def delete_queue(name, region, opts=None, user=None):
 queues = list_queues(region, opts, user)
 url_map = _parse_queue_list(queues)
 logger = logging.getLogger(__name__)
 logger.debug(('map ' + six.text_type(url_map)))
 if (name in url_map):
  delete = {'queue-url': url_map[name]}
  rtn = _run_aws('delete-queue', region=region, opts=opts, user=user, **delete)
  success = True
  err = ''
  out = '{0} deleted'.format(name)
 else:
  out = ''
  err = 'Delete failed'
  success = False
 ret = {'retcode': (0 if success else 1), 'stdout': out, 'stderr': err}
 return ret

def delete_queue ( name , region , opts = None , user = None ) : queues = list_queues ( region , opts , user ) url_map = _parse_queue_list ( queues ) logger = logging . getLogger ( __name__ ) logger . debug ( ( 'map ' + six . text_type ( url_map ) ) ) if ( name in url_map ) : delete = { 'queue-url' : url_map [ name ] } rtn = _run_aws ( 'delete-queue' , region = region , opts = opts , user = user , ** delete ) success = True err = '' out = '{0} deleted' . format ( name ) else : out = '' err = 'Delete failed' success = False ret = { 'retcode' : ( 0 if success else 1 ) , 'stdout' : out , 'stderr' : err } return ret
deletes a queue in the region .