| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
To list the distributions associated with your AWS account, you do a GET on the 2012-07-01/distribution
resource. The response includes a DistributionList element with zero or more DistributionSummary
child elements, each of which corresponds with a distribution. By default, your entire list of distributions is returned
in one page. If the list is long, you can paginate it using the MaxItems and Marker
parameters.
GET /2012-07-01/distribution?Marker=value&MaxItems=valueHTTP/1.1 Host: cloudfront.amazonaws.com Authorization:AWS authentication stringDate:time stampOther required headers
The request must include the headers required in all CloudFront requests. For more information, see Common REST Headers.
| Name | Description | Required |
|---|---|---|
|
|
Use this when paginating results to indicate where to begin in your list of distributions. The results
include distributions in the list that occur after the marker. To get the next page of
results, set the Type: String Default: All your distributions are listed from the beginning | No |
|
|
The maximum number of distributions you want in the response body. Type: String with a maximum value of 100 Default: 100 | No |
200 OK x-amz-request-id:Request ID<?xml version="1.0" encoding="UTF-8"?> <DistributionList xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/"> <Marker>value specified in request</Marker> <NextMarker>value for Marker parameter in next request</NextMarker> <MaxItems>value specified in request</MaxItems> <IsTruncated>true | false</IsTruncated> <Quantity>number of distributions created by current AWS account</Quantity> <Items> <DistributionSummary> <Id>ID for the distribution</Id> <Status>Deployed | InProgress</Status> <LastModifiedTime>creation date and time in ISO 8601 format</LastModifiedTime> <DomainName>CloudFront domain name assigned to the distribution</DomainName> <Aliases> <Quantity>number of CNAME aliases</Quantity> <Items> <CNAME>CNAME alias</CNAME> </Items> </Aliases> <Origins> <Quantity>number of origins</Quantity> <Items> <Origin> <Id>unique identifier for this origin</Id> <DomainName>domain name of origin</DomainName> <!-- The S3OriginConfig element is returned only if you use an Amazon S3 origin for your distribution. --> <S3OriginConfig> <OriginAccessIdentity>origin-access-identity/ cloudfront/ID</OriginAccessIdentity> </S3OriginConfig> <!-- The CustomOriginConfig element is returned only if you use a custom origin for your distribution. --> <CustomOriginConfig> <HTTPPort>HTTP port that the custom origin listens on</HTTPPort> <HTTPSPort>HTTPS port that the custom origin listens on</HTTPSPort> <OriginProtocolPolicy>http-only | match-viewer</OriginProtocolPolicy> </CustomOriginConfig> </Origin> </Items> </Origins> <DefaultCacheBehavior> <TargetOriginId>ID of the origin that the default cache behavior applies to</TargetOriginId> <ForwardedValues> <QueryString>true | false</QueryString> <Cookies> <Forward>all | whitelist | none</Forward> <!-- Required when Forward = whitelist, omitted otherwise. --> <WhitelistedNames> <Quantity>number of cookie names to forward to origin</Quantity> <Items> <Name>name of a cookie to forward to the origin</Name> </Items> </WhitelistedNames> </Cookies> </ForwardedValues> <TrustedSigners> <Enabled>true | false</Enabled> <Quantity>number of trusted signers</Quantity> <Items> <AwsAccountNumber>self |AWS account that can create signed URLs</AwsAccountNumber> </Items> </TrustedSigners> <ViewerProtocolPolicy>allow-all | https-only</ViewerProtocolPolicy> <MinTTL>minimum TTL in seconds</MinTTL> </DefaultCacheBehavior> <CacheBehaviors> <Quantity>number of cache behaviors</Quantity> <Items> <CacheBehavior> <PathPattern>pattern that specifies files that this cache behavior applies to</PathPattern> <TargetOriginId>ID of the origin that this cache behavior applies to</TargetOriginId> <ForwardedValues> <QueryString>true | false</QueryString> <Cookies> <Forward>all | whitelist | none</Forward> <!-- Required when Forward = whitelist, omitted otherwise. --> <WhitelistedNames> <Quantity>number of cookie names to forward to origin</Quantity> <Items> <Name>name of a cookie to forward to the origin</Name> </Items> </WhitelistedNames> </Cookies> </ForwardedValues> <TrustedSigners> <Enabled>true | false</Enabled> <Quantity>number of trusted signers</Quantity> <Items> <AwsAccountNumber>self |AWS account that can create signed URLs</AwsAccountNumber> </Items> </TrustedSigners> <ViewerProtocolPolicy>allow-all | https-only</ViewerProtocolPolicy> <MinTTL>minimum TTL in seconds for files specified by PathPattern</MinTTL> </CacheBehavior> </Items> </CacheBehaviors> <Comment>comment about the distribution</Comment> <PriceClass>maximum price class for the distribution</PriceClass> <Enabled>true | false</Enabled> </DistributionSummary> </Items> </DistributionList>
The body of the response includes an XML document with a DistributionList
element. The following table lists the child elements of the
DistributionList element.
| Name | Description |
|---|---|
|
|
The value you provided for the Type: String Parent: DistributionList |
|
|
If Type: String Parent: DistributionList |
|
|
The value you provided for the Type: String Parent: DistributionList |
|
|
A flag that indicates whether more distributions remain to be listed.
If your results were truncated, you can make a follow-up pagination
request using the Type: String Valid Values: Parent: DistributionList |
|
|
The number of distributions that were created by the current AWS account. Type: String Parent: DistributionList |
|
|
A complex type that contains one Type: Complex Child: DistributionSummary Parent: DistributionList |
|
|
Type: An XML structure containing a summary of the distribution. For information about the child elements, see Distribution Complex Type. Parent: Items |
The action returns no special errors besides the common errors that all actions return. For more information, see Errors).
The following example request lists the first two of your ten distributions.
GET /2012-07-01/distribution?MaxItems=2 HTTP/1.1 Host: cloudfront.amazonaws.com Authorization:AWS authentication stringDate: Thu, 17 May 2012 19:37:58 GMTOther required headers
200 OK
x-amz-request-id: request_id
<?xml version="1.0" encoding="UTF-8"?>
<DistributionList xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/">
<Marker>RMPARXS293KSTG7</Marker>
<NextMarker>EMLARXS9EXAMPLE</NextMarker>
<MaxItems>2</MaxItems>
<IsTruncated>true</IsTruncated>
<Quantity>1</Quantity>
<Items>
<DistributionSummary>
<Id>EDFDVBD6EXAMPLE</Id>
<Status>Deployed</Status>
<LastModifiedTime>2012-05-19T19:37:58Z</LastModifiedTime>
<DomainName>d111111abcdef8.cloudfront.net</DomainName>
<Aliases>
<Quantity>1</Quantity>
<Items>
<CNAME>www.example.com</CNAME>
</Items>
</Aliases>
<Origins>
<Quantity>2</Quantity>
<Items>
<Origin>
<Id>example-Amazon S3-origin</Id>
<DomainName>myawsbucket.s3.amazonaws.com</DomainName>
<S3OriginConfig>
<OriginAccessIdentity>origin-access-identity/cloudfront/E74FTE3AEXAMPLE</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
<Origin>
<Id>example-custom-origin</Id>
<DomainName>example.com</DomainName>
<CustomOriginConfig>
<HTTPPort>80</HTTPPort>
<HTTPSPort>443</HTTPSPort>
<OriginProtocolPolicy>match-viewer</OriginProtocolPolicy>
</CustomOriginConfig>
</Origin>
</Items>
</Origins>
<DefaultCacheBehavior>
<TargetOriginId>example-Amazon S3-origin</TargetOriginId>
<ForwardedValues>
<QueryString>true</QueryString>
<Cookies>
<Forward>whitelist</Forward>
<WhitelistedNames>
<Quantity>1</Quantity>
<Items>
<Name>example-cookie</Name>
</Items>
</WhitelistedNames>
</Cookies>
</ForwardedValues>
<TrustedSigners>
<Enabled>true</Enabled>
<Quantity>3</Quantity>
<Items>
<AwsAccountNumber>self</AwsAccountNumber>
<AwsAccountNumber>111122223333</AwsAccountNumber>
<AwsAccountNumber>444455556666</AwsAccountNumber>
</Items>
</TrustedSigners>
<ViewerProtocolPolicy>https-only</ViewerProtocolPolicy>
<MinTTL>0</MinTTL>
</DefaultCacheBehavior>
<CacheBehaviors>
<Quantity>1</Quantity>
<Items>
<CacheBehavior>
<PathPattern>*.jpg</PathPattern>
<TargetOriginId>example-custom-origin</TargetOriginId>
<ForwardedValues>
<QueryString>false</QueryString>
<Cookies>
<Forward>all</Forward>
</Cookies>
</ForwardedValues>
<TrustedSigners>
<Enabled>true</Enabled>
<Quantity>2</Quantity>
<Items>
<AwsAccountNumber>self</AwsAccountNumber>
<AwsAccountNumber>111122223333</AwsAccountNumber>
</Items>
</TrustedSigners>
<ViewerProtocolPolicy>allow-all</ViewerProtocolPolicy>
<MinTTL>86400</MinTTL>
</CacheBehavior>
</Items>
</CacheBehaviors>
<Comment>example comment</Comment>
<PriceClass>PriceClass_All</PriceClass>
<Enabled>true</Enabled>
</DistributionSummary>
</Items>
</DistributionList>The following example request gets the next four distributions in your list.
GET /2012-07-01/distribution?MaxItems=4?Marker=EMLARXS9EXAMPLE HTTP/1.1 Host: cloudfront.amazonaws.com Authorization:AWS authentication stringDate: Thu, 17 May 2012 19:39:00 GMTOther required headers