AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Lists all tags currently on a named 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 ElastiCache resources, with the exception of global replication group. When you add or remove tags on replication groups, those actions will be replicated to all nodes in the replication group. For more information, see Resource-level permissions.
If the cluster is not in the available state, ListTagsForResource
returns
an error.
For .NET Core this operation is only available in asynchronous form. Please refer to ListTagsForResourceAsync.
Namespace: Amazon.ElastiCache
Assembly: AWSSDK.ElastiCache.dll
Version: 3.x.y.z
public abstract ListTagsForResourceResponse ListTagsForResource( ListTagsForResourceRequest request )
Container for the necessary parameters to execute the ListTagsForResource service method.
Exception | Condition |
---|---|
CacheClusterNotFoundException | The requested cluster ID does not refer to an existing cluster. |
CacheParameterGroupNotFoundException | The requested cache parameter group name does not refer to an existing cache parameter group. |
CacheSecurityGroupNotFoundException | The requested cache security group name does not refer to an existing cache security group. |
CacheSubnetGroupNotFoundException | The requested cache subnet group name does not refer to an existing cache subnet group. |
InvalidARNException | The requested Amazon Resource Name (ARN) does not refer to an existing resource. |
InvalidReplicationGroupStateException | The requested replication group is not in the available state. |
InvalidServerlessCacheSnapshotStateException | The state of the serverless cache snapshot was not received. Available for Redis only. |
InvalidServerlessCacheStateException | The account for these credentials is not currently active. |
ReplicationGroupNotFoundException | The specified replication group does not exist. |
ReservedCacheNodeNotFoundException | The requested reserved cache node was not found. |
ServerlessCacheNotFoundException | The serverless cache was not found or does not exist. |
ServerlessCacheSnapshotNotFoundException | This serverless cache snapshot could not be found or does not exist. Available for Redis only. |
SnapshotNotFoundException | The requested snapshot name does not refer to an existing snapshot. |
UserGroupNotFoundException | The user group was not found or does not exist |
UserNotFoundException | The user does not exist or could not be found. |
Lists all cost allocation tags currently on the named resource. A cost allocation tag is a key-value pair where the key is case-sensitive and the value is optional. You can use cost allocation tags to categorize and track your AWS costs.
var client = new AmazonElastiCacheClient(); var response = client.ListTagsForResource(new ListTagsForResourceRequest { ResourceName = "arn:aws:elasticache:us-west-2:<my-account-id>:cluster:mycluster" }); List<Tag> tagList = response.TagList;
.NET Framework:
Supported in: 4.5, 4.0, 3.5