AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Create a new distribution with tags. This API operation requires the following IAM permissions:
This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginCreateDistributionWithTags and EndCreateDistributionWithTags.
Namespace: Amazon.CloudFront
Assembly: AWSSDK.CloudFront.dll
Version: 3.x.y.z
public virtual Task<CreateDistributionWithTagsResponse> CreateDistributionWithTagsAsync( CreateDistributionWithTagsRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the CreateDistributionWithTags service method.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Exception | Condition |
---|---|
AccessDeniedException | Access denied. |
CNAMEAlreadyExistsException | The CNAME specified is already defined for CloudFront. |
ContinuousDeploymentPolicyInUseException | You cannot delete a continuous deployment policy that is associated with a primary distribution. |
DistributionAlreadyExistsException | The caller reference you attempted to create the distribution with is associated with another distribution. |
IllegalFieldLevelEncryptionConfigAssociationWithCacheBehaviorException | The specified configuration for field-level encryption can't be associated with the specified cache behavior. |
IllegalOriginAccessConfigurationException | An origin cannot contain both an origin access control (OAC) and an origin access identity (OAI). |
InconsistentQuantitiesException | The value of Quantity and the size of Items don't match. |
InvalidArgumentException | An argument is invalid. |
InvalidDefaultRootObjectException | The default root object file name is too big or contains an invalid character. |
InvalidDomainNameForOriginAccessControlException | An origin access control is associated with an origin whose domain name is not supported. |
InvalidErrorCodeException | An invalid error code was specified. |
InvalidForwardCookiesException | 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. |
InvalidFunctionAssociationException | A CloudFront function association is invalid. |
InvalidGeoRestrictionParameterException | The specified geo restriction parameter is not valid. |
InvalidHeadersForS3OriginException | The headers specified are not valid for an Amazon S3 origin. |
InvalidLambdaFunctionAssociationException | The specified Lambda@Edge function association is invalid. |
InvalidLocationCodeException | The location code specified is not valid. |
InvalidMinimumProtocolVersionException | The minimum protocol version specified is not valid. |
InvalidOriginAccessControlException | The origin access control is not valid. |
InvalidOriginAccessIdentityException | The origin access identity is not valid or doesn't exist. |
InvalidOriginException | The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket. |
InvalidOriginKeepaliveTimeoutException | The keep alive timeout specified for the origin is not valid. |
InvalidOriginReadTimeoutException | The read timeout specified for the origin is not valid. |
InvalidProtocolSettingsException | You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI). |
InvalidQueryStringParametersException | The query string parameters specified are not valid. |
InvalidRelativePathException | The relative path is too big, is not URL-encoded, or does not begin with a slash (/). |
InvalidRequiredProtocolException | 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. |
InvalidResponseCodeException | A response code is not valid. |
InvalidTaggingException | The tagging specified is not valid. |
InvalidTTLOrderException | The TTL order specified is not valid. |
InvalidViewerCertificateException | A viewer certificate specified is not valid. |
InvalidWebACLIdException | 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. |
MissingBodyException | This operation requires a body. Ensure that the body is present and the Content-Type header is set. |
NoSuchCachePolicyException | The cache policy does not exist. |
NoSuchContinuousDeploymentPolicyException | The continuous deployment policy doesn't exist. |
NoSuchFieldLevelEncryptionConfigException | The specified configuration for field-level encryption doesn't exist. |
NoSuchOriginException | No origin exists with the specified Origin Id. |
NoSuchOriginRequestPolicyException | The origin request policy does not exist. |
NoSuchRealtimeLogConfigException | The real-time log configuration does not exist. |
NoSuchResponseHeadersPolicyException | The response headers policy does not exist. |
RealtimeLogConfigOwnerMismatchException | The specified real-time log configuration belongs to a different Amazon Web Services account. |
TooManyCacheBehaviorsException | You cannot create more cache behaviors for the distribution. |
TooManyCertificatesException | You cannot create anymore custom SSL/TLS certificates. |
TooManyCookieNamesInWhiteListException | Your request contains more cookie names in the whitelist than are allowed per cache behavior. |
TooManyDistributionCNAMEsException | Your request contains more CNAMEs than are allowed per distribution. |
TooManyDistributionsAssociatedToCachePolicyException | 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. |
TooManyDistributionsAssociatedToFieldLevelEncryptionConfigException | The maximum number of distributions have been associated with the specified configuration for field-level encryption. |
TooManyDistributionsAssociatedToKeyGroupException | 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. |
TooManyDistributionsAssociatedToOriginAccessControlException | 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. |
TooManyDistributionsAssociatedToOriginRequestPolicyException | 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. |
TooManyDistributionsAssociatedToResponseHeadersPolicyException | 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. |
TooManyDistributionsException | Processing your request would cause you to exceed the maximum number of distributions allowed. |
TooManyDistributionsWithFunctionAssociationsException | 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. |
TooManyDistributionsWithLambdaAssociationsException | Processing your request would cause the maximum number of distributions with Lambda@Edge function associations per owner to be exceeded. |
TooManyDistributionsWithSingleFunctionARNException | The maximum number of distributions have been associated with the specified Lambda@Edge function. |
TooManyFunctionAssociationsException | 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. |
TooManyHeadersInForwardedValuesException | Your request contains too many headers in forwarded values. |
TooManyKeyGroupsAssociatedToDistributionException | 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. |
TooManyLambdaFunctionAssociationsException | Your request contains more Lambda@Edge function associations than are allowed per distribution. |
TooManyOriginCustomHeadersException | Your request contains too many origin custom headers. |
TooManyOriginGroupsPerDistributionException | Processing your request would cause you to exceed the maximum number of origin groups allowed. |
TooManyOriginsException | You cannot create more origins for the distribution. |
TooManyQueryStringParametersException | Your request contains too many query string parameters. |
TooManyTrustedSignersException | Your request contains more trusted signers than are allowed per distribution. |
TrustedKeyGroupDoesNotExistException | The specified key group does not exist. |
TrustedSignerDoesNotExistException | One or more of your trusted signers don't exist. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5