Amazon CloudFront 2017-03-25
- Client: Aws\CloudFront\CloudFrontClient
- Service ID: cloudfront
- Version: 2017-03-25
This page describes the parameters and results for the operations of the Amazon CloudFront (2017-03-25), and shows how to use the Aws\CloudFront\CloudFrontClient object to call the described operations. This documentation is specific to the 2017-03-25 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- CreateCloudFrontOriginAccessIdentity ( array $params = [] )
- Creates a new origin access identity.
- CreateDistribution ( array $params = [] )
- Creates a new web distribution.
- CreateDistributionWithTags ( array $params = [] )
- Create a new distribution with tags.
- CreateInvalidation ( array $params = [] )
- Create a new invalidation.
- CreateStreamingDistribution ( array $params = [] )
- Creates a new RMTP distribution.
- CreateStreamingDistributionWithTags ( array $params = [] )
- Create a new streaming distribution with tags.
- DeleteCloudFrontOriginAccessIdentity ( array $params = [] )
- Delete an origin access identity.
- DeleteDistribution ( array $params = [] )
- Delete a distribution.
- DeleteServiceLinkedRole ( array $params = [] )
- DeleteStreamingDistribution ( array $params = [] )
- Delete a streaming distribution.
- GetCloudFrontOriginAccessIdentity ( array $params = [] )
- Get the information about an origin access identity.
- GetCloudFrontOriginAccessIdentityConfig ( array $params = [] )
- Get the configuration information about an origin access identity.
- GetDistribution ( array $params = [] )
- Get the information about a distribution.
- GetDistributionConfig ( array $params = [] )
- Get the configuration information about a distribution.
- GetInvalidation ( array $params = [] )
- Get the information about an invalidation.
- GetStreamingDistribution ( array $params = [] )
- Gets information about a specified RTMP distribution, including the distribution configuration.
- GetStreamingDistributionConfig ( array $params = [] )
- Get the configuration information about a streaming distribution.
- ListCloudFrontOriginAccessIdentities ( array $params = [] )
- Lists origin access identities.
- ListDistributions ( array $params = [] )
- List distributions.
- ListDistributionsByWebACLId ( array $params = [] )
- List the distributions that are associated with a specified AWS WAF web ACL.
- ListInvalidations ( array $params = [] )
- Lists invalidation batches.
- ListStreamingDistributions ( array $params = [] )
- List streaming distributions.
- ListTagsForResource ( array $params = [] )
- List tags for a CloudFront resource.
- TagResource ( array $params = [] )
- Add tags to a CloudFront resource.
- UntagResource ( array $params = [] )
- Remove tags from a CloudFront resource.
- UpdateCloudFrontOriginAccessIdentity ( array $params = [] )
- Update an origin access identity.
- UpdateDistribution ( array $params = [] )
- Updates the configuration for a web distribution.
- UpdateStreamingDistribution ( array $params = [] )
- Update a streaming distribution.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Waiters
Waiters allow you to poll a resource until it enters into a desired state. A waiter has a name used to describe what it does, and is associated with an API operation. When creating a waiter, you can provide the API operation parameters associated with the corresponding operation. Waiters can be accessed using the getWaiter($waiterName, $operationParameters) method of a client object. This client supports the following waiters:
Waiter name | API Operation | Delay | Max Attempts |
---|---|---|---|
DistributionDeployed | GetDistribution | 60 | 25 |
InvalidationCompleted | GetInvalidation | 20 | 30 |
StreamingDistributionDeployed | GetStreamingDistribution | 60 | 25 |
Operations
CreateCloudFrontOriginAccessIdentity
$result = $client->createCloudFrontOriginAccessIdentity
([/* ... */]); $promise = $client->createCloudFrontOriginAccessIdentityAsync
([/* ... */]);
Creates a new origin access identity. If you're using Amazon S3 for your origin, you can use an origin access identity to require users to access your content using a CloudFront URL instead of the Amazon S3 URL. For more information about how to use origin access identities, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
Parameter Syntax
$result = $client->createCloudFrontOriginAccessIdentity([ 'CloudFrontOriginAccessIdentityConfig' => [ // REQUIRED 'CallerReference' => '<string>', // REQUIRED 'Comment' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- CloudFrontOriginAccessIdentityConfig
-
- Required: Yes
- Type: CloudFrontOriginAccessIdentityConfig structure
The current configuration information for the identity.
Result Syntax
[ 'CloudFrontOriginAccessIdentity' => [ 'CloudFrontOriginAccessIdentityConfig' => [ 'CallerReference' => '<string>', 'Comment' => '<string>', ], 'Id' => '<string>', 'S3CanonicalUserId' => '<string>', ], 'ETag' => '<string>', 'Location' => '<string>', ]
Result Details
Members
- CloudFrontOriginAccessIdentity
-
- Type: CloudFrontOriginAccessIdentity structure
The origin access identity's information.
- ETag
-
- Type: string
The current version of the origin access identity created.
- Location
-
- Type: string
The fully qualified URI of the new origin access identity just created. For example:
https://cloudfront.amazonaws.com/2010-11-01/origin-access-identity/cloudfront/E74FTE3AJFJ256A
.
Errors
- CloudFrontOriginAccessIdentityAlreadyExists:
If the
CallerReference
is a value you already sent in a previous request to create an identity but the content of theCloudFrontOriginAccessIdentityConfig
is different from the original request, CloudFront returns aCloudFrontOriginAccessIdentityAlreadyExists
error.- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- TooManyCloudFrontOriginAccessIdentities:
Processing your request would cause you to exceed the maximum number of origin access identities allowed.
- InvalidArgument:
The argument is invalid.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.
Examples
Example 1:
$result = $client->createCloudFrontOriginAccessIdentity([ ]);
CreateDistribution
$result = $client->createDistribution
([/* ... */]); $promise = $client->createDistributionAsync
([/* ... */]);
Creates a new web distribution. Send a POST
request to the /CloudFront API version/distribution
/distribution ID
resource.
Parameter Syntax
$result = $client->createDistribution([ 'DistributionConfig' => [ // REQUIRED 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ // REQUIRED 'Cookies' => [ // REQUIRED 'Forward' => 'none|whitelist|all', // REQUIRED 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'QueryString' => true || false, // REQUIRED 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, // REQUIRED 'PathPattern' => '<string>', // REQUIRED 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', // REQUIRED 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', // REQUIRED ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'CallerReference' => '<string>', // REQUIRED 'Comment' => '<string>', // REQUIRED 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, // REQUIRED 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'DefaultCacheBehavior' => [ // REQUIRED 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ // REQUIRED 'Cookies' => [ // REQUIRED 'Forward' => 'none|whitelist|all', // REQUIRED 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'QueryString' => true || false, // REQUIRED 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, // REQUIRED 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', // REQUIRED 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', // REQUIRED ], 'DefaultRootObject' => '<string>', 'Enabled' => true || false, // REQUIRED 'HttpVersion' => 'http1.1|http2', 'IsIPV6Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'IncludeCookies' => true || false, // REQUIRED 'Prefix' => '<string>', // REQUIRED ], 'Origins' => [ // REQUIRED 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', // REQUIRED 'HeaderValue' => '<string>', // REQUIRED ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, // REQUIRED 'HTTPSPort' => <integer>, // REQUIRED 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', // REQUIRED 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], ], 'DomainName' => '<string>', // REQUIRED 'Id' => '<string>', // REQUIRED 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', // REQUIRED ], ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED 'RestrictionType' => 'blacklist|whitelist|none', // REQUIRED ], ], 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], ]);
Parameter Details
Members
- DistributionConfig
-
- Required: Yes
- Type: DistributionConfig structure
The distribution's configuration information.
Result Syntax
[ 'Distribution' => [ 'ARN' => '<string>', 'ActiveTrustedSigners' => [ 'Enabled' => true || false, 'Items' => [ [ 'AwsAccountNumber' => '<string>', 'KeyPairIds' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Quantity' => <integer>, ], 'DistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'PathPattern' => '<string>', 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], // ... ], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'DefaultCacheBehavior' => [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], 'DefaultRootObject' => '<string>', 'Enabled' => true || false, 'HttpVersion' => 'http1.1|http2', 'IsIPV6Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'IncludeCookies' => true || false, 'Prefix' => '<string>', ], 'Origins' => [ 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', 'HeaderValue' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, 'HTTPSPort' => <integer>, 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'DomainName' => '<string>', 'Id' => '<string>', 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', ], ], // ... ], 'Quantity' => <integer>, ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, 'RestrictionType' => 'blacklist|whitelist|none', ], ], 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], 'DomainName' => '<string>', 'Id' => '<string>', 'InProgressInvalidationBatches' => <integer>, 'LastModifiedTime' => <DateTime>, 'Status' => '<string>', ], 'ETag' => '<string>', 'Location' => '<string>', ]
Result Details
Members
- Distribution
-
- Type: Distribution structure
The distribution's information.
- ETag
-
- Type: string
The current version of the distribution created.
- Location
-
- Type: string
The fully qualified URI of the new distribution resource just created. For example:
https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5
.
Errors
- CNAMEAlreadyExists:
- This error does not currently have a description.
- DistributionAlreadyExists:
The caller reference you attempted to create the distribution with is associated with another distribution.
- InvalidOrigin:
The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.
- InvalidOriginAccessIdentity:
The origin access identity is not valid or doesn't exist.
- AccessDenied:
Access denied.
- TooManyTrustedSigners:
Your request contains more trusted signers than are allowed per distribution.
- TrustedSignerDoesNotExist:
One or more of your trusted signers don't exist.
- InvalidViewerCertificate:
- This error does not currently have a description.
- InvalidMinimumProtocolVersion:
- This error does not currently have a description.
- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- TooManyDistributionCNAMEs:
Your request contains more CNAMEs than are allowed per distribution.
- TooManyDistributions:
Processing your request would cause you to exceed the maximum number of distributions allowed.
- InvalidDefaultRootObject:
The default root object file name is too big or contains an invalid character.
- InvalidRelativePath:
The relative path is too big, is not URL-encoded, or does not begin with a slash (/).
- InvalidErrorCode:
- This error does not currently have a description.
- InvalidResponseCode:
- This error does not currently have a description.
- InvalidArgument:
The argument is invalid.
- InvalidRequiredProtocol:
This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the
RequiredProtocols
element from your distribution configuration.- NoSuchOrigin:
No origin exists with the specified
Origin Id
.- TooManyOrigins:
You cannot create more origins for the distribution.
- TooManyCacheBehaviors:
You cannot create more cache behaviors for the distribution.
- TooManyCookieNamesInWhiteList:
Your request contains more cookie names in the whitelist than are allowed per cache behavior.
- InvalidForwardCookies:
Your request contains forward cookies option which doesn't match with the expectation for the
whitelisted
list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.- TooManyHeadersInForwardedValues:
- This error does not currently have a description.
- InvalidHeadersForS3Origin:
- This error does not currently have a description.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.- TooManyCertificates:
You cannot create anymore custom SSL/TLS certificates.
- InvalidLocationCode:
- This error does not currently have a description.
- InvalidGeoRestrictionParameter:
- This error does not currently have a description.
- InvalidProtocolSettings:
You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI).
- InvalidTTLOrder:
- This error does not currently have a description.
- InvalidWebACLId:
- This error does not currently have a description.
- TooManyOriginCustomHeaders:
- This error does not currently have a description.
- TooManyQueryStringParameters:
- This error does not currently have a description.
- InvalidQueryStringParameters:
- This error does not currently have a description.
- TooManyDistributionsWithLambdaAssociations:
Processing your request would cause the maximum number of distributions with Lambda function associations per owner to be exceeded.
- TooManyLambdaFunctionAssociations:
Your request contains more Lambda function associations than are allowed per distribution.
- InvalidLambdaFunctionAssociation:
The specified Lambda function association is invalid.
- InvalidOriginReadTimeout:
- This error does not currently have a description.
- InvalidOriginKeepaliveTimeout:
- This error does not currently have a description.
Examples
Example 1:
$result = $client->createDistribution([ ]);
CreateDistributionWithTags
$result = $client->createDistributionWithTags
([/* ... */]); $promise = $client->createDistributionWithTagsAsync
([/* ... */]);
Create a new distribution with tags.
Parameter Syntax
$result = $client->createDistributionWithTags([ 'DistributionConfigWithTags' => [ // REQUIRED 'DistributionConfig' => [ // REQUIRED 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ // REQUIRED 'Cookies' => [ // REQUIRED 'Forward' => 'none|whitelist|all', // REQUIRED 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'QueryString' => true || false, // REQUIRED 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, // REQUIRED 'PathPattern' => '<string>', // REQUIRED 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', // REQUIRED 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', // REQUIRED ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'CallerReference' => '<string>', // REQUIRED 'Comment' => '<string>', // REQUIRED 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, // REQUIRED 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'DefaultCacheBehavior' => [ // REQUIRED 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ // REQUIRED 'Cookies' => [ // REQUIRED 'Forward' => 'none|whitelist|all', // REQUIRED 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'QueryString' => true || false, // REQUIRED 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, // REQUIRED 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', // REQUIRED 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', // REQUIRED ], 'DefaultRootObject' => '<string>', 'Enabled' => true || false, // REQUIRED 'HttpVersion' => 'http1.1|http2', 'IsIPV6Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'IncludeCookies' => true || false, // REQUIRED 'Prefix' => '<string>', // REQUIRED ], 'Origins' => [ // REQUIRED 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', // REQUIRED 'HeaderValue' => '<string>', // REQUIRED ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, // REQUIRED 'HTTPSPort' => <integer>, // REQUIRED 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', // REQUIRED 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], ], 'DomainName' => '<string>', // REQUIRED 'Id' => '<string>', // REQUIRED 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', // REQUIRED ], ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED 'RestrictionType' => 'blacklist|whitelist|none', // REQUIRED ], ], 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], 'Tags' => [ // REQUIRED 'Items' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', ], // ... ], ], ], ]);
Parameter Details
Members
- DistributionConfigWithTags
-
- Required: Yes
- Type: DistributionConfigWithTags structure
The distribution's configuration information.
Result Syntax
[ 'Distribution' => [ 'ARN' => '<string>', 'ActiveTrustedSigners' => [ 'Enabled' => true || false, 'Items' => [ [ 'AwsAccountNumber' => '<string>', 'KeyPairIds' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Quantity' => <integer>, ], 'DistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'PathPattern' => '<string>', 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], // ... ], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'DefaultCacheBehavior' => [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], 'DefaultRootObject' => '<string>', 'Enabled' => true || false, 'HttpVersion' => 'http1.1|http2', 'IsIPV6Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'IncludeCookies' => true || false, 'Prefix' => '<string>', ], 'Origins' => [ 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', 'HeaderValue' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, 'HTTPSPort' => <integer>, 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'DomainName' => '<string>', 'Id' => '<string>', 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', ], ], // ... ], 'Quantity' => <integer>, ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, 'RestrictionType' => 'blacklist|whitelist|none', ], ], 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], 'DomainName' => '<string>', 'Id' => '<string>', 'InProgressInvalidationBatches' => <integer>, 'LastModifiedTime' => <DateTime>, 'Status' => '<string>', ], 'ETag' => '<string>', 'Location' => '<string>', ]
Result Details
Members
- Distribution
-
- Type: Distribution structure
The distribution's information.
- ETag
-
- Type: string
The current version of the distribution created.
- Location
-
- Type: string
The fully qualified URI of the new distribution resource just created. For example:
https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5
.
Errors
- CNAMEAlreadyExists:
- This error does not currently have a description.
- DistributionAlreadyExists:
The caller reference you attempted to create the distribution with is associated with another distribution.
- InvalidOrigin:
The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.
- InvalidOriginAccessIdentity:
The origin access identity is not valid or doesn't exist.
- AccessDenied:
Access denied.
- TooManyTrustedSigners:
Your request contains more trusted signers than are allowed per distribution.
- TrustedSignerDoesNotExist:
One or more of your trusted signers don't exist.
- InvalidViewerCertificate:
- This error does not currently have a description.
- InvalidMinimumProtocolVersion:
- This error does not currently have a description.
- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- TooManyDistributionCNAMEs:
Your request contains more CNAMEs than are allowed per distribution.
- TooManyDistributions:
Processing your request would cause you to exceed the maximum number of distributions allowed.
- InvalidDefaultRootObject:
The default root object file name is too big or contains an invalid character.
- InvalidRelativePath:
The relative path is too big, is not URL-encoded, or does not begin with a slash (/).
- InvalidErrorCode:
- This error does not currently have a description.
- InvalidResponseCode:
- This error does not currently have a description.
- InvalidArgument:
The argument is invalid.
- InvalidRequiredProtocol:
This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the
RequiredProtocols
element from your distribution configuration.- NoSuchOrigin:
No origin exists with the specified
Origin Id
.- TooManyOrigins:
You cannot create more origins for the distribution.
- TooManyCacheBehaviors:
You cannot create more cache behaviors for the distribution.
- TooManyCookieNamesInWhiteList:
Your request contains more cookie names in the whitelist than are allowed per cache behavior.
- InvalidForwardCookies:
Your request contains forward cookies option which doesn't match with the expectation for the
whitelisted
list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.- TooManyHeadersInForwardedValues:
- This error does not currently have a description.
- InvalidHeadersForS3Origin:
- This error does not currently have a description.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.- TooManyCertificates:
You cannot create anymore custom SSL/TLS certificates.
- InvalidLocationCode:
- This error does not currently have a description.
- InvalidGeoRestrictionParameter:
- This error does not currently have a description.
- InvalidProtocolSettings:
You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI).
- InvalidTTLOrder:
- This error does not currently have a description.
- InvalidWebACLId:
- This error does not currently have a description.
- TooManyOriginCustomHeaders:
- This error does not currently have a description.
- InvalidTagging:
- This error does not currently have a description.
- TooManyQueryStringParameters:
- This error does not currently have a description.
- InvalidQueryStringParameters:
- This error does not currently have a description.
- TooManyDistributionsWithLambdaAssociations:
Processing your request would cause the maximum number of distributions with Lambda function associations per owner to be exceeded.
- TooManyLambdaFunctionAssociations:
Your request contains more Lambda function associations than are allowed per distribution.
- InvalidLambdaFunctionAssociation:
The specified Lambda function association is invalid.
- InvalidOriginReadTimeout:
- This error does not currently have a description.
- InvalidOriginKeepaliveTimeout:
- This error does not currently have a description.
Examples
Example 1:
$result = $client->createDistributionWithTags([ ]);
CreateInvalidation
$result = $client->createInvalidation
([/* ... */]); $promise = $client->createInvalidationAsync
([/* ... */]);
Create a new invalidation.
Parameter Syntax
$result = $client->createInvalidation([ 'DistributionId' => '<string>', // REQUIRED 'InvalidationBatch' => [ // REQUIRED 'CallerReference' => '<string>', // REQUIRED 'Paths' => [ // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], ]);
Parameter Details
Members
- DistributionId
-
- Required: Yes
- Type: string
The distribution's id.
- InvalidationBatch
-
- Required: Yes
- Type: InvalidationBatch structure
The batch information for the invalidation.
Result Syntax
[ 'Invalidation' => [ 'CreateTime' => <DateTime>, 'Id' => '<string>', 'InvalidationBatch' => [ 'CallerReference' => '<string>', 'Paths' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Status' => '<string>', ], 'Location' => '<string>', ]
Result Details
Members
- Invalidation
-
- Type: Invalidation structure
The invalidation's information.
- Location
-
- Type: string
The fully qualified URI of the distribution and invalidation batch request, including the
Invalidation ID
.
Errors
- AccessDenied:
Access denied.
- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- InvalidArgument:
The argument is invalid.
- NoSuchDistribution:
The specified distribution does not exist.
- BatchTooLarge:
- This error does not currently have a description.
- TooManyInvalidationsInProgress:
You have exceeded the maximum number of allowable InProgress invalidation batch requests, or invalidation objects.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.
Examples
Example 1:
$result = $client->createInvalidation([ ]);
CreateStreamingDistribution
$result = $client->createStreamingDistribution
([/* ... */]); $promise = $client->createStreamingDistributionAsync
([/* ... */]);
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.
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.
Parameter Syntax
$result = $client->createStreamingDistribution([ 'StreamingDistributionConfig' => [ // REQUIRED 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'CallerReference' => '<string>', // REQUIRED 'Comment' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'Logging' => [ 'Bucket' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'Prefix' => '<string>', // REQUIRED ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ // REQUIRED 'DomainName' => '<string>', // REQUIRED 'OriginAccessIdentity' => '<string>', // REQUIRED ], 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], ]);
Parameter Details
Members
- StreamingDistributionConfig
-
- Required: Yes
- Type: StreamingDistributionConfig structure
The streaming distribution's configuration information.
Result Syntax
[ 'ETag' => '<string>', 'Location' => '<string>', 'StreamingDistribution' => [ 'ARN' => '<string>', 'ActiveTrustedSigners' => [ 'Enabled' => true || false, 'Items' => [ [ 'AwsAccountNumber' => '<string>', 'KeyPairIds' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Quantity' => <integer>, ], 'DomainName' => '<string>', 'Id' => '<string>', 'LastModifiedTime' => <DateTime>, 'Status' => '<string>', 'StreamingDistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'Prefix' => '<string>', ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ 'DomainName' => '<string>', 'OriginAccessIdentity' => '<string>', ], 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], ], ]
Result Details
Members
- ETag
-
- Type: string
The current version of the streaming distribution created.
- Location
-
- Type: string
The fully qualified URI of the new streaming distribution resource just created. For example:
https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8
. - StreamingDistribution
-
- Type: StreamingDistribution structure
The streaming distribution's information.
Errors
- CNAMEAlreadyExists:
- This error does not currently have a description.
- StreamingDistributionAlreadyExists:
- This error does not currently have a description.
- InvalidOrigin:
The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.
- InvalidOriginAccessIdentity:
The origin access identity is not valid or doesn't exist.
- AccessDenied:
Access denied.
- TooManyTrustedSigners:
Your request contains more trusted signers than are allowed per distribution.
- TrustedSignerDoesNotExist:
One or more of your trusted signers don't exist.
- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- TooManyStreamingDistributionCNAMEs:
- This error does not currently have a description.
- TooManyStreamingDistributions:
Processing your request would cause you to exceed the maximum number of streaming distributions allowed.
- InvalidArgument:
The argument is invalid.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.
Examples
Example 1:
$result = $client->createStreamingDistribution([ ]);
CreateStreamingDistributionWithTags
$result = $client->createStreamingDistributionWithTags
([/* ... */]); $promise = $client->createStreamingDistributionWithTagsAsync
([/* ... */]);
Create a new streaming distribution with tags.
Parameter Syntax
$result = $client->createStreamingDistributionWithTags([ 'StreamingDistributionConfigWithTags' => [ // REQUIRED 'StreamingDistributionConfig' => [ // REQUIRED 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'CallerReference' => '<string>', // REQUIRED 'Comment' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'Logging' => [ 'Bucket' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'Prefix' => '<string>', // REQUIRED ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ // REQUIRED 'DomainName' => '<string>', // REQUIRED 'OriginAccessIdentity' => '<string>', // REQUIRED ], 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'Tags' => [ // REQUIRED 'Items' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', ], // ... ], ], ], ]);
Parameter Details
Members
- StreamingDistributionConfigWithTags
-
- Required: Yes
- Type: StreamingDistributionConfigWithTags structure
The streaming distribution's configuration information.
Result Syntax
[ 'ETag' => '<string>', 'Location' => '<string>', 'StreamingDistribution' => [ 'ARN' => '<string>', 'ActiveTrustedSigners' => [ 'Enabled' => true || false, 'Items' => [ [ 'AwsAccountNumber' => '<string>', 'KeyPairIds' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Quantity' => <integer>, ], 'DomainName' => '<string>', 'Id' => '<string>', 'LastModifiedTime' => <DateTime>, 'Status' => '<string>', 'StreamingDistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'Prefix' => '<string>', ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ 'DomainName' => '<string>', 'OriginAccessIdentity' => '<string>', ], 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], ], ]
Result Details
Members
- ETag
-
- Type: string
- Location
-
- Type: string
The fully qualified URI of the new streaming distribution resource just created. For example:
https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8
. - StreamingDistribution
-
- Type: StreamingDistribution structure
The streaming distribution's information.
Errors
- CNAMEAlreadyExists:
- This error does not currently have a description.
- StreamingDistributionAlreadyExists:
- This error does not currently have a description.
- InvalidOrigin:
The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.
- InvalidOriginAccessIdentity:
The origin access identity is not valid or doesn't exist.
- AccessDenied:
Access denied.
- TooManyTrustedSigners:
Your request contains more trusted signers than are allowed per distribution.
- TrustedSignerDoesNotExist:
One or more of your trusted signers don't exist.
- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- TooManyStreamingDistributionCNAMEs:
- This error does not currently have a description.
- TooManyStreamingDistributions:
Processing your request would cause you to exceed the maximum number of streaming distributions allowed.
- InvalidArgument:
The argument is invalid.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.- InvalidTagging:
- This error does not currently have a description.
DeleteCloudFrontOriginAccessIdentity
$result = $client->deleteCloudFrontOriginAccessIdentity
([/* ... */]); $promise = $client->deleteCloudFrontOriginAccessIdentityAsync
([/* ... */]);
Delete an origin access identity.
Parameter Syntax
$result = $client->deleteCloudFrontOriginAccessIdentity([ 'Id' => '<string>', // REQUIRED 'IfMatch' => '<string>', ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The origin access identity's ID.
- IfMatch
-
- Type: string
The value of the
ETag
header you received from a previousGET
orPUT
request. For example:E2QWRUHAPOMQZL
.
Result Syntax
[]
Result Details
Errors
- AccessDenied:
Access denied.
- InvalidIfMatchVersion:
The
If-Match
version is missing or not valid for the distribution.- NoSuchCloudFrontOriginAccessIdentity:
The specified origin access identity does not exist.
- PreconditionFailed:
The precondition given in one or more of the request-header fields evaluated to
false
.- CloudFrontOriginAccessIdentityInUse:
- This error does not currently have a description.
Examples
Example 1:
$result = $client->deleteCloudFrontOriginAccessIdentity([ ]);
DeleteDistribution
$result = $client->deleteDistribution
([/* ... */]); $promise = $client->deleteDistributionAsync
([/* ... */]);
Delete a distribution.
Parameter Syntax
$result = $client->deleteDistribution([ 'Id' => '<string>', // REQUIRED 'IfMatch' => '<string>', ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The distribution ID.
- IfMatch
-
- Type: string
The value of the
ETag
header that you received when you disabled the distribution. For example:E2QWRUHAPOMQZL
.
Result Syntax
[]
Result Details
Errors
- AccessDenied:
Access denied.
- DistributionNotDisabled:
- This error does not currently have a description.
- InvalidIfMatchVersion:
The
If-Match
version is missing or not valid for the distribution.- NoSuchDistribution:
The specified distribution does not exist.
- PreconditionFailed:
The precondition given in one or more of the request-header fields evaluated to
false
.
Examples
Example 1:
$result = $client->deleteDistribution([ ]);
DeleteServiceLinkedRole
$result = $client->deleteServiceLinkedRole
([/* ... */]); $promise = $client->deleteServiceLinkedRoleAsync
([/* ... */]);
Parameter Syntax
$result = $client->deleteServiceLinkedRole([ 'RoleName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- RoleName
-
- Required: Yes
- Type: string
Result Syntax
[]
Result Details
Errors
- InvalidArgument:
The argument is invalid.
- AccessDenied:
Access denied.
- ResourceInUse:
- This error does not currently have a description.
- NoSuchResource:
- This error does not currently have a description.
DeleteStreamingDistribution
$result = $client->deleteStreamingDistribution
([/* ... */]); $promise = $client->deleteStreamingDistributionAsync
([/* ... */]);
Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, perform the following steps.
To delete an RTMP distribution using the CloudFront API:
-
Disable the RTMP distribution.
-
Submit a
GET Streaming Distribution Config
request to get the current configuration and theEtag
header for the distribution. -
Update the XML document that was returned in the response to your
GET Streaming Distribution Config
request to change the value ofEnabled
tofalse
. -
Submit a
PUT Streaming Distribution Config
request to update the configuration for your distribution. In the request body, include the XML document that you updated in Step 3. Then set the value of the HTTPIf-Match
header to the value of theETag
header that CloudFront returned when you submitted theGET Streaming Distribution Config
request in Step 2. -
Review the response to the
PUT Streaming Distribution Config
request to confirm that the distribution was successfully disabled. -
Submit a
GET Streaming Distribution Config
request to confirm that your changes have propagated. When propagation is complete, the value ofStatus
isDeployed
. -
Submit a
DELETE Streaming Distribution
request. Set the value of the HTTPIf-Match
header to the value of theETag
header that CloudFront returned when you submitted theGET Streaming Distribution Config
request in Step 2. -
Review the response to your
DELETE Streaming Distribution
request to confirm that the distribution was successfully deleted.
For information about deleting a distribution using the CloudFront console, see Deleting a Distribution in the Amazon CloudFront Developer Guide.
Parameter Syntax
$result = $client->deleteStreamingDistribution([ 'Id' => '<string>', // REQUIRED 'IfMatch' => '<string>', ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The distribution ID.
- IfMatch
-
- Type: string
The value of the
ETag
header that you received when you disabled the streaming distribution. For example:E2QWRUHAPOMQZL
.
Result Syntax
[]
Result Details
Errors
- AccessDenied:
Access denied.
- StreamingDistributionNotDisabled:
- This error does not currently have a description.
- InvalidIfMatchVersion:
The
If-Match
version is missing or not valid for the distribution.- NoSuchStreamingDistribution:
The specified streaming distribution does not exist.
- PreconditionFailed:
The precondition given in one or more of the request-header fields evaluated to
false
.
Examples
Example 1:
$result = $client->deleteStreamingDistribution([ ]);
GetCloudFrontOriginAccessIdentity
$result = $client->getCloudFrontOriginAccessIdentity
([/* ... */]); $promise = $client->getCloudFrontOriginAccessIdentityAsync
([/* ... */]);
Get the information about an origin access identity.
Parameter Syntax
$result = $client->getCloudFrontOriginAccessIdentity([ 'Id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The identity's ID.
Result Syntax
[ 'CloudFrontOriginAccessIdentity' => [ 'CloudFrontOriginAccessIdentityConfig' => [ 'CallerReference' => '<string>', 'Comment' => '<string>', ], 'Id' => '<string>', 'S3CanonicalUserId' => '<string>', ], 'ETag' => '<string>', ]
Result Details
Members
- CloudFrontOriginAccessIdentity
-
- Type: CloudFrontOriginAccessIdentity structure
The origin access identity's information.
- ETag
-
- Type: string
The current version of the origin access identity's information. For example:
E2QWRUHAPOMQZL
.
Errors
- NoSuchCloudFrontOriginAccessIdentity:
The specified origin access identity does not exist.
- AccessDenied:
Access denied.
Examples
Example 1:
$result = $client->getCloudFrontOriginAccessIdentity([ ]);
GetCloudFrontOriginAccessIdentityConfig
$result = $client->getCloudFrontOriginAccessIdentityConfig
([/* ... */]); $promise = $client->getCloudFrontOriginAccessIdentityConfigAsync
([/* ... */]);
Get the configuration information about an origin access identity.
Parameter Syntax
$result = $client->getCloudFrontOriginAccessIdentityConfig([ 'Id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The identity's ID.
Result Syntax
[ 'CloudFrontOriginAccessIdentityConfig' => [ 'CallerReference' => '<string>', 'Comment' => '<string>', ], 'ETag' => '<string>', ]
Result Details
Members
- CloudFrontOriginAccessIdentityConfig
-
- Type: CloudFrontOriginAccessIdentityConfig structure
The origin access identity's configuration information.
- ETag
-
- Type: string
The current version of the configuration. For example:
E2QWRUHAPOMQZL
.
Errors
- NoSuchCloudFrontOriginAccessIdentity:
The specified origin access identity does not exist.
- AccessDenied:
Access denied.
Examples
Example 1:
$result = $client->getCloudFrontOriginAccessIdentityConfig([ ]);
GetDistribution
$result = $client->getDistribution
([/* ... */]); $promise = $client->getDistributionAsync
([/* ... */]);
Get the information about a distribution.
Parameter Syntax
$result = $client->getDistribution([ 'Id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The distribution's ID.
Result Syntax
[ 'Distribution' => [ 'ARN' => '<string>', 'ActiveTrustedSigners' => [ 'Enabled' => true || false, 'Items' => [ [ 'AwsAccountNumber' => '<string>', 'KeyPairIds' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Quantity' => <integer>, ], 'DistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'PathPattern' => '<string>', 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], // ... ], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'DefaultCacheBehavior' => [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], 'DefaultRootObject' => '<string>', 'Enabled' => true || false, 'HttpVersion' => 'http1.1|http2', 'IsIPV6Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'IncludeCookies' => true || false, 'Prefix' => '<string>', ], 'Origins' => [ 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', 'HeaderValue' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, 'HTTPSPort' => <integer>, 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'DomainName' => '<string>', 'Id' => '<string>', 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', ], ], // ... ], 'Quantity' => <integer>, ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, 'RestrictionType' => 'blacklist|whitelist|none', ], ], 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], 'DomainName' => '<string>', 'Id' => '<string>', 'InProgressInvalidationBatches' => <integer>, 'LastModifiedTime' => <DateTime>, 'Status' => '<string>', ], 'ETag' => '<string>', ]
Result Details
Members
- Distribution
-
- Type: Distribution structure
The distribution's information.
- ETag
-
- Type: string
The current version of the distribution's information. For example:
E2QWRUHAPOMQZL
.
Errors
- NoSuchDistribution:
The specified distribution does not exist.
- AccessDenied:
Access denied.
Examples
Example 1:
$result = $client->getDistribution([ ]);
GetDistributionConfig
$result = $client->getDistributionConfig
([/* ... */]); $promise = $client->getDistributionConfigAsync
([/* ... */]);
Get the configuration information about a distribution.
Parameter Syntax
$result = $client->getDistributionConfig([ 'Id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The distribution's ID.
Result Syntax
[ 'DistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'PathPattern' => '<string>', 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], // ... ], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'DefaultCacheBehavior' => [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], 'DefaultRootObject' => '<string>', 'Enabled' => true || false, 'HttpVersion' => 'http1.1|http2', 'IsIPV6Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'IncludeCookies' => true || false, 'Prefix' => '<string>', ], 'Origins' => [ 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', 'HeaderValue' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, 'HTTPSPort' => <integer>, 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'DomainName' => '<string>', 'Id' => '<string>', 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', ], ], // ... ], 'Quantity' => <integer>, ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, 'RestrictionType' => 'blacklist|whitelist|none', ], ], 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], 'ETag' => '<string>', ]
Result Details
Members
- DistributionConfig
-
- Type: DistributionConfig structure
The distribution's configuration information.
- ETag
-
- Type: string
The current version of the configuration. For example:
E2QWRUHAPOMQZL
.
Errors
- NoSuchDistribution:
The specified distribution does not exist.
- AccessDenied:
Access denied.
Examples
Example 1:
$result = $client->getDistributionConfig([ ]);
GetInvalidation
$result = $client->getInvalidation
([/* ... */]); $promise = $client->getInvalidationAsync
([/* ... */]);
Get the information about an invalidation.
Parameter Syntax
$result = $client->getInvalidation([ 'DistributionId' => '<string>', // REQUIRED 'Id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DistributionId
-
- Required: Yes
- Type: string
The distribution's ID.
- Id
-
- Required: Yes
- Type: string
The identifier for the invalidation request, for example,
IDFDVBD632BHDS5
.
Result Syntax
[ 'Invalidation' => [ 'CreateTime' => <DateTime>, 'Id' => '<string>', 'InvalidationBatch' => [ 'CallerReference' => '<string>', 'Paths' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Status' => '<string>', ], ]
Result Details
Members
- Invalidation
-
- Type: Invalidation structure
The invalidation's information. For more information, see Invalidation Complex Type.
Errors
- NoSuchInvalidation:
The specified invalidation does not exist.
- NoSuchDistribution:
The specified distribution does not exist.
- AccessDenied:
Access denied.
Examples
Example 1:
$result = $client->getInvalidation([ ]);
GetStreamingDistribution
$result = $client->getStreamingDistribution
([/* ... */]); $promise = $client->getStreamingDistributionAsync
([/* ... */]);
Gets information about a specified RTMP distribution, including the distribution configuration.
Parameter Syntax
$result = $client->getStreamingDistribution([ 'Id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The streaming distribution's ID.
Result Syntax
[ 'ETag' => '<string>', 'StreamingDistribution' => [ 'ARN' => '<string>', 'ActiveTrustedSigners' => [ 'Enabled' => true || false, 'Items' => [ [ 'AwsAccountNumber' => '<string>', 'KeyPairIds' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Quantity' => <integer>, ], 'DomainName' => '<string>', 'Id' => '<string>', 'LastModifiedTime' => <DateTime>, 'Status' => '<string>', 'StreamingDistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'Prefix' => '<string>', ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ 'DomainName' => '<string>', 'OriginAccessIdentity' => '<string>', ], 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], ], ]
Result Details
Members
- ETag
-
- Type: string
The current version of the streaming distribution's information. For example:
E2QWRUHAPOMQZL
. - StreamingDistribution
-
- Type: StreamingDistribution structure
The streaming distribution's information.
Errors
- NoSuchStreamingDistribution:
The specified streaming distribution does not exist.
- AccessDenied:
Access denied.
Examples
Example 1:
$result = $client->getStreamingDistribution([ ]);
GetStreamingDistributionConfig
$result = $client->getStreamingDistributionConfig
([/* ... */]); $promise = $client->getStreamingDistributionConfigAsync
([/* ... */]);
Get the configuration information about a streaming distribution.
Parameter Syntax
$result = $client->getStreamingDistributionConfig([ 'Id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The streaming distribution's ID.
Result Syntax
[ 'ETag' => '<string>', 'StreamingDistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'Prefix' => '<string>', ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ 'DomainName' => '<string>', 'OriginAccessIdentity' => '<string>', ], 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], ]
Result Details
Members
- ETag
-
- Type: string
The current version of the configuration. For example:
E2QWRUHAPOMQZL
. - StreamingDistributionConfig
-
- Type: StreamingDistributionConfig structure
The streaming distribution's configuration information.
Errors
- NoSuchStreamingDistribution:
The specified streaming distribution does not exist.
- AccessDenied:
Access denied.
Examples
Example 1:
$result = $client->getStreamingDistributionConfig([ ]);
ListCloudFrontOriginAccessIdentities
$result = $client->listCloudFrontOriginAccessIdentities
([/* ... */]); $promise = $client->listCloudFrontOriginAccessIdentitiesAsync
([/* ... */]);
Lists origin access identities.
Parameter Syntax
$result = $client->listCloudFrontOriginAccessIdentities([ 'Marker' => '<string>', 'MaxItems' => '<string>', ]);
Parameter Details
Members
- Marker
-
- Type: string
Use this when paginating results to indicate where to begin in your list of origin access identities. The results include identities in the list that occur after the marker. To get the next page of results, set the
Marker
to the value of theNextMarker
from the current page's response (which is also the ID of the last identity on that page). - MaxItems
-
- Type: string
The maximum number of origin access identities you want in the response body.
Result Syntax
[ 'CloudFrontOriginAccessIdentityList' => [ 'IsTruncated' => true || false, 'Items' => [ [ 'Comment' => '<string>', 'Id' => '<string>', 'S3CanonicalUserId' => '<string>', ], // ... ], 'Marker' => '<string>', 'MaxItems' => <integer>, 'NextMarker' => '<string>', 'Quantity' => <integer>, ], ]
Result Details
Members
- CloudFrontOriginAccessIdentityList
-
- Type: CloudFrontOriginAccessIdentityList structure
The
CloudFrontOriginAccessIdentityList
type.
Errors
- InvalidArgument:
The argument is invalid.
Examples
Example 1:
$result = $client->listCloudFrontOriginAccessIdentities([ ]);
ListDistributions
$result = $client->listDistributions
([/* ... */]); $promise = $client->listDistributionsAsync
([/* ... */]);
List distributions.
Parameter Syntax
$result = $client->listDistributions([ 'Marker' => '<string>', 'MaxItems' => '<string>', ]);
Parameter Details
Members
- Marker
-
- Type: string
Use this when paginating results to indicate where to begin in your list of distributions. The results include distributions in the list that occur after the marker. To get the next page of results, set the
Marker
to the value of theNextMarker
from the current page's response (which is also the ID of the last distribution on that page). - MaxItems
-
- Type: string
The maximum number of distributions you want in the response body.
Result Syntax
[ 'DistributionList' => [ 'IsTruncated' => true || false, 'Items' => [ [ 'ARN' => '<string>', 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'PathPattern' => '<string>', 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], // ... ], 'Quantity' => <integer>, ], 'Comment' => '<string>', 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'DefaultCacheBehavior' => [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], 'DomainName' => '<string>', 'Enabled' => true || false, 'HttpVersion' => 'http1.1|http2', 'Id' => '<string>', 'IsIPV6Enabled' => true || false, 'LastModifiedTime' => <DateTime>, 'Origins' => [ 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', 'HeaderValue' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, 'HTTPSPort' => <integer>, 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'DomainName' => '<string>', 'Id' => '<string>', 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', ], ], // ... ], 'Quantity' => <integer>, ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, 'RestrictionType' => 'blacklist|whitelist|none', ], ], 'Status' => '<string>', 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], // ... ], 'Marker' => '<string>', 'MaxItems' => <integer>, 'NextMarker' => '<string>', 'Quantity' => <integer>, ], ]
Result Details
Members
- DistributionList
-
- Type: DistributionList structure
The
DistributionList
type.
Errors
- InvalidArgument:
The argument is invalid.
Examples
Example 1:
$result = $client->listDistributions([ ]);
ListDistributionsByWebACLId
$result = $client->listDistributionsByWebACLId
([/* ... */]); $promise = $client->listDistributionsByWebACLIdAsync
([/* ... */]);
List the distributions that are associated with a specified AWS WAF web ACL.
Parameter Syntax
$result = $client->listDistributionsByWebACLId([ 'Marker' => '<string>', 'MaxItems' => '<string>', 'WebACLId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Marker
-
- Type: string
Use
Marker
andMaxItems
to control pagination of results. If you have more thanMaxItems
distributions that satisfy the request, the response includes aNextMarker
element. To get the next page of results, submit another request. For the value ofMarker
, specify the value ofNextMarker
from the last response. (For the first request, omitMarker
.) - MaxItems
-
- Type: string
The maximum number of distributions that you want CloudFront to return in the response body. The maximum and default values are both 100.
- WebACLId
-
- Required: Yes
- Type: string
The ID of the AWS WAF web ACL that you want to list the associated distributions. If you specify "null" for the ID, the request returns a list of the distributions that aren't associated with a web ACL.
Result Syntax
[ 'DistributionList' => [ 'IsTruncated' => true || false, 'Items' => [ [ 'ARN' => '<string>', 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'PathPattern' => '<string>', 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], // ... ], 'Quantity' => <integer>, ], 'Comment' => '<string>', 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'DefaultCacheBehavior' => [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], 'DomainName' => '<string>', 'Enabled' => true || false, 'HttpVersion' => 'http1.1|http2', 'Id' => '<string>', 'IsIPV6Enabled' => true || false, 'LastModifiedTime' => <DateTime>, 'Origins' => [ 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', 'HeaderValue' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, 'HTTPSPort' => <integer>, 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'DomainName' => '<string>', 'Id' => '<string>', 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', ], ], // ... ], 'Quantity' => <integer>, ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, 'RestrictionType' => 'blacklist|whitelist|none', ], ], 'Status' => '<string>', 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], // ... ], 'Marker' => '<string>', 'MaxItems' => <integer>, 'NextMarker' => '<string>', 'Quantity' => <integer>, ], ]
Result Details
Members
- DistributionList
-
- Type: DistributionList structure
The
DistributionList
type.
Errors
- InvalidArgument:
The argument is invalid.
- InvalidWebACLId:
- This error does not currently have a description.
Examples
Example 1:
$result = $client->listDistributionsByWebACLId([ ]);
ListInvalidations
$result = $client->listInvalidations
([/* ... */]); $promise = $client->listInvalidationsAsync
([/* ... */]);
Lists invalidation batches.
Parameter Syntax
$result = $client->listInvalidations([ 'DistributionId' => '<string>', // REQUIRED 'Marker' => '<string>', 'MaxItems' => '<string>', ]);
Parameter Details
Members
- DistributionId
-
- Required: Yes
- Type: string
The distribution's ID.
- Marker
-
- Type: string
Use this parameter when paginating results to indicate where to begin in your list of invalidation batches. Because the results are returned in decreasing order from most recent to oldest, the most recent results are on the first page, the second page will contain earlier results, and so on. To get the next page of results, set
Marker
to the value of theNextMarker
from the current page's response. This value is the same as the ID of the last invalidation batch on that page. - MaxItems
-
- Type: string
The maximum number of invalidation batches that you want in the response body.
Result Syntax
[ 'InvalidationList' => [ 'IsTruncated' => true || false, 'Items' => [ [ 'CreateTime' => <DateTime>, 'Id' => '<string>', 'Status' => '<string>', ], // ... ], 'Marker' => '<string>', 'MaxItems' => <integer>, 'NextMarker' => '<string>', 'Quantity' => <integer>, ], ]
Result Details
Members
- InvalidationList
-
- Type: InvalidationList structure
Information about invalidation batches.
Errors
- InvalidArgument:
The argument is invalid.
- NoSuchDistribution:
The specified distribution does not exist.
- AccessDenied:
Access denied.
Examples
Example 1:
$result = $client->listInvalidations([ ]);
ListStreamingDistributions
$result = $client->listStreamingDistributions
([/* ... */]); $promise = $client->listStreamingDistributionsAsync
([/* ... */]);
List streaming distributions.
Parameter Syntax
$result = $client->listStreamingDistributions([ 'Marker' => '<string>', 'MaxItems' => '<string>', ]);
Parameter Details
Members
- Marker
-
- Type: string
The value that you provided for the
Marker
request parameter. - MaxItems
-
- Type: string
The value that you provided for the
MaxItems
request parameter.
Result Syntax
[ 'StreamingDistributionList' => [ 'IsTruncated' => true || false, 'Items' => [ [ 'ARN' => '<string>', 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Comment' => '<string>', 'DomainName' => '<string>', 'Enabled' => true || false, 'Id' => '<string>', 'LastModifiedTime' => <DateTime>, 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ 'DomainName' => '<string>', 'OriginAccessIdentity' => '<string>', ], 'Status' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Marker' => '<string>', 'MaxItems' => <integer>, 'NextMarker' => '<string>', 'Quantity' => <integer>, ], ]
Result Details
Members
- StreamingDistributionList
-
- Type: StreamingDistributionList structure
The
StreamingDistributionList
type.
Errors
- InvalidArgument:
The argument is invalid.
Examples
Example 1:
$result = $client->listStreamingDistributions([ ]);
ListTagsForResource
$result = $client->listTagsForResource
([/* ... */]); $promise = $client->listTagsForResourceAsync
([/* ... */]);
List tags for a CloudFront resource.
Parameter Syntax
$result = $client->listTagsForResource([ 'Resource' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Resource
-
- Required: Yes
- Type: string
An ARN of a CloudFront resource.
Result Syntax
[ 'Tags' => [ 'Items' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], ]
Result Details
Members
- Tags
-
- Required: Yes
- Type: Tags structure
A complex type that contains zero or more
Tag
elements.
Errors
- AccessDenied:
Access denied.
- InvalidArgument:
The argument is invalid.
- InvalidTagging:
- This error does not currently have a description.
- NoSuchResource:
- This error does not currently have a description.
Examples
Example 1:
$result = $client->listTagsForResource([ ]);
TagResource
$result = $client->tagResource
([/* ... */]); $promise = $client->tagResourceAsync
([/* ... */]);
Add tags to a CloudFront resource.
Parameter Syntax
$result = $client->tagResource([ 'Resource' => '<string>', // REQUIRED 'Tags' => [ // REQUIRED 'Items' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', ], // ... ], ], ]);
Parameter Details
Members
- Resource
-
- Required: Yes
- Type: string
An ARN of a CloudFront resource.
- Tags
-
- Required: Yes
- Type: Tags structure
A complex type that contains zero or more
Tag
elements.
Result Syntax
[]
Result Details
Errors
- AccessDenied:
Access denied.
- InvalidArgument:
The argument is invalid.
- InvalidTagging:
- This error does not currently have a description.
- NoSuchResource:
- This error does not currently have a description.
Examples
Example 1:
$result = $client->tagResource([ ]);
UntagResource
$result = $client->untagResource
([/* ... */]); $promise = $client->untagResourceAsync
([/* ... */]);
Remove tags from a CloudFront resource.
Parameter Syntax
$result = $client->untagResource([ 'Resource' => '<string>', // REQUIRED 'TagKeys' => [ // REQUIRED 'Items' => ['<string>', ...], ], ]);
Parameter Details
Members
- Resource
-
- Required: Yes
- Type: string
An ARN of a CloudFront resource.
- TagKeys
-
- Required: Yes
- Type: TagKeys structure
A complex type that contains zero or more
Tag
key elements.
Result Syntax
[]
Result Details
Errors
- AccessDenied:
Access denied.
- InvalidArgument:
The argument is invalid.
- InvalidTagging:
- This error does not currently have a description.
- NoSuchResource:
- This error does not currently have a description.
Examples
Example 1:
$result = $client->untagResource([ ]);
UpdateCloudFrontOriginAccessIdentity
$result = $client->updateCloudFrontOriginAccessIdentity
([/* ... */]); $promise = $client->updateCloudFrontOriginAccessIdentityAsync
([/* ... */]);
Update an origin access identity.
Parameter Syntax
$result = $client->updateCloudFrontOriginAccessIdentity([ 'CloudFrontOriginAccessIdentityConfig' => [ // REQUIRED 'CallerReference' => '<string>', // REQUIRED 'Comment' => '<string>', // REQUIRED ], 'Id' => '<string>', // REQUIRED 'IfMatch' => '<string>', ]);
Parameter Details
Members
- CloudFrontOriginAccessIdentityConfig
-
- Required: Yes
- Type: CloudFrontOriginAccessIdentityConfig structure
The identity's configuration information.
- Id
-
- Required: Yes
- Type: string
The identity's id.
- IfMatch
-
- Type: string
The value of the
ETag
header that you received when retrieving the identity's configuration. For example:E2QWRUHAPOMQZL
.
Result Syntax
[ 'CloudFrontOriginAccessIdentity' => [ 'CloudFrontOriginAccessIdentityConfig' => [ 'CallerReference' => '<string>', 'Comment' => '<string>', ], 'Id' => '<string>', 'S3CanonicalUserId' => '<string>', ], 'ETag' => '<string>', ]
Result Details
Members
- CloudFrontOriginAccessIdentity
-
- Type: CloudFrontOriginAccessIdentity structure
The origin access identity's information.
- ETag
-
- Type: string
The current version of the configuration. For example:
E2QWRUHAPOMQZL
.
Errors
- AccessDenied:
Access denied.
- IllegalUpdate:
Origin and
CallerReference
cannot be updated.- InvalidIfMatchVersion:
The
If-Match
version is missing or not valid for the distribution.- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- NoSuchCloudFrontOriginAccessIdentity:
The specified origin access identity does not exist.
- PreconditionFailed:
The precondition given in one or more of the request-header fields evaluated to
false
.- InvalidArgument:
The argument is invalid.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.
Examples
Example 1:
$result = $client->updateCloudFrontOriginAccessIdentity([ ]);
UpdateDistribution
$result = $client->updateDistribution
([/* ... */]); $promise = $client->updateDistributionAsync
([/* ... */]);
Updates the configuration for a web distribution. Perform the following steps.
For information about updating a distribution using the CloudFront console, see Creating or Updating a Web Distribution Using the CloudFront Console in the Amazon CloudFront Developer Guide.
To update a web distribution using the CloudFront API
-
Submit a GetDistributionConfig request to get the current configuration and an
Etag
header for the distribution.If you update the distribution again, you need to get a new
Etag
header. -
Update the XML document that was returned in the response to your
GetDistributionConfig
request to include the desired changes. You can't change the value ofCallerReference
. If you try to change this value, CloudFront returns anIllegalUpdate
error.The new configuration replaces the existing configuration; the values that you specify in an
UpdateDistribution
request are not merged into the existing configuration. When you add, delete, or replace values in an element that allows multiple values (for example,CNAME
), you must specify all of the values that you want to appear in the updated distribution. In addition, you must update the correspondingQuantity
element. -
Submit an
UpdateDistribution
request to update the configuration for your distribution:-
In the request body, include the XML document that you updated in Step 2. The request body must include an XML document with a
DistributionConfig
element. -
Set the value of the HTTP
If-Match
header to the value of theETag
header that CloudFront returned when you submitted theGetDistributionConfig
request in Step 1.
-
-
Review the response to the
UpdateDistribution
request to confirm that the configuration was successfully updated. -
Optional: Submit a GetDistribution request to confirm that your changes have propagated. When propagation is complete, the value of
Status
isDeployed
.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 distribution. 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 you're actually specifying.
Parameter Syntax
$result = $client->updateDistribution([ 'DistributionConfig' => [ // REQUIRED 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ // REQUIRED 'Cookies' => [ // REQUIRED 'Forward' => 'none|whitelist|all', // REQUIRED 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'QueryString' => true || false, // REQUIRED 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, // REQUIRED 'PathPattern' => '<string>', // REQUIRED 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', // REQUIRED 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', // REQUIRED ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'CallerReference' => '<string>', // REQUIRED 'Comment' => '<string>', // REQUIRED 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, // REQUIRED 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'DefaultCacheBehavior' => [ // REQUIRED 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ // REQUIRED 'Cookies' => [ // REQUIRED 'Forward' => 'none|whitelist|all', // REQUIRED 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'QueryString' => true || false, // REQUIRED 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, // REQUIRED 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', // REQUIRED 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', // REQUIRED ], 'DefaultRootObject' => '<string>', 'Enabled' => true || false, // REQUIRED 'HttpVersion' => 'http1.1|http2', 'IsIPV6Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'IncludeCookies' => true || false, // REQUIRED 'Prefix' => '<string>', // REQUIRED ], 'Origins' => [ // REQUIRED 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', // REQUIRED 'HeaderValue' => '<string>', // REQUIRED ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, // REQUIRED 'HTTPSPort' => <integer>, // REQUIRED 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', // REQUIRED 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], // REQUIRED 'Quantity' => <integer>, // REQUIRED ], ], 'DomainName' => '<string>', // REQUIRED 'Id' => '<string>', // REQUIRED 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', // REQUIRED ], ], // ... ], 'Quantity' => <integer>, // REQUIRED ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED 'RestrictionType' => 'blacklist|whitelist|none', // REQUIRED ], ], 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], 'Id' => '<string>', // REQUIRED 'IfMatch' => '<string>', ]);
Parameter Details
Members
- DistributionConfig
-
- Required: Yes
- Type: DistributionConfig structure
The distribution's configuration information.
- Id
-
- Required: Yes
- Type: string
The distribution's id.
- IfMatch
-
- Type: string
The value of the
ETag
header that you received when retrieving the distribution's configuration. For example:E2QWRUHAPOMQZL
.
Result Syntax
[ 'Distribution' => [ 'ARN' => '<string>', 'ActiveTrustedSigners' => [ 'Enabled' => true || false, 'Items' => [ [ 'AwsAccountNumber' => '<string>', 'KeyPairIds' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Quantity' => <integer>, ], 'DistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CacheBehaviors' => [ 'Items' => [ [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'PathPattern' => '<string>', 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], // ... ], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'CustomErrorResponses' => [ 'Items' => [ [ 'ErrorCachingMinTTL' => <integer>, 'ErrorCode' => <integer>, 'ResponseCode' => '<string>', 'ResponsePagePath' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'DefaultCacheBehavior' => [ 'AllowedMethods' => [ 'CachedMethods' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'Compress' => true || false, 'DefaultTTL' => <integer>, 'ForwardedValues' => [ 'Cookies' => [ 'Forward' => 'none|whitelist|all', 'WhitelistedNames' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'Headers' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'QueryString' => true || false, 'QueryStringCacheKeys' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'LambdaFunctionAssociations' => [ 'Items' => [ [ 'EventType' => 'viewer-request|viewer-response|origin-request|origin-response', 'LambdaFunctionARN' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'MaxTTL' => <integer>, 'MinTTL' => <integer>, 'SmoothStreaming' => true || false, 'TargetOriginId' => '<string>', 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'ViewerProtocolPolicy' => 'allow-all|https-only|redirect-to-https', ], 'DefaultRootObject' => '<string>', 'Enabled' => true || false, 'HttpVersion' => 'http1.1|http2', 'IsIPV6Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'IncludeCookies' => true || false, 'Prefix' => '<string>', ], 'Origins' => [ 'Items' => [ [ 'CustomHeaders' => [ 'Items' => [ [ 'HeaderName' => '<string>', 'HeaderValue' => '<string>', ], // ... ], 'Quantity' => <integer>, ], 'CustomOriginConfig' => [ 'HTTPPort' => <integer>, 'HTTPSPort' => <integer>, 'OriginKeepaliveTimeout' => <integer>, 'OriginProtocolPolicy' => 'http-only|match-viewer|https-only', 'OriginReadTimeout' => <integer>, 'OriginSslProtocols' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], 'DomainName' => '<string>', 'Id' => '<string>', 'OriginPath' => '<string>', 'S3OriginConfig' => [ 'OriginAccessIdentity' => '<string>', ], ], // ... ], 'Quantity' => <integer>, ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'Restrictions' => [ 'GeoRestriction' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, 'RestrictionType' => 'blacklist|whitelist|none', ], ], 'ViewerCertificate' => [ 'ACMCertificateArn' => '<string>', 'Certificate' => '<string>', 'CertificateSource' => 'cloudfront|iam|acm', 'CloudFrontDefaultCertificate' => true || false, 'IAMCertificateId' => '<string>', 'MinimumProtocolVersion' => 'SSLv3|TLSv1|TLSv1_2016|TLSv1.1_2016|TLSv1.2_2018', 'SSLSupportMethod' => 'sni-only|vip', ], 'WebACLId' => '<string>', ], 'DomainName' => '<string>', 'Id' => '<string>', 'InProgressInvalidationBatches' => <integer>, 'LastModifiedTime' => <DateTime>, 'Status' => '<string>', ], 'ETag' => '<string>', ]
Result Details
Members
- Distribution
-
- Type: Distribution structure
The distribution's information.
- ETag
-
- Type: string
The current version of the configuration. For example:
E2QWRUHAPOMQZL
.
Errors
- AccessDenied:
Access denied.
- CNAMEAlreadyExists:
- This error does not currently have a description.
- IllegalUpdate:
Origin and
CallerReference
cannot be updated.- InvalidIfMatchVersion:
The
If-Match
version is missing or not valid for the distribution.- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- NoSuchDistribution:
The specified distribution does not exist.
- PreconditionFailed:
The precondition given in one or more of the request-header fields evaluated to
false
.- TooManyDistributionCNAMEs:
Your request contains more CNAMEs than are allowed per distribution.
- InvalidDefaultRootObject:
The default root object file name is too big or contains an invalid character.
- InvalidRelativePath:
The relative path is too big, is not URL-encoded, or does not begin with a slash (/).
- InvalidErrorCode:
- This error does not currently have a description.
- InvalidResponseCode:
- This error does not currently have a description.
- InvalidArgument:
The argument is invalid.
- InvalidOriginAccessIdentity:
The origin access identity is not valid or doesn't exist.
- TooManyTrustedSigners:
Your request contains more trusted signers than are allowed per distribution.
- TrustedSignerDoesNotExist:
One or more of your trusted signers don't exist.
- InvalidViewerCertificate:
- This error does not currently have a description.
- InvalidMinimumProtocolVersion:
- This error does not currently have a description.
- InvalidRequiredProtocol:
This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the
RequiredProtocols
element from your distribution configuration.- NoSuchOrigin:
No origin exists with the specified
Origin Id
.- TooManyOrigins:
You cannot create more origins for the distribution.
- TooManyCacheBehaviors:
You cannot create more cache behaviors for the distribution.
- TooManyCookieNamesInWhiteList:
Your request contains more cookie names in the whitelist than are allowed per cache behavior.
- InvalidForwardCookies:
Your request contains forward cookies option which doesn't match with the expectation for the
whitelisted
list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.- TooManyHeadersInForwardedValues:
- This error does not currently have a description.
- InvalidHeadersForS3Origin:
- This error does not currently have a description.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.- TooManyCertificates:
You cannot create anymore custom SSL/TLS certificates.
- InvalidLocationCode:
- This error does not currently have a description.
- InvalidGeoRestrictionParameter:
- This error does not currently have a description.
- InvalidTTLOrder:
- This error does not currently have a description.
- InvalidWebACLId:
- This error does not currently have a description.
- TooManyOriginCustomHeaders:
- This error does not currently have a description.
- TooManyQueryStringParameters:
- This error does not currently have a description.
- InvalidQueryStringParameters:
- This error does not currently have a description.
- TooManyDistributionsWithLambdaAssociations:
Processing your request would cause the maximum number of distributions with Lambda function associations per owner to be exceeded.
- TooManyLambdaFunctionAssociations:
Your request contains more Lambda function associations than are allowed per distribution.
- InvalidLambdaFunctionAssociation:
The specified Lambda function association is invalid.
- InvalidOriginReadTimeout:
- This error does not currently have a description.
- InvalidOriginKeepaliveTimeout:
- This error does not currently have a description.
Examples
Example 1:
$result = $client->updateDistribution([ ]);
UpdateStreamingDistribution
$result = $client->updateStreamingDistribution
([/* ... */]); $promise = $client->updateStreamingDistributionAsync
([/* ... */]);
Update a streaming distribution.
Parameter Syntax
$result = $client->updateStreamingDistribution([ 'Id' => '<string>', // REQUIRED 'IfMatch' => '<string>', 'StreamingDistributionConfig' => [ // REQUIRED 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], 'CallerReference' => '<string>', // REQUIRED 'Comment' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'Logging' => [ 'Bucket' => '<string>', // REQUIRED 'Enabled' => true || false, // REQUIRED 'Prefix' => '<string>', // REQUIRED ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ // REQUIRED 'DomainName' => '<string>', // REQUIRED 'OriginAccessIdentity' => '<string>', // REQUIRED ], 'TrustedSigners' => [ // REQUIRED 'Enabled' => true || false, // REQUIRED 'Items' => ['<string>', ...], 'Quantity' => <integer>, // REQUIRED ], ], ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The streaming distribution's id.
- IfMatch
-
- Type: string
The value of the
ETag
header that you received when retrieving the streaming distribution's configuration. For example:E2QWRUHAPOMQZL
. - StreamingDistributionConfig
-
- Required: Yes
- Type: StreamingDistributionConfig structure
The streaming distribution's configuration information.
Result Syntax
[ 'ETag' => '<string>', 'StreamingDistribution' => [ 'ARN' => '<string>', 'ActiveTrustedSigners' => [ 'Enabled' => true || false, 'Items' => [ [ 'AwsAccountNumber' => '<string>', 'KeyPairIds' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], // ... ], 'Quantity' => <integer>, ], 'DomainName' => '<string>', 'Id' => '<string>', 'LastModifiedTime' => <DateTime>, 'Status' => '<string>', 'StreamingDistributionConfig' => [ 'Aliases' => [ 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], 'CallerReference' => '<string>', 'Comment' => '<string>', 'Enabled' => true || false, 'Logging' => [ 'Bucket' => '<string>', 'Enabled' => true || false, 'Prefix' => '<string>', ], 'PriceClass' => 'PriceClass_100|PriceClass_200|PriceClass_All', 'S3Origin' => [ 'DomainName' => '<string>', 'OriginAccessIdentity' => '<string>', ], 'TrustedSigners' => [ 'Enabled' => true || false, 'Items' => ['<string>', ...], 'Quantity' => <integer>, ], ], ], ]
Result Details
Members
- ETag
-
- Type: string
The current version of the configuration. For example:
E2QWRUHAPOMQZL
. - StreamingDistribution
-
- Type: StreamingDistribution structure
The streaming distribution's information.
Errors
- AccessDenied:
Access denied.
- CNAMEAlreadyExists:
- This error does not currently have a description.
- IllegalUpdate:
Origin and
CallerReference
cannot be updated.- InvalidIfMatchVersion:
The
If-Match
version is missing or not valid for the distribution.- MissingBody:
This operation requires a body. Ensure that the body is present and the
Content-Type
header is set.- NoSuchStreamingDistribution:
The specified streaming distribution does not exist.
- PreconditionFailed:
The precondition given in one or more of the request-header fields evaluated to
false
.- TooManyStreamingDistributionCNAMEs:
- This error does not currently have a description.
- InvalidArgument:
The argument is invalid.
- InvalidOriginAccessIdentity:
The origin access identity is not valid or doesn't exist.
- TooManyTrustedSigners:
Your request contains more trusted signers than are allowed per distribution.
- TrustedSignerDoesNotExist:
One or more of your trusted signers don't exist.
- InconsistentQuantities:
The value of
Quantity
and the size ofItems
don't match.
Examples
Example 1:
$result = $client->updateStreamingDistribution([ ]);
Shapes
AccessDenied
Description
Access denied.
Members
- Message
-
- Type: string
ActiveTrustedSigners
Description
A complex type that lists the AWS accounts, if any, that you included in the TrustedSigners
complex type for this distribution. These are the accounts that you want to allow to create signed URLs for private content.
The Signer
complex type lists the AWS account number of the trusted signer or self
if the signer is the AWS account that created the distribution. The Signer
element also includes the IDs of any active CloudFront key pairs that are associated with the trusted signer's AWS account. If no KeyPairId
element appears for a Signer
, that signer can't create signed URLs.
For more information, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
Members
- Enabled
-
- Required: Yes
- Type: boolean
Enabled is
true
if any of the AWS accounts listed in theTrustedSigners
complex type for this RTMP distribution have active CloudFront key pairs. If not,Enabled
isfalse
.For more information, see ActiveTrustedSigners.
- Items
-
- Type: Array of Signer structures
A complex type that contains one
Signer
complex type for each trusted signer that is specified in theTrustedSigners
complex type.For more information, see ActiveTrustedSigners.
- Quantity
-
- Required: Yes
- Type: int
A complex type that contains one
Signer
complex type for each trusted signer specified in theTrustedSigners
complex type.For more information, see ActiveTrustedSigners.
Aliases
Description
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
Members
- Items
-
- Type: Array of strings
A complex type that contains the CNAME aliases, if any, that you want to associate with this distribution.
- Quantity
-
- Required: Yes
- Type: int
The number of CNAME aliases, if any, that you want to associate with this distribution.
AllowedMethods
Description
A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin. There are three choices:
-
CloudFront forwards only
GET
andHEAD
requests. -
CloudFront forwards only
GET
,HEAD
, andOPTIONS
requests. -
CloudFront forwards
GET, HEAD, OPTIONS, PUT, PATCH, POST
, andDELETE
requests.
If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your custom origin so users can't perform operations that you don't want them to. For example, you might not want users to have permissions to delete objects from your origin.
Members
- CachedMethods
-
- Type: CachedMethods structure
A complex type that controls whether CloudFront caches the response to requests using the specified HTTP methods. There are two choices:
-
CloudFront caches responses to
GET
andHEAD
requests. -
CloudFront caches responses to
GET
,HEAD
, andOPTIONS
requests.
If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be cached correctly.
- Items
-
- Required: Yes
- Type: Array of strings
A complex type that contains the HTTP methods that you want CloudFront to process and forward to your origin.
- Quantity
-
- Required: Yes
- Type: int
The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are 2 (for
GET
andHEAD
requests), 3 (forGET
,HEAD
, andOPTIONS
requests) and 7 (forGET, HEAD, OPTIONS, PUT, PATCH, POST
, andDELETE
requests).
BatchTooLarge
Members
- Message
-
- Type: string
CNAMEAlreadyExists
Members
- Message
-
- Type: string
CacheBehavior
Description
A complex type that describes how CloudFront processes requests.
You must create at least as many cache behaviors (including the default cache behavior) as you have origins if you want CloudFront to distribute objects from all of the origins. Each cache behavior specifies the one origin from which you want CloudFront to get objects. If you have two origins and only the default cache behavior, the default cache behavior will cause CloudFront to get objects from one of the origins, but the other origin is never used.
For the current limit on the number of cache behaviors that you can add to a distribution, see Amazon CloudFront Limits in the AWS General Reference.
If you don't want to specify any cache behaviors, include only an empty CacheBehaviors
element. Don't include an empty CacheBehavior
element, or CloudFront returns a MalformedXML
error.
To delete all cache behaviors in an existing distribution, update the distribution configuration and include only an empty CacheBehaviors
element.
To add, change, or remove one or more cache behaviors, update the distribution configuration and specify all of the cache behaviors that you want to include in the updated distribution.
For more information about cache behaviors, see Cache Behaviors in the Amazon CloudFront Developer Guide.
Members
- AllowedMethods
-
- Type: AllowedMethods structure
A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin. There are three choices:
-
CloudFront forwards only
GET
andHEAD
requests. -
CloudFront forwards only
GET
,HEAD
, andOPTIONS
requests. -
CloudFront forwards
GET, HEAD, OPTIONS, PUT, PATCH, POST
, andDELETE
requests.
If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your custom origin so users can't perform operations that you don't want them to. For example, you might not want users to have permissions to delete objects from your origin.
- Compress
-
- Type: boolean
Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify true; if not, specify false. For more information, see Serving Compressed Files in the Amazon CloudFront Developer Guide.
- DefaultTTL
-
- Type: long (int|float)
The default amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin does not add HTTP headers such as
Cache-Control max-age
,Cache-Control s-maxage
, andExpires
to objects. For more information, see Specifying How Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. - ForwardedValues
-
- Required: Yes
- Type: ForwardedValues structure
A complex type that specifies how CloudFront handles query strings and cookies.
- LambdaFunctionAssociations
-
- Type: LambdaFunctionAssociations structure
A complex type that contains zero or more Lambda function associations for a cache behavior.
- MaxTTL
-
- Type: long (int|float)
The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin adds HTTP headers such as
Cache-Control max-age
,Cache-Control s-maxage
, andExpires
to objects. For more information, see Specifying How Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. - MinTTL
-
- Required: Yes
- Type: long (int|float)
The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. For more information, see Specifying How Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) in the Amazon Amazon CloudFront Developer Guide.
You must specify
0
forMinTTL
if you configure CloudFront to forward all headers to your origin (underHeaders
, if you specify1
forQuantity
and*
forName
). - PathPattern
-
- Required: Yes
- Type: string
The pattern (for example,
images/*.jpg
) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.You can optionally include a slash (
/
) at the beginning of the path pattern. For example,/images/*.jpg
. CloudFront behavior is the same with or without the leading/
.The path pattern for the default cache behavior is
*
and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.For more information, see Path Pattern in the Amazon CloudFront Developer Guide.
- SmoothStreaming
-
- Type: boolean
Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify
true
; if not, specifyfalse
. If you specifytrue
forSmoothStreaming
, you can still distribute other content using this cache behavior if the content matches the value ofPathPattern
. - TargetOriginId
-
- Required: Yes
- Type: string
The value of
ID
for the origin that you want CloudFront to route requests to when a request matches the path pattern either for a cache behavior or for the default cache behavior. - TrustedSigners
-
- Required: Yes
- Type: TrustedSigners structure
A complex type that specifies the AWS accounts, if any, that you want to allow to create signed URLs for private content.
If you want to require signed URLs in requests for objects in the target origin that match the
PathPattern
for this cache behavior, specifytrue
forEnabled
, and specify the applicable values forQuantity
andItems
. For more information, see Serving Private Content through CloudFront in the Amazon Amazon CloudFront Developer Guide.If you don't want to require signed URLs in requests for objects that match
PathPattern
, specifyfalse
forEnabled
and0
forQuantity
. OmitItems
.To add, change, or remove one or more trusted signers, change
Enabled
totrue
(if it's currentlyfalse
), changeQuantity
as applicable, and specify all of the trusted signers that you want to include in the updated distribution. - ViewerProtocolPolicy
-
- Required: Yes
- Type: string
The protocol that viewers can use to access the files in the origin specified by
TargetOriginId
when a request matches the path pattern inPathPattern
. You can specify the following options:-
allow-all
: Viewers can use HTTP or HTTPS. -
redirect-to-https
: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL. -
https-only
: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden).
For more information about requiring the HTTPS protocol, see Using an HTTPS Connection to Access Your Objects in the Amazon CloudFront Developer Guide.
The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects' cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see Specifying How Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.
CacheBehaviors
Description
A complex type that contains zero or more CacheBehavior
elements.
Members
- Items
-
- Type: Array of CacheBehavior structures
Optional: A complex type that contains cache behaviors for this distribution. If
Quantity
is0
, you can omitItems
. - Quantity
-
- Required: Yes
- Type: int
The number of cache behaviors for this distribution.
CachedMethods
Description
A complex type that controls whether CloudFront caches the response to requests using the specified HTTP methods. There are two choices:
-
CloudFront caches responses to
GET
andHEAD
requests. -
CloudFront caches responses to
GET
,HEAD
, andOPTIONS
requests.
If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be cached correctly.
Members
- Items
-
- Required: Yes
- Type: Array of strings
A complex type that contains the HTTP methods that you want CloudFront to cache responses to.
- Quantity
-
- Required: Yes
- Type: int
The number of HTTP methods for which you want CloudFront to cache responses. Valid values are
2
(for caching responses toGET
andHEAD
requests) and3
(for caching responses toGET
,HEAD
, andOPTIONS
requests).
CloudFrontOriginAccessIdentity
Description
CloudFront origin access identity.
Members
- CloudFrontOriginAccessIdentityConfig
-
- Type: CloudFrontOriginAccessIdentityConfig structure
The current configuration information for the identity.
- Id
-
- Required: Yes
- Type: string
The ID for the origin access identity, for example,
E74FTE3AJFJ256A
. - S3CanonicalUserId
-
- Required: Yes
- Type: string
The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access identity read permission to an object in Amazon S3.
CloudFrontOriginAccessIdentityAlreadyExists
Description
If the CallerReference
is a value you already sent in a previous request to create an identity but the content of the CloudFrontOriginAccessIdentityConfig
is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
error.
Members
- Message
-
- Type: string
CloudFrontOriginAccessIdentityConfig
Description
Origin access identity configuration. Send a GET
request to the /CloudFront API version/CloudFront/identity ID/config
resource.
Members
- CallerReference
-
- Required: Yes
- Type: string
A unique number that ensures the request can't be replayed.
If the
CallerReference
is new (no matter the content of theCloudFrontOriginAccessIdentityConfig
object), a new origin access identity is created.If the
CallerReference
is a value already sent in a previous identity request, and the content of theCloudFrontOriginAccessIdentityConfig
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 identity, but the content of theCloudFrontOriginAccessIdentityConfig
is different from the original request, CloudFront returns aCloudFrontOriginAccessIdentityAlreadyExists
error. - Comment
-
- Required: Yes
- Type: string
Any comments you want to include about the origin access identity.
CloudFrontOriginAccessIdentityInUse
Members
- Message
-
- Type: string
CloudFrontOriginAccessIdentityList
Description
Lists the origin access identities for CloudFront.Send a GET
request to the /CloudFront API version/origin-access-identity/cloudfront
resource. The response includes a CloudFrontOriginAccessIdentityList
element with zero or more CloudFrontOriginAccessIdentitySummary
child elements. By default, your entire list of origin access identities is returned in one single page. If the list is long, you can paginate it using the MaxItems
and Marker
parameters.
Members
- IsTruncated
-
- Required: Yes
- Type: boolean
A flag that indicates whether more origin access identities remain to be listed. If your results were truncated, you can make a follow-up pagination request using the
Marker
request parameter to retrieve more items in the list. - Items
-
- Type: Array of CloudFrontOriginAccessIdentitySummary structures
A complex type that contains one
CloudFrontOriginAccessIdentitySummary
element for each origin access identity that was created by the current AWS account. - Marker
-
- Required: Yes
- Type: string
Use this when paginating results to indicate where to begin in your list of origin access identities. The results include identities in the list that occur after the marker. To get the next page of results, set the
Marker
to the value of theNextMarker
from the current page's response (which is also the ID of the last identity on that page). - MaxItems
-
- Required: Yes
- Type: int
The maximum number of origin access identities you want in the response body.
- NextMarker
-
- Type: string
If
IsTruncated
istrue
, this element is present and contains the value you can use for theMarker
request parameter to continue listing your origin access identities where they left off. - Quantity
-
- Required: Yes
- Type: int
The number of CloudFront origin access identities that were created by the current AWS account.
CloudFrontOriginAccessIdentitySummary
Description
Summary of the information about a CloudFront origin access identity.
Members
- Comment
-
- Required: Yes
- Type: string
The comment for this origin access identity, as originally specified when created.
- Id
-
- Required: Yes
- Type: string
The ID for the origin access identity. For example:
E74FTE3AJFJ256A
. - S3CanonicalUserId
-
- Required: Yes
- Type: string
The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.
CookieNames
Description
A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies in the Amazon CloudFront Developer Guide.
Members
- Items
-
- Type: Array of strings
A complex type that contains one
Name
element for each cookie that you want CloudFront to forward to the origin for this cache behavior. - Quantity
-
- Required: Yes
- Type: int
The number of different cookies that you want CloudFront to forward to the origin for this cache behavior.
CookiePreference
Description
A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies in the Amazon CloudFront Developer Guide.
Members
- Forward
-
- Required: Yes
- Type: string
Specifies which cookies to forward to the origin for this cache behavior: all, none, or the list of cookies specified in the
WhitelistedNames
complex type.Amazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the
Forward
element. - WhitelistedNames
-
- Type: CookieNames structure
Required if you specify
whitelist
for the value ofForward:
. A complex type that specifies how many different cookies you want CloudFront to forward to the origin for this cache behavior and, if you want to forward selected cookies, the names of those cookies.If you specify
all
or none for the value ofForward
, omitWhitelistedNames
. If you change the value ofForward
fromwhitelist
to all or none and you don't delete theWhitelistedNames
element and its child elements, CloudFront deletes them automatically.For the current limit on the number of cookie names that you can whitelist for each cache behavior, see Amazon CloudFront Limits in the AWS General Reference.
CustomErrorResponse
Description
A complex type that controls:
-
Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer.
-
How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
For more information about custom error pages, see Customizing Error Responses in the Amazon CloudFront Developer Guide.
Members
- ErrorCachingMinTTL
-
- Type: long (int|float)
The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in
ErrorCode
. When this time period has elapsed, CloudFront queries your origin to see whether the problem that caused the error has been resolved and the requested object is now available.If you don't want to specify a value, include an empty element,
<ErrorCachingMinTTL>
, in the XML document.For more information, see Customizing Error Responses in the Amazon CloudFront Developer Guide.
- ErrorCode
-
- Required: Yes
- Type: int
The HTTP status code for which you want to specify a custom error page and/or a caching duration.
- ResponseCode
-
- Type: string
The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example:
-
Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute
200
, the response typically won't be intercepted. -
If you don't care about distinguishing among different client errors or server errors, you can specify
400
or500
as theResponseCode
for all 4xx or 5xx errors. -
You might want to return a
200
status code (OK) and static website so your customers don't know that your website is down.
If you specify a value for
ResponseCode
, you must also specify a value forResponsePagePath
. If you don't want to specify a value, include an empty element,<ResponseCode>
, in the XML document. - ResponsePagePath
-
- Type: string
The path to the custom error page that you want CloudFront to return to a viewer when your origin returns the HTTP status code specified by
ErrorCode
, for example,/4xx-errors/403-forbidden.html
. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:-
The value of
PathPattern
matches the path to your custom error messages. For example, suppose you saved custom error pages for 4xx errors in an Amazon S3 bucket in a directory named/4xx-errors
. Your distribution must include a cache behavior for which the path pattern routes requests for your custom error pages to that location, for example,/4xx-errors/*
. -
The value of
TargetOriginId
specifies the value of theID
element for the origin that contains your custom error pages.
If you specify a value for
ResponsePagePath
, you must also specify a value forResponseCode
. If you don't want to specify a value, include an empty element,<ResponsePagePath>
, in the XML document.We recommend that you store custom error pages in an Amazon S3 bucket. If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable.
CustomErrorResponses
Description
A complex type that controls:
-
Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer.
-
How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
For more information about custom error pages, see Customizing Error Responses in the Amazon CloudFront Developer Guide.
Members
- Items
-
- Type: Array of CustomErrorResponse structures
A complex type that contains a
CustomErrorResponse
element for each HTTP status code for which you want to specify a custom error page and/or a caching duration. - Quantity
-
- Required: Yes
- Type: int
The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If
Quantity
is0
, you can omitItems
.
CustomHeaders
Description
A complex type that contains the list of Custom Headers for each origin.
Members
- Items
-
- Type: Array of OriginCustomHeader structures
Optional: A list that contains one
OriginCustomHeader
element for each custom header that you want CloudFront to forward to the origin. If Quantity is0
, omitItems
. - Quantity
-
- Required: Yes
- Type: int
The number of custom headers, if any, for this distribution.
CustomOriginConfig
Description
A customer origin.
Members
- HTTPPort
-
- Required: Yes
- Type: int
The HTTP port the custom origin listens on.
- HTTPSPort
-
- Required: Yes
- Type: int
The HTTPS port the custom origin listens on.
- OriginKeepaliveTimeout
-
- Type: int
You can create a custom keep-alive timeout. All timeout units are in seconds. The default keep-alive timeout is 5 seconds, but you can configure custom timeout lengths using the CloudFront API. The minimum timeout length is 1 second; the maximum is 60 seconds.
If you need to increase the maximum time limit, contact the AWS Support Center.
- OriginProtocolPolicy
-
- Required: Yes
- Type: string
The origin protocol policy to apply to your origin.
- OriginReadTimeout
-
- Type: int
You can create a custom origin read timeout. All timeout units are in seconds. The default origin read timeout is 30 seconds, but you can configure custom timeout lengths using the CloudFront API. The minimum timeout length is 4 seconds; the maximum is 60 seconds.
If you need to increase the maximum time limit, contact the AWS Support Center.
- OriginSslProtocols
-
- Type: OriginSslProtocols structure
The SSL/TLS protocols that you want CloudFront to use when communicating with your origin over HTTPS.
DefaultCacheBehavior
Description
A complex type that describes the default cache behavior if you don't specify a CacheBehavior
element or if files don't match any of the values of PathPattern
in CacheBehavior
elements. You must create exactly one default cache behavior.
Members
- AllowedMethods
-
- Type: AllowedMethods structure
A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin. There are three choices:
-
CloudFront forwards only
GET
andHEAD
requests. -
CloudFront forwards only
GET
,HEAD
, andOPTIONS
requests. -
CloudFront forwards
GET, HEAD, OPTIONS, PUT, PATCH, POST
, andDELETE
requests.
If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your custom origin so users can't perform operations that you don't want them to. For example, you might not want users to have permissions to delete objects from your origin.
- Compress
-
- Type: boolean
Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify
true
; if not, specifyfalse
. For more information, see Serving Compressed Files in the Amazon CloudFront Developer Guide. - DefaultTTL
-
- Type: long (int|float)
The default amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin does not add HTTP headers such as
Cache-Control max-age
,Cache-Control s-maxage
, andExpires
to objects. For more information, see Specifying How Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. - ForwardedValues
-
- Required: Yes
- Type: ForwardedValues structure
A complex type that specifies how CloudFront handles query strings and cookies.
- LambdaFunctionAssociations
-
- Type: LambdaFunctionAssociations structure
A complex type that contains zero or more Lambda function associations for a cache behavior.
- MaxTTL
-
- Type: long (int|float)
- MinTTL
-
- Required: Yes
- Type: long (int|float)
The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. For more information, see Specifying How Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) in the Amazon Amazon CloudFront Developer Guide.
You must specify
0
forMinTTL
if you configure CloudFront to forward all headers to your origin (underHeaders
, if you specify1
forQuantity
and*
forName
). - SmoothStreaming
-
- Type: boolean
Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify
true
; if not, specifyfalse
. If you specifytrue
forSmoothStreaming
, you can still distribute other content using this cache behavior if the content matches the value ofPathPattern
. - TargetOriginId
-
- Required: Yes
- Type: string
The value of
ID
for the origin that you want CloudFront to route requests to when a request matches the path pattern either for a cache behavior or for the default cache behavior. - TrustedSigners
-
- Required: Yes
- Type: TrustedSigners structure
A complex type that specifies the AWS accounts, if any, that you want to allow to create signed URLs for private content.
If you want to require signed URLs in requests for objects in the target origin that match the
PathPattern
for this cache behavior, specifytrue
forEnabled
, and specify the applicable values forQuantity
andItems
. For more information, see Serving Private Content through CloudFront in the Amazon Amazon CloudFront Developer Guide.If you don't want to require signed URLs in requests for objects that match
PathPattern
, specifyfalse
forEnabled
and0
forQuantity
. OmitItems
.To add, change, or remove one or more trusted signers, change
Enabled
totrue
(if it's currentlyfalse
), changeQuantity
as applicable, and specify all of the trusted signers that you want to include in the updated distribution. - ViewerProtocolPolicy
-
- Required: Yes
- Type: string
The protocol that viewers can use to access the files in the origin specified by
TargetOriginId
when a request matches the path pattern inPathPattern
. You can specify the following options:-
allow-all
: Viewers can use HTTP or HTTPS. -
redirect-to-https
: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL. -
https-only
: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden).
For more information about requiring the HTTPS protocol, see Using an HTTPS Connection to Access Your Objects in the Amazon CloudFront Developer Guide.
The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects' cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see Specifying How Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.
Distribution
Description
The distribution's information.
Members
- ARN
-
- Required: Yes
- Type: string
The ARN (Amazon Resource Name) for the distribution. For example:
arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5
, where123456789012
is your AWS account ID. - ActiveTrustedSigners
-
- Required: Yes
- Type: ActiveTrustedSigners structure
CloudFront automatically adds this element to the response only if you've set up the distribution to serve private content with signed URLs. The element lists the key pair IDs that CloudFront is aware of for each trusted signer. The
Signer
child element lists the AWS account number of the trusted signer (or an emptySelf
element if the signer is you). TheSigner
element also includes the IDs of any active key pairs associated with the trusted signer's AWS account. If noKeyPairId
element appears for aSigner
, that signer can't create working signed URLs. - DistributionConfig
-
- Required: Yes
- Type: DistributionConfig structure
The current configuration information for the distribution. Send a
GET
request to the/CloudFront API version/distribution ID/config
resource. - DomainName
-
- Required: Yes
- Type: string
The domain name corresponding to the distribution, for example,
d111111abcdef8.cloudfront.net
. - Id
-
- Required: Yes
- Type: string
The identifier for the distribution. For example:
EDFDVBD632BHDS5
. - InProgressInvalidationBatches
-
- Required: Yes
- Type: int
The number of invalidation batches currently in progress.
- LastModifiedTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the distribution was last modified.
- Status
-
- Required: Yes
- Type: string
This response element indicates the current status of the distribution. When the status is
Deployed
, the distribution's information is fully propagated to all CloudFront edge locations.
DistributionAlreadyExists
Description
The caller reference you attempted to create the distribution with is associated with another distribution.
Members
- Message
-
- Type: string
DistributionConfig
Description
A distribution configuration.
Members
- Aliases
-
- Type: Aliases structure
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
- CacheBehaviors
-
- Type: CacheBehaviors structure
A complex type that contains zero or more
CacheBehavior
elements. - CallerReference
-
- Required: Yes
- Type: string
A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.
If the value of
CallerReference
is new (regardless of the content of theDistributionConfig
object), CloudFront creates a new distribution.If
CallerReference
is a value you already sent in a previous request to create a distribution, and if the content of theDistributionConfig
is identical to the original request (ignoring white space), CloudFront returns the same the response that it returned to the original request.If
CallerReference
is a value you already sent in a previous request to create a distribution but the content of theDistributionConfig
is different from the original request, CloudFront returns aDistributionAlreadyExists
error. - Comment
-
- Required: Yes
- Type: string
Any comments you want to include about the distribution.
If you don't want to specify a comment, include an empty
Comment
element.To delete an existing comment, update the distribution configuration and include an empty
Comment
element.To add or change a comment, update the distribution configuration and specify the new comment.
- CustomErrorResponses
-
- Type: CustomErrorResponses structure
A complex type that controls the following:
-
Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer.
-
How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
For more information about custom error pages, see Customizing Error Responses in the Amazon CloudFront Developer Guide.
- DefaultCacheBehavior
-
- Required: Yes
- Type: DefaultCacheBehavior structure
A complex type that describes the default cache behavior if you don't specify a
CacheBehavior
element or if files don't match any of the values ofPathPattern
inCacheBehavior
elements. You must create exactly one default cache behavior. - DefaultRootObject
-
- Type: string
The object that you want CloudFront to request from your origin (for example,
index.html
) when a viewer requests the root URL for your distribution (http://www.example.com
) instead of an object in your distribution (http://www.example.com/product-description.html
). Specifying a default root object avoids exposing the contents of your distribution.Specify only the object name, for example,
index.html
. Don't add a/
before the object name.If you don't want to specify a default root object when you create a distribution, include an empty
DefaultRootObject
element.To delete the default root object from an existing distribution, update the distribution configuration and include an empty
DefaultRootObject
element.To replace the default root object, update the distribution configuration and specify the new object.
For more information about the default root object, see Creating a Default Root Object in the Amazon CloudFront Developer Guide.
- Enabled
-
- Required: Yes
- Type: boolean
From this field, you can enable or disable the selected distribution.
If you specify
false
forEnabled
but you specify values forBucket
andPrefix
, the values are automatically deleted. - HttpVersion
-
- Type: string
(Optional) Specify the maximum HTTP version that you want viewers to use to communicate with CloudFront. The default value for new web distributions is http2. Viewers that don't support HTTP/2 automatically use an earlier HTTP version.
For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support Server Name Identification (SNI).
In general, configuring CloudFront to communicate with viewers using HTTP/2 reduces latency. You can improve performance by optimizing for HTTP/2. For more information, do an Internet search for "http/2 optimization."
- IsIPV6Enabled
-
- Type: boolean
If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution, specify
true
. If you specifyfalse
, CloudFront responds to IPv6 DNS requests with the DNS response codeNOERROR
and with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution.In general, you should enable IPv6 if you have users on IPv6 networks who want to access your content. However, if you're using signed URLs or signed cookies to restrict access to your content, and if you're using a custom policy that includes the
IpAddress
parameter to restrict the IP addresses that can access your content, don't enable IPv6. If you want to restrict access to some content by IP address and not restrict access to other content (or restrict access but not by IP address), you can create two distributions. For more information, see Creating a Signed URL Using a Custom Policy in the Amazon CloudFront Developer Guide.If you're using an Amazon Route 53 alias resource record set to route traffic to your CloudFront distribution, you need to create a second alias resource record set when both of the following are true:
-
You enable IPv6 for the distribution
-
You're using alternate domain names in the URLs for your objects
For more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name in the Amazon Route 53 Developer Guide.
If you created a CNAME resource record set, either with Amazon Route 53 or with another DNS service, you don't need to make any changes. A CNAME record will route traffic to your distribution regardless of the IP address format of the viewer request.
- Logging
-
- Type: LoggingConfig structure
A complex type that controls whether access logs are written for the distribution.
For more information about logging, see Access Logs in the Amazon CloudFront Developer Guide.
- Origins
-
- Required: Yes
- Type: Origins structure
A complex type that contains information about origins for this distribution.
- PriceClass
-
- Type: string
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, see 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, see Amazon CloudFront Pricing.
- Restrictions
-
- Type: Restrictions structure
A complex type that identifies ways in which you want to restrict distribution of your content.
- ViewerCertificate
-
- Type: ViewerCertificate structure
A complex type that specifies the following:
-
Whether you want viewers to use HTTP or HTTPS to request your objects.
-
If you want viewers to use HTTPS, whether you're using an alternate domain name such as
example.com
or the CloudFront domain name for your distribution, such asd111111abcdef8.cloudfront.net
. -
If you're using an alternate domain name, whether AWS Certificate Manager (ACM) provided the certificate, or you purchased a certificate from a third-party certificate authority and imported it into ACM or uploaded it to the IAM certificate store.
You must specify only one of the following values:
Don't specify
false
forCloudFrontDefaultCertificate
.If you want viewers to use HTTP instead of HTTPS to request your objects: Specify the following value:
<CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
In addition, specify
allow-all
forViewerProtocolPolicy
for all of your cache behaviors.If you want viewers to use HTTPS to request your objects: Choose the type of certificate that you want to use based on whether you're using an alternate domain name for your objects or the CloudFront domain name:
-
If you're using an alternate domain name, such as example.com: Specify one of the following values, depending on whether ACM provided your certificate or you purchased your certificate from third-party certificate authority:
-
<ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn>
whereARN for ACM SSL/TLS certificate
is the ARN for the ACM SSL/TLS certificate that you want to use for this distribution. -
<IAMCertificateId>IAM certificate ID<IAMCertificateId>
whereIAM certificate ID
is the ID that IAM returned when you added the certificate to the IAM certificate store.
If you specify
ACMCertificateArn
orIAMCertificateId
, you must also specify a value forSSLSupportMethod
.If you choose to use an ACM certificate or a certificate in the IAM certificate store, we recommend that you use only an alternate domain name in your object URLs (
https://example.com/logo.jpg
). If you use the domain name that is associated with your CloudFront distribution (such ashttps://d111111abcdef8.cloudfront.net/logo.jpg
) and the viewer supportsSNI
, then CloudFront behaves normally. However, if the browser does not support SNI, the user's experience depends on the value that you choose forSSLSupportMethod
:-
vip
: The viewer displays a warning because there is a mismatch between the CloudFront domain name and the domain name in your SSL/TLS certificate. -
sni-only
: CloudFront drops the connection with the browser without returning the object.
-
-
If you're using the CloudFront domain name for your distribution, such as
d111111abcdef8.cloudfront.net
: Specify the following value:<CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
If you want viewers to use HTTPS, you must also specify one of the following values in your cache behaviors:
-
<ViewerProtocolPolicy>https-only<ViewerProtocolPolicy>
-
<ViewerProtocolPolicy>redirect-to-https<ViewerProtocolPolicy>
You can also optionally require that CloudFront use HTTPS to communicate with your origin by specifying one of the following values for the applicable origins:
-
<OriginProtocolPolicy>https-only<OriginProtocolPolicy>
-
<OriginProtocolPolicy>match-viewer<OriginProtocolPolicy>
For more information, see Using Alternate Domain Names and HTTPS in the Amazon CloudFront Developer Guide.
- WebACLId
-
- Type: string
A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution.
AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to CloudFront, and lets you control access to your content. Based on conditions that you specify, such as the IP addresses that requests originate from or the values of query strings, CloudFront responds to requests either with the requested content or with an HTTP 403 status code (Forbidden). You can also configure CloudFront to return a custom error page when a request is blocked. For more information about AWS WAF, see the AWS WAF Developer Guide.
DistributionConfigWithTags
Description
A distribution Configuration and a list of tags to be associated with the distribution.
Members
- DistributionConfig
-
- Required: Yes
- Type: DistributionConfig structure
A distribution configuration.
- Tags
-
- Required: Yes
- Type: Tags structure
A complex type that contains zero or more
Tag
elements.
DistributionList
Description
A distribution list.
Members
- IsTruncated
-
- Required: Yes
- Type: boolean
A flag that indicates whether more distributions remain to be listed. If your results were truncated, you can make a follow-up pagination request using the
Marker
request parameter to retrieve more distributions in the list. - Items
-
- Type: Array of DistributionSummary structures
A complex type that contains one
DistributionSummary
element for each distribution that was created by the current AWS account. - Marker
-
- Required: Yes
- Type: string
The value you provided for the
Marker
request parameter. - MaxItems
-
- Required: Yes
- Type: int
The value you provided for the
MaxItems
request parameter. - NextMarker
-
- Type: string
If
IsTruncated
istrue
, this element is present and contains the value you can use for theMarker
request parameter to continue listing your distributions where they left off. - Quantity
-
- Required: Yes
- Type: int
The number of distributions that were created by the current AWS account.
DistributionNotDisabled
Members
- Message
-
- Type: string
DistributionSummary
Description
A summary of the information about a CloudFront distribution.
Members
- ARN
-
- Required: Yes
- Type: string
The ARN (Amazon Resource Name) for the distribution. For example:
arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5
, where123456789012
is your AWS account ID. - Aliases
-
- Required: Yes
- Type: Aliases structure
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
- CacheBehaviors
-
- Required: Yes
- Type: CacheBehaviors structure
A complex type that contains zero or more
CacheBehavior
elements. - Comment
-
- Required: Yes
- Type: string
The comment originally specified when this distribution was created.
- CustomErrorResponses
-
- Required: Yes
- Type: CustomErrorResponses structure
A complex type that contains zero or more
CustomErrorResponses
elements. - DefaultCacheBehavior
-
- Required: Yes
- Type: DefaultCacheBehavior structure
A complex type that describes the default cache behavior if you don't specify a
CacheBehavior
element or if files don't match any of the values ofPathPattern
inCacheBehavior
elements. You must create exactly one default cache behavior. - DomainName
-
- Required: Yes
- Type: string
The domain name that corresponds to the distribution, for example,
d111111abcdef8.cloudfront.net
. - Enabled
-
- Required: Yes
- Type: boolean
Whether the distribution is enabled to accept user requests for content.
- HttpVersion
-
- Required: Yes
- Type: string
Specify the maximum HTTP version that you want viewers to use to communicate with CloudFront. The default value for new web distributions is
http2
. Viewers that don't supportHTTP/2
will automatically use an earlier version. - Id
-
- Required: Yes
- Type: string
The identifier for the distribution. For example:
EDFDVBD632BHDS5
. - IsIPV6Enabled
-
- Required: Yes
- Type: boolean
Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for your distribution.
- LastModifiedTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the distribution was last modified.
- Origins
-
- Required: Yes
- Type: Origins structure
A complex type that contains information about origins for this distribution.
- PriceClass
-
- Required: Yes
- Type: string
- Restrictions
-
- Required: Yes
- Type: Restrictions structure
A complex type that identifies ways in which you want to restrict distribution of your content.
- Status
-
- Required: Yes
- Type: string
The current status of the distribution. When the status is
Deployed
, the distribution's information is propagated to all CloudFront edge locations. - ViewerCertificate
-
- Required: Yes
- Type: ViewerCertificate structure
A complex type that specifies the following:
-
Whether you want viewers to use HTTP or HTTPS to request your objects.
-
If you want viewers to use HTTPS, whether you're using an alternate domain name such as
example.com
or the CloudFront domain name for your distribution, such asd111111abcdef8.cloudfront.net
. -
If you're using an alternate domain name, whether AWS Certificate Manager (ACM) provided the certificate, or you purchased a certificate from a third-party certificate authority and imported it into ACM or uploaded it to the IAM certificate store.
You must specify only one of the following values:
Don't specify
false
forCloudFrontDefaultCertificate
.If you want viewers to use HTTP instead of HTTPS to request your objects: Specify the following value:
<CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
In addition, specify
allow-all
forViewerProtocolPolicy
for all of your cache behaviors.If you want viewers to use HTTPS to request your objects: Choose the type of certificate that you want to use based on whether you're using an alternate domain name for your objects or the CloudFront domain name:
-
If you're using an alternate domain name, such as example.com: Specify one of the following values, depending on whether ACM provided your certificate or you purchased your certificate from third-party certificate authority:
-
<ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn>
whereARN for ACM SSL/TLS certificate
is the ARN for the ACM SSL/TLS certificate that you want to use for this distribution. -
<IAMCertificateId>IAM certificate ID<IAMCertificateId>
whereIAM certificate ID
is the ID that IAM returned when you added the certificate to the IAM certificate store.
If you specify
ACMCertificateArn
orIAMCertificateId
, you must also specify a value forSSLSupportMethod
.If you choose to use an ACM certificate or a certificate in the IAM certificate store, we recommend that you use only an alternate domain name in your object URLs (
https://example.com/logo.jpg
). If you use the domain name that is associated with your CloudFront distribution (such ashttps://d111111abcdef8.cloudfront.net/logo.jpg
) and the viewer supportsSNI
, then CloudFront behaves normally. However, if the browser does not support SNI, the user's experience depends on the value that you choose forSSLSupportMethod
:-
vip
: The viewer displays a warning because there is a mismatch between the CloudFront domain name and the domain name in your SSL/TLS certificate. -
sni-only
: CloudFront drops the connection with the browser without returning the object.
-
-
If you're using the CloudFront domain name for your distribution, such as
d111111abcdef8.cloudfront.net
: Specify the following value:<CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
If you want viewers to use HTTPS, you must also specify one of the following values in your cache behaviors:
-
<ViewerProtocolPolicy>https-only<ViewerProtocolPolicy>
-
<ViewerProtocolPolicy>redirect-to-https<ViewerProtocolPolicy>
You can also optionally require that CloudFront use HTTPS to communicate with your origin by specifying one of the following values for the applicable origins:
-
<OriginProtocolPolicy>https-only<OriginProtocolPolicy>
-
<OriginProtocolPolicy>match-viewer<OriginProtocolPolicy>
For more information, see Using Alternate Domain Names and HTTPS in the Amazon CloudFront Developer Guide.
- WebACLId
-
- Required: Yes
- Type: string
The Web ACL Id (if any) associated with the distribution.
ForwardedValues
Description
A complex type that specifies how CloudFront handles query strings and cookies.
Members
- Cookies
-
- Required: Yes
- Type: CookiePreference structure
A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies in the Amazon CloudFront Developer Guide.
- Headers
-
- Type: Headers structure
A complex type that specifies the
Headers
, if any, that you want CloudFront to base caching on for this cache behavior. - QueryString
-
- Required: Yes
- Type: boolean
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior and cache based on the query string parameters. CloudFront behavior depends on the value of
QueryString
and on the values that you specify forQueryStringCacheKeys
, if any:If you specify true for
QueryString
and you don't specify any values forQueryStringCacheKeys
, CloudFront forwards all query string parameters to the origin and caches based on all query string parameters. Depending on how many query string parameters and values you have, this can adversely affect performance because CloudFront must forward more requests to the origin.If you specify true for
QueryString
and you specify one or more values forQueryStringCacheKeys
, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify.If you specify false for
QueryString
, CloudFront doesn't forward any query string parameters to the origin, and doesn't cache based on query string parameters.For more information, see Configuring CloudFront to Cache Based on Query String Parameters in the Amazon CloudFront Developer Guide.
- QueryStringCacheKeys
-
- Type: QueryStringCacheKeys structure
A complex type that contains information about the query string parameters that you want CloudFront to use for caching for this cache behavior.
GeoRestriction
Description
A complex type that controls the countries in which your content is distributed. CloudFront determines the location of your users using MaxMind
GeoIP databases.
Members
- Items
-
- Type: Array of strings
A complex type that contains a
Location
element for each country in which you want CloudFront either to distribute your content (whitelist
) or not distribute your content (blacklist
).The
Location
element is a two-letter, uppercase country code for a country that you want to include in yourblacklist
orwhitelist
. Include oneLocation
element for each country.CloudFront and
MaxMind
both useISO 3166
country codes. For the current list of countries and the corresponding codes, seeISO 3166-1-alpha-2
code on the International Organization for Standardization website. You can also refer to the country list on the CloudFront console, which includes both country names and codes. - Quantity
-
- Required: Yes
- Type: int
When geo restriction is
enabled
, this is the number of countries in yourwhitelist
orblacklist
. Otherwise, when it is not enabled,Quantity
is0
, and you can omitItems
. - RestrictionType
-
- Required: Yes
- Type: string
The method that you want to use to restrict distribution of your content by country:
-
none
: No geo restriction is enabled, meaning access to content is not restricted by client geo location. -
blacklist
: TheLocation
elements specify the countries in which you don't want CloudFront to distribute your content. -
whitelist
: TheLocation
elements specify the countries in which you want CloudFront to distribute your content.
Headers
Description
A complex type that specifies the request headers, if any, that you want CloudFront to base caching on for this cache behavior.
For the headers that you specify, CloudFront caches separate versions of a specified object based on the header values in viewer requests. For example, suppose viewer requests for logo.jpg
contain a custom product
header that has a value of either acme
or apex
, and you configure CloudFront to cache your content based on values in the product
header. CloudFront forwards the product
header to the origin and caches the response from the origin once for each header value. For more information about caching based on header values, see How CloudFront Forwards and Caches Headers in the Amazon CloudFront Developer Guide.
Members
- Items
-
- Type: Array of strings
A list that contains one
Name
element for each header that you want CloudFront to use for caching in this cache behavior. IfQuantity
is0
, omitItems
. - Quantity
-
- Required: Yes
- Type: int
The number of different headers that you want CloudFront to base caching on for this cache behavior. You can configure each cache behavior in a web distribution to do one of the following:
-
Forward all headers to your origin: Specify
1
forQuantity
and*
forName
.CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin.
-
Forward a whitelist of headers you specify: Specify the number of headers that you want CloudFront to base caching on. Then specify the header names in
Name
elements. CloudFront caches your objects based on the values in the specified headers. -
Forward only the default headers: Specify
0
forQuantity
and omitItems
. In this configuration, CloudFront doesn't cache based on the values in the request headers.
Regardless of which option you choose, CloudFront forwards headers to your origin based on whether the origin is an S3 bucket or a custom origin. See the following documentation:
-
S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates
-
Custom origin: See HTTP Request Headers and CloudFront Behavior
IllegalUpdate
Description
Origin and CallerReference
cannot be updated.
Members
- Message
-
- Type: string
InconsistentQuantities
Description
The value of Quantity
and the size of Items
don't match.
Members
- Message
-
- Type: string
InvalidArgument
Description
The argument is invalid.
Members
- Message
-
- Type: string
InvalidDefaultRootObject
Description
The default root object file name is too big or contains an invalid character.
Members
- Message
-
- Type: string
InvalidErrorCode
Members
- Message
-
- Type: string
InvalidForwardCookies
Description
Your request contains forward cookies option which doesn't match with the expectation for the whitelisted
list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.
Members
- Message
-
- Type: string
InvalidGeoRestrictionParameter
Members
- Message
-
- Type: string
InvalidHeadersForS3Origin
Members
- Message
-
- Type: string
InvalidIfMatchVersion
Description
The If-Match
version is missing or not valid for the distribution.
Members
- Message
-
- Type: string
InvalidLambdaFunctionAssociation
Description
The specified Lambda function association is invalid.
Members
- Message
-
- Type: string
InvalidLocationCode
Members
- Message
-
- Type: string
InvalidMinimumProtocolVersion
Members
- Message
-
- Type: string
InvalidOrigin
Description
The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.
Members
- Message
-
- Type: string
InvalidOriginAccessIdentity
Description
The origin access identity is not valid or doesn't exist.
Members
- Message
-
- Type: string
InvalidOriginKeepaliveTimeout
Members
- Message
-
- Type: string
InvalidOriginReadTimeout
Members
- Message
-
- Type: string
InvalidProtocolSettings
Description
You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI).
Members
- Message
-
- Type: string
InvalidQueryStringParameters
Members
- Message
-
- Type: string
InvalidRelativePath
Description
The relative path is too big, is not URL-encoded, or does not begin with a slash (/).
Members
- Message
-
- Type: string
InvalidRequiredProtocol
Description
This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the RequiredProtocols
element from your distribution configuration.
Members
- Message
-
- Type: string
InvalidResponseCode
Members
- Message
-
- Type: string
InvalidTTLOrder
Members
- Message
-
- Type: string
InvalidTagging
Members
- Message
-
- Type: string
InvalidViewerCertificate
Members
- Message
-
- Type: string
InvalidWebACLId
Members
- Message
-
- Type: string
Invalidation
Description
An invalidation.
Members
- CreateTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the invalidation request was first made.
- Id
-
- Required: Yes
- Type: string
The identifier for the invalidation request. For example:
IDFDVBD632BHDS5
. - InvalidationBatch
-
- Required: Yes
- Type: InvalidationBatch structure
The current invalidation information for the batch request.
- Status
-
- Required: Yes
- Type: string
The status of the invalidation request. When the invalidation batch is finished, the status is
Completed
.
InvalidationBatch
Description
An invalidation batch.
Members
- CallerReference
-
- Required: Yes
- Type: string
A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to prevent you from accidentally resubmitting an identical request. Whenever you create a new invalidation request, you must specify a new value for
CallerReference
and change other values in the request as applicable. One way to ensure that the value ofCallerReference
is unique is to use atimestamp
, for example,20120301090000
.If you make a second invalidation request with the same value for
CallerReference
, and if the rest of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront returns information about the invalidation request that you previously created with the sameCallerReference
.If
CallerReference
is a value you already sent in a previous invalidation batch request but the content of anyPath
is different from the original request, CloudFront returns anInvalidationBatchAlreadyExists
error. - Paths
-
- Required: Yes
- Type: Paths structure
A complex type that contains information about the objects that you want to invalidate. For more information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide.
InvalidationList
Description
The InvalidationList
complex type describes the list of invalidation objects. For more information about invalidation, see Invalidating Objects (Web Distributions Only) in the Amazon CloudFront Developer Guide.
Members
- IsTruncated
-
- Required: Yes
- Type: boolean
A flag that indicates whether more invalidation batch requests remain to be listed. If your results were truncated, you can make a follow-up pagination request using the
Marker
request parameter to retrieve more invalidation batches in the list. - Items
-
- Type: Array of InvalidationSummary structures
A complex type that contains one
InvalidationSummary
element for each invalidation batch created by the current AWS account. - Marker
-
- Required: Yes
- Type: string
The value that you provided for the
Marker
request parameter. - MaxItems
-
- Required: Yes
- Type: int
The value that you provided for the
MaxItems
request parameter. - NextMarker
-
- Type: string
If
IsTruncated
istrue
, this element is present and contains the value that you can use for theMarker
request parameter to continue listing your invalidation batches where they left off. - Quantity
-
- Required: Yes
- Type: int
The number of invalidation batches that were created by the current AWS account.
InvalidationSummary
Description
A summary of an invalidation request.
Members
- CreateTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
- Id
-
- Required: Yes
- Type: string
The unique ID for an invalidation request.
- Status
-
- Required: Yes
- Type: string
The status of an invalidation request.
KeyPairIds
Description
A complex type that lists the active CloudFront key pairs, if any, that are associated with AwsAccountNumber
.
For more information, see ActiveTrustedSigners.
Members
- Items
-
- Type: Array of strings
A complex type that lists the active CloudFront key pairs, if any, that are associated with
AwsAccountNumber
.For more information, see ActiveTrustedSigners.
- Quantity
-
- Required: Yes
- Type: int
The number of active CloudFront key pairs for
AwsAccountNumber
.For more information, see ActiveTrustedSigners.
LambdaFunctionAssociation
Description
A complex type that contains a Lambda function association.
Members
- EventType
-
- Type: string
Specifies the event type that triggers a Lambda function invocation. You can specify the following values:
-
viewer-request
: The function executes when CloudFront receives a request from a viewer and before it checks to see whether the requested object is in the edge cache. -
origin-request
: The function executes only when CloudFront forwards a request to your origin. When the requested object is in the edge cache, the function doesn't execute. -
origin-response
: The function executes after CloudFront receives a response from the origin and before it caches the object in the response. When the requested object is in the edge cache, the function doesn't execute.If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute.
-
viewer-response
: The function executes before CloudFront returns the requested object to the viewer. The function executes regardless of whether the object was already in the edge cache.If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute.
- LambdaFunctionARN
-
- Type: string
The ARN of the Lambda function. You must specify the ARN of a function version; you can't specify a Lambda alias or $LATEST.
LambdaFunctionAssociations
Description
A complex type that specifies a list of Lambda functions associations for a cache behavior.
If you want to invoke one or more Lambda functions triggered by requests that match the PathPattern
of the cache behavior, specify the applicable values for Quantity
and Items
. Note that there can be up to 4 LambdaFunctionAssociation
items in this list (one for each possible value of EventType
) and each EventType
can be associated with the Lambda function only once.
If you don't want to invoke any Lambda functions for the requests that match PathPattern
, specify 0
for Quantity
and omit Items
.
Members
- Items
-
- Type: Array of LambdaFunctionAssociation structures
Optional: A complex type that contains
LambdaFunctionAssociation
items for this cache behavior. IfQuantity
is0
, you can omitItems
. - Quantity
-
- Required: Yes
- Type: int
The number of Lambda function associations for this cache behavior.
LoggingConfig
Description
A complex type that controls whether access logs are written for the distribution.
Members
- Bucket
-
- Required: Yes
- Type: string
The Amazon S3 bucket to store the access logs in, for example,
myawslogbucket.s3.amazonaws.com
. - Enabled
-
- Required: Yes
- Type: boolean
Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't want to enable logging when you create a distribution or if you want to disable logging for an existing distribution, specify
false
forEnabled
, and specify emptyBucket
andPrefix
elements. If you specifyfalse
forEnabled
but you specify values forBucket
,prefix
, andIncludeCookies
, the values are automatically deleted. - IncludeCookies
-
- Required: Yes
- Type: boolean
Specifies whether you want CloudFront to include cookies in access logs, specify
true
forIncludeCookies
. If you choose to include cookies in logs, CloudFront logs all cookies regardless of how you configure the cache behaviors for this distribution. If you don't want to include cookies when you create a distribution or if you want to disable include cookies for an existing distribution, specifyfalse
forIncludeCookies
. - Prefix
-
- Required: Yes
- Type: string
An optional string that you want CloudFront to prefix to the access log
filenames
for this distribution, for example,myprefix/
. If you want to enable logging, but you don't want to specify a prefix, you still must include an emptyPrefix
element in theLogging
element.
MissingBody
Description
This operation requires a body. Ensure that the body is present and the Content-Type
header is set.
Members
- Message
-
- Type: string
NoSuchCloudFrontOriginAccessIdentity
Description
The specified origin access identity does not exist.
Members
- Message
-
- Type: string
NoSuchDistribution
Description
The specified distribution does not exist.
Members
- Message
-
- Type: string
NoSuchInvalidation
Description
The specified invalidation does not exist.
Members
- Message
-
- Type: string
NoSuchOrigin
Description
No origin exists with the specified Origin Id
.
Members
- Message
-
- Type: string
NoSuchResource
Members
- Message
-
- Type: string
NoSuchStreamingDistribution
Description
The specified streaming distribution does not exist.
Members
- Message
-
- Type: string
Origin
Description
A complex type that describes the Amazon S3 bucket or the HTTP server (for example, a web server) from which CloudFront gets your files. You must create at least one origin.
For the current limit on the number of origins that you can create for a distribution, see Amazon CloudFront Limits in the AWS General Reference.
Members
- CustomHeaders
-
- Type: CustomHeaders structure
A complex type that contains names and values for the custom headers that you want.
- CustomOriginConfig
-
- Type: CustomOriginConfig structure
A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the
S3OriginConfig
element instead. - DomainName
-
- Required: Yes
- Type: string
Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example,
myawsbucket.s3.amazonaws.com
.Constraints for Amazon S3 origins:
-
If you configured Amazon S3 Transfer Acceleration for your bucket, don't specify the
s3-accelerate
endpoint forDomainName
. -
The bucket name must be between 3 and 63 characters long (inclusive).
-
The bucket name must contain only lowercase characters, numbers, periods, underscores, and dashes.
-
The bucket name must not contain adjacent periods.
Custom Origins: The DNS domain name for the HTTP server from which you want CloudFront to get objects for this origin, for example,
www.example.com
.Constraints for custom origins:
-
DomainName
must be a valid DNS name that contains only a-z, A-Z, 0-9, dot (.), hyphen (-), or underscore (_) characters. -
The name cannot exceed 128 characters.
- Id
-
- Required: Yes
- Type: string
A unique identifier for the origin. The value of
Id
must be unique within the distribution.When you specify the value of
TargetOriginId
for the default cache behavior or for another cache behavior, you indicate the origin to which you want the cache behavior to route requests by specifying the value of theId
element for that origin. When a request matches the path pattern for that cache behavior, CloudFront routes the request to the specified origin. For more information, see Cache Behavior Settings in the Amazon CloudFront Developer Guide. - OriginPath
-
- Type: string
An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. When you include the
OriginPath
element, specify the directory name, beginning with a/
. CloudFront appends the directory name to the value ofDomainName
, for example,example.com/production
. Do not include a/
at the end of the directory name.For example, suppose you've specified the following values for your distribution:
-
DomainName
: An Amazon S3 bucket namedmyawsbucket
. -
OriginPath
:/production
-
CNAME
:example.com
When a user enters
example.com/index.html
in a browser, CloudFront sends a request to Amazon S3 formyawsbucket/production/index.html
.When a user enters
example.com/acme/index.html
in a browser, CloudFront sends a request to Amazon S3 formyawsbucket/production/acme/index.html
. - S3OriginConfig
-
- Type: S3OriginConfig structure
A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the
CustomOriginConfig
element instead.
OriginCustomHeader
Description
A complex type that contains HeaderName
and HeaderValue
elements, if any, for this distribution.
Members
- HeaderName
-
- Required: Yes
- Type: string
The name of a header that you want CloudFront to forward to your origin. For more information, see Forwarding Custom Headers to Your Origin (Web Distributions Only) in the Amazon Amazon CloudFront Developer Guide.
- HeaderValue
-
- Required: Yes
- Type: string
The value for the header that you specified in the
HeaderName
field.
OriginSslProtocols
Description
A complex type that contains information about the SSL/TLS protocols that CloudFront can use when establishing an HTTPS connection with your origin.
Members
- Items
-
- Required: Yes
- Type: Array of strings
A list that contains allowed SSL/TLS protocols for this distribution.
- Quantity
-
- Required: Yes
- Type: int
The number of SSL/TLS protocols that you want to allow CloudFront to use when establishing an HTTPS connection with this origin.
Origins
Description
A complex type that contains information about origins for this distribution.
Members
- Items
-
- Type: Array of Origin structures
A complex type that contains origins for this distribution.
- Quantity
-
- Required: Yes
- Type: int
The number of origins for this distribution.
Paths
Description
A complex type that contains information about the objects that you want to invalidate. For more information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide.
Members
- Items
-
- Type: Array of strings
A complex type that contains a list of the paths that you want to invalidate.
- Quantity
-
- Required: Yes
- Type: int
The number of objects that you want to invalidate.
PreconditionFailed
Description
The precondition given in one or more of the request-header fields evaluated to false
.
Members
- Message
-
- Type: string
QueryStringCacheKeys
Members
- Items
-
- Type: Array of strings
(Optional) A list that contains the query string parameters that you want CloudFront to use as a basis for caching for this cache behavior. If
Quantity
is 0, you can omitItems
. - Quantity
-
- Required: Yes
- Type: int
The number of
whitelisted
query string parameters for this cache behavior.
ResourceInUse
Members
- Message
-
- Type: string
Restrictions
Description
A complex type that identifies ways in which you want to restrict distribution of your content.
Members
- GeoRestriction
-
- Required: Yes
- Type: GeoRestriction structure
A complex type that controls the countries in which your content is distributed. CloudFront determines the location of your users using
MaxMind
GeoIP databases.
S3Origin
Description
A complex type that contains information about the Amazon S3 bucket from which you want CloudFront to get your media files for distribution.
Members
- DomainName
-
- Required: Yes
- Type: string
The DNS name of the Amazon S3 origin.
- OriginAccessIdentity
-
- Required: Yes
- Type: string
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 Amazon CloudFront Developer Guide.
S3OriginConfig
Description
A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the CustomOriginConfig
element instead.
Members
- OriginAccessIdentity
-
- Required: Yes
- Type: string
The CloudFront origin access identity to associate with the origin. Use an origin access identity to configure the origin so that viewers can only access objects in an Amazon S3 bucket through CloudFront. The format of the value is:
origin-access-identity/cloudfront/ID-of-origin-access-identity
where
ID-of-origin-access-identity
is the value that CloudFront returned in theID
element when you created the origin access identity.If you want viewers 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 about the origin access identity, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
Signer
Description
A complex type that lists the AWS accounts that were included in the TrustedSigners
complex type, as well as their active CloudFront key pair IDs, if any.
Members
- AwsAccountNumber
-
- Type: string
An AWS account that is included in the
TrustedSigners
complex type for this RTMP distribution. Valid values include:-
self
, which is the AWS account used to create the distribution. -
An AWS account number.
- KeyPairIds
-
- Type: KeyPairIds structure
A complex type that lists the active CloudFront key pairs, if any, that are associated with
AwsAccountNumber
.
StreamingDistribution
Description
A streaming distribution.
Members
- ARN
-
- Required: Yes
- Type: string
- ActiveTrustedSigners
-
- Required: Yes
- Type: ActiveTrustedSigners structure
A complex type that lists the AWS accounts, if any, that you included in the
TrustedSigners
complex type for this distribution. These are the accounts that you want to allow to create signed URLs for private content.The
Signer
complex type lists the AWS account number of the trusted signer orself
if the signer is the AWS account that created the distribution. TheSigner
element also includes the IDs of any active CloudFront key pairs that are associated with the trusted signer's AWS account. If noKeyPairId
element appears for aSigner
, that signer can't create signed URLs.For more information, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
- DomainName
-
- Required: Yes
- Type: string
The domain name that corresponds to the streaming distribution, for example,
s5c39gqb8ow64r.cloudfront.net
. - Id
-
- Required: Yes
- Type: string
The identifier for the RTMP distribution. For example:
EGTXBD79EXAMPLE
. - LastModifiedTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time that the distribution was last modified.
- Status
-
- Required: Yes
- Type: string
The current status of the RTMP distribution. When the status is
Deployed
, the distribution's information is propagated to all CloudFront edge locations. - StreamingDistributionConfig
-
- Required: Yes
- Type: StreamingDistributionConfig structure
The current configuration information for the RTMP distribution.
StreamingDistributionAlreadyExists
Members
- Message
-
- Type: string
StreamingDistributionConfig
Description
The RTMP distribution's configuration information.
Members
- Aliases
-
- Type: Aliases structure
A complex type that contains information about CNAMEs (alternate domain names), if any, for this streaming distribution.
- CallerReference
-
- Required: Yes
- Type: string
A unique number that ensures that the request can't be replayed. If the
CallerReference
is new (no matter the content of theStreamingDistributionConfig
object), a new streaming distribution is created. If theCallerReference
is a value that you already sent in a previous request to create a streaming distribution, and the content of theStreamingDistributionConfig
is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If theCallerReference
is a value that you already sent in a previous request to create a streaming distribution but the content of theStreamingDistributionConfig
is different from the original request, CloudFront returns aDistributionAlreadyExists
error. - Comment
-
- Required: Yes
- Type: string
Any comments you want to include about the streaming distribution.
- Enabled
-
- Required: Yes
- Type: boolean
Whether the streaming distribution is enabled to accept user requests for content.
- Logging
-
- Type: StreamingLoggingConfig structure
A complex type that controls whether access logs are written for the streaming distribution.
- PriceClass
-
- Type: string
A complex type that contains information about price class for this streaming distribution.
- S3Origin
-
- Required: Yes
- Type: S3Origin structure
A complex type that contains information about the Amazon S3 bucket from which you want CloudFront to get your media files for distribution.
- TrustedSigners
-
- Required: Yes
- Type: TrustedSigners structure
A complex type that specifies any AWS accounts that 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, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
StreamingDistributionConfigWithTags
Description
A streaming distribution Configuration and a list of tags to be associated with the streaming distribution.
Members
- StreamingDistributionConfig
-
- Required: Yes
- Type: StreamingDistributionConfig structure
A streaming distribution Configuration.
- Tags
-
- Required: Yes
- Type: Tags structure
A complex type that contains zero or more
Tag
elements.
StreamingDistributionList
Description
A streaming distribution list.
Members
- IsTruncated
-
- Required: Yes
- Type: boolean
A flag that indicates whether more streaming distributions remain to be listed. If your results were truncated, you can make a follow-up pagination request using the
Marker
request parameter to retrieve more distributions in the list. - Items
-
- Type: Array of StreamingDistributionSummary structures
A complex type that contains one
StreamingDistributionSummary
element for each distribution that was created by the current AWS account. - Marker
-
- Required: Yes
- Type: string
The value you provided for the
Marker
request parameter. - MaxItems
-
- Required: Yes
- Type: int
The value you provided for the
MaxItems
request parameter. - NextMarker
-
- Type: string
If
IsTruncated
istrue
, this element is present and contains the value you can use for theMarker
request parameter to continue listing your RTMP distributions where they left off. - Quantity
-
- Required: Yes
- Type: int
The number of streaming distributions that were created by the current AWS account.
StreamingDistributionNotDisabled
Members
- Message
-
- Type: string
StreamingDistributionSummary
Description
A summary of the information for an Amazon CloudFront streaming distribution.
Members
- ARN
-
- Required: Yes
- Type: string
The ARN (Amazon Resource Name) for the streaming distribution. For example:
arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5
, where123456789012
is your AWS account ID. - Aliases
-
- Required: Yes
- Type: Aliases structure
A complex type that contains information about CNAMEs (alternate domain names), if any, for this streaming distribution.
- Comment
-
- Required: Yes
- Type: string
The comment originally specified when this distribution was created.
- DomainName
-
- Required: Yes
- Type: string
The domain name corresponding to the distribution, for example,
d111111abcdef8.cloudfront.net
. - Enabled
-
- Required: Yes
- Type: boolean
Whether the distribution is enabled to accept end user requests for content.
- Id
-
- Required: Yes
- Type: string
The identifier for the distribution, for example,
EDFDVBD632BHDS5
. - LastModifiedTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the distribution was last modified.
- PriceClass
-
- Required: Yes
- Type: string
- S3Origin
-
- Required: Yes
- Type: S3Origin structure
A complex type that contains information about the Amazon S3 bucket from which you want CloudFront to get your media files for distribution.
- Status
-
- Required: Yes
- Type: string
Indicates the current status of the distribution. When the status is
Deployed
, the distribution's information is fully propagated throughout the Amazon CloudFront system. - TrustedSigners
-
- Required: Yes
- Type: TrustedSigners structure
A complex type that specifies the AWS accounts, if any, that you want to allow to create signed URLs for private content. If you want to require signed URLs in requests for objects in the target origin that match the
PathPattern
for this cache behavior, specifytrue
forEnabled
, and specify the applicable values forQuantity
andItems
.If you don't want to require signed URLs in requests for objects that matchPathPattern
, specifyfalse
forEnabled
and0
forQuantity
. OmitItems
. To add, change, or remove one or more trusted signers, changeEnabled
totrue
(if it's currentlyfalse
), changeQuantity
as applicable, and specify all of the trusted signers that you want to include in the updated distribution.
StreamingLoggingConfig
Description
A complex type that controls whether access logs are written for this streaming distribution.
Members
- Bucket
-
- Required: Yes
- Type: string
The Amazon S3 bucket to store the access logs in, for example,
myawslogbucket.s3.amazonaws.com
. - Enabled
-
- Required: Yes
- Type: boolean
Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't want to enable logging when you create a streaming distribution or if you want to disable logging for an existing streaming distribution, specify
false
forEnabled
, and specifyempty Bucket
andPrefix
elements. If you specifyfalse
forEnabled
but you specify values forBucket
andPrefix
, the values are automatically deleted. - Prefix
-
- Required: Yes
- Type: string
An optional string that you want CloudFront to prefix to the access log filenames for this streaming distribution, for example,
myprefix/
. If you want to enable logging, but you don't want to specify a prefix, you still must include an emptyPrefix
element in theLogging
element.
Tag
Description
A complex type that contains Tag
key and Tag
value.
Members
- Key
-
- Required: Yes
- Type: string
A string that contains
Tag
key.The string length should be between 1 and 128 characters. Valid characters include
a-z
,A-Z
,0-9
, space, and the special characters_ - . : / = + @
. - Value
-
- Type: string
A string that contains an optional
Tag
value.The string length should be between 0 and 256 characters. Valid characters include
a-z
,A-Z
,0-9
, space, and the special characters_ - . : / = + @
.
TagKeys
Description
A complex type that contains zero or more Tag
elements.
Members
- Items
-
- Type: Array of strings
A complex type that contains
Tag
key elements.
Tags
Description
A complex type that contains zero or more Tag
elements.
Members
- Items
-
- Type: Array of Tag structures
A complex type that contains
Tag
elements.
TooManyCacheBehaviors
Description
You cannot create more cache behaviors for the distribution.
Members
- Message
-
- Type: string
TooManyCertificates
Description
You cannot create anymore custom SSL/TLS certificates.
Members
- Message
-
- Type: string
TooManyCloudFrontOriginAccessIdentities
Description
Processing your request would cause you to exceed the maximum number of origin access identities allowed.
Members
- Message
-
- Type: string
TooManyCookieNamesInWhiteList
Description
Your request contains more cookie names in the whitelist than are allowed per cache behavior.
Members
- Message
-
- Type: string
TooManyDistributionCNAMEs
Description
Your request contains more CNAMEs than are allowed per distribution.
Members
- Message
-
- Type: string
TooManyDistributions
Description
Processing your request would cause you to exceed the maximum number of distributions allowed.
Members
- Message
-
- Type: string
TooManyDistributionsWithLambdaAssociations
Description
Processing your request would cause the maximum number of distributions with Lambda function associations per owner to be exceeded.
Members
- Message
-
- Type: string
TooManyHeadersInForwardedValues
Members
- Message
-
- Type: string
TooManyInvalidationsInProgress
Description
You have exceeded the maximum number of allowable InProgress invalidation batch requests, or invalidation objects.
Members
- Message
-
- Type: string
TooManyLambdaFunctionAssociations
Description
Your request contains more Lambda function associations than are allowed per distribution.
Members
- Message
-
- Type: string
TooManyOriginCustomHeaders
Members
- Message
-
- Type: string
TooManyOrigins
Description
You cannot create more origins for the distribution.
Members
- Message
-
- Type: string
TooManyQueryStringParameters
Members
- Message
-
- Type: string
TooManyStreamingDistributionCNAMEs
Members
- Message
-
- Type: string
TooManyStreamingDistributions
Description
Processing your request would cause you to exceed the maximum number of streaming distributions allowed.
Members
- Message
-
- Type: string
TooManyTrustedSigners
Description
Your request contains more trusted signers than are allowed per distribution.
Members
- Message
-
- Type: string
TrustedSignerDoesNotExist
Description
One or more of your trusted signers don't exist.
Members
- Message
-
- Type: string
TrustedSigners
Description
A complex type that specifies the AWS accounts, if any, that you want to allow to create signed URLs for private content.
If you want to require signed URLs in requests for objects in the target origin that match the PathPattern
for this cache behavior, specify true
for Enabled
, and specify the applicable values for Quantity
and Items
. For more information, see Serving Private Content through CloudFront in the Amazon Amazon CloudFront Developer Guide.
If you don't want to require signed URLs in requests for objects that match PathPattern
, specify false
for Enabled
and 0
for Quantity
. Omit Items
.
To add, change, or remove one or more trusted signers, change Enabled
to true
(if it's currently false
), change Quantity
as applicable, and specify all of the trusted signers that you want to include in the updated distribution.
For more information about updating the distribution configuration, see DistributionConfig .
Members
- Enabled
-
- Required: Yes
- Type: boolean
Specifies whether you want to require viewers to use signed URLs to access the files specified by
PathPattern
andTargetOriginId
. - Items
-
- Type: Array of strings
Optional: A complex type that contains trusted signers for this cache behavior. If
Quantity
is0
, you can omitItems
. - Quantity
-
- Required: Yes
- Type: int
The number of trusted signers for this cache behavior.
ViewerCertificate
Description
A complex type that specifies the following:
-
Whether you want viewers to use HTTP or HTTPS to request your objects.
-
If you want viewers to use HTTPS, whether you're using an alternate domain name such as
example.com
or the CloudFront domain name for your distribution, such asd111111abcdef8.cloudfront.net
. -
If you're using an alternate domain name, whether AWS Certificate Manager (ACM) provided the certificate, or you purchased a certificate from a third-party certificate authority and imported it into ACM or uploaded it to the IAM certificate store.
You must specify only one of the following values:
Don't specify false
for CloudFrontDefaultCertificate
.
If you want viewers to use HTTP instead of HTTPS to request your objects: Specify the following value:
<CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
In addition, specify allow-all
for ViewerProtocolPolicy
for all of your cache behaviors.
If you want viewers to use HTTPS to request your objects: Choose the type of certificate that you want to use based on whether you're using an alternate domain name for your objects or the CloudFront domain name:
-
If you're using an alternate domain name, such as example.com: Specify one of the following values, depending on whether ACM provided your certificate or you purchased your certificate from third-party certificate authority:
-
<ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn>
whereARN for ACM SSL/TLS certificate
is the ARN for the ACM SSL/TLS certificate that you want to use for this distribution. -
<IAMCertificateId>IAM certificate ID<IAMCertificateId>
whereIAM certificate ID
is the ID that IAM returned when you added the certificate to the IAM certificate store.
If you specify
ACMCertificateArn
orIAMCertificateId
, you must also specify a value forSSLSupportMethod
.If you choose to use an ACM certificate or a certificate in the IAM certificate store, we recommend that you use only an alternate domain name in your object URLs (
https://example.com/logo.jpg
). If you use the domain name that is associated with your CloudFront distribution (such ashttps://d111111abcdef8.cloudfront.net/logo.jpg
) and the viewer supportsSNI
, then CloudFront behaves normally. However, if the browser does not support SNI, the user's experience depends on the value that you choose forSSLSupportMethod
:-
vip
: The viewer displays a warning because there is a mismatch between the CloudFront domain name and the domain name in your SSL/TLS certificate. -
sni-only
: CloudFront drops the connection with the browser without returning the object.
-
-
If you're using the CloudFront domain name for your distribution, such as
d111111abcdef8.cloudfront.net
: Specify the following value:<CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
If you want viewers to use HTTPS, you must also specify one of the following values in your cache behaviors:
-
<ViewerProtocolPolicy>https-only<ViewerProtocolPolicy>
-
<ViewerProtocolPolicy>redirect-to-https<ViewerProtocolPolicy>
You can also optionally require that CloudFront use HTTPS to communicate with your origin by specifying one of the following values for the applicable origins:
-
<OriginProtocolPolicy>https-only<OriginProtocolPolicy>
-
<OriginProtocolPolicy>match-viewer<OriginProtocolPolicy>
For more information, see Using Alternate Domain Names and HTTPS in the Amazon CloudFront Developer Guide.
Members
- ACMCertificateArn
-
- Type: string
For information about how and when to use
ACMCertificateArn
, see ViewerCertificate. - Certificate
-
- Type: string
This field has been deprecated. Use one of the following fields instead:
- CertificateSource
-
- Type: string
This field has been deprecated. Use one of the following fields instead:
- CloudFrontDefaultCertificate
-
- Type: boolean
For information about how and when to use
CloudFrontDefaultCertificate
, see ViewerCertificate. - IAMCertificateId
-
- Type: string
For information about how and when to use
IAMCertificateId
, see ViewerCertificate. - MinimumProtocolVersion
-
- Type: string
Specify the security policy that you want CloudFront to use for HTTPS connections. A security policy determines two settings:
-
The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers
-
The cipher that CloudFront uses to encrypt the content that it returns to viewers
On the CloudFront console, this setting is called Security policy.
We recommend that you specify
TLSv1.1_2016
unless your users are using browsers or devices that do not support TLSv1.1 or later.When both of the following are true, you must specify
TLSv1
or later for the security policy:-
You're using a custom certificate: you specified a value for
ACMCertificateArn
or forIAMCertificateId
-
You're using SNI: you specified
sni-only
forSSLSupportMethod
If you specify
true
forCloudFrontDefaultCertificate
, CloudFront automatically sets the security policy toTLSv1
regardless of the value that you specify forMinimumProtocolVersion
.For information about the relationship between the security policy that you choose and the protocols and ciphers that CloudFront uses to communicate with viewers, see Supported SSL/TLS Protocols and Ciphers for Communication Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.
- SSLSupportMethod
-
- Type: string
If you specify a value for ViewerCertificate$ACMCertificateArn or for ViewerCertificate$IAMCertificateId, you must also specify how you want CloudFront to serve HTTPS requests: using a method that works for all clients or one that works for most clients:
-
vip
: CloudFront uses dedicated IP addresses for your content and can respond to HTTPS requests from any viewer. However, you will incur additional monthly charges. -
sni-only
: CloudFront can respond to HTTPS requests from viewers that support Server Name Indication (SNI). All modern browsers support SNI, but some browsers still in use don't support SNI. If some of your users' browsers don't support SNI, we recommend that you do one of the following:-
Use the
vip
option (dedicated IP addresses) instead ofsni-only
. -
Use the CloudFront SSL/TLS certificate instead of a custom certificate. This requires that you use the CloudFront domain name of your distribution in the URLs for your objects, for example,
https://d111111abcdef8.cloudfront.net/logo.png
. -
If you can control which browser your users use, upgrade the browser to one that supports SNI.
-
Use HTTP instead of HTTPS.
-
Don't specify a value for
SSLSupportMethod
if you specified<CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
.For more information, see Using Alternate Domain Names and HTTPS in the Amazon CloudFront Developer Guide.