ruby/example_code/sqs/sqs-ruby-example-show-queues.rb
# Full example call:
# Replace us-west-2 with the AWS Region you're using for Amazon SQS.

Full example call:
Replace us-west-2 with the AWS Region you're using for Amazon SQS.
Full example call : Replace us - west - 2 with the AWS Region you ' re using for Amazon SQS .
def run_me
  region = 'us-west-2'
  queue_name = 'my-queue'
  sqs_client = Aws::SQS::Client.new(region: region)
  puts 'Listing available queue URLs...'
  list_queue_urls(sqs_client)
  sts_client = Aws::STS::Client.new(region: region)
  queue_url = 'https://sqs.' + region + '.amazonaws.com/' +
    sts_client.get_caller_identity.account + '/' + queue_name
  puts "\nGetting information about queue '#{queue_name}'..."
  list_queue_attributes(sqs_client, queue_url)
end
def run_me region = 'us-west-2' queue_name = 'my-queue' sqs_client = Aws :: SQS :: Client . new ( region : region ) puts 'Listing available queue URLs...' list_queue_urls ( sqs_client ) sts_client = Aws :: STS :: Client . new ( region : region ) queue_url = 'https://sqs.' + region + '.amazonaws.com/' + sts_client . get_caller_identity . account + '/' + queue_name puts "\nGetting information about queue '#{queue_name}'..." list_queue_attributes ( sqs_client , queue_url ) end
Full example call:
Replace us-west-2 with the AWS Region you're using for Amazon SQS.
Full example call : Replace us - west - 2 with the AWS Region you ' re using for Amazon SQS .
# For example:
 # 'https://sqs.us-west-2.amazonaws.com/111111111111/my-queue'
