Skip to content

CloudWatchLogsClient.tag_resource

rboto-cloudwatch-logs==0.4.0 · Service index · Types

Model summary (excerpt): Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs resource. Currently, the only CloudWatch Logs resources that can be tagged are log groups and destinations. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Tags don't have...

Install and imports

python -m pip install "rboto[cloudwatch-logs]==0.4.0"
from rboto import CloudWatchLogsClient

Signature

async def tag_resource(
    *,
    resource_arn: str,
    tags: dict[str, str],
) -> None: ...

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_arn Yes The ARN of the resource that you're adding tags to. The ARN format of a log group is arn:aws:logs: Region : account-id :log-group: log-group-name The ARN format of a destination is arn:aws:logs: Region : account-id :destination: destination-name For more information about ARN format, see CloudWatch Logs resources and operations .
tags Yes The list of key-value pairs to associate with the resource.

Output

None.

| 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.

—

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_cloudwatch_logs.exceptions:

InvalidParameterError, ResourceNotFoundError, ServiceUnavailableError, TooManyTagsError.

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

Service guide · Pinned model