add_tags¶
Operation¶
add_tags
¶
add_tags(request: AddTagsInput | AddTagsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[AddTagsInputDict]) -> AddTagsOutput
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 tag a trail or event data store that applies to all Amazon Web Services Regions only from the Region in which the trail or event data store was created (also known as its home Region).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
AddTagsInput | AddTagsInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[AddTagsInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
AddTagsOutput
|
An instance of |
add_tags
async
¶
add_tags(request: AddTagsInput | AddTagsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[AddTagsInputDict]) -> AddTagsOutput
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 tag a trail or event data store that applies to all Amazon Web Services Regions only from the Region in which the trail or event data store was created (also known as its home Region).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
AddTagsInput | AddTagsInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[AddTagsInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
AddTagsOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
AddTagsInputDict
¶
Bases: TypedDict
Dictionary form of AddTagsInput.
Attributes¶
resource_id
instance-attribute
¶
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:
arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash
The format of a channel ARN is:
arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
AddTagsInput
dataclass
¶
Bases: _SerdeShape
Specifies the tags to add to a trail, event data store, dashboard, or channel.
Attributes¶
resource_id
class-attribute
instance-attribute
¶
resource_id: str | None = ...
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:
arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash
The format of a channel ARN is:
arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
Output¶
AddTagsOutput
dataclass
¶
Bases: _SerdeShape
Returns the objects or data if successful. Otherwise, returns an error.