tag_resource
async
¶
tag_resource(
resource_arn: String,
tags: TagList,
*,
config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
) -> TagResourceResponse
Use this operation to add tags to a resource. A tag is a key-value pair where the key and value are case-sensitive. You can use tags to categorize and track all your MemoryDB resources. For more information, see Tagging your MemoryDB resources.
When you add tags to multi region clusters, you might not immediately see the latest effective tags in the ListTags API response due to it being eventually consistent specifically for multi region clusters. For more information, see Tagging your MemoryDB resources.
You can specify cost-allocation tags for your MemoryDB resources, Amazon generates a cost allocation report as a comma-separated value (CSV) file with your usage and costs aggregated by your tags. You can apply tags that represent business categories (such as cost centers, application names, or owners) to organize your costs across multiple services. For more information, see Using Cost Allocation Tags.
Parameters:
-
resource_arn(String) –The Amazon Resource Name (ARN) of the resource to which the tags are to be added.
-
tags(TagList) –A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
Raises:
-
ACLNotFoundFault–The specified ACL does not exist.
-
ClusterNotFoundFault–The specified cluster does not exist.
-
InvalidARNFault–The specified Amazon Resource Name (ARN) is not valid.
-
InvalidClusterStateFault–The cluster is not in a valid state for the requested operation.
-
InvalidParameterValueException–The specified parameter value is not valid.
-
MultiRegionClusterNotFoundFault–The specified multi-Region cluster does not exist.
-
MultiRegionParameterGroupNotFoundFault–The specified multi-Region parameter group does not exist.
-
ParameterGroupNotFoundFault–The specified parameter group does not exist.
-
ServiceLinkedRoleNotFoundFault–The required service-linked role was not found.
-
SnapshotNotFoundFault–The specified snapshot does not exist.
-
SubnetGroupNotFoundFault–The specified subnet group does not exist.
-
TagQuotaPerResourceExceeded–The request cannot be processed because it would exceed the maximum number of tags allowed per resource.
-
UserNotFoundFault–The specified user does not exist.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_memorydb/_services/async_memory_db.py
3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 | |