| Did this page help you? Yes No Tell us about it... |
This action sets the configuration for a streaming distribution. You use this when updating the configuration. You must follow a particular process when updating any type of distribution's configuration. For more information, go to Updating a Distribution's Configuration in the Amazon CloudFront Developer Guide.
To set a streaming distribution's configuration, you do a PUT on the
2010-11-01/streaming-distribution/distribution
ID/config resource. The request body must include an XML document
with a StreamingDistributionConfig element. The new
StreamingDistributionConfig configuration replaces the existing configuration;
they are not merged. This distinction is important to remember when adding an additional CNAME
alias to a streaming distribution that already has one. Make sure to include the original CNAME
alias in the StreamingDistributionConfig object, or else your update erases the
original CNAME alias and just adds the new one.
If you try to change configuration items that cannot be changed (the origin and the caller
reference), CloudFront returns an IllegalUpdate error.
PUT /2010-11-01/streaming-distribution/distribution Id/config HTTP/1.1 Host: cloudfront.amazonaws.com If-Match: [value from ETag header in previous GET response] Authorization: [AWS authentication string] [Other required headers] <?xml version="1.0" encoding="UTF-8"?> <StreamingDistributionConfig> <S3Origin> <DNSName>name</DNSName> <OriginAccessIdentity>OAI</OriginAccessIdentity> <S3Origin>origin</S3Origin> <CallerReference>ref</CallerReference> <CNAME>canonical name</CNAME> <Comment>The comment</Comment> <Enabled>true or false</Enabled> <Logging> <Bucket>mylogs.s3.amazonaws.com</Bucket> <Prefix>myprefix/</Prefix> </Logging> </StreamingDistributionConfig>
The following table lists the special request header the action uses in addition to the common request headers all actions use (for more information, see Common REST Headers).
| Name | Description | Required |
|---|---|---|
|
|
The value of the Type: String |
Yes |
| Name | Description | Required |
|---|---|---|
|
|
The streaming distribution's configuration information. For more information, see StreamingDistributionConfig Complex Type. Type: |
Yes |
200 OK
ETag: [ETag value to use later when doing a DELETE]
x-amz-request-id: [Request ID]
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistribution xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
<Id>EGTXBD79H29TRA8</Id>
<Status>Deployed</Status>
<LastModifiedTime>2009-11-19T19:37:58Z</LastModifiedTime>
<DomainName>s5c39gqb8ow64r.cloudfront.net</DomainName>
<StreamingDistributionConfig>
<S3Origin>
<DNSName>mystreamingbucket.s3.amazonaws.com</DNSName>
</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>
</StreamingDistributionConfig>
</StreamingDistribution>| Name | Description |
|---|---|
|
|
The current version of the configuration. For example:
Type: String |
| Name | Description |
|---|---|
|
|
The streaming distribution's information. For more information, see StreamingDistribution 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 |
|---|---|---|
|
|
One or more of the CNAMEs you provided are already associated with a different distribution. |
409 |
|
|
Origin and CallerReference cannot be updated. |
400 |
|
|
The If-Match version is missing or not valid for the distribution. |
400 |
|
|
This operation requires a body. Ensure that the body is present and the Content-Type header is set. |
400 |
|
|
The specified streaming distribution does not exist. |
404 |
|
|
The precondition given in one or more of the request-header fields
evaluated to |
412 |
|
|
Your request contains more CNAMEs than are allowed per streaming distribution. |
400 |
The following example request updates the configuration for the EGTXBD79H29TRA8 streaming distribution.
PUT /2010-11-01/streaming-distribution/EGTXBD79H29TRA8/config HTTP/1.1
Host: cloudfront.amazonaws.com
Authorization: AWS O39F6A430S6FJNPPGDR2:frJIUN8DYpKDtOLEXAMPLE=
Date: Thu, 19 Nov 2009 19:37:58 GMT
If-Match: E2QWRUHAPOMQZL
[Other required headers]
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
<S3Origin>
<DNSName>mystreamingbucket.s3.amazonaws.com</DNSName>
</S3Origin>
<CallerReference>20091130090000</CallerReference>
<CNAME>beagles.com</CNAME>
<Comment>A different comment</Comment>
<Enabled>true</Enabled>
<Logging>
<Bucket>mylogs.s3.amazonaws.com</Bucket>
<Prefix>myprefix/</Prefix>
</Logging>
</StreamingDistributionConfig>200 OK
ETag: E9LHASXUMDPRTF
x-amz-request-id: request_id
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistribution xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
<Id>EGTXBD79H29TRA8</Id>
<Status>InProgress</Status>
<LastModifiedTime>2009-11-19T19:37:58Z</LastModifiedTime>
<DomainName>s5c39gqb8ow64r.cloudfront.net</DomainName>
<StreamingDistributionConfig>
<S3Origin>
<DNSName>mystreamingbucket.s3.amazonaws.com</DNSName>
</S3Origin>
<CallerReference>20091130090000</CallerReference>
<CNAME>beagles.com</CNAME>
<Comment>A different comment</Comment>
<Enabled>true</Enabled>
<Logging>
<Bucket>mylogs.s3.amazonaws.com</Bucket>
<Prefix>myprefix/</Prefix>
</Logging>
</StreamingDistributionConfig>
</StreamingDistribution>