Amazon CloudFront
API Reference (API Version 2010-11-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Distribution Complex Type

Description

The Distribution complex type describes the information about a distribution. For more information about distributions, go to Working with Distributions in the Amazon CloudFront Developer Guide.

This complex type is used as a response element in POST Distribution and in GET Distribution.

Syntax

<Distribution xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
   <Id>EDFDVBD632BHDS5</Id>
   <Status>Deployed</Status>
   <LastModifiedTime>2009-11-19T19:37:58Z</LastModifiedTime>
   <InProgressInvalidationBatches>1</InProgressInvalidationBatches>
   <DomainName>d604721fxaaqy9.cloudfront.net</DomaineName>
   <ActiveTrustedSigners>
         <Signer>
            <Self/>
            <KeyPairId>APKAI72T5DYBXEXAMPLE</KeyPairId>
         </Signer>
         <Signer>
            <AwsAccountNumber>111122223333</AwsAccountNumber>
            <KeyPairId>APKA9ONS7QCOWEXAMPLE</KeyPairId>
         </Signer>
   </ActiveTrustedSigners>
   <DistributionConfig>
      <S3Origin>1
         <DNSName>mybucket.s3.amazonaws.com</DNSName>
         <OriginAccessIdentity>
         origin-access-identity/cloudfront/E127EXAMPLE51Z
         </OriginAccessIdentity>
      </S3Origin>   
      <CustomOrigin>2
         <DNSName>www.example.com</DNSName>
         <HTTPPort>80</HTTPPort>
         <OriginProtocolPolicy>http-only</OriginProtocolPolicy>
      </CustomOrigin>
      <CallerReference>your unique caller reference</CallerReference>
      <CNAME>mysite.example.com</CNAME>
      <Comment>My comments</Comment>
      <Enabled>true</Enabled>
      <DefaultRootObject>index.html</DefaultRootObject>
      <Logging>
         <Bucket>mylogs.s3.amazonaws.com</Bucket>
         <Prefix>myprefix/</Prefix>
      </Logging>
      <TrustedSigners>
         <Self/>
         <AwsAccountNumber>111122223333</AwsAccountNumber>
         <AwsAccountNumber>444455556666</AwsAccountNumber>
      </TrustedSigners>
   </DistributionConfig>
</Distribution>

1

Use the S3Origin element only if you use an Amazon S3 origin for your distribution.

2

Use the CustomOrigin element only if you use a custom origin for your distribution. For more information about the CustomOrigin element and the S3Origin element, see DistributionConfig Complex Type.

Elements

The following table describes the child elements in the Distribution datatype. They're presented in the order they appear in the distribution, and not in alphabetical order.

NameDescriptionRequired

Id

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Type: String

Default: None

Yes

Status

This response element indicates the current status of the distribution. When the status is Deployed, the distribution's information is fully propagated throughout the Amazon CloudFront system.

Type: String

Valid Values: Deployed | InProgress

Default: None

Yes

InProgress InvalidationBatches

The number of invalidation batches currently in progress. For more information about invalidation, go to Object Invalidation in the Amazon CloudFront Developer Guide.

Type: String

Valid Values: 0 | 1 | 2 | 3

Default: None

Yes

LastModifiedTime

The date and time the distribution was last modified.

Type: String with date in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard (e.g., 2009-11-19T19:37:58Z)

Default: None

Yes

DomainName

The domain name corresponding to the distribution. For example, d604721fxaaqy9.cloudfront.net.

Type: String

Default: None

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.

For more information, go to Serving Private Content in the Amazon CloudFront Developer Guide.

Type: Complex type

Children: Signer

Default: None

No

DistributionConfig

The current configuration information for the distribution.

Type: DistributionConfig Complex Type

Default: None

Yes

[Note]Note

Even though a distribution might be deployed, you must enable the distribution for use before end users can retrieve content. For more information about enabled and disabled distributions, go to Parts of a Basic Distribution in the Amazon CloudFront Developer Guide.

Examples

The following example shows a distribution with just the basic required elements. It doesn't include information used for serving private content, for using CNAMEs, or for writing access logs.

<Distribution xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
   <Id>EDFDVBD632BHDS5</Id>
   <Status>Deployed</Status>
   <InProgressInvalidationBatches>1</InProgressInvalidationBatches>
   <LastModifiedTime>2009-11-19T19:37:58Z</LastModifiedTime>
   <DomainName>d604721fxaaqy9.cloudfront.net</DomainName>
   <DistributionConfig>   
      <S3Origin>
         <DNSName>mybucket.s3.amazonaws.com</DNSName>
      </S3Origin>
      <CallerReference>20091130090000</CallerReference>
      <Enabled>true</Enabled>
   </DistributionConfig>
</Distribution>

The following example shows a distribution with the additional information used for serving private content, for using CNAMEs, and for writing access logs.

<Distribution xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
   <Id>EDFDVBD632BHDS5</Id>
   <Status>Deployed</Status>
   <InProgressInvalidationBatches>1</InProgressInvalidationBatches>
   <LastModifiedTime>2009-11-19T19:37:58Z</LastModifiedTime>
   <DomainName>d604721fxaaqy9.cloudfront.net</DomainName>
   <ActiveTrustedSigners>
      <Signer>
         <Self/>
         <KeyPairId>APKAI72T5DYBXEXAMPLE</KeyPairId>
         <KeyPairId>APKAU72D8DYNXEXAMPLE</KeyPairId>
      </Signer>
      <Signer>
         <AwsAccountNumber>111122223333</AwsAccountNumber>
         <KeyPairId>APKA9ONS7QCOWEXAMPLE</KeyPairId>
      </Signer>
      <Signer>
         <AwsAccountNumber>444455556666</AwsAccountNumber>
      </Signer>
   </ActiveTrustedSigners>
   <DistributionConfig>   
      <S3Origin>
         <DNSName>mybucket.s3.amazonaws.com</DNSName>
         <OriginAccessIdentity>
         origin-access-identity/cloudfront/E74FTE3AJFJ256A
         </OriginAccessIdentity>
      </S3Origin>
      <CallerReference>20091130090000</CallerReference>
      <CNAME>beagles.com</CNAME>
      <Comment>My comments</Comment>
      <Enabled>true</Enabled>
      <Logging>
         <Bucket>mylogs.s3.amazonaws.com</Bucket>
         <Prefix>myprefix/</Prefix>
      </Logging>
      <TrustedSigners>
         <Self/>
         <AwsAccountNumber>111122223333</AwsAccountNumber>
         <AwsAccountNumber>444455556666</AwsAccountNumber>
      </TrustedSigners>
   </DistributionConfig>
</Distribution>