Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class CreateDistributionCommandProtected

Creates a CloudFront distribution.

Example

Use a bare-bones client and the command you need to make an API call.

import { CloudFrontClient, CreateDistributionCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import
// const { CloudFrontClient, CreateDistributionCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import
const client = new CloudFrontClient(config);
const input = { // CreateDistributionRequest
DistributionConfig: { // DistributionConfig
CallerReference: "STRING_VALUE", // required
Aliases: { // Aliases
Quantity: Number("int"), // required
Items: [ // AliasList
"STRING_VALUE",
],
},
DefaultRootObject: "STRING_VALUE",
Origins: { // Origins
Quantity: Number("int"), // required
Items: [ // OriginList // required
{ // Origin
Id: "STRING_VALUE", // required
DomainName: "STRING_VALUE", // required
OriginPath: "STRING_VALUE",
CustomHeaders: { // CustomHeaders
Quantity: Number("int"), // required
Items: [ // OriginCustomHeadersList
{ // OriginCustomHeader
HeaderName: "STRING_VALUE", // required
HeaderValue: "STRING_VALUE", // required
},
],
},
S3OriginConfig: { // S3OriginConfig
OriginAccessIdentity: "STRING_VALUE", // required
},
CustomOriginConfig: { // CustomOriginConfig
HTTPPort: Number("int"), // required
HTTPSPort: Number("int"), // required
OriginProtocolPolicy: "http-only" || "match-viewer" || "https-only", // required
OriginSslProtocols: { // OriginSslProtocols
Quantity: Number("int"), // required
Items: [ // SslProtocolsList // required
"SSLv3" || "TLSv1" || "TLSv1.1" || "TLSv1.2",
],
},
OriginReadTimeout: Number("int"),
OriginKeepaliveTimeout: Number("int"),
},
ConnectionAttempts: Number("int"),
ConnectionTimeout: Number("int"),
OriginShield: { // OriginShield
Enabled: true || false, // required
OriginShieldRegion: "STRING_VALUE",
},
OriginAccessControlId: "STRING_VALUE",
},
],
},
OriginGroups: { // OriginGroups
Quantity: Number("int"), // required
Items: [ // OriginGroupList
{ // OriginGroup
Id: "STRING_VALUE", // required
FailoverCriteria: { // OriginGroupFailoverCriteria
StatusCodes: { // StatusCodes
Quantity: Number("int"), // required
Items: [ // StatusCodeList // required
Number("int"),
],
},
},
Members: { // OriginGroupMembers
Quantity: Number("int"), // required
Items: [ // OriginGroupMemberList // required
{ // OriginGroupMember
OriginId: "STRING_VALUE", // required
},
],
},
},
],
},
DefaultCacheBehavior: { // DefaultCacheBehavior
TargetOriginId: "STRING_VALUE", // required
TrustedSigners: { // TrustedSigners
Enabled: true || false, // required
Quantity: Number("int"), // required
Items: [ // AwsAccountNumberList
"STRING_VALUE",
],
},
TrustedKeyGroups: { // TrustedKeyGroups
Enabled: true || false, // required
Quantity: Number("int"), // required
Items: [ // TrustedKeyGroupIdList
"STRING_VALUE",
],
},
ViewerProtocolPolicy: "allow-all" || "https-only" || "redirect-to-https", // required
AllowedMethods: { // AllowedMethods
Quantity: Number("int"), // required
Items: [ // MethodsList // required
"GET" || "HEAD" || "POST" || "PUT" || "PATCH" || "OPTIONS" || "DELETE",
],
CachedMethods: { // CachedMethods
Quantity: Number("int"), // required
Items: [ // required
"GET" || "HEAD" || "POST" || "PUT" || "PATCH" || "OPTIONS" || "DELETE",
],
},
},
SmoothStreaming: true || false,
Compress: true || false,
LambdaFunctionAssociations: { // LambdaFunctionAssociations
Quantity: Number("int"), // required
Items: [ // LambdaFunctionAssociationList
{ // LambdaFunctionAssociation
LambdaFunctionARN: "STRING_VALUE", // required
EventType: "viewer-request" || "viewer-response" || "origin-request" || "origin-response", // required
IncludeBody: true || false,
},
],
},
FunctionAssociations: { // FunctionAssociations
Quantity: Number("int"), // required
Items: [ // FunctionAssociationList
{ // FunctionAssociation
FunctionARN: "STRING_VALUE", // required
EventType: "viewer-request" || "viewer-response" || "origin-request" || "origin-response", // required
},
],
},
FieldLevelEncryptionId: "STRING_VALUE",
RealtimeLogConfigArn: "STRING_VALUE",
CachePolicyId: "STRING_VALUE",
OriginRequestPolicyId: "STRING_VALUE",
ResponseHeadersPolicyId: "STRING_VALUE",
ForwardedValues: { // ForwardedValues
QueryString: true || false, // required
Cookies: { // CookiePreference
Forward: "none" || "whitelist" || "all", // required
WhitelistedNames: { // CookieNames
Quantity: Number("int"), // required
Items: [ // CookieNameList
"STRING_VALUE",
],
},
},
Headers: { // Headers
Quantity: Number("int"), // required
Items: [ // HeaderList
"STRING_VALUE",
],
},
QueryStringCacheKeys: { // QueryStringCacheKeys
Quantity: Number("int"), // required
Items: [ // QueryStringCacheKeysList
"STRING_VALUE",
],
},
},
MinTTL: Number("long"),
DefaultTTL: Number("long"),
MaxTTL: Number("long"),
},
CacheBehaviors: { // CacheBehaviors
Quantity: Number("int"), // required
Items: [ // CacheBehaviorList
{ // CacheBehavior
PathPattern: "STRING_VALUE", // required
TargetOriginId: "STRING_VALUE", // required
TrustedSigners: {
Enabled: true || false, // required
Quantity: Number("int"), // required
Items: [
"STRING_VALUE",
],
},
TrustedKeyGroups: {
Enabled: true || false, // required
Quantity: Number("int"), // required
Items: [
"STRING_VALUE",
],
},
ViewerProtocolPolicy: "allow-all" || "https-only" || "redirect-to-https", // required
AllowedMethods: {
Quantity: Number("int"), // required
Items: "<MethodsList>", // required
CachedMethods: {
Quantity: Number("int"), // required
Items: "<MethodsList>", // required
},
},
SmoothStreaming: true || false,
Compress: true || false,
LambdaFunctionAssociations: {
Quantity: Number("int"), // required
Items: [
{
LambdaFunctionARN: "STRING_VALUE", // required
EventType: "viewer-request" || "viewer-response" || "origin-request" || "origin-response", // required
IncludeBody: true || false,
},
],
},
FunctionAssociations: {
Quantity: Number("int"), // required
Items: [
{
FunctionARN: "STRING_VALUE", // required
EventType: "viewer-request" || "viewer-response" || "origin-request" || "origin-response", // required
},
],
},
FieldLevelEncryptionId: "STRING_VALUE",
RealtimeLogConfigArn: "STRING_VALUE",
CachePolicyId: "STRING_VALUE",
OriginRequestPolicyId: "STRING_VALUE",
ResponseHeadersPolicyId: "STRING_VALUE",
ForwardedValues: {
QueryString: true || false, // required
Cookies: {
Forward: "none" || "whitelist" || "all", // required
WhitelistedNames: {
Quantity: Number("int"), // required
Items: [
"STRING_VALUE",
],
},
},
Headers: {
Quantity: Number("int"), // required
Items: [
"STRING_VALUE",
],
},
QueryStringCacheKeys: {
Quantity: Number("int"), // required
Items: [
"STRING_VALUE",
],
},
},
MinTTL: Number("long"),
DefaultTTL: Number("long"),
MaxTTL: Number("long"),
},
],
},
CustomErrorResponses: { // CustomErrorResponses
Quantity: Number("int"), // required
Items: [ // CustomErrorResponseList
{ // CustomErrorResponse
ErrorCode: Number("int"), // required
ResponsePagePath: "STRING_VALUE",
ResponseCode: "STRING_VALUE",
ErrorCachingMinTTL: Number("long"),
},
],
},
Comment: "STRING_VALUE", // required
Logging: { // LoggingConfig
Enabled: true || false, // required
IncludeCookies: true || false, // required
Bucket: "STRING_VALUE", // required
Prefix: "STRING_VALUE", // required
},
PriceClass: "PriceClass_100" || "PriceClass_200" || "PriceClass_All",
Enabled: true || false, // required
ViewerCertificate: { // ViewerCertificate
CloudFrontDefaultCertificate: true || false,
IAMCertificateId: "STRING_VALUE",
ACMCertificateArn: "STRING_VALUE",
SSLSupportMethod: "sni-only" || "vip" || "static-ip",
MinimumProtocolVersion: "SSLv3" || "TLSv1" || "TLSv1_2016" || "TLSv1.1_2016" || "TLSv1.2_2018" || "TLSv1.2_2019" || "TLSv1.2_2021",
Certificate: "STRING_VALUE",
CertificateSource: "cloudfront" || "iam" || "acm",
},
Restrictions: { // Restrictions
GeoRestriction: { // GeoRestriction
RestrictionType: "blacklist" || "whitelist" || "none", // required
Quantity: Number("int"), // required
Items: [ // LocationList
"STRING_VALUE",
],
},
},
WebACLId: "STRING_VALUE",
HttpVersion: "http1.1" || "http2" || "http3" || "http2and3",
IsIPV6Enabled: true || false,
ContinuousDeploymentPolicyId: "STRING_VALUE",
Staging: true || false,
},
};
const command = new CreateDistributionCommand(input);
const response = await client.send(command);
// { // CreateDistributionResult
// Distribution: { // Distribution
// Id: "STRING_VALUE", // required
// ARN: "STRING_VALUE", // required
// Status: "STRING_VALUE", // required
// LastModifiedTime: new Date("TIMESTAMP"), // required
// InProgressInvalidationBatches: Number("int"), // required
// DomainName: "STRING_VALUE", // required
// ActiveTrustedSigners: { // ActiveTrustedSigners
// Enabled: true || false, // required
// Quantity: Number("int"), // required
// Items: [ // SignerList
// { // Signer
// AwsAccountNumber: "STRING_VALUE",
// KeyPairIds: { // KeyPairIds
// Quantity: Number("int"), // required
// Items: [ // KeyPairIdList
// "STRING_VALUE",
// ],
// },
// },
// ],
// },
// ActiveTrustedKeyGroups: { // ActiveTrustedKeyGroups
// Enabled: true || false, // required
// Quantity: Number("int"), // required
// Items: [ // KGKeyPairIdsList
// { // KGKeyPairIds
// KeyGroupId: "STRING_VALUE",
// KeyPairIds: {
// Quantity: Number("int"), // required
// Items: [
// "STRING_VALUE",
// ],
// },
// },
// ],
// },
// DistributionConfig: { // DistributionConfig
// CallerReference: "STRING_VALUE", // required
// Aliases: { // Aliases
// Quantity: Number("int"), // required
// Items: [ // AliasList
// "STRING_VALUE",
// ],
// },
// DefaultRootObject: "STRING_VALUE",
// Origins: { // Origins
// Quantity: Number("int"), // required
// Items: [ // OriginList // required
// { // Origin
// Id: "STRING_VALUE", // required
// DomainName: "STRING_VALUE", // required
// OriginPath: "STRING_VALUE",
// CustomHeaders: { // CustomHeaders
// Quantity: Number("int"), // required
// Items: [ // OriginCustomHeadersList
// { // OriginCustomHeader
// HeaderName: "STRING_VALUE", // required
// HeaderValue: "STRING_VALUE", // required
// },
// ],
// },
// S3OriginConfig: { // S3OriginConfig
// OriginAccessIdentity: "STRING_VALUE", // required
// },
// CustomOriginConfig: { // CustomOriginConfig
// HTTPPort: Number("int"), // required
// HTTPSPort: Number("int"), // required
// OriginProtocolPolicy: "http-only" || "match-viewer" || "https-only", // required
// OriginSslProtocols: { // OriginSslProtocols
// Quantity: Number("int"), // required
// Items: [ // SslProtocolsList // required
// "SSLv3" || "TLSv1" || "TLSv1.1" || "TLSv1.2",
// ],
// },
// OriginReadTimeout: Number("int"),
// OriginKeepaliveTimeout: Number("int"),
// },
// ConnectionAttempts: Number("int"),
// ConnectionTimeout: Number("int"),
// OriginShield: { // OriginShield
// Enabled: true || false, // required
// OriginShieldRegion: "STRING_VALUE",
// },
// OriginAccessControlId: "STRING_VALUE",
// },
// ],
// },
// OriginGroups: { // OriginGroups
// Quantity: Number("int"), // required
// Items: [ // OriginGroupList
// { // OriginGroup
// Id: "STRING_VALUE", // required
// FailoverCriteria: { // OriginGroupFailoverCriteria
// StatusCodes: { // StatusCodes
// Quantity: Number("int"), // required
// Items: [ // StatusCodeList // required
// Number("int"),
// ],
// },
// },
// Members: { // OriginGroupMembers
// Quantity: Number("int"), // required
// Items: [ // OriginGroupMemberList // required
// { // OriginGroupMember
// OriginId: "STRING_VALUE", // required
// },
// ],
// },
// },
// ],
// },
// DefaultCacheBehavior: { // DefaultCacheBehavior
// TargetOriginId: "STRING_VALUE", // required
// TrustedSigners: { // TrustedSigners
// Enabled: true || false, // required
// Quantity: Number("int"), // required
// Items: [ // AwsAccountNumberList
// "STRING_VALUE",
// ],
// },
// TrustedKeyGroups: { // TrustedKeyGroups
// Enabled: true || false, // required
// Quantity: Number("int"), // required
// Items: [ // TrustedKeyGroupIdList
// "STRING_VALUE",
// ],
// },
// ViewerProtocolPolicy: "allow-all" || "https-only" || "redirect-to-https", // required
// AllowedMethods: { // AllowedMethods
// Quantity: Number("int"), // required
// Items: [ // MethodsList // required
// "GET" || "HEAD" || "POST" || "PUT" || "PATCH" || "OPTIONS" || "DELETE",
// ],
// CachedMethods: { // CachedMethods
// Quantity: Number("int"), // required
// Items: [ // required
// "GET" || "HEAD" || "POST" || "PUT" || "PATCH" || "OPTIONS" || "DELETE",
// ],
// },
// },
// SmoothStreaming: true || false,
// Compress: true || false,
// LambdaFunctionAssociations: { // LambdaFunctionAssociations
// Quantity: Number("int"), // required
// Items: [ // LambdaFunctionAssociationList
// { // LambdaFunctionAssociation
// LambdaFunctionARN: "STRING_VALUE", // required
// EventType: "viewer-request" || "viewer-response" || "origin-request" || "origin-response", // required
// IncludeBody: true || false,
// },
// ],
// },
// FunctionAssociations: { // FunctionAssociations
// Quantity: Number("int"), // required
// Items: [ // FunctionAssociationList
// { // FunctionAssociation
// FunctionARN: "STRING_VALUE", // required
// EventType: "viewer-request" || "viewer-response" || "origin-request" || "origin-response", // required
// },
// ],
// },
// FieldLevelEncryptionId: "STRING_VALUE",
// RealtimeLogConfigArn: "STRING_VALUE",
// CachePolicyId: "STRING_VALUE",
// OriginRequestPolicyId: "STRING_VALUE",
// ResponseHeadersPolicyId: "STRING_VALUE",
// ForwardedValues: { // ForwardedValues
// QueryString: true || false, // required
// Cookies: { // CookiePreference
// Forward: "none" || "whitelist" || "all", // required
// WhitelistedNames: { // CookieNames
// Quantity: Number("int"), // required
// Items: [ // CookieNameList
// "STRING_VALUE",
// ],
// },
// },
// Headers: { // Headers
// Quantity: Number("int"), // required
// Items: [ // HeaderList
// "STRING_VALUE",
// ],
// },
// QueryStringCacheKeys: { // QueryStringCacheKeys
// Quantity: Number("int"), // required
// Items: [ // QueryStringCacheKeysList
// "STRING_VALUE",
// ],
// },
// },
// MinTTL: Number("long"),
// DefaultTTL: Number("long"),
// MaxTTL: Number("long"),
// },
// CacheBehaviors: { // CacheBehaviors
// Quantity: Number("int"), // required
// Items: [ // CacheBehaviorList
// { // CacheBehavior
// PathPattern: "STRING_VALUE", // required
// TargetOriginId: "STRING_VALUE", // required
// TrustedSigners: {
// Enabled: true || false, // required
// Quantity: Number("int"), // required
// Items: [
// "STRING_VALUE",
// ],
// },
// TrustedKeyGroups: {
// Enabled: true || false, // required
// Quantity: Number("int"), // required
// Items: [
// "STRING_VALUE",
// ],
// },
// ViewerProtocolPolicy: "allow-all" || "https-only" || "redirect-to-https", // required
// AllowedMethods: {
// Quantity: Number("int"), // required
// Items: "<MethodsList>", // required
// CachedMethods: {
// Quantity: Number("int"), // required
// Items: "<MethodsList>", // required
// },
// },
// SmoothStreaming: true || false,
// Compress: true || false,
// LambdaFunctionAssociations: {
// Quantity: Number("int"), // required
// Items: [
// {
// LambdaFunctionARN: "STRING_VALUE", // required
// EventType: "viewer-request" || "viewer-response" || "origin-request" || "origin-response", // required
// IncludeBody: true || false,
// },
// ],
// },
// FunctionAssociations: {
// Quantity: Number("int"), // required
// Items: [
// {
// FunctionARN: "STRING_VALUE", // required
// EventType: "viewer-request" || "viewer-response" || "origin-request" || "origin-response", // required
// },
// ],
// },
// FieldLevelEncryptionId: "STRING_VALUE",
// RealtimeLogConfigArn: "STRING_VALUE",
// CachePolicyId: "STRING_VALUE",
// OriginRequestPolicyId: "STRING_VALUE",
// ResponseHeadersPolicyId: "STRING_VALUE",
// ForwardedValues: {
// QueryString: true || false, // required
// Cookies: {
// Forward: "none" || "whitelist" || "all", // required
// WhitelistedNames: {
// Quantity: Number("int"), // required
// Items: [
// "STRING_VALUE",
// ],
// },
// },
// Headers: {
// Quantity: Number("int"), // required
// Items: [
// "STRING_VALUE",
// ],
// },
// QueryStringCacheKeys: {
// Quantity: Number("int"), // required
// Items: [
// "STRING_VALUE",
// ],
// },
// },
// MinTTL: Number("long"),
// DefaultTTL: Number("long"),
// MaxTTL: Number("long"),
// },
// ],
// },
// CustomErrorResponses: { // CustomErrorResponses
// Quantity: Number("int"), // required
// Items: [ // CustomErrorResponseList
// { // CustomErrorResponse
// ErrorCode: Number("int"), // required
// ResponsePagePath: "STRING_VALUE",
// ResponseCode: "STRING_VALUE",
// ErrorCachingMinTTL: Number("long"),
// },
// ],
// },
// Comment: "STRING_VALUE", // required
// Logging: { // LoggingConfig
// Enabled: true || false, // required
// IncludeCookies: true || false, // required
// Bucket: "STRING_VALUE", // required
// Prefix: "STRING_VALUE", // required
// },
// PriceClass: "PriceClass_100" || "PriceClass_200" || "PriceClass_All",
// Enabled: true || false, // required
// ViewerCertificate: { // ViewerCertificate
// CloudFrontDefaultCertificate: true || false,
// IAMCertificateId: "STRING_VALUE",
// ACMCertificateArn: "STRING_VALUE",
// SSLSupportMethod: "sni-only" || "vip" || "static-ip",
// MinimumProtocolVersion: "SSLv3" || "TLSv1" || "TLSv1_2016" || "TLSv1.1_2016" || "TLSv1.2_2018" || "TLSv1.2_2019" || "TLSv1.2_2021",
// Certificate: "STRING_VALUE",
// CertificateSource: "cloudfront" || "iam" || "acm",
// },
// Restrictions: { // Restrictions
// GeoRestriction: { // GeoRestriction
// RestrictionType: "blacklist" || "whitelist" || "none", // required
// Quantity: Number("int"), // required
// Items: [ // LocationList
// "STRING_VALUE",
// ],
// },
// },
// WebACLId: "STRING_VALUE",
// HttpVersion: "http1.1" || "http2" || "http3" || "http2and3",
// IsIPV6Enabled: true || false,
// ContinuousDeploymentPolicyId: "STRING_VALUE",
// Staging: true || false,
// },
// AliasICPRecordals: [ // AliasICPRecordals
// { // AliasICPRecordal
// CNAME: "STRING_VALUE",
// ICPRecordalStatus: "APPROVED" || "SUSPENDED" || "PENDING",
// },
// ],
// },
// Location: "STRING_VALUE",
// ETag: "STRING_VALUE",
// };

Param

CreateDistributionCommandInput

Returns

CreateDistributionCommandOutput

See

Throws

AccessDenied (client fault)

Access denied.

Throws

CNAMEAlreadyExists (client fault)

The CNAME specified is already defined for CloudFront.

Throws

ContinuousDeploymentPolicyInUse (client fault)

You cannot delete a continuous deployment policy that is associated with a primary distribution.

Throws

DistributionAlreadyExists (client fault)

The caller reference you attempted to create the distribution with is associated with another distribution.

Throws

IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior (client fault)

The specified configuration for field-level encryption can't be associated with the specified cache behavior.

Throws

IllegalOriginAccessConfiguration (client fault)

An origin cannot contain both an origin access control (OAC) and an origin access identity (OAI).

Throws

InconsistentQuantities (client fault)

The value of Quantity and the size of Items don't match.

Throws

InvalidArgument (client fault)

An argument is invalid.

Throws

InvalidDefaultRootObject (client fault)

The default root object file name is too big or contains an invalid character.

Throws

InvalidDomainNameForOriginAccessControl (client fault)

An origin access control is associated with an origin whose domain name is not supported.

Throws

InvalidErrorCode (client fault)

An invalid error code was specified.

Throws

InvalidForwardCookies (client fault)

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.

Throws

InvalidFunctionAssociation (client fault)

A CloudFront function association is invalid.

Throws

InvalidGeoRestrictionParameter (client fault)

The specified geo restriction parameter is not valid.

Throws

InvalidHeadersForS3Origin (client fault)

The headers specified are not valid for an Amazon S3 origin.

Throws

InvalidLambdaFunctionAssociation (client fault)

The specified Lambda@Edge function association is invalid.

Throws

InvalidLocationCode (client fault)

The location code specified is not valid.

Throws

InvalidMinimumProtocolVersion (client fault)

The minimum protocol version specified is not valid.

Throws

InvalidOrigin (client fault)

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

Throws

InvalidOriginAccessControl (client fault)

The origin access control is not valid.

Throws

InvalidOriginAccessIdentity (client fault)

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

Throws

InvalidOriginKeepaliveTimeout (client fault)

The keep alive timeout specified for the origin is not valid.

Throws

InvalidOriginReadTimeout (client fault)

The read timeout specified for the origin is not valid.

Throws

InvalidProtocolSettings (client fault)

You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI).

Throws

InvalidQueryStringParameters (client fault)

The query string parameters specified are not valid.

Throws

InvalidRelativePath (client fault)

The relative path is too big, is not URL-encoded, or does not begin with a slash (/).

Throws

InvalidRequiredProtocol (client fault)

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.

Throws

InvalidResponseCode (client fault)

A response code is not valid.

Throws

InvalidTTLOrder (client fault)

The TTL order specified is not valid.

Throws

InvalidViewerCertificate (client fault)

A viewer certificate specified is not valid.

Throws

InvalidWebACLId (client fault)

A web ACL ID specified is not valid. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using WAF Classic, use the ACL ID, for example 473e64fd-f30b-4765-81a0-62ad96dd167a.

Throws

MissingBody (client fault)

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

Throws

NoSuchCachePolicy (client fault)

The cache policy does not exist.

Throws

NoSuchContinuousDeploymentPolicy (client fault)

The continuous deployment policy doesn't exist.

Throws

NoSuchFieldLevelEncryptionConfig (client fault)

The specified configuration for field-level encryption doesn't exist.

Throws

NoSuchOrigin (client fault)

No origin exists with the specified Origin Id.

Throws

NoSuchOriginRequestPolicy (client fault)

The origin request policy does not exist.

Throws

NoSuchRealtimeLogConfig (client fault)

The real-time log configuration does not exist.

Throws

NoSuchResponseHeadersPolicy (client fault)

The response headers policy does not exist.

Throws

RealtimeLogConfigOwnerMismatch (client fault)

The specified real-time log configuration belongs to a different Amazon Web Services account.

Throws

TooManyCacheBehaviors (client fault)

You cannot create more cache behaviors for the distribution.

Throws

TooManyCertificates (client fault)

You cannot create anymore custom SSL/TLS certificates.

Throws

TooManyCookieNamesInWhiteList (client fault)

Your request contains more cookie names in the whitelist than are allowed per cache behavior.

Throws

TooManyDistributionCNAMEs (client fault)

Your request contains more CNAMEs than are allowed per distribution.

Throws

TooManyDistributions (client fault)

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

Throws

TooManyDistributionsAssociatedToCachePolicy (client fault)

The maximum number of distributions have been associated with the specified cache policy. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Throws

TooManyDistributionsAssociatedToFieldLevelEncryptionConfig (client fault)

The maximum number of distributions have been associated with the specified configuration for field-level encryption.

Throws

TooManyDistributionsAssociatedToKeyGroup (client fault)

The number of distributions that reference this key group is more than the maximum allowed. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Throws

TooManyDistributionsAssociatedToOriginAccessControl (client fault)

The maximum number of distributions have been associated with the specified origin access control.

For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Throws

TooManyDistributionsAssociatedToOriginRequestPolicy (client fault)

The maximum number of distributions have been associated with the specified origin request policy. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Throws

TooManyDistributionsAssociatedToResponseHeadersPolicy (client fault)

The maximum number of distributions have been associated with the specified response headers policy.

For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Throws

TooManyDistributionsWithFunctionAssociations (client fault)

You have reached the maximum number of distributions that are associated with a CloudFront function. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Throws

TooManyDistributionsWithLambdaAssociations (client fault)

Processing your request would cause the maximum number of distributions with Lambda@Edge function associations per owner to be exceeded.

Throws

TooManyDistributionsWithSingleFunctionARN (client fault)

The maximum number of distributions have been associated with the specified Lambda@Edge function.

Throws

TooManyFunctionAssociations (client fault)

You have reached the maximum number of CloudFront function associations for this distribution. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Throws

TooManyHeadersInForwardedValues (client fault)

Your request contains too many headers in forwarded values.

Throws

TooManyKeyGroupsAssociatedToDistribution (client fault)

The number of key groups referenced by this distribution is more than the maximum allowed. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Throws

TooManyLambdaFunctionAssociations (client fault)

Your request contains more Lambda@Edge function associations than are allowed per distribution.

Throws

TooManyOriginCustomHeaders (client fault)

Your request contains too many origin custom headers.

Throws

TooManyOriginGroupsPerDistribution (client fault)

Processing your request would cause you to exceed the maximum number of origin groups allowed.

Throws

TooManyOrigins (client fault)

You cannot create more origins for the distribution.

Throws

TooManyQueryStringParameters (client fault)

Your request contains too many query string parameters.

Throws

TooManyTrustedSigners (client fault)

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

Throws

TrustedKeyGroupDoesNotExist (client fault)

The specified key group does not exist.

Throws

TrustedSignerDoesNotExist (client fault)

One or more of your trusted signers don't exist.

Throws

CloudFrontServiceException

Base exception class for all service exceptions from CloudFront service.

Hierarchy

Constructors

Properties

Methods