RAM / Client / tag_resource

tag_resource#

RAM.Client.tag_resource(**kwargs)#

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(
    resourceShareArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    resourceArn='string'
)
Parameters:
  • 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) –

    [REQUIRED]

    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:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions