AWS Elastic Beanstalk

2017/10/12 - AWS Elastic Beanstalk - 2 new api methods

Changes  Added the ability to add, delete or update Tags

UpdateTagsForResource (new) Link ¶

Update the list of tags applied to an AWS Elastic Beanstalk resource. Two lists can be passed: TagsToAdd for tags to add or update, and TagsToRemove .

Currently, Elastic Beanstalk only supports tagging of Elastic Beanstalk environments.

See also: AWS API Documentation

Request Syntax

client.update_tags_for_resource(
    ResourceArn='string',
    TagsToAdd=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    TagsToRemove=[
        'string',
    ]
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resouce to be updated.

Must be the ARN of an Elastic Beanstalk environment.

type TagsToAdd

list

param TagsToAdd

A list of tags to add or update.

If a key of an existing tag is added, the tag's value is updated.

  • (dict) --

    Describes a tag applied to a resource in an environment.

    • Key (string) --

      The key of the tag.

    • Value (string) --

      The value of the tag.

type TagsToRemove

list

param TagsToRemove

A list of tag keys to remove.

If a tag key doesn't exist, it is silently ignored.

  • (string) --

returns

None

ListTagsForResource (new) Link ¶

Returns the tags applied to an AWS Elastic Beanstalk resource. The response contains a list of tag key-value pairs.

Currently, Elastic Beanstalk only supports tagging Elastic Beanstalk environments.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    ResourceArn='string'
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resouce for which a tag list is requested.

Must be the ARN of an Elastic Beanstalk environment.

rtype

dict

returns

Response Syntax

{
    'ResourceArn': 'string',
    'ResourceTags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • ResourceArn (string) --

      The Amazon Resource Name (ARN) of the resouce for which a tag list was requested.

    • ResourceTags (list) --

      A list of tag key-value pairs.

      • (dict) --

        Describes a tag applied to a resource in an environment.

        • Key (string) --

          The key of the tag.

        • Value (string) --

          The value of the tag.