Menu
Amazon CloudFront
API Reference (API Version 2017-03-25)

GetDistribution

Get the information about a distribution.

Request Syntax

GET /2017-03-25/distribution/Id HTTP/1.1

URI Request Parameters

The request requires the following URI parameters.

Id

The distribution's ID.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<Distribution>
   <ActiveTrustedSigners>
      <Enabled>boolean</Enabled>
      <Items>
         <Signer>
            <AwsAccountNumber>string</AwsAccountNumber>
            <KeyPairIds>
               <Items>
                  <KeyPairId>string</KeyPairId>
               </Items>
               <Quantity>integer</Quantity>
            </KeyPairIds>
         </Signer>
      </Items>
      <Quantity>integer</Quantity>
   </ActiveTrustedSigners>
   <ARN>string</ARN>
   <DistributionConfig>
      <Aliases>
         <Items>
            <CNAME>string</CNAME>
         </Items>
         <Quantity>integer</Quantity>
      </Aliases>
      <CacheBehaviors>
         <Items>
            <CacheBehavior>
               <AllowedMethods>
                  <CachedMethods>
                     <Items>
                        <Method>string</Method>
                     </Items>
                     <Quantity>integer</Quantity>
                  </CachedMethods>
                  <Items>
                     <Method>string</Method>
                  </Items>
                  <Quantity>integer</Quantity>
               </AllowedMethods>
               <Compress>boolean</Compress>
               <DefaultTTL>long</DefaultTTL>
               <ForwardedValues>
                  <Cookies>
                     <Forward>string</Forward>
                     <WhitelistedNames>
                        <Items>
                           <Name>string</Name>
                        </Items>
                        <Quantity>integer</Quantity>
                     </WhitelistedNames>
                  </Cookies>
                  <Headers>
                     <Items>
                        <Name>string</Name>
                     </Items>
                     <Quantity>integer</Quantity>
                  </Headers>
                  <QueryString>boolean</QueryString>
                  <QueryStringCacheKeys>
                     <Items>
                        <Name>string</Name>
                     </Items>
                     <Quantity>integer</Quantity>
                  </QueryStringCacheKeys>
               </ForwardedValues>
               <LambdaFunctionAssociations>
                  <Items>
                     <LambdaFunctionAssociation>
                        <EventType>string</EventType>
                        <LambdaFunctionARN>string</LambdaFunctionARN>
                     </LambdaFunctionAssociation>
                  </Items>
                  <Quantity>integer</Quantity>
               </LambdaFunctionAssociations>
               <MaxTTL>long</MaxTTL>
               <MinTTL>long</MinTTL>
               <PathPattern>string</PathPattern>
               <SmoothStreaming>boolean</SmoothStreaming>
               <TargetOriginId>string</TargetOriginId>
               <TrustedSigners>
                  <Enabled>boolean</Enabled>
                  <Items>
                     <AwsAccountNumber>string</AwsAccountNumber>
                  </Items>
                  <Quantity>integer</Quantity>
               </TrustedSigners>
               <ViewerProtocolPolicy>string</ViewerProtocolPolicy>
            </CacheBehavior>
         </Items>
         <Quantity>integer</Quantity>
      </CacheBehaviors>
      <CallerReference>string</CallerReference>
      <Comment>string</Comment>
      <CustomErrorResponses>
         <Items>
            <CustomErrorResponse>
               <ErrorCachingMinTTL>long</ErrorCachingMinTTL>
               <ErrorCode>integer</ErrorCode>
               <ResponseCode>string</ResponseCode>
               <ResponsePagePath>string</ResponsePagePath>
            </CustomErrorResponse>
         </Items>
         <Quantity>integer</Quantity>
      </CustomErrorResponses>
      <DefaultCacheBehavior>
         <AllowedMethods>
            <CachedMethods>
               <Items>
                  <Method>string</Method>
               </Items>
               <Quantity>integer</Quantity>
            </CachedMethods>
            <Items>
               <Method>string</Method>
            </Items>
            <Quantity>integer</Quantity>
         </AllowedMethods>
         <Compress>boolean</Compress>
         <DefaultTTL>long</DefaultTTL>
         <ForwardedValues>
            <Cookies>
               <Forward>string</Forward>
               <WhitelistedNames>
                  <Items>
                     <Name>string</Name>
                  </Items>
                  <Quantity>integer</Quantity>
               </WhitelistedNames>
            </Cookies>
            <Headers>
               <Items>
                  <Name>string</Name>
               </Items>
               <Quantity>integer</Quantity>
            </Headers>
            <QueryString>boolean</QueryString>
            <QueryStringCacheKeys>
               <Items>
                  <Name>string</Name>
               </Items>
               <Quantity>integer</Quantity>
            </QueryStringCacheKeys>
         </ForwardedValues>
         <LambdaFunctionAssociations>
            <Items>
               <LambdaFunctionAssociation>
                  <EventType>string</EventType>
                  <LambdaFunctionARN>string</LambdaFunctionARN>
               </LambdaFunctionAssociation>
            </Items>
            <Quantity>integer</Quantity>
         </LambdaFunctionAssociations>
         <MaxTTL>long</MaxTTL>
         <MinTTL>long</MinTTL>
         <SmoothStreaming>boolean</SmoothStreaming>
         <TargetOriginId>string</TargetOriginId>
         <TrustedSigners>
            <Enabled>boolean</Enabled>
            <Items>
               <AwsAccountNumber>string</AwsAccountNumber>
            </Items>
            <Quantity>integer</Quantity>
         </TrustedSigners>
         <ViewerProtocolPolicy>string</ViewerProtocolPolicy>
      </DefaultCacheBehavior>
      <DefaultRootObject>string</DefaultRootObject>
      <Enabled>boolean</Enabled>
      <HttpVersion>string</HttpVersion>
      <IsIPV6Enabled>boolean</IsIPV6Enabled>
      <Logging>
         <Bucket>string</Bucket>
         <Enabled>boolean</Enabled>
         <IncludeCookies>boolean</IncludeCookies>
         <Prefix>string</Prefix>
      </Logging>
      <Origins>
         <Items>
            <Origin>
               <CustomHeaders>
                  <Items>
                     <OriginCustomHeader>
                        <HeaderName>string</HeaderName>
                        <HeaderValue>string</HeaderValue>
                     </OriginCustomHeader>
                  </Items>
                  <Quantity>integer</Quantity>
               </CustomHeaders>
               <CustomOriginConfig>
                  <HTTPPort>integer</HTTPPort>
                  <HTTPSPort>integer</HTTPSPort>
                  <OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
                  <OriginProtocolPolicy>string</OriginProtocolPolicy>
                  <OriginReadTimeout>integer</OriginReadTimeout>
                  <OriginSslProtocols>
                     <Items>
                        <SslProtocol>string</SslProtocol>
                     </Items>
                     <Quantity>integer</Quantity>
                  </OriginSslProtocols>
               </CustomOriginConfig>
               <DomainName>string</DomainName>
               <Id>string</Id>
               <OriginPath>string</OriginPath>
               <S3OriginConfig>
                  <OriginAccessIdentity>string</OriginAccessIdentity>
               </S3OriginConfig>
            </Origin>
         </Items>
         <Quantity>integer</Quantity>
      </Origins>
      <PriceClass>string</PriceClass>
      <Restrictions>
         <GeoRestriction>
            <Items>
               <Location>string</Location>
            </Items>
            <Quantity>integer</Quantity>
            <RestrictionType>string</RestrictionType>
         </GeoRestriction>
      </Restrictions>
      <ViewerCertificate>
         <ACMCertificateArn>string</ACMCertificateArn>
         <Certificate>string</Certificate>
         <CertificateSource>string</CertificateSource>
         <CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
         <IAMCertificateId>string</IAMCertificateId>
         <MinimumProtocolVersion>string</MinimumProtocolVersion>
         <SSLSupportMethod>string</SSLSupportMethod>
      </ViewerCertificate>
      <WebACLId>string</WebACLId>
   </DistributionConfig>
   <DomainName>string</DomainName>
   <Id>string</Id>
   <InProgressInvalidationBatches>integer</InProgressInvalidationBatches>
   <LastModifiedTime>timestamp</LastModifiedTime>
   <Status>string</Status>
</Distribution>

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

Distribution

Root level tag for the Distribution parameters.

Required: Yes

ActiveTrustedSigners

CloudFront automatically adds this element to the response only if you've set up the distribution to serve private content with signed URLs. The element lists the key pair IDs that CloudFront is aware of for each trusted signer. The Signer child element lists the AWS account number of the trusted signer (or an empty Self element if the signer is you). The Signer element also includes the IDs of any active key pairs associated with the trusted signer's AWS account. If no KeyPairId element appears for a Signer, that signer can't create working signed URLs.

Type: ActiveTrustedSigners object

ARN

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

Type: String

DistributionConfig

The current configuration information for the distribution. Send a GET request to the /CloudFront API version/distribution ID/config resource.

Type: DistributionConfig object

DomainName

The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net.

Type: String

Id

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Type: String

InProgressInvalidationBatches

The number of invalidation batches currently in progress.

Type: Integer

LastModifiedTime

The date and time the distribution was last modified.

Type: Timestamp

Status

This response element indicates the current status of the distribution. When the status is Deployed, the distribution's information is fully propagated to all CloudFront edge locations.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDenied

Access denied.

HTTP Status Code: 403

NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: