Skip to content

CloudTrailClient.add_tags

rboto-cloudtrail==0.4.0 · Service index · Types

Model summary (excerpt): Adds one or more tags to a trail, event data store, dashboard, or channel, up to a limit of 50. Overwrites an existing tag's value when a new value is specified for an existing tag key. Tag key names must be unique; you cannot have two keys with the same name but different values. If you specify a key without a value, the tag will be created with the specified key and a value of null. You can...

Install and imports

python -m pip install "rboto[cloudtrail]==0.4.0"
from rboto import CloudTrailClient
from collections.abc import Sequence
from rboto_cloudtrail.types import (
    AddTagsOutput,
    Tag,
)

Signature

async def add_tags(
    *,
    resource_id: str,
    tags_list: Sequence[Tag],
) -> AddTagsOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
resource_id Yes Specifies the ARN of the trail, event data store, dashboard, or channel to which one or more tags will be added. The format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail The format of an event data store ARN is: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE The format of a dashboard ARN is:...
tags_list Yes Contains a list of tags, up to a limit of 50

Output

AddTagsOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

No fields.

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

AddTagsOutput, Tag

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_cloudtrail.exceptions:

ChannelARNInvalidError, ChannelNotFoundError, CloudTrailARNInvalidError, ConflictError, EventDataStoreARNInvalidError, EventDataStoreNotFoundError, InactiveEventDataStoreError, InvalidTagParameterError, InvalidTrailNameError, NoManagementAccountSLRExistsError, NotOrganizationMasterAccountError, OperationNotPermittedError, ResourceNotFoundError, ResourceTypeNotSupportedError, TagsLimitExceededError, UnsupportedOperationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model