The DistributionConfig complex type describes a distribution's configuration
information. For more information about distributions, go to Working with Distributions in the
Amazon CloudFront Developer Guide.
This complex type is used as a request element in POST Distribution and PUT Distribution Config.
It is used as a response element in GET Distribution and GET Distribution Config.
<DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2009-12-01/">
<Origin/>
<CallerReference/>
<CNAME/>
<Comment/>
<Enabled/>
<Logging>
<Bucket/>
<Prefix/>
</Logging>
<OriginAccessIdentity/>
<TrustedSigners>
<Self/>
<AwsAccountNumber/>
</TrustedSigners>
</DistributionConfig>The following table describes the child elements in the DistributionConfig
datatype. They're presented in the order they appear in the configuration, and not in alphabetical
order.
| Name | Description | Required |
|---|---|---|
|
|
The Amazon S3 bucket to associate with the distribution. For example:
Type: String Constraints: Maximum 128 characters Default: None |
Yes |
|
|
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the
If the CallerReference is a value you already sent in a previous request
to create a distribution, and the content of the
If the CallerReference is a value you already sent in a previous request
to create a distribution but the content of the
Type: String Constraints: Allowable characters are any Unicode code points that are legal in an XML 1.0 document. The UTF-8 encoding of the value must be less than 128 bytes. Default: None |
Yes |
|
|
A CNAME alias you want to associate with this distribution. You can have up to 10 CNAME aliases per distribution. For more information, go to Using CNAMEs in the Amazon CloudFront Developer Guide. Only include a Type: String Valid Value: The CNAME alias Default: None |
No |
|
|
Any comments you want to include about the distribution. Type: String Constraints: Maximum 128 characters Default: None |
No |
|
|
Whether the distribution is enabled to accept end user requests for content. Type: Boolean Valid Values: Default: None |
Yes |
|
|
A complex type that controls whether access logs are written for the distribution. If you want to turn on access logs, include this element; if you want to turn off access logs, remove this element. For more information, go to Access Logs in the Amazon CloudFront Developer Guide. Type: Complex type Children: Default: None |
No |
|
|
The CloudFront origin access identity to associate with the distribution. If you want the distribution to serve private content, include this element; if you want the distribution to serve public content, remove this element. For more information, go to Serving Private Content in the Amazon CloudFront Developer Guide. Type: String Constraints: Must be in format
Default: None |
No |
|
|
A complex type that specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, include this element; if you want the distribution to use basic URLs, remove this element. For more information, go to Serving Private Content in the Amazon CloudFront Developer Guide. Type: Complex type Children: Default: None |
No |
The following table describes the child elements of the Logging element.
| Name | Description | Required |
|---|---|---|
|
|
The Amazon S3 bucket to store the access logs in. For example:
Type: String Constraints: Maximum 128 characters Default: None |
Yes |
|
|
An optional string of your choice to prefix to the access log
filenames for this distribution. For example:
If you decide not to use a prefix, you must still include the empty
Type: String Constraints: Maximum 256 characters; the string must not start with a slash ( / ). Default: None |
No |
The following table describes the child elements of the TrustedSigners
element.
| Name | Description | Required |
|---|---|---|
|
|
Include this empty element if you want to give your own AWS account permission to create signed URLs. Type: String Default: None |
No |
|
|
Specifies an AWS account that can create signed URLs. Remove the dashes. You can specify up to five accounts, each with
its own Type: String Default: None |
No |
The following example configuration is for a public content distribution with no CNAME aliases, and logging turned off.
<DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2009-12-01/"> <Origin>mybucket.s3.amazonaws.com</Origin> <CallerReference>20091130090000</CallerReference> <Comment>My comments</Comment> <Enabled>true</Enabled> </DistributionConfig>
The following example configuration is for a distribution that serves private content with
signed URLs and with two CNAME aliases. The presence of the Logging element means
that logging is turned on for this distribution.
<DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2009-12-01/">
<Origin>mybucket.s3.amazonaws.com</Origin>
<CallerReference>20091130090000</CallerReference>
<CNAME>beagles.com</CNAME>
<CNAME>beagles.dogs.com</CNAME>
<Comment>My comments</Comment>
<Enabled>true</Enabled>
<Logging>
<Bucket>mylogs.s3.amazonaws.com</Bucket>
<Prefix/>
</Logging>
<OriginAccessIdentity>origin-access-identity/cloudfront/E74FTE3AJFJ256A</OriginAccessIdentity>
<TrustedSigners>
<Self/>
<AwsAccountNumber>123456789012</AwsAccountNumber>
<AwsAccountNumber>987654321111</AwsAccountNumber>
</TrustedSigners>
</DistributionConfig>