AWS SDK Version 3 for .NET
API Reference

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.

Creates a new web distribution. Send a POST request to the

            API version/distribution
/distribution ID resource.


For PCL this operation is only available in asynchronous form. Please refer to CreateDistributionAsync.

Namespace: Amazon.CloudFront
Assembly: AWSSDK.CloudFront.dll
Version: 3.x.y.z


public abstract CreateDistributionResponse CreateDistribution(
         CreateDistributionRequest request
Type: Amazon.CloudFront.Model.CreateDistributionRequest

Container for the necessary parameters to execute the CreateDistribution service method.

Return Value
The response from the CreateDistribution service method, as returned by CloudFront.


AccessDeniedException Access denied.
DistributionAlreadyExistsException The caller reference you attempted to create the distribution with is associated with another distribution.
InconsistentQuantitiesException The value of Quantity and the size of Items do not match.
InvalidArgumentException The argument is invalid.
InvalidDefaultRootObjectException The default root object file name is too big or contains an invalid character.
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.
InvalidLambdaFunctionAssociationException The specified Lambda function association is invalid.
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.
InvalidProtocolSettingsException You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI).
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.
MissingBodyException This operation requires a body. Ensure that the body is present and the Content-Type header is set.
NoSuchOriginException No origin exists with the specified Origin Id.
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.
TooManyDistributionsException Processing your request would cause you to exceed the maximum number of distributions allowed.
TooManyDistributionsWithLambdaAssociationsException Processing your request would cause the maximum number of distributions with Lambda function associations per owner to be exceeded.
TooManyLambdaFunctionAssociationsException Your request contains more Lambda function associations than are allowed per distribution.
TooManyOriginsException You cannot create more origins for the distribution.
TooManyTrustedSignersException Your request contains more trusted signers than are allowed per distribution.
TrustedSignerDoesNotExistException One or more of your trusted signers do not exist.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also