View a markdown version of this page

CreateDistribution - Amazon CloudFront

CreateDistribution

Creates a CloudFront distribution.

Request Syntax

POST /2020-05-31/distribution HTTP/1.1 <?xml version="1.0" encoding="UTF-8"?> <DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2020-05-31/"> <Aliases> <Items> <CNAME>string</CNAME> </Items> <Quantity>integer</Quantity> </Aliases> <AnycastIpListId>string</AnycastIpListId> <CacheBehaviors> <Items> <CacheBehavior> <AllowedMethods> <CachedMethods> <Items> <Method>string</Method> </Items> <Quantity>integer</Quantity> </CachedMethods> <Items> <Method>string</Method> </Items> <Quantity>integer</Quantity> </AllowedMethods> <CachePolicyId>string</CachePolicyId> <Compress>boolean</Compress> <DefaultTTL>long</DefaultTTL> <FieldLevelEncryptionId>string</FieldLevelEncryptionId> <ForwardedValues> <Cookies> <Forward>string</Forward> <WhitelistedNames> <Items> <Name>string</Name> </Items> <Quantity>integer</Quantity> </WhitelistedNames> </Cookies> <Headers> <Items> <Name>string</Name> </Items> <Quantity>integer</Quantity> </Headers> <QueryString>boolean</QueryString> <QueryStringCacheKeys> <Items> <Name>string</Name> </Items> <Quantity>integer</Quantity> </QueryStringCacheKeys> </ForwardedValues> <FunctionAssociations> <Items> <FunctionAssociation> <EventType>string</EventType> <FunctionARN>string</FunctionARN> </FunctionAssociation> </Items> <Quantity>integer</Quantity> </FunctionAssociations> <GrpcConfig> <Enabled>boolean</Enabled> </GrpcConfig> <LambdaFunctionAssociations> <Items> <LambdaFunctionAssociation> <EventType>string</EventType> <IncludeBody>boolean</IncludeBody> <LambdaFunctionARN>string</LambdaFunctionARN> </LambdaFunctionAssociation> </Items> <Quantity>integer</Quantity> </LambdaFunctionAssociations> <MaxTTL>long</MaxTTL> <MinTTL>long</MinTTL> <OriginRequestPolicyId>string</OriginRequestPolicyId> <PathPattern>string</PathPattern> <RealtimeLogConfigArn>string</RealtimeLogConfigArn> <ResponseHeadersPolicyId>string</ResponseHeadersPolicyId> <SmoothStreaming>boolean</SmoothStreaming> <TargetOriginId>string</TargetOriginId> <TrustedKeyGroups> <Enabled>boolean</Enabled> <Items> <KeyGroup>string</KeyGroup> </Items> <Quantity>integer</Quantity> </TrustedKeyGroups> <TrustedSigners> <Enabled>boolean</Enabled> <Items> <AwsAccountNumber>string</AwsAccountNumber> </Items> <Quantity>integer</Quantity> </TrustedSigners> <ViewerProtocolPolicy>string</ViewerProtocolPolicy> </CacheBehavior> </Items> <Quantity>integer</Quantity> </CacheBehaviors> <CacheTagConfig> <HeaderName>string</HeaderName> </CacheTagConfig> <CallerReference>string</CallerReference> <Comment>string</Comment> <ConnectionFunctionAssociation> <Id>string</Id> </ConnectionFunctionAssociation> <ConnectionMode>string</ConnectionMode> <ContinuousDeploymentPolicyId>string</