#NEWLINE# def absent( name , region , user = None , opts = False ) : #NEWLINE# #INDENT# '\n    Remove the named SQS queue if it exists.\n\n    name\n        Name of the SQS queue.\n\n    region\n        Region to remove the queue from\n\n    user\n        Name of the user performing the SQS operations\n\n    opts\n        Include additional arguments and options to the aws command line\n    ' #NEWLINE# ret = { #NEWLINE# #INDENT# 'name' : name , #NEWLINE# 'result' : True , #NEWLINE# 'comment' : '' , #NEWLINE# 'changes' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# does_exist = __salt__ [ 'aws_sqs.queue_exists' ] ( name , region , opts , user ) #NEWLINE# if does_exist : #NEWLINE# #INDENT# if __opts__ [ 'test' ] : #NEWLINE# #INDENT# ret [ 'result' ] = None #NEWLINE# ret [ 'comment' ] = 'AWS SQS queue {0} is set to be removed' . format ( name ) #NEWLINE# return ret #NEWLINE# #UNINDENT# removed = __salt__ [ 'aws_sqs.delete_queue' ] ( name , region , opts , removed ) #NEWLINE# if ( removed [ 'retcode' ] == 0 ) : #NEWLINE# #INDENT# ret [ 'changes' ] [ 'removed' ] = removed [ 'stdout' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ret [ 'result' ] = False #NEWLINE# ret [ 'comment' ] = removed [ 'stderr' ] #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# ret [ 'comment' ] = '{0} does not exist in {1}' . format ( name , region ) #NEWLINE# #UNINDENT# return ret