Method: Aws::SQS::Client#tag_queue

Defined in:
lib/aws-sdk-sqs/client.rb

#tag_queue(params = {}) ⇒ Struct

Add cost allocation tags to the specified Amazon SQS queue. For an overview, see [Tagging Your Amazon SQS Queues] in the *Amazon SQS Developer Guide*.

When you use queue tags, keep the following guidelines in mind:

  • Adding more than 50 tags to a queue isn’t recommended.

  • Tags don’t have any semantic meaning. Amazon SQS interprets tags as character strings.

  • Tags are case-sensitive.

  • A new tag with a key identical to that of an existing tag overwrites the existing tag.

For a full list of tag restrictions, see [Quotas related to queues] in the *Amazon SQS Developer Guide*.

<note markdown=“1”> Cross-account permissions don’t apply to this action. For more information, see [Grant cross-account permissions to a role and a username] in the *Amazon SQS Developer Guide*.

</note>

[1]: docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html [2]: docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues [3]: docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name

Examples:

Request syntax with placeholder values


resp = client.tag_queue({
  queue_url: "String", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :queue_url (required, String)

    The URL of the queue.

  • :tags (required, Hash<String,String>)

    The list of tags to be added to the specified queue.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2924
2925
2926
2927
# File 'lib/aws-sdk-sqs/client.rb', line 2924

def tag_queue(params = {}, options = {})
  req = build_request(:tag_queue, params)
  req.send_request(options)
end