| Did this page help you? Yes No Tell us about it... |
This action creates a new streaming distribution. A streaming distribution looks similar to a distribution, except it streams media files over an Adobe Real-Time Messaging Protocol (RTMP) connection, instead of serving files over HTTP. You can create up to 100 streaming distributions per AWS account. For more information about streaming distributions, go to Working with Distributions and Streaming Media Files in the Amazon CloudFront Developer Guide.
To create a new streaming distribution, you do a POST on the
2010-11-01/streaming-distribution resource. The request body must include
an XML document with a StreamingDistributionConfig element. The response echoes the
StreamingDistributionConfig element and returns other metadata about the
streaming distribution. For more information, go to Parts of a Basic Distribution
in the Amazon CloudFront Developer Guide.
POST /2010-11-01/streaming-distribution HTTP/1.1
Host: cloudfront.amazonaws.com
Authorization: [AWS authentication string]
Date: [time stamp]
[Other required headers]
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
<S3Origin>
<DNSName>dns name</DNSName>
</S3Origin>
<CallerReference>ref</CallerReference>
<CNAME>far.example.com</CNAME>
<CNAME>farther.example.com;/CNAME>
<Comment>The comment.</Comment>
<Enabled>true|false</Enabled>
<Enabled>true|false</Enabled>
<Logging>
<Bucket>mylogs.s3.amazonaws.com</Bucket>
<Prefix/>
</Logging>
</StreamingDistributionConfig>The request must include the headers required in all CloudFront requests. For more information, see Common REST Headers.
| Name | Description | Required |
|---|---|---|
|
|
The streaming distribution's configuration information. For more information, see StreamingDistributionConfig Complex Type. Type: Default: None |
Yes |
201 Created Location: [URI of new streaming distribution] x-amz-request-id: [Request ID] <?xml version="1.0" encoding="UTF-8"?> <StreamingDistribution xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"> <Id>S3FC98xK7ETSU1</Id> <Status>Disabled</Status> <LastModifiedTime>2009-11-19T19:37:58Z</LastModifiedTime> <DomainName>d8jveqvsk3u8gy.cloudfront.net</DomainName> <StreamingDistributionConfig> <S3Origin> <DNSName>test-streaming-dist.s3.amazonaws.com</DNSName> <OriginAccessIdentity>OAI</OriginAccessIdentity> <S3Origin>origin</S3Origin> <CallerReference>ref</CallerReference> <CNAME>far.example.com</CNAME> <Comment>The comment.</Comment> <Enabled>true|false</Enabled> <Logging> <Bucket>mylogs.s3.amazonaws.com</Bucket> <Prefix>myprefix/</Prefix> </Logging> </StreamingDistributionConfig> </StreamingDistribution>
| Name | Description |
|---|---|
|
|
The fully qualified URI of the new streaming distribution resource
just created. 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 |
|
|
The caller reference you attempted to create the streaming distribution with is associated with another streaming distribution. |
409 |
|
|
The origin server specified does not refer to a valid Amazon S3 bucket. |
400 |
|
|
This operation requires a body. Ensure that the body is present and the Content-Type header is set. |
400 |
|
|
Your request contains more CNAMEs than are allowed per streaming distribution. |
400 |
|
|
Processing your request would cause you to exceed the maximum number of streaming distributions allowed. |
400 |
The following example request creates a new streaming distribution that corresponds to the bucket mystreamingbucket.s3.amazonaws.com. The request enables logging.
POST /2010-11-01/streaming-distribution HTTP/1.1 Host: cloudfront.amazonaws.com Authorization: AWS O39F6A430S6FJNPPGDR2:frJIUN8DYpKDtOLEXAMPLE= Date: Thu, 19 Nov 2009 19:37:58 GMT [Other required headers] <?xml version="1.0" encoding="UTF-8"?> <StreamingDistribution xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"> <Id>id</Id> <Status>status</Status> <LastModifiedTime>time</LastModifiedTime> <DomainName>domain name</DomainName> <StreamingDistributionConfig> <S3Origin> <DNSName>name</DNSName> <OriginAccessIdentity>OAI</OriginAccessIdentity> <S3Origin>origin</S3Origin> <CallerReference>ref</CallerReference> <CNAME>near.example.com</CNAME> <Comment>The comment.</Comment> <Enabled>true|false</Enabled> <Logging> <Bucket>mylogs.s3.amazonaws.com</Bucket> <Prefix>myprefix/</Prefix> </Logging> </StreamingDistributionConfig> </StreamingDistribution>
201 Created
Location: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8
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>
<Comment>My comments</Comment>
<Enabled>true</Enabled>
<Logging>
<Bucket>mylogs.s3.amazonaws.com</Bucket>
<Prefix>myprefix/</Prefix>
</Logging>
</StreamingDistributionConfig>
</StreamingDistribution>