Menu
Amazon CloudFront
API Reference (API Version 2016-11-25)

CreateStreamingDistribution

Creates a new RMTP distribution. An RTMP distribution is similar to a web distribution, but an RTMP distribution streams media files using the Adobe Real-Time Messaging Protocol (RTMP) instead of serving files using HTTP.

To create a new web distribution, submit a POST request to the CloudFront API version/distribution resource. The request body must include a document with a StreamingDistributionConfig element. The response echoes the StreamingDistributionConfig element and returns other information about the RTMP distribution.

To get the status of your request, use the GET StreamingDistribution API action. When the value of Enabled is true and the value of Status is Deployed, your distribution is ready. A distribution usually deploys in less than 15 minutes.

For more information about web distributions, see Working with RTMP Distributions in the Amazon CloudFront Developer Guide.

Important

Beginning with the 2012-05-05 version of the CloudFront API, we made substantial changes to the format of the XML document that you include in the request body when you create or update a web distribution or an RTMP distribution, and when you invalidate objects. With previous versions of the API, we discovered that it was too easy to accidentally delete one or more values for an element that accepts multiple values, for example, CNAMEs and trusted signers. Our changes for the 2012-05-05 release are intended to prevent these accidental deletions and to notify you when there's a mismatch between the number of values you say you're specifying in the Quantity element and the number of values specified.

Request Syntax

POST /2016-11-25/streaming-distribution HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<CreateStreamingDistributionRequest>
   <StreamingDistributionConfig>
      <Aliases>
         <Items>
            <CNAME>string</CNAME></Items>
         <Quantity>integer</Quantity>
      </Aliases>
      <CallerReference>string</CallerReference>
      <Comment>string</Comment>
      <Enabled>boolean</Enabled>
      <Logging>
         <Bucket>string</Bucket>
         <Enabled>boolean</Enabled>
         <Prefix>string</Prefix>
      </Logging>
      <PriceClass>string</PriceClass>
      <S3Origin>
         <DomainName>string</DomainName>
         <OriginAccessIdentity>string</OriginAccessIdentity>
      </S3Origin>
      <TrustedSigners>
         <Enabled>boolean</Enabled>
         <Items>
            <AwsAccountNumber>string</AwsAccountNumber></Items>
         <Quantity>integer</Quantity>
      </TrustedSigners>
   </StreamingDistributionConfig>
</CreateStreamingDistributionRequest>

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request requires the following data in XML format.

CreateStreamingDistributionRequest

Root level tag for the CreateStreamingDistributionRequest parameters.

Required: Yes

StreamingDistributionConfig

The streaming distribution's configuration information.

Type: StreamingDistributionConfig object

Required: Yes

Response Syntax

HTTP/1.1 201
Location: Location
ETag: ETag
<?xml version="1.0" encoding="UTF-8"?>
<CreateStreamingDistributionResult>
   <StreamingDistribution>
      <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>
      <DomainName>string</DomainName>
      <Id>string</Id>
      <LastModifiedTime>timestamp</LastModifiedTime>
      <Status>string</Status>
      <StreamingDistributionConfig>
         <Aliases>
            <Items>
               <CNAME>string</CNAME></Items>
            <Quantity>integer</Quantity>
         </Aliases>
         <CallerReference>string</CallerReference>
         <Comment>string</Comment>
         <Enabled>boolean</Enabled>
         <Logging>
            <Bucket>string</Bucket>
            <Enabled>boolean</Enabled>
            <Prefix>string</Prefix>
         </Logging>
         <PriceClass>string</PriceClass>
         <S3Origin>
            <DomainName>string</DomainName>
            <OriginAccessIdentity>string</OriginAccessIdentity>
         </S3Origin>
         <TrustedSigners>
            <Enabled>boolean</Enabled>
            <Items>
               <AwsAccountNumber>string</AwsAccountNumber></Items>
            <Quantity>integer</Quantity>
         </TrustedSigners>
      </StreamingDistributionConfig>
   </StreamingDistribution>
</CreateStreamingDistributionResult>

Response Elements

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

The response returns the following HTTP headers.

ETag

The current version of the streaming distribution created.

Location

The fully qualified URI of the new streaming distribution resource just created. For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8.

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

CreateStreamingDistributionResult

Root level tag for the CreateStreamingDistributionResult parameters.

Required: Yes

StreamingDistribution

The streaming distribution's information.

Type: StreamingDistribution object

Errors

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

AccessDenied

Access denied.

HTTP Status Code: 403

CNAMEAlreadyExists

HTTP Status Code: 409

InconsistentQuantities

The value of Quantity and the size of Items do not match.

HTTP Status Code: 400

InvalidArgument

The argument is invalid.

HTTP Status Code: 400

InvalidOrigin

The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

HTTP Status Code: 400

InvalidOriginAccessIdentity

The origin access identity is not valid or doesn't exist.

HTTP Status Code: 400

MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is set.

HTTP Status Code: 400

StreamingDistributionAlreadyExists

HTTP Status Code: 409

TooManyStreamingDistributionCNAMEs

HTTP Status Code: 400

TooManyStreamingDistributions

Processing your request would cause you to exceed the maximum number of streaming distributions allowed.

HTTP Status Code: 400

TooManyTrustedSigners

Your request contains more trusted signers than are allowed per distribution.

HTTP Status Code: 400

TrustedSignerDoesNotExist

One or more of your trusted signers do not exist.

HTTP Status Code: 400