| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
To get a distribution's configuration information, you do a GET on the
2013-05-12/distribution/distribution ID/config resource.
GET /2013-05-12/distribution/distribution ID/config HTTP/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.
200 OK ETag:ETag value to use later when doing a PUT on the configx-amz-request-id:Request ID<?xml version="1.0" encoding="UTF-8"?> <DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2013-05-12/"> <CallerReference>unique description for this distribution config</CallerReference> <Aliases> <Quantity>number of CNAME aliases</Quantity> <!-- Optional. Omit when Quantity = 0. --> <Items> <CNAME>CNAME alias</CNAME> </Items> </Aliases> <DefaultRootObject>URL for default root object</DefaultRootObject> <Origins> <Quantity>number of origins</Quantity> <Items> <Origin> <Id>unique identifier for this origin</Id> <DomainName>domain name of origin</DomainName> <!-- CloudFront returns the S3OriginConfig element only if you use an Amazon S3 origin for your distribution. --> <S3OriginConfig> <OriginAccessIdentity>origin-access-identity/ cloudfront/ID</OriginAccessIdentity> </S3OriginConfig> <!-- CloudFront returns the CustomOriginConfig element only if you use an Amazon S3 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> <!-- Optional. Omit when Quantity = 0. --> <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> <!-- Optional. Omit when Quantity = 0. --> <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> <!-- Optional. Omit when Quantity = 0. --> <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> <Logging> <Enabled>true | false</Enabled> <IncludeCookies>true | false</IncludeCookies> <Bucket>Amazon S3 bucket to save logs in</Bucket> <Prefix>prefix for log filenames</Prefix> </Logging> <ViewerCertificate> <IAMCertificateId>IAM certificate ID</IAMCertificateId> | <CloudFrontDefaultCertificate>true</CloudFrontDefaultCertificate> </ViewerCertificate> <PriceClass>maximum price class for the distribution</PriceClass> <Enabled>true | false</Enabled> </DistributionConfig>
| Name | Description |
|---|---|
| The current version of the configuration, for example, Type: String |
| Name | Description |
|---|---|
| The distribution's configuration information. For more information, see DistributionConfig Complex Type. Type: |
The following table lists the special errors returned in addition to the common errors all actions return. For more information, see Errors.
| Error | Description | HTTP Status Code |
|---|---|---|
| The specified distribution does not exist. | 404 |
The following example request gets the configuration information for the EDFDVBD6EXAMPLE distribution.
GET /2013-05-12/distribution/EDFDVBD6EXAMPLE/config HTTP/1.1 Host: cloudfront.amazonaws.com Authorization:AWS authentication stringDate: Thu, 17 May 2012 19:37:58 GMTOther required headers
200 OK
ETag: E2QWRUHEXAMPLE
x-amz-request-id: request_id
<?xml version="1.0" encoding="UTF-8"?>
<DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2013-05-12/">
<CallerReference>example.com2012-04-11-5:09pm</CallerReference>
<Aliases>
<Quantity>1</Quantity>
<Items>
<CNAME>www.example.com</CNAME>
</Items>
</Aliases>
<DefaultRootObject>index.html</DefaultRootObject>
<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>
<Logging>
<Enabled>true</Enabled>
<IncludeCookies>true</IncludeCookies>
<Bucket>myawslogbucket.s3.amazonaws.com</Bucket>
<Prefix>example.com.</Prefix>
</Logging>
<ViewerCertificate>
<IAMCertificateId>AS1A2M3P4L5E67SIIXR3J</IAMCertificateId>
</ViewerCertificate>
<PriceClass>PriceClass_All</PriceClass>
<Enabled>true</Enabled>
</DistributionConfig>