GameLift / Client / tag_resource

tag_resource#

GameLift.Client.tag_resource(**kwargs)#

Assigns a tag to an Amazon GameLift resource. You can use tags to organize resources, create IAM permissions policies to manage access to groups of resources, customize Amazon Web Services cost breakdowns, and more. This operation handles the permissions necessary to manage tags for Amazon GameLift resources that support tagging.

To add a tag to a resource, specify the unique ARN value for the resource and provide a tag list containing one or more tags. The operation succeeds even if the list includes tags that are already assigned to the resource.

Learn more

Tagging Amazon Web Services Resources in the Amazon Web Services General Reference

Amazon Web Services Tagging Strategies

Related actions

All APIs by task

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceARN='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • ResourceARN (string) –

    [REQUIRED]

    The Amazon Resource Name ( ARN) that uniquely identifies the Amazon GameLift resource that you want to assign tags to. Amazon GameLift includes resource ARNs in the data object for the resource. You can retrieve the ARN by calling a List or Describe operation for the resource type.

  • Tags (list) –

    [REQUIRED]

    A list of one or more tags to assign to the specified Amazon GameLift resource. Tags are developer-defined and structured as key-value pairs. The maximum tag limit may be lower than stated. See Tagging Amazon Web Services Resources for tagging limits.

    • (dict) –

      A label that you can assign to a Amazon GameLift resource.

      Learn more

      Tagging Amazon Web Services Resources in the Amazon Web Services General Reference

      Amazon Web Services Tagging Strategies

      Related actions

      All APIs by task

      • Key (string) – [REQUIRED]

        The key for a developer-defined key value pair for tagging an Amazon Web Services resource.

      • Value (string) – [REQUIRED]

        The value for a developer-defined key value pair for tagging an Amazon Web Services resource.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions