Menu
Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

List Bucket Analytics Configurations

Description

This implementation of the GET operation returns a list of analytics configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.

This operation supports list pagination and does not return more than 100 configurations at a time. You should always check the IsTruncated element in the response. If there are no more configurations to list, IsTruncated is set to false. If there are more configurations to list, IsTruncated is set to true, and there will be a value in NextContinuationToken. You use the NextContinuationToken value to continue the pagination of the list by passing the value in continuation-token in the request to GET the next page.

To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the Amazon Simple Storage Service Developer Guide.

For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class Analysis in the Amazon Simple Storage Service Developer Guide.

Requests

Syntax

Copy to clipboard
GET /?analytics HTTP/1.1 Host: BucketName.s3.amazonaws.com Date: date Authorization: authorization string (see Authenticating Requests (AWS Signature Version 4))

Request Parameters

This implementation of GET uses the parameters in the following table.

Parameter Description Required
continuation-token

When the Amazon S3 response to this API call is truncated (that is, when the IsTruncated response element value is true), the response also includes the NextContinuationToken element, the value of which you can use in the next request as the continuation-token to list the next page. The continuation token is an opaque value that Amazon S3 understands.

Type: String

Default: None

No

Request Elements

This implementation of the operation does not use request elements.

Request Headers

This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.

Responses

Response Headers

This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.

Response Elements

Name Description
ContinuationToken

The marker that is used as a starting point for this analytics configuration list response. This value is present if it was sent in the request.

Type: String

Ancestor: ListBucketAnalyticsConfigurationsResult

IsTruncated

Indicates whether the returned list of analytics configurations is complete. A value of true indicates that the list is not complete and the NextContinuationToken is provided for a subsequent request.

Type: Boolean

Ancestor: ListAnalyticsConfigurationsResult

AnalyticsConfiguration

Contains the analytics configuration. For the XML structure, see GET Bucket analytics.

Type: Container

Ancestor: ListAnalyticsConfigurationsResult

ListAnalyticsConfigurationsResult

The list of analytics configurations for a bucket.

Type: Container

NextContinuationToken

The marker used to continue an analytics configuration listing that has been truncated. Use the NextContinuationToken from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.

Type: String

Ancestor: ListBucketAnalyticsConfigurationsResult

Special Errors

This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.

Examples

Example 1: Listing Analytics Configurations

The following request returns the analytics configurations in example-bucket.

Sample Request

Copy to clipboard
GET /?analytics HTTP/1.1 Host: example-bucket.s3.amazonaws.com x-amz-date: 20160430T233541Z Authorization: authorization string

Sample Response

Copy to clipboard
HTTP/1.1 200 OK x-amz-id-2: gyB+3jRPnrkN98ZajxHXr3u7EFM67bNgSAxexeEHndCX/7GRnfTXxReKUQF28IfP x-amz-request-id: 3B3C7C725673C630 Date: Sat, 30 Apr 2016 23:29:37 GMT Content-Length: length Server: AmazonS3 <ListBucketAnalyticsConfigurationResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <AnalyticsConfiguration> <Id>list1</Id> <Filter> <And> <Prefix>images/</Prefix> <Tag> <Key>dog</Key> <Value>corgi</Value> </Tag> </And> </Filter> <StorageClassAnalysis> <DataExport> <OutputSchemaVersion>V_1</OutputSchemaVersion> <Destination> <S3BucketDestination> <Format>CSV</Format> <BucketAccountId>123456789012</BucketAccountId> <Bucket>arn:aws:s3:::destination-bucket</Bucket> <Prefix>destination-prefix</Prefix> </S3BucketDestination> </Destination> </DataExport> </StorageClassAnalysis> </AnalyticsConfiguration> <AnalyticsConfiguration> <Id>report1</Id> <Filter> <And> <Prefix>images/</Prefix> <Tag> <Key>dog</Key> <Value>bulldog</Value> </Tag> </And> </Filter> <StorageClassAnalysis> <DataExport> <OutputSchemaVersion>V_1</OutputSchemaVersion> <Destination> <S3BucketDestination> <Format>CSV</Format> <BucketAccountId>123456789012</BucketAccountId> <Bucket>arn:aws:s3:::destination-bucket</Bucket> <Prefix>destination-prefix</Prefix> </S3BucketDestination> </Destination> </DataExport> </StorageClassAnalysis> </AnalyticsConfiguration> ... <IsTruncated>false</IsTruncated> <!-- If ContinuationToken was provided in the request. --> <ContinuationToken>...</ContinuationToken> <!-- if IsTruncated == true --> <IsTruncated>true</IsTruncated> <NextContinuationToken>...</NextContinuationToken> </ListBucketAnalyticsConfigurationResult>

For an example of using the ContinuationToken with a list, see Example 4: Using a Continuation Token.