tag_resource
¶
tag_resource(
resource_arn: String,
tags: TagList,
*,
config_overrides: Optional[MemoryDBClientConfig] = 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/memory_db.py
3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 | |