RAM / Client / tag_resource



Adds the specified tag keys and values to a resource share or managed permission. If you choose a resource share, the tags are attached to only the resource share, not to the resources that are in the resource share.

The tags on a managed permission are the same for all versions of the managed permission.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
            'key': 'string',
            'value': 'string'
  • resourceShareArn (string) – Specifies the Amazon Resource Name (ARN) of the resource share that you want to add tags to. You must specify either resourceShareArn, or resourceArn, but not both.

  • tags (list) –


    A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.

    • (dict) –

      A structure containing a tag. A tag is metadata that you can attach to your resources to help organize and categorize them. You can also use them to help you secure your resources. For more information, see Controlling access to Amazon Web Services resources using tags.

      For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.

      • key (string) –

        The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

      • value (string) –

        The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

  • resourceArn (string) – Specifies the Amazon Resource Name (ARN) of the managed permission that you want to add tags to. You must specify either resourceArn, or resourceShareArn, but not both.

Return type:



Response Syntax


Response Structure

  • (dict) –


  • RAM.Client.exceptions.InvalidParameterException

  • RAM.Client.exceptions.MalformedArnException

  • RAM.Client.exceptions.UnknownResourceException

  • RAM.Client.exceptions.TagLimitExceededException

  • RAM.Client.exceptions.ResourceArnNotFoundException

  • RAM.Client.exceptions.TagPolicyViolationException

  • RAM.Client.exceptions.ServerInternalException

  • RAM.Client.exceptions.ServiceUnavailableException