Menu
Amazon CloudFront
API Reference (API Version 2016-09-07)

StreamingDistributionConfig Complex Type

Description

The StreamingDistributionConfig complex type describes an RTMP distribution's configuration information. For more information about RTMP distributions, go to Working with RTMP Distributions in the Amazon CloudFront Developer Guide.

Usage:

Syntax

<StreamingDistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2016-09-07/">
   <CallerReference>unique description for this distribution</CallerReference>
   <S3Origin>
      <DNSName>domain name of the S3 bucket</DNSName>
      <OriginAccessIdentity>origin-access-identity/cloudfront/ID-of-origin-access-identity</OriginAccessIdentity>
   </S3Origin>
   <Aliases>
      <Quantity>number of CNAME aliases</Quantity>
      <Items>
         <CNAME>CNAME alias</CNAME>
      </Items>
   </Aliases>
   <Comment>comment about the distribution</Comment>
   <Logging>
      <Enabled>true | false</Enabled>
      <Bucket>Amazon S3 bucket for logs</Bucket>
      <Prefix>prefix for log file names</Prefix>
   </Logging>
   <TrustedSigners>
      <Quantity>number of trusted signers</Quantity>
      <Items>
         <AwsAccountNumber>self | AWS account that can create 
            signed URLs</AwsAccountNumber>
      </Items>
   </TrustedSigners>
   <PriceClass>maximum price class for the distribution</PriceClass>
   <Enabled>true | false</Enabled>
</StreamingDistributionConfig>

Elements

The following table describes the child elements in the StreamingDistributionConfig datatype. They're presented in the order they appear in the configuration.

NameDescription

CallerReference

A unique value (for example, a date-time stamp) that ensures the request can't be replayed.

If the CallerReference is new (no matter the content of the StreamingDistributionConfig object), a new RTMP distribution is created.

If the CallerReference is a value you already sent in a previous request to create an RTMP distribution, and the content of the StreamingDistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request.

If the CallerReference is a value you already sent in a previous request to create an RTMP distribution but the content of the StreamingDistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.

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

Parent: StreamingDistributionConfig

S3Origin

A complex type that contains information about the Amazon S3 bucket from which you want CloudFront to get your media files for distribution.

Type: Complex

Default: None

Children: DNSName, OriginAccessIdentity

Parent: StreamingDistributionConfig

DNSName

The DNS name of your Amazon S3 bucket to associate with the distribution, for example, myawsbucket.s3.amazonaws.com.

If you configured Amazon S3 Transfer Acceleration for your bucket, do not specify the s3-accelerate endpoint for DNSName.

Type: String

Default: None

Constraints: Maximum 128 characters

Parent: S3Origin

OriginAccessIdentity

The CloudFront origin access identity to associate with the RTMP distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.

If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element.

To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element.

To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon CloudFront Developer Guide.

Type: String

Default: None

Constraints: Must be in format origin-access-identity/cloudfront/ID-of-origin-access-identity

Parent: S3Origin

Aliases

A complex type that contains information about the CNAME aliases, if any, that you want to associate with this distribution.

Type: Complex

Default: None

Children: Quantity, Items

Parent: StreamingDistributionConfig

Quantity (Aliases)

The number of CNAME aliases, if any, that you want to associate with this distribution.

Type: Integer

Default: None

Parent: Aliases

Items (Aliases)

A complex type that contains the CNAME aliases, if any, that you want to associate with this distribution.

Type: Complex

Default: None

Children: CNAME

Parent: Aliases

CNAME

An alternate domain name (CNAME) that you want to associate with this RTMP distribution. For more information about CNAMEs, go to Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.

For the current limit on the number of alternate domain names that you can add to a distribution, see Amazon CloudFront Limits in the Amazon Web Services General Reference. To request a higher limit, go to https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-cloudfront-distributions.

When you're creating a distribution, if you don't want to specify any CNAMEs, specify 0 for Quantity and omit Items.

When you're updating a distribution:

  • If you want to delete all CNAMEs, change Quantity to 0, and delete Items.

  • If you want to add, change, or remove one or more CNAMEs, change the value of Quantity and specify all of the CNAMEs that you want to include in the updated distribution.

Type: String

Valid Value: An alternate domain name (CNAME)

Default: None

Parent: Aliases

Comment

Any comments you want to include about the RTMP distribution.

Type: String

Constraints: Maximum 128 characters

Default: None

Parent: StreamingDistributionConfig

Logging

A complex type that controls whether access logs are written for the RTMP distribution. For more information, go to Access Logs in the Amazon CloudFront Developer Guide.

Type: Complex type

Children: Enabled, Bucket, Prefix

Default: None

Enabled (Logging)

Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket.

If you do not want to enable logging when you create a distribution or if you want to disable logging for an existing distribution, specify false for Enabled, and specify empty Bucket and Prefix elements.

If you specify false for Enabled but you specify values for Bucket and Prefix, the values are automatically deleted.

Type: String

Valid Values: true | false

Default: None

Parent: Logging

Bucket

The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.

Note

You must have the permissions required to get and update Amazon S3 bucket ACLs, and the S3 ACL for the bucket must grant you FULL_CONTROL. This allows CloudFront to give the awsdatafeeds account permission to save log files in the bucket. For more information, see Permissions Required to Configure Logging and to Access Your Log Files in the Amazon Route 53 Developer Guide.

Type: String

Constraints: Maximum 128 characters

Default: None

Prefix

An optional string of your choice to prefix to the access log filenames for this distribution, for example, logprefix/.

If you decide not to use a prefix, you must still include the empty Prefix element in the Logging element.

Type: String

Constraints: Maximum 256 characters; the string must not start with a slash ( / ).

Default: None

Parent: Logging

TrustedSigners

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 public URLs, remove this element. For more information, go to Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.

Type: Complex type

Default: None

Children: Quantity, Items

Parent: StreamingDistributionConfig

Quantity (TrustedSigners)

The number of trusted signers, if any, that you want to associate with this RTMP distribution.

Type: Integer

Default: None

Parent: TrustedSigners

Items (TrustedSigners)

Optional: A complex type that contains trusted signers, if any, for this RTMP distribution.

Type: Complex

Default: None

Children: AWSAccountNumber

Parent: TrustedSigners

AwsAccountNumber

Specifies an AWS account that can create signed URLs. Valid values include:

  • self, which indicates that the AWS account that was used to create the distribution can created signed URLs.

  • An AWS account number. Omit the dashes in the account number.

You can specify up to five accounts (including self) in separate AwsAccountNumber elements.

Type: String

Default: None

Parent: Items (TrustedSigners)

PriceClass

The price class that corresponds with the maximum price that you want to pay for CloudFront service. If you specify PriceClass_All, CloudFront responds to requests for your objects from all CloudFront edge locations.

If you specify a price class other than PriceClass_All, CloudFront serves your objects from the CloudFront edge location that has the lowest latency among the edge locations in your price class. Viewers who are in or near regions that are excluded from your specified price class may encounter slower performance.

For more information about price classes, go to Choosing the Price Class for a CloudFront Distribution in the Amazon CloudFront Developer Guide. For information about CloudFront pricing, including how price classes map to CloudFront regions, go to Amazon CloudFront Pricing.

Type: String

Default: None

Valid Values:

  • PriceClass_All: Requests are routed to all CloudFront edge locations based entirely on latency.

  • PriceClass_200: Requests are routed to more edge locations than with PriceClass_100 but not to all edge locations.

  • PriceClass_100: Requests are routed to edge locations in the least-expensive CloudFront regions.

Parent: DistributionConfig

Enabled (StreamingDistributionConfig)

Whether the RTMP distribution is enabled to accept end user requests for content.

Type: String

Valid Values: false | true

Default: None

Parent: StreamingDistributionConfig

Example

The following RTMP distribution configuration is for an RTMP distribution that includes all optional values.

<StreamingDistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2016-09-07/">
   <CallerReference>20120229090000</CallerReference>
   <S3Origin>
      <DNSName>mystreamingbucket.s3.amazonaws.com</DNSName>
      <OriginAccessIdentity>origin-access-identity/cloudfront/E74FTE3AEXAMPLE</OriginAccessIdentity>
   </S3Origin>
   <Aliases>
      <Quantity>1</Quantity>
      <Items>
         <CNAME>www.example.com</CNAME>
      </Items>
   </Aliases>
   <Comment>example comment</Comment>
   <Logging>
      <Enabled>true</Enabled>
      <Bucket>myawslogbucket.s3.amazonaws.com</Bucket>
      <Prefix>myprefix/</Prefix>
   </Logging>
   <TrustedSigners>
      <Quantity>3</Quantity>
      <Items>
         <AwsAccountNumber>self</AwsAccountNumber>
         <AwsAccountNumber>111122223333</AwsAccountNumber>
         <AwsAccountNumber>444455556666</AwsAccountNumber>
      </Items>
   </TrustedSigners>
   <PriceClass>PriceClass_All</PriceClass>
   <Enabled>true</Enabled>
</StreamingDistributionConfig>