Retrieve AWS resource tags for a configuration
You retrieve the tags for a configuration with the ListTagsForResource
operation, which returns the current tag set for the configuration's ARN. You can retrieve
resource tags by using the Amazon S3 console, the AWS CLI, or the AWS SDKs.
In the Amazon S3 console, you view a configuration's tags on the dashboard configuration details page.
To view a configuration's tags
Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/
. -
In the left navigation pane, choose Storage Lens, and then choose the Table buckets tab.
-
Choose the dashboard, and then choose View dashboard configuration.
-
In the General section, review the tags that are applied to the configuration.
Example
The following example command retrieves the tags for an Amazon S3 Storage Lens for
Tables configuration. To use this example, replace the with your own information.user input
placeholders
aws s3tables list-tags-for-resource --resource-arn=arn:aws:s3tables:us-east-1:222222222222:storage-lens/your-configuration-id
The following example retrieves the tags for an Amazon S3 Storage Lens for Tables
configuration in SDK for Java. To use this example, replace the with your own information.user input
placeholders
Example– Get tags for an Amazon S3 Storage Lens for Tables configuration
import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.s3tables.S3TablesClient; import software.amazon.awssdk.services.s3tables.model.ListTagsForResourceRequest; import software.amazon.awssdk.services.s3tables.model.ListTagsForResourceResponse; public class GetStorageLensTags { public static void main(String[] args) { String resourceArn = "arn:aws:s3tables:us-east-1:111122223333:storage-lens/your-configuration-id"; try (S3TablesClient s3TablesClient = S3TablesClient.builder() .region(Region.US_EAST_1) .build()) { ListTagsForResourceResponse response = s3TablesClient.listTagsForResource( ListTagsForResourceRequest.builder() .resourceArn(resourceArn) .build()); System.out.println(response.tags()); } } }