OpsWorks / Client / tag_resource

tag_resource#

OpsWorks.Client.tag_resource(**kwargs)#

Apply cost-allocation tags to a specified stack or layer in OpsWorks Stacks. For more information about how tagging works, see Tags in the OpsWorks User Guide.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceArn='string',
    Tags={
        'string': 'string'
    }
)
Parameters:
  • ResourceArn (string) –

    [REQUIRED]

    The stack or layer’s Amazon Resource Number (ARN).

  • Tags (dict) –

    [REQUIRED]

    A map that contains tag keys and tag values that are attached to a stack or layer.

    • The key cannot be empty.

    • The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

    • The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

    • Leading and trailing white spaces are trimmed from both the key and value.

    • A maximum of 40 tags is allowed for any resource.

    • (string) –

      • (string) –

Returns:

None

Exceptions

  • OpsWorks.Client.exceptions.ValidationException

  • OpsWorks.Client.exceptions.ResourceNotFoundException