Use GetBucketAnalyticsConfiguration
with a CLI
The following code examples show how to use GetBucketAnalyticsConfiguration
.
- AWS CLI
-
To retrieve the analytics configuration for a bucket with a specific ID
The following
get-bucket-analytics-configuration
example displays the analytics configuration for the specified bucket and ID.aws s3api get-bucket-analytics-configuration \ --bucket
amzn-s3-demo-bucket
\ --id1
Output:
{ "AnalyticsConfiguration": { "StorageClassAnalysis": {}, "Id": "1" } }
-
For API details, see GetBucketAnalyticsConfiguration
in AWS CLI Command Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Developing with Amazon S3 using the AWS SDKs. This topic also includes information about getting started and details about previous SDK versions.