AWS CloudFront (version v1.*.*)

create_cloud_front_origin_access_identity#

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.

Parameters

$body#

The request to create a new origin access identity (OAI). An origin access identity is a special CloudFront user that you can associate with Amazon S3 origins, so that you can secure all or just some of your Amazon S3 content. For more information, see Restricting Access to Amazon S3 Content by Using an Origin Access Identity in the Amazon CloudFront Developer Guide.

Type: object

{
"CloudFrontOriginAccessIdentityConfig" : {
"Comment" : "Any comments you want to include about the origin access identity. ",
"CallerReference" : "A unique value (for example, a date-time stamp) that ensures that the request can't be replayed. \nIf the value of CallerReference is new (regardless of the content of the CloudFrontOriginAccessIdentityConfig object), a new origin access identity is created. \nIf the CallerReference is a value already sent in a previous identity request, and the content of the CloudFrontOriginAccessIdentityConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. \nIf 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. "
}
}

create_distribution#

Creates a new web distribution. You create a CloudFront distribution to tell CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery. Send a POST request to the /CloudFront API version/distribution/distribution ID resource.
When you update a distribution, there are more required fields than when you create a distribution. When you update your distribution by using UpdateDistribution, follow the steps included in the documentation to get the current configuration and then make your updates. This helps to make sure that you include all of the required fields. To view a summary, see Required Fields for Create Distribution and Update Distribution in the Amazon CloudFront Developer Guide.

Parameters

$body#

The request to create a new distribution.

Type: object

{
"DistributionConfig" : {
"Logging" : {
"IncludeCookies" : "Specifies whether you want CloudFront to include cookies in access logs, specify true for IncludeCookies. 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, specify false for IncludeCookies.",
"Bucket" : "The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.",
"Enabled" : "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 for Enabled, and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, the values are automatically deleted.",
"Prefix" : "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 empty Prefix element in the Logging element."
},
"DefaultRootObject" : "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. \nSpecify only the object name, for example, index.html. Don't add a / before the object name. \nIf you don't want to specify a default root object when you create a distribution, include an empty DefaultRootObject element. \nTo delete the default root object from an existing distribution, update the distribution configuration and include an empty DefaultRootObject element. \nTo replace the default root object, update the distribution configuration and specify the new object. \nFor more information about the default root object, see Creating a Default Root Object in the Amazon CloudFront Developer Guide.",
"Origins" : {
"Quantity" : "The number of origins or origin groups for this distribution.",
"Items" : [ {
"Origin" : {
"DomainName" : " 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. If you set up your bucket to be configured as a website endpoint, enter the Amazon S3 static website hosting endpoint for the bucket. \nFor more information about specifying this value for different types of origins, see Origin Domain Name in the Amazon CloudFront Developer Guide. \nConstraints for Amazon S3 origins: \n If you configured Amazon S3 Transfer Acceleration for your bucket, don't specify the s3-accelerate endpoint for DomainName. \n The bucket name must be between 3 and 63 characters long (inclusive). \n The bucket name must contain only lowercase characters, numbers, periods, underscores, and dashes. \n The bucket name must not contain adjacent periods. \n 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. \nConstraints for custom origins: \n DomainName must be a valid DNS name that contains only a-z, A-Z, 0-9, dot (.), hyphen (-), or underscore (_) characters. \n The name cannot exceed 128 characters. ",
"S3OriginConfig" : {
"OriginAccessIdentity" : "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: \norigin-access-identity/cloudfront/ID-of-origin-access-identity \nwhere ID-of-origin-access-identity is the value that CloudFront returned in the ID element when you created the origin access identity. \nIf you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. \nTo delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element. \nTo replace the origin access identity, update the distribution configuration and specify the new origin access identity. \nFor more information about the origin access identity, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide."
},
"OriginPath" : "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 of DomainName, for example, example.com/production. Do not include a / at the end of the directory name. \nFor example, suppose you've specified the following values for your distribution: \n DomainName: An Amazon S3 bucket named myawsbucket. \n OriginPath: /production \n CNAME: example.com \nWhen a user enters example.com/index.html in a browser, CloudFront sends a request to Amazon S3 for myawsbucket/production/index.html. \nWhen a user enters example.com/acme/index.html in a browser, CloudFront sends a request to Amazon S3 for myawsbucket/production/acme/index.html.",
"Id" : "A unique identifier for the origin or origin group. The value of Id must be unique within the distribution. \nWhen 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 the Id 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.",
"CustomHeaders" : {
"Quantity" : "The number of custom headers, if any, for this distribution.",
"Items" : "OriginCustomHeadersList"
},
"CustomOriginConfig" : {
"OriginReadTimeout" : "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. \nIf you need to increase the maximum time limit, contact the AWS Support Center.",
"HTTPSPort" : "The HTTPS port the custom origin listens on.",
"OriginSslProtocols" : {
"Quantity" : "The number of SSL/TLS protocols that you want to allow CloudFront to use when establishing an HTTPS connection with this origin. ",
"Items" : "Required SslProtocolsList"
},
"OriginKeepaliveTimeout" : "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. \nIf you need to increase the maximum time limit, contact the AWS Support Center.",
"HTTPPort" : "The HTTP port the custom origin listens on.",
"OriginProtocolPolicy" : "The origin protocol policy to apply to your origin."
}
}
} ]
},
"Comment" : "Any comments you want to include about the distribution. \nIf you don't want to specify a comment, include an empty Comment element. \nTo delete an existing comment, update the distribution configuration and include an empty Comment element. \nTo add or change a comment, update the distribution configuration and specify the new comment.",
"ViewerCertificate" : {
"CertificateSource" : "This field is no longer used. Use one of the following fields instead: \n ACMCertificateArn \n IAMCertificateId \n CloudFrontDefaultCertificate ",
"IAMCertificateId" : "If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. Specify the following value if you purchased your certificate from a third-party certificate authority: \n <IAMCertificateId>IAM certificate ID<IAMCertificateId> where IAM certificate ID is the ID that IAM returned when you added the certificate to the IAM certificate store. \nIf you specify IAMCertificateId, you must also specify a value for SSLSupportMethod.",
"SSLSupportMethod" : "If you specify a value for ACMCertificateArn or for IAMCertificateId, you must also specify how you want CloudFront to serve HTTPS requests: using a method that works for browsers and clients released after 2010 or one that works for all clients. \n sni-only: CloudFront can respond to HTTPS requests from viewers that support Server Name Indication (SNI). All modern browsers support SNI, but there are a few that don't. For a current list of the browsers that support SNI, see the Wikipedia entry Server Name Indication. To learn about options to explore if you have users with browsers that don't include SNI support, see Choosing How CloudFront Serves HTTPS Requests in the Amazon CloudFront Developer Guide. \n vip: CloudFront uses dedicated IP addresses for your content and can respond to HTTPS requests from any viewer. However, there are additional monthly charges. For details, including specific pricing information, see Custom SSL options for Amazon CloudFront on the AWS marketing site. \nDon't specify a value for SSLSupportMethod if you specified <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>. \nFor more information, see Choosing How CloudFront Serves HTTPS Requests in the Amazon CloudFront Developer Guide.",
"ACMCertificateArn" : "If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. Specify the following value if ACM provided your certificate: \n <ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn> where ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate that you want to use for this distribution. \nIf you specify ACMCertificateArn, you must also specify a value for SSLSupportMethod.",
"MinimumProtocolVersion" : "Specify the security policy that you want CloudFront to use for HTTPS connections. A security policy determines two settings: \n The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers \n The cipher that CloudFront uses to encrypt the content that it returns to viewers \nOn the CloudFront console, this setting is called Security policy. \nWe recommend that you specify TLSv1.1_2016 unless your users are using browsers or devices that do not support TLSv1.1 or later. \nWhen both of the following are true, you must specify TLSv1 or later for the security policy: \n You're using a custom certificate: you specified a value for ACMCertificateArn or for IAMCertificateId \n You're using SNI: you specified sni-only for SSLSupportMethod \nIf you specify true for CloudFrontDefaultCertificate, CloudFront automatically sets the security policy to TLSv1 regardless of the value that you specify for MinimumProtocolVersion. \nFor 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.",
"CloudFrontDefaultCertificate" : "If you're using the CloudFront domain name for your distribution, such as d111111abcdef8.cloudfront.net, specify the following value: \n <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate> ",
"Certificate" : "This field is no longer used. Use one of the following fields instead: \n ACMCertificateArn \n IAMCertificateId \n CloudFrontDefaultCertificate "
},
"PriceClass" : "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. \nIf 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. \nFor 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 (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing. For price class information, scroll down to see the table at the bottom of the page.",
"DefaultCacheBehavior" : {
"Compress" : "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.",
"AllowedMethods" : {
"CachedMethods" : {
"Quantity" : "The number of HTTP methods for which you want CloudFront to cache responses. Valid values are 2 (for caching responses to GET and HEAD requests) and 3 (for caching responses to GET, HEAD, and OPTIONS requests).",
"Items" : [ {
"Method" : "string. Possible values: GET | HEAD | POST | PUT | PATCH | OPTIONS | DELETE"
} ]
},
"Quantity" : "The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).",
"Items" : [ {
"Method" : "string. Possible values: GET | HEAD | POST | PUT | PATCH | OPTIONS | DELETE"
} ]
},
"LambdaFunctionAssociations" : {
"Quantity" : "The number of Lambda function associations for this cache behavior.",
"Items" : [ {
"LambdaFunctionAssociation" : {
"IncludeBody" : "A flag that allows a Lambda function to have read access to the body content. For more information, see Accessing the Request Body by Choosing the Include Body Option in the Amazon CloudFront Developer Guide.",
"EventType" : "Specifies the event type that triggers a Lambda function invocation. You can specify the following values: \n 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. \n 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. \n 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. \n 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" : "The ARN of the Lambda function. You must specify the ARN of a function version; you can't specify a Lambda alias or $LATEST."
}
} ]
},
"SmoothStreaming" : "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, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern. ",
"TargetOriginId" : "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 in your distribution.",
"ViewerProtocolPolicy" : "The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options: \n allow-all: Viewers can use HTTP or HTTPS. \n 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. \n https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). \nFor more information about requiring the HTTPS protocol, see Using an HTTPS Connection to Access Your Objects in the Amazon CloudFront Developer Guide. \nThe 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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"ForwardedValues" : {
"QueryString" : "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 for QueryStringCacheKeys, if any: \nIf you specify true for QueryString and you don't specify any values for QueryStringCacheKeys, 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. \nIf you specify true for QueryString and you specify one or more values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. \nIf 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. \nFor more information, see Configuring CloudFront to Cache Based on Query String Parameters in the Amazon CloudFront Developer Guide.",
"Cookies" : {
"WhitelistedNames" : {
"Quantity" : "The number of different cookies that you want CloudFront to forward to the origin for this cache behavior.",
"Items" : [ {
"Name" : "string"
} ]
},
"Forward" : "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. \nAmazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the Forward element. "
},
"Headers" : {
"Quantity" : "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: \n Forward all headers to your origin: Specify 1 for Quantity and * for Name. CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin. \n 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. \n Forward only the default headers: Specify 0 for Quantity and omit Items. In this configuration, CloudFront doesn't cache based on the values in the request headers. \nRegardless 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: \n S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates \n Custom origin: See HTTP Request Headers and CloudFront Behavior ",
"Items" : [ {
"Name" : "string"
} ]
},
"QueryStringCacheKeys" : {
"Quantity" : "The number of whitelisted query string parameters for a cache behavior.",
"Items" : [ {
"Name" : "string"
} ]
}
},
"MinTTL" : "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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. \nYou must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin (under Headers, if you specify 1 for Quantity and * for Name).",
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : [ {
"AwsAccountNumber" : "string"
} ]
},
"MaxTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"DefaultTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"FieldLevelEncryptionId" : "The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for a cache behavior or for the default cache behavior in your distribution."
},
"CustomErrorResponses" : {
"Quantity" : "The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If Quantity is 0, you can omit Items.",
"Items" : [ {
"CustomErrorResponse" : {
"ResponseCode" : "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: \n 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. \n If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors. \n You might want to return a 200 status code (OK) and static website so your customers don't know that your website is down. \nIf you specify a value for ResponseCode, you must also specify a value for ResponsePagePath. If you don't want to specify a value, include an empty element, <ResponseCode>, in the XML document.",
"ErrorCachingMinTTL" : "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. \nIf you don't want to specify a value, include an empty element, <ErrorCachingMinTTL>, in the XML document. \nFor more information, see Customizing Error Responses in the Amazon CloudFront Developer Guide.",
"ErrorCode" : "The HTTP status code for which you want to specify a custom error page and/or a caching duration.",
"ResponsePagePath" : "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: \n 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/*. \n The value of TargetOriginId specifies the value of the ID element for the origin that contains your custom error pages. \nIf you specify a value for ResponsePagePath, you must also specify a value for ResponseCode. If you don't want to specify a value, include an empty element, <ResponsePagePath>, in the XML document. \nWe 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."
}
} ]
},
"OriginGroups" : {
"Quantity" : "The number of origin groups.",
"Items" : [ {
"OriginGroup" : {
"Id" : "The origin group's ID.",
"FailoverCriteria" : {
"StatusCodes" : {
"Quantity" : "The number of status codes.",
"Items" : "Required StatusCodeList"
}
},
"Members" : {
"Quantity" : "The number of origins in an origin group.",
"Items" : "Required OriginGroupMemberList"
}
}
} ]
},
"Enabled" : "From this field, you can enable or disable the selected distribution.",
"IsIPV6Enabled" : "If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution, specify true. If you specify false, CloudFront responds to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution. \nIn 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. \nIf 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: \n You enable IPv6 for the distribution \n You're using alternate domain names in the URLs for your objects \nFor more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name in the Amazon Route 53 Developer Guide. \nIf 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.",
"CallerReference" : "A unique value (for example, a date-time stamp) that ensures that the request can't be replayed. \nIf the value of CallerReference is new (regardless of the content of the DistributionConfig object), CloudFront creates a new distribution. \nIf CallerReference is a value that you already sent in a previous request to create a distribution, CloudFront returns a DistributionAlreadyExists error.",
"Aliases" : {
"Quantity" : "The number of CNAME aliases, if any, that you want to associate with this distribution.",
"Items" : [ {
"CNAME" : "string"
} ]
},
"WebACLId" : "A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution. \nAWS 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. ",
"HttpVersion" : "(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. \nFor viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support Server Name Identification (SNI). \nIn 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.\" ",
"Restrictions" : {
"GeoRestriction" : {
"Quantity" : "When geo restriction is enabled, this is the number of countries in your whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0, and you can omit Items.",
"Items" : [ {
"Location" : "string"
} ],
"RestrictionType" : "The method that you want to use to restrict distribution of your content by country: \n none: No geo restriction is enabled, meaning access to content is not restricted by client geo location. \n blacklist: The Location elements specify the countries in which you don't want CloudFront to distribute your content. \n whitelist: The Location elements specify the countries in which you want CloudFront to distribute your content. "
}
},
"CacheBehaviors" : {
"Quantity" : "The number of cache behaviors for this distribution. ",
"Items" : [ {
"CacheBehavior" : {
"Compress" : "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.",
"LambdaFunctionAssociations" : {
"Quantity" : "The number of Lambda function associations for this cache behavior.",
"Items" : "LambdaFunctionAssociationList"
},
"TargetOriginId" : "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 in your distribution.",
"ViewerProtocolPolicy" : "The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options: \n allow-all: Viewers can use HTTP or HTTPS. \n 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. \n https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). \nFor more information about requiring the HTTPS protocol, see Using an HTTPS Connection to Access Your Objects in the Amazon CloudFront Developer Guide. \nThe 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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : "AwsAccountNumberList"
},
"DefaultTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"FieldLevelEncryptionId" : "The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for a cache behavior or for the default cache behavior in your distribution.",
"PathPattern" : "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. \nYou 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 /. \nThe 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. \nFor more information, see Path Pattern in the Amazon CloudFront Developer Guide.",
"AllowedMethods" : {
"CachedMethods" : {
"Quantity" : "The number of HTTP methods for which you want CloudFront to cache responses. Valid values are 2 (for caching responses to GET and HEAD requests) and 3 (for caching responses to GET, HEAD, and OPTIONS requests).",
"Items" : "Required MethodsList"
},
"Quantity" : "The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).",
"Items" : "Required MethodsList"
},
"SmoothStreaming" : "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, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern. ",
"ForwardedValues" : {
"QueryString" : "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 for QueryStringCacheKeys, if any: \nIf you specify true for QueryString and you don't specify any values for QueryStringCacheKeys, 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. \nIf you specify true for QueryString and you specify one or more values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. \nIf 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. \nFor more information, see Configuring CloudFront to Cache Based on Query String Parameters in the Amazon CloudFront Developer Guide.",
"Cookies" : {
"WhitelistedNames" : {
"Quantity" : "The number of different cookies that you want CloudFront to forward to the origin for this cache behavior.",
"Items" : "CookieNameList"
},
"Forward" : "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. \nAmazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the Forward element. "
},
"Headers" : {
"Quantity" : "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: \n Forward all headers to your origin: Specify 1 for Quantity and * for Name. CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin. \n 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. \n Forward only the default headers: Specify 0 for Quantity and omit Items. In this configuration, CloudFront doesn't cache based on the values in the request headers. \nRegardless 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: \n S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates \n Custom origin: See HTTP Request Headers and CloudFront Behavior ",
"Items" : "HeaderList"
},
"QueryStringCacheKeys" : {
"Quantity" : "The number of whitelisted query string parameters for a cache behavior.",
"Items" : "QueryStringCacheKeysList"
}
},
"MinTTL" : "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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. \nYou must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin (under Headers, if you specify 1 for Quantity and * for Name).",
"MaxTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide."
}
} ]
}
}
}

create_distribution_with_tags#

Create a new distribution with tags.

Parameters

$body#

The request to create a new distribution with tags.

Type: object

{
"DistributionConfigWithTags" : {
"DistributionConfig" : {
"Logging" : {
"IncludeCookies" : "Specifies whether you want CloudFront to include cookies in access logs, specify true for IncludeCookies. 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, specify false for IncludeCookies.",
"Bucket" : "The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.",
"Enabled" : "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 for Enabled, and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, the values are automatically deleted.",
"Prefix" : "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 empty Prefix element in the Logging element."
},
"DefaultRootObject" : "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. \nSpecify only the object name, for example, index.html. Don't add a / before the object name. \nIf you don't want to specify a default root object when you create a distribution, include an empty DefaultRootObject element. \nTo delete the default root object from an existing distribution, update the distribution configuration and include an empty DefaultRootObject element. \nTo replace the default root object, update the distribution configuration and specify the new object. \nFor more information about the default root object, see Creating a Default Root Object in the Amazon CloudFront Developer Guide.",
"Origins" : {
"Quantity" : "The number of origins or origin groups for this distribution.",
"Items" : [ {
"Origin" : {
"DomainName" : " 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. If you set up your bucket to be configured as a website endpoint, enter the Amazon S3 static website hosting endpoint for the bucket. \nFor more information about specifying this value for different types of origins, see Origin Domain Name in the Amazon CloudFront Developer Guide. \nConstraints for Amazon S3 origins: \n If you configured Amazon S3 Transfer Acceleration for your bucket, don't specify the s3-accelerate endpoint for DomainName. \n The bucket name must be between 3 and 63 characters long (inclusive). \n The bucket name must contain only lowercase characters, numbers, periods, underscores, and dashes. \n The bucket name must not contain adjacent periods. \n 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. \nConstraints for custom origins: \n DomainName must be a valid DNS name that contains only a-z, A-Z, 0-9, dot (.), hyphen (-), or underscore (_) characters. \n The name cannot exceed 128 characters. ",
"S3OriginConfig" : {
"OriginAccessIdentity" : "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: \norigin-access-identity/cloudfront/ID-of-origin-access-identity \nwhere ID-of-origin-access-identity is the value that CloudFront returned in the ID element when you created the origin access identity. \nIf you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. \nTo delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element. \nTo replace the origin access identity, update the distribution configuration and specify the new origin access identity. \nFor more information about the origin access identity, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide."
},
"OriginPath" : "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 of DomainName, for example, example.com/production. Do not include a / at the end of the directory name. \nFor example, suppose you've specified the following values for your distribution: \n DomainName: An Amazon S3 bucket named myawsbucket. \n OriginPath: /production \n CNAME: example.com \nWhen a user enters example.com/index.html in a browser, CloudFront sends a request to Amazon S3 for myawsbucket/production/index.html. \nWhen a user enters example.com/acme/index.html in a browser, CloudFront sends a request to Amazon S3 for myawsbucket/production/acme/index.html.",
"Id" : "A unique identifier for the origin or origin group. The value of Id must be unique within the distribution. \nWhen 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 the Id 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.",
"CustomHeaders" : {
"Quantity" : "The number of custom headers, if any, for this distribution.",
"Items" : "OriginCustomHeadersList"
},
"CustomOriginConfig" : {
"OriginReadTimeout" : "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. \nIf you need to increase the maximum time limit, contact the AWS Support Center.",
"HTTPSPort" : "The HTTPS port the custom origin listens on.",
"OriginSslProtocols" : {
"Quantity" : "The number of SSL/TLS protocols that you want to allow CloudFront to use when establishing an HTTPS connection with this origin. ",
"Items" : "Required SslProtocolsList"
},
"OriginKeepaliveTimeout" : "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. \nIf you need to increase the maximum time limit, contact the AWS Support Center.",
"HTTPPort" : "The HTTP port the custom origin listens on.",
"OriginProtocolPolicy" : "The origin protocol policy to apply to your origin."
}
}
} ]
},
"Comment" : "Any comments you want to include about the distribution. \nIf you don't want to specify a comment, include an empty Comment element. \nTo delete an existing comment, update the distribution configuration and include an empty Comment element. \nTo add or change a comment, update the distribution configuration and specify the new comment.",
"ViewerCertificate" : {
"CertificateSource" : "This field is no longer used. Use one of the following fields instead: \n ACMCertificateArn \n IAMCertificateId \n CloudFrontDefaultCertificate ",
"IAMCertificateId" : "If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. Specify the following value if you purchased your certificate from a third-party certificate authority: \n <IAMCertificateId>IAM certificate ID<IAMCertificateId> where IAM certificate ID is the ID that IAM returned when you added the certificate to the IAM certificate store. \nIf you specify IAMCertificateId, you must also specify a value for SSLSupportMethod.",
"SSLSupportMethod" : "If you specify a value for ACMCertificateArn or for IAMCertificateId, you must also specify how you want CloudFront to serve HTTPS requests: using a method that works for browsers and clients released after 2010 or one that works for all clients. \n sni-only: CloudFront can respond to HTTPS requests from viewers that support Server Name Indication (SNI). All modern browsers support SNI, but there are a few that don't. For a current list of the browsers that support SNI, see the Wikipedia entry Server Name Indication. To learn about options to explore if you have users with browsers that don't include SNI support, see Choosing How CloudFront Serves HTTPS Requests in the Amazon CloudFront Developer Guide. \n vip: CloudFront uses dedicated IP addresses for your content and can respond to HTTPS requests from any viewer. However, there are additional monthly charges. For details, including specific pricing information, see Custom SSL options for Amazon CloudFront on the AWS marketing site. \nDon't specify a value for SSLSupportMethod if you specified <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>. \nFor more information, see Choosing How CloudFront Serves HTTPS Requests in the Amazon CloudFront Developer Guide.",
"ACMCertificateArn" : "If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. Specify the following value if ACM provided your certificate: \n <ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn> where ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate that you want to use for this distribution. \nIf you specify ACMCertificateArn, you must also specify a value for SSLSupportMethod.",
"MinimumProtocolVersion" : "Specify the security policy that you want CloudFront to use for HTTPS connections. A security policy determines two settings: \n The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers \n The cipher that CloudFront uses to encrypt the content that it returns to viewers \nOn the CloudFront console, this setting is called Security policy. \nWe recommend that you specify TLSv1.1_2016 unless your users are using browsers or devices that do not support TLSv1.1 or later. \nWhen both of the following are true, you must specify TLSv1 or later for the security policy: \n You're using a custom certificate: you specified a value for ACMCertificateArn or for IAMCertificateId \n You're using SNI: you specified sni-only for SSLSupportMethod \nIf you specify true for CloudFrontDefaultCertificate, CloudFront automatically sets the security policy to TLSv1 regardless of the value that you specify for MinimumProtocolVersion. \nFor 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.",
"CloudFrontDefaultCertificate" : "If you're using the CloudFront domain name for your distribution, such as d111111abcdef8.cloudfront.net, specify the following value: \n <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate> ",
"Certificate" : "This field is no longer used. Use one of the following fields instead: \n ACMCertificateArn \n IAMCertificateId \n CloudFrontDefaultCertificate "
},
"PriceClass" : "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. \nIf 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. \nFor 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 (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing. For price class information, scroll down to see the table at the bottom of the page.",
"DefaultCacheBehavior" : {
"Compress" : "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.",
"AllowedMethods" : {
"CachedMethods" : {
"Quantity" : "The number of HTTP methods for which you want CloudFront to cache responses. Valid values are 2 (for caching responses to GET and HEAD requests) and 3 (for caching responses to GET, HEAD, and OPTIONS requests).",
"Items" : [ {
"Method" : "string. Possible values: GET | HEAD | POST | PUT | PATCH | OPTIONS | DELETE"
} ]
},
"Quantity" : "The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).",
"Items" : [ {
"Method" : "string. Possible values: GET | HEAD | POST | PUT | PATCH | OPTIONS | DELETE"
} ]
},
"LambdaFunctionAssociations" : {
"Quantity" : "The number of Lambda function associations for this cache behavior.",
"Items" : [ {
"LambdaFunctionAssociation" : {
"IncludeBody" : "A flag that allows a Lambda function to have read access to the body content. For more information, see Accessing the Request Body by Choosing the Include Body Option in the Amazon CloudFront Developer Guide.",
"EventType" : "Specifies the event type that triggers a Lambda function invocation. You can specify the following values: \n 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. \n 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. \n 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. \n 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" : "The ARN of the Lambda function. You must specify the ARN of a function version; you can't specify a Lambda alias or $LATEST."
}
} ]
},
"SmoothStreaming" : "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, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern. ",
"TargetOriginId" : "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 in your distribution.",
"ViewerProtocolPolicy" : "The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options: \n allow-all: Viewers can use HTTP or HTTPS. \n 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. \n https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). \nFor more information about requiring the HTTPS protocol, see Using an HTTPS Connection to Access Your Objects in the Amazon CloudFront Developer Guide. \nThe 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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"ForwardedValues" : {
"QueryString" : "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 for QueryStringCacheKeys, if any: \nIf you specify true for QueryString and you don't specify any values for QueryStringCacheKeys, 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. \nIf you specify true for QueryString and you specify one or more values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. \nIf 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. \nFor more information, see Configuring CloudFront to Cache Based on Query String Parameters in the Amazon CloudFront Developer Guide.",
"Cookies" : {
"WhitelistedNames" : {
"Quantity" : "The number of different cookies that you want CloudFront to forward to the origin for this cache behavior.",
"Items" : [ {
"Name" : "string"
} ]
},
"Forward" : "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. \nAmazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the Forward element. "
},
"Headers" : {
"Quantity" : "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: \n Forward all headers to your origin: Specify 1 for Quantity and * for Name. CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin. \n 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. \n Forward only the default headers: Specify 0 for Quantity and omit Items. In this configuration, CloudFront doesn't cache based on the values in the request headers. \nRegardless 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: \n S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates \n Custom origin: See HTTP Request Headers and CloudFront Behavior ",
"Items" : [ {
"Name" : "string"
} ]
},
"QueryStringCacheKeys" : {
"Quantity" : "The number of whitelisted query string parameters for a cache behavior.",
"Items" : [ {
"Name" : "string"
} ]
}
},
"MinTTL" : "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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. \nYou must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin (under Headers, if you specify 1 for Quantity and * for Name).",
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : [ {
"AwsAccountNumber" : "string"
} ]
},
"MaxTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"DefaultTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"FieldLevelEncryptionId" : "The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for a cache behavior or for the default cache behavior in your distribution."
},
"CustomErrorResponses" : {
"Quantity" : "The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If Quantity is 0, you can omit Items.",
"Items" : [ {
"CustomErrorResponse" : {
"ResponseCode" : "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: \n 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. \n If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors. \n You might want to return a 200 status code (OK) and static website so your customers don't know that your website is down. \nIf you specify a value for ResponseCode, you must also specify a value for ResponsePagePath. If you don't want to specify a value, include an empty element, <ResponseCode>, in the XML document.",
"ErrorCachingMinTTL" : "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. \nIf you don't want to specify a value, include an empty element, <ErrorCachingMinTTL>, in the XML document. \nFor more information, see Customizing Error Responses in the Amazon CloudFront Developer Guide.",
"ErrorCode" : "The HTTP status code for which you want to specify a custom error page and/or a caching duration.",
"ResponsePagePath" : "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: \n 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/*. \n The value of TargetOriginId specifies the value of the ID element for the origin that contains your custom error pages. \nIf you specify a value for ResponsePagePath, you must also specify a value for ResponseCode. If you don't want to specify a value, include an empty element, <ResponsePagePath>, in the XML document. \nWe 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."
}
} ]
},
"OriginGroups" : {
"Quantity" : "The number of origin groups.",
"Items" : [ {
"OriginGroup" : {
"Id" : "The origin group's ID.",
"FailoverCriteria" : {
"StatusCodes" : {
"Quantity" : "The number of status codes.",
"Items" : "Required StatusCodeList"
}
},
"Members" : {
"Quantity" : "The number of origins in an origin group.",
"Items" : "Required OriginGroupMemberList"
}
}
} ]
},
"Enabled" : "From this field, you can enable or disable the selected distribution.",
"IsIPV6Enabled" : "If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution, specify true. If you specify false, CloudFront responds to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution. \nIn 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. \nIf 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: \n You enable IPv6 for the distribution \n You're using alternate domain names in the URLs for your objects \nFor more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name in the Amazon Route 53 Developer Guide. \nIf 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.",
"CallerReference" : "A unique value (for example, a date-time stamp) that ensures that the request can't be replayed. \nIf the value of CallerReference is new (regardless of the content of the DistributionConfig object), CloudFront creates a new distribution. \nIf CallerReference is a value that you already sent in a previous request to create a distribution, CloudFront returns a DistributionAlreadyExists error.",
"Aliases" : {
"Quantity" : "The number of CNAME aliases, if any, that you want to associate with this distribution.",
"Items" : [ {
"CNAME" : "string"
} ]
},
"WebACLId" : "A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution. \nAWS 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. ",
"HttpVersion" : "(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. \nFor viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support Server Name Identification (SNI). \nIn 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.\" ",
"Restrictions" : {
"GeoRestriction" : {
"Quantity" : "When geo restriction is enabled, this is the number of countries in your whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0, and you can omit Items.",
"Items" : [ {
"Location" : "string"
} ],
"RestrictionType" : "The method that you want to use to restrict distribution of your content by country: \n none: No geo restriction is enabled, meaning access to content is not restricted by client geo location. \n blacklist: The Location elements specify the countries in which you don't want CloudFront to distribute your content. \n whitelist: The Location elements specify the countries in which you want CloudFront to distribute your content. "
}
},
"CacheBehaviors" : {
"Quantity" : "The number of cache behaviors for this distribution. ",
"Items" : [ {
"CacheBehavior" : {
"Compress" : "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.",
"LambdaFunctionAssociations" : {
"Quantity" : "The number of Lambda function associations for this cache behavior.",
"Items" : "LambdaFunctionAssociationList"
},
"TargetOriginId" : "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 in your distribution.",
"ViewerProtocolPolicy" : "The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options: \n allow-all: Viewers can use HTTP or HTTPS. \n 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. \n https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). \nFor more information about requiring the HTTPS protocol, see Using an HTTPS Connection to Access Your Objects in the Amazon CloudFront Developer Guide. \nThe 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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : "AwsAccountNumberList"
},
"DefaultTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"FieldLevelEncryptionId" : "The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for a cache behavior or for the default cache behavior in your distribution.",
"PathPattern" : "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. \nYou 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 /. \nThe 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. \nFor more information, see Path Pattern in the Amazon CloudFront Developer Guide.",
"AllowedMethods" : {
"CachedMethods" : {
"Quantity" : "The number of HTTP methods for which you want CloudFront to cache responses. Valid values are 2 (for caching responses to GET and HEAD requests) and 3 (for caching responses to GET, HEAD, and OPTIONS requests).",
"Items" : "Required MethodsList"
},
"Quantity" : "The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).",
"Items" : "Required MethodsList"
},
"SmoothStreaming" : "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, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern. ",
"ForwardedValues" : {
"QueryString" : "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 for QueryStringCacheKeys, if any: \nIf you specify true for QueryString and you don't specify any values for QueryStringCacheKeys, 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. \nIf you specify true for QueryString and you specify one or more values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. \nIf 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. \nFor more information, see Configuring CloudFront to Cache Based on Query String Parameters in the Amazon CloudFront Developer Guide.",
"Cookies" : {
"WhitelistedNames" : {
"Quantity" : "The number of different cookies that you want CloudFront to forward to the origin for this cache behavior.",
"Items" : "CookieNameList"
},
"Forward" : "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. \nAmazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the Forward element. "
},
"Headers" : {
"Quantity" : "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: \n Forward all headers to your origin: Specify 1 for Quantity and * for Name. CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin. \n 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. \n Forward only the default headers: Specify 0 for Quantity and omit Items. In this configuration, CloudFront doesn't cache based on the values in the request headers. \nRegardless 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: \n S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates \n Custom origin: See HTTP Request Headers and CloudFront Behavior ",
"Items" : "HeaderList"
},
"QueryStringCacheKeys" : {
"Quantity" : "The number of whitelisted query string parameters for a cache behavior.",
"Items" : "QueryStringCacheKeysList"
}
},
"MinTTL" : "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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. \nYou must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin (under Headers, if you specify 1 for Quantity and * for Name).",
"MaxTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide."
}
} ]
}
},
"Tags" : {
"Items" : [ {
"Tag" : {
"Value" : " A string that contains an optional Tag value. \nThe string length should be between 0 and 256 characters. Valid characters include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.",
"Key" : " A string that contains Tag key. \nThe string length should be between 1 and 128 characters. Valid characters include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @."
}
} ]
}
}
}

create_field_level_encryption_config#

Create a new field-level encryption configuration.

Parameters

$body#

Type: object

{
"FieldLevelEncryptionConfig" : {
"Comment" : "An optional comment about the configuration.",
"ContentTypeProfileConfig" : {
"ContentTypeProfiles" : {
"Quantity" : "The number of field-level encryption content type-profile mappings. ",
"Items" : [ {
"ContentTypeProfile" : {
"ProfileId" : "The profile ID for a field-level encryption content type-profile mapping. ",
"Format" : "The format for a field-level encryption content type-profile mapping. ",
"ContentType" : "The content type for a field-level encryption content type-profile mapping. "
}
} ]
},
"ForwardWhenContentTypeIsUnknown" : "The setting in a field-level encryption content type-profile mapping that specifies what to do when an unknown content type is provided for the profile. If true, content is forwarded without being encrypted when the content type is unknown. If false (the default), an error is returned when the content type is unknown. "
},
"QueryArgProfileConfig" : {
"QueryArgProfiles" : {
"Quantity" : "Number of profiles for query argument-profile mapping for field-level encryption.",
"Items" : [ {
"QueryArgProfile" : {
"ProfileId" : "ID of profile to use for field-level encryption query argument-profile mapping",
"QueryArg" : "Query argument for field-level encryption query argument-profile mapping."
}
} ]
},
"ForwardWhenQueryArgProfileIsUnknown" : "Flag to set if you want a request to be forwarded to the origin even if the profile specified by the field-level encryption query argument, fle-profile, is unknown."
},
"CallerReference" : "A unique number that ensures the request can't be replayed."
}
}

create_field_level_encryption_profile#

Create a field-level encryption profile.

Parameters

$body#

Type: object

{
"FieldLevelEncryptionProfileConfig" : {
"Comment" : "An optional comment for the field-level encryption profile.",
"CallerReference" : "A unique number that ensures that the request can't be replayed.",
"EncryptionEntities" : {
"Quantity" : "Number of field pattern items in a field-level encryption content type-profile mapping. ",
"Items" : [ {
"EncryptionEntity" : {
"ProviderId" : "The provider associated with the public key being used for encryption. This value must also be provided with the private key for applications to be able to decrypt data.",
"PublicKeyId" : "The public key associated with a set of field-level encryption patterns, to be used when encrypting the fields that match the patterns. ",
"FieldPatterns" : {
"Quantity" : "The number of field-level encryption field patterns.",
"Items" : "FieldPatternList"
}
}
} ]
},
"Name" : "Profile name for the field-level encryption profile."
}
}

create_invalidation#

Create a new invalidation.

Parameters

DistributionId (required)#

The distribution's id.

Type: string

$body#

The batch information for the invalidation.

Type: object

{
"InvalidationBatch" : {
"CallerReference" : "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 of CallerReference is unique is to use a timestamp, for example, 20120301090000. \nIf 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 same CallerReference. \nIf CallerReference is a value you already sent in a previous invalidation batch request but the content of any Path is different from the original request, CloudFront returns an InvalidationBatchAlreadyExists error.",
"Paths" : {
"Quantity" : "The number of invalidation paths specified for the objects that you want to invalidate.",
"Items" : [ {
"Path" : "string"
} ]
}
}
}

create_public_key#

Add a new public key to CloudFront to use, for example, for field-level encryption. You can add a maximum of 10 public keys with one AWS account.

Parameters

$body#

Type: object

{
"PublicKeyConfig" : {
"Comment" : "An optional comment about a public key.",
"CallerReference" : "A unique number that ensures that the request can't be replayed.",
"EncodedKey" : "The encoded public key that you want to add to CloudFront to use with features like field-level encryption.",
"Name" : "The name for a public key you add to CloudFront to use with features like field-level encryption."
}
}

create_streaming_distribution#

Creates a new RTMP 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 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.

Parameters

$body#

The request to create a new streaming distribution.

Type: object

{
"StreamingDistributionConfig" : {
"Logging" : {
"Bucket" : "The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.",
"Enabled" : "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 for Enabled, and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket and Prefix, the values are automatically deleted. ",
"Prefix" : "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 empty Prefix element in the Logging element."
},
"Comment" : "Any comments you want to include about the streaming distribution. ",
"PriceClass" : "A complex type that contains information about price class for this streaming distribution. ",
"S3Origin" : {
"DomainName" : "The DNS name of the Amazon S3 origin. ",
"OriginAccessIdentity" : "The CloudFront origin access identity to associate with the 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. \nIf 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. \nTo delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element. \nTo replace the origin access identity, update the distribution configuration and specify the new origin access identity. \nFor more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon CloudFront Developer Guide."
},
"Enabled" : "Whether the streaming distribution is enabled to accept user requests for content.",
"CallerReference" : "A unique value (for example, a date-time stamp) that ensures that the request can't be replayed. \nIf the value of CallerReference is new (regardless of the content of the StreamingDistributionConfig object), CloudFront creates a new distribution. \nIf CallerReference is a value that you already sent in a previous request to create a distribution, CloudFront returns a DistributionAlreadyExists error.",
"Aliases" : {
"Quantity" : "The number of CNAME aliases, if any, that you want to associate with this distribution.",
"Items" : [ {
"CNAME" : "string"
} ]
},
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : [ {
"AwsAccountNumber" : "string"
} ]
}
}
}

create_streaming_distribution_with_tags#

Create a new streaming distribution with tags.

Parameters

$body#

The request to create a new streaming distribution with tags.

Type: object

{
"StreamingDistributionConfigWithTags" : {
"StreamingDistributionConfig" : {
"Logging" : {
"Bucket" : "The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.",
"Enabled" : "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 for Enabled, and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket and Prefix, the values are automatically deleted. ",
"Prefix" : "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 empty Prefix element in the Logging element."
},
"Comment" : "Any comments you want to include about the streaming distribution. ",
"PriceClass" : "A complex type that contains information about price class for this streaming distribution. ",
"S3Origin" : {
"DomainName" : "The DNS name of the Amazon S3 origin. ",
"OriginAccessIdentity" : "The CloudFront origin access identity to associate with the 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. \nIf 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. \nTo delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element. \nTo replace the origin access identity, update the distribution configuration and specify the new origin access identity. \nFor more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon CloudFront Developer Guide."
},
"Enabled" : "Whether the streaming distribution is enabled to accept user requests for content.",
"CallerReference" : "A unique value (for example, a date-time stamp) that ensures that the request can't be replayed. \nIf the value of CallerReference is new (regardless of the content of the StreamingDistributionConfig object), CloudFront creates a new distribution. \nIf CallerReference is a value that you already sent in a previous request to create a distribution, CloudFront returns a DistributionAlreadyExists error.",
"Aliases" : {
"Quantity" : "The number of CNAME aliases, if any, that you want to associate with this distribution.",
"Items" : [ {
"CNAME" : "string"
} ]
},
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : [ {
"AwsAccountNumber" : "string"
} ]
}
},
"Tags" : {
"Items" : [ {
"Tag" : {
"Value" : " A string that contains an optional Tag value. \nThe string length should be between 0 and 256 characters. Valid characters include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.",
"Key" : " A string that contains Tag key. \nThe string length should be between 1 and 128 characters. Valid characters include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @."
}
} ]
}
}
}

delete_cloud_front_origin_access_identity#

Delete an origin access identity.

Parameters

Id (required)#

The origin access identity's ID.

Type: string

If-Match#

The value of the ETag header you received from a previous GET or PUT request. For example: E2QWRUHAPOMQZL.

Type: string

delete_distribution#

Delete a distribution.

Parameters

Id (required)#

The distribution ID.

Type: string

If-Match#

The value of the ETag header that you received when you disabled the distribution. For example: E2QWRUHAPOMQZL.

Type: string

delete_field_level_encryption_config#

Remove a field-level encryption configuration.

Parameters

Id (required)#

The ID of the configuration you want to delete from CloudFront.

Type: string

If-Match#

The value of the ETag header that you received when retrieving the configuration identity to delete. For example: E2QWRUHAPOMQZL.

Type: string

delete_field_level_encryption_profile#

Remove a field-level encryption profile.

Parameters

Id (required)#

Request the ID of the profile you want to delete from CloudFront.

Type: string

If-Match#

The value of the ETag header that you received when retrieving the profile to delete. For example: E2QWRUHAPOMQZL.

Type: string

delete_public_key#

Remove a public key you previously added to CloudFront.

Parameters

Id (required)#

The ID of the public key you want to remove from CloudFront.

Type: string

If-Match#

The value of the ETag header that you received when retrieving the public key identity to delete. For example: E2QWRUHAPOMQZL.

Type: string

delete_streaming_distribution#

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 the Etag 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 of Enabled to false.
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 HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GET 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 of Status is Deployed.
Submit a DELETE Streaming Distribution request. Set the value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GET 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.

Parameters

Id (required)#

The distribution ID.

Type: string

If-Match#

The value of the ETag header that you received when you disabled the streaming distribution. For example: E2QWRUHAPOMQZL.

Type: string

get_cloud_front_origin_access_identity#

Get the information about an origin access identity.

Parameters

Id (required)#

The identity's ID.

Type: string

get_cloud_front_origin_access_identity_config#

Get the configuration information about an origin access identity.

Parameters

Id (required)#

The identity's ID.

Type: string

get_distribution#

Get the information about a distribution.

Parameters

Id (required)#

The distribution's ID. If the ID is empty, an empty distribution configuration is returned.

Type: string

get_distribution_config#

Get the configuration information about a distribution.

Parameters

Id (required)#

The distribution's ID. If the ID is empty, an empty distribution configuration is returned.

Type: string

get_field_level_encryption#

Get the field-level encryption configuration information.

Parameters

Id (required)#

Request the ID for the field-level encryption configuration information.

Type: string

get_field_level_encryption_config#

Get the field-level encryption configuration information.

Parameters

Id (required)#

Request the ID for the field-level encryption configuration information.

Type: string

get_field_level_encryption_profile#

Get the field-level encryption profile information.

Parameters

Id (required)#

Get the ID for the field-level encryption profile information.

Type: string

get_field_level_encryption_profile_config#

Get the field-level encryption profile configuration information.

Parameters

Id (required)#

Get the ID for the field-level encryption profile configuration information.

Type: string

get_invalidation#

Get the information about an invalidation.

Parameters

DistributionId (required)#

The distribution's ID.

Type: string

Id (required)#

The identifier for the invalidation request, for example, IDFDVBD632BHDS5.

Type: string

get_public_key#

Get the public key information.

Parameters

Id (required)#

Request the ID for the public key.

Type: string

get_public_key_config#

Return public key configuration informaation

Parameters

Id (required)#

Request the ID for the public key configuration.

Type: string

get_streaming_distribution#

Gets information about a specified RTMP distribution, including the distribution configuration.

Parameters

Id (required)#

The streaming distribution's ID.

Type: string

get_streaming_distribution_config#

Get the configuration information about a streaming distribution.

Parameters

Id (required)#

The streaming distribution's ID.

Type: string

list_cloud_front_origin_access_identities#

Lists origin access identities.

This operation has no parameters

list_distributions#

List CloudFront distributions.

This operation has no parameters

list_distributions_by_web_acl_id#

List the distributions that are associated with a specified AWS WAF web ACL.

Parameters

WebACLId (required)#

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.

Type: string

Marker#

Use Marker and MaxItems to control pagination of results. If you have more than MaxItems distributions that satisfy the request, the response includes a NextMarker element. To get the next page of results, submit another request. For the value of Marker, specify the value of NextMarker from the last response. (For the first request, omit Marker.)

Type: string

MaxItems#

The maximum number of distributions that you want CloudFront to return in the response body. The maximum and default values are both 100.

Type: string

list_field_level_encryption_configs#

List all field-level encryption configurations that have been created in CloudFront for this account.

Parameters

Marker#

Use this when paginating results to indicate where to begin in your list of configurations. The results include configurations in the list that occur after the marker. To get the next page of results, set the Marker to the value of the NextMarker from the current page's response (which is also the ID of the last configuration on that page).

Type: string

MaxItems#

The maximum number of field-level encryption configurations you want in the response body.

Type: string

list_field_level_encryption_profiles#

Request a list of field-level encryption profiles that have been created in CloudFront for this account.

Parameters

Marker#

Use this when paginating results to indicate where to begin in your list of profiles. The results include profiles in the list that occur after the marker. To get the next page of results, set the Marker to the value of the NextMarker from the current page's response (which is also the ID of the last profile on that page).

Type: string

MaxItems#

The maximum number of field-level encryption profiles you want in the response body.

Type: string

list_invalidations#

Lists invalidation batches.

Parameters

DistributionId (required)#

The distribution's ID.

Type: string

list_public_keys#

List all public keys that have been added to CloudFront for this account.

Parameters

Marker#

Use this when paginating results to indicate where to begin in your list of public keys. The results include public keys in the list that occur after the marker. To get the next page of results, set the Marker to the value of the NextMarker from the current page's response (which is also the ID of the last public key on that page).

Type: string

MaxItems#

The maximum number of public keys you want in the response body.

Type: string

list_streaming_distributions#

List streaming distributions.

This operation has no parameters

list_tags_for_resource#

List tags for a CloudFront resource.

Parameters

Resource (required)#

An ARN of a CloudFront resource.

Type: string

tag_resource#

Add tags to a CloudFront resource.

Parameters

Resource (required)#

An ARN of a CloudFront resource.

Type: string

$body#

A complex type that contains zero or more Tag elements.

Type: object

{
"Tags" : {
"Items" : [ {
"Tag" : {
"Value" : " A string that contains an optional Tag value. \nThe string length should be between 0 and 256 characters. Valid characters include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.",
"Key" : " A string that contains Tag key. \nThe string length should be between 1 and 128 characters. Valid characters include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @."
}
} ]
}
}

untag_resource#

Remove tags from a CloudFront resource.

Parameters

Resource (required)#

An ARN of a CloudFront resource.

Type: string

$body#

A complex type that contains zero or more Tag key elements.

Type: object

{
"TagKeys" : {
"Items" : [ {
"Key" : "string"
} ]
}
}

update_cloud_front_origin_access_identity#

Update an origin access identity.

Parameters

Id (required)#

The identity's id.

Type: string

$body#

The identity's configuration information.

Type: object

{
"CloudFrontOriginAccessIdentityConfig" : {
"Comment" : "Any comments you want to include about the origin access identity. ",
"CallerReference" : "A unique value (for example, a date-time stamp) that ensures that the request can't be replayed. \nIf the value of CallerReference is new (regardless of the content of the CloudFrontOriginAccessIdentityConfig object), a new origin access identity is created. \nIf the CallerReference is a value already sent in a previous identity request, and the content of the CloudFrontOriginAccessIdentityConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. \nIf 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. "
}
}

If-Match#

The value of the ETag header that you received when retrieving the identity's configuration. For example: E2QWRUHAPOMQZL.

Type: string

update_distribution#

Updates the configuration for a web distribution.
When you update a distribution, there are more required fields than when you create a distribution. When you update your distribution by using this API action, follow the steps here to get the current configuration and then make your updates, to make sure that you include all of the required fields. To view a summary, see Required Fields for Create Distribution and Update Distribution in the Amazon CloudFront Developer Guide.
The update process includes getting the current distribution configuration, updating the XML document that is returned to make your changes, and then submitting an UpdateDistribution request to make the updates.
For information about updating a distribution using the CloudFront console instead, see Creating a Distribution 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 must get a new Etag header.
Update the XML document that was returned in the response to your GetDistributionConfig request to include your changes. When you edit the XML file, be aware of the following: You must strip out the ETag parameter that is returned. Additional fields are required when you update a distribution. There may be fields included in the XML file for features that you haven't configured for your distribution. This is expected and required to successfully update the distribution. You can't change the value of CallerReference. If you try to change this value, CloudFront returns an IllegalUpdate error. The new configuration replaces the existing configuration; the values that you specify in an UpdateDistribution request are not merged into your 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 corresponding Quantity 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 the ETag header that CloudFront returned when you submitted the GetDistributionConfig 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 is Deployed.

Parameters

Id (required)#

The distribution's id.

Type: string

$body#

The distribution's configuration information.

Type: object

{
"DistributionConfig" : {
"Logging" : {
"IncludeCookies" : "Specifies whether you want CloudFront to include cookies in access logs, specify true for IncludeCookies. 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, specify false for IncludeCookies.",
"Bucket" : "The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.",
"Enabled" : "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 for Enabled, and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, the values are automatically deleted.",
"Prefix" : "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 empty Prefix element in the Logging element."
},
"DefaultRootObject" : "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. \nSpecify only the object name, for example, index.html. Don't add a / before the object name. \nIf you don't want to specify a default root object when you create a distribution, include an empty DefaultRootObject element. \nTo delete the default root object from an existing distribution, update the distribution configuration and include an empty DefaultRootObject element. \nTo replace the default root object, update the distribution configuration and specify the new object. \nFor more information about the default root object, see Creating a Default Root Object in the Amazon CloudFront Developer Guide.",
"Origins" : {
"Quantity" : "The number of origins or origin groups for this distribution.",
"Items" : [ {
"Origin" : {
"DomainName" : " 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. If you set up your bucket to be configured as a website endpoint, enter the Amazon S3 static website hosting endpoint for the bucket. \nFor more information about specifying this value for different types of origins, see Origin Domain Name in the Amazon CloudFront Developer Guide. \nConstraints for Amazon S3 origins: \n If you configured Amazon S3 Transfer Acceleration for your bucket, don't specify the s3-accelerate endpoint for DomainName. \n The bucket name must be between 3 and 63 characters long (inclusive). \n The bucket name must contain only lowercase characters, numbers, periods, underscores, and dashes. \n The bucket name must not contain adjacent periods. \n 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. \nConstraints for custom origins: \n DomainName must be a valid DNS name that contains only a-z, A-Z, 0-9, dot (.), hyphen (-), or underscore (_) characters. \n The name cannot exceed 128 characters. ",
"S3OriginConfig" : {
"OriginAccessIdentity" : "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: \norigin-access-identity/cloudfront/ID-of-origin-access-identity \nwhere ID-of-origin-access-identity is the value that CloudFront returned in the ID element when you created the origin access identity. \nIf you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. \nTo delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element. \nTo replace the origin access identity, update the distribution configuration and specify the new origin access identity. \nFor more information about the origin access identity, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide."
},
"OriginPath" : "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 of DomainName, for example, example.com/production. Do not include a / at the end of the directory name. \nFor example, suppose you've specified the following values for your distribution: \n DomainName: An Amazon S3 bucket named myawsbucket. \n OriginPath: /production \n CNAME: example.com \nWhen a user enters example.com/index.html in a browser, CloudFront sends a request to Amazon S3 for myawsbucket/production/index.html. \nWhen a user enters example.com/acme/index.html in a browser, CloudFront sends a request to Amazon S3 for myawsbucket/production/acme/index.html.",
"Id" : "A unique identifier for the origin or origin group. The value of Id must be unique within the distribution. \nWhen 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 the Id 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.",
"CustomHeaders" : {
"Quantity" : "The number of custom headers, if any, for this distribution.",
"Items" : "OriginCustomHeadersList"
},
"CustomOriginConfig" : {
"OriginReadTimeout" : "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. \nIf you need to increase the maximum time limit, contact the AWS Support Center.",
"HTTPSPort" : "The HTTPS port the custom origin listens on.",
"OriginSslProtocols" : {
"Quantity" : "The number of SSL/TLS protocols that you want to allow CloudFront to use when establishing an HTTPS connection with this origin. ",
"Items" : "Required SslProtocolsList"
},
"OriginKeepaliveTimeout" : "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. \nIf you need to increase the maximum time limit, contact the AWS Support Center.",
"HTTPPort" : "The HTTP port the custom origin listens on.",
"OriginProtocolPolicy" : "The origin protocol policy to apply to your origin."
}
}
} ]
},
"Comment" : "Any comments you want to include about the distribution. \nIf you don't want to specify a comment, include an empty Comment element. \nTo delete an existing comment, update the distribution configuration and include an empty Comment element. \nTo add or change a comment, update the distribution configuration and specify the new comment.",
"ViewerCertificate" : {
"CertificateSource" : "This field is no longer used. Use one of the following fields instead: \n ACMCertificateArn \n IAMCertificateId \n CloudFrontDefaultCertificate ",
"IAMCertificateId" : "If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. Specify the following value if you purchased your certificate from a third-party certificate authority: \n <IAMCertificateId>IAM certificate ID<IAMCertificateId> where IAM certificate ID is the ID that IAM returned when you added the certificate to the IAM certificate store. \nIf you specify IAMCertificateId, you must also specify a value for SSLSupportMethod.",
"SSLSupportMethod" : "If you specify a value for ACMCertificateArn or for IAMCertificateId, you must also specify how you want CloudFront to serve HTTPS requests: using a method that works for browsers and clients released after 2010 or one that works for all clients. \n sni-only: CloudFront can respond to HTTPS requests from viewers that support Server Name Indication (SNI). All modern browsers support SNI, but there are a few that don't. For a current list of the browsers that support SNI, see the Wikipedia entry Server Name Indication. To learn about options to explore if you have users with browsers that don't include SNI support, see Choosing How CloudFront Serves HTTPS Requests in the Amazon CloudFront Developer Guide. \n vip: CloudFront uses dedicated IP addresses for your content and can respond to HTTPS requests from any viewer. However, there are additional monthly charges. For details, including specific pricing information, see Custom SSL options for Amazon CloudFront on the AWS marketing site. \nDon't specify a value for SSLSupportMethod if you specified <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>. \nFor more information, see Choosing How CloudFront Serves HTTPS Requests in the Amazon CloudFront Developer Guide.",
"ACMCertificateArn" : "If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. Specify the following value if ACM provided your certificate: \n <ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn> where ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate that you want to use for this distribution. \nIf you specify ACMCertificateArn, you must also specify a value for SSLSupportMethod.",
"MinimumProtocolVersion" : "Specify the security policy that you want CloudFront to use for HTTPS connections. A security policy determines two settings: \n The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers \n The cipher that CloudFront uses to encrypt the content that it returns to viewers \nOn the CloudFront console, this setting is called Security policy. \nWe recommend that you specify TLSv1.1_2016 unless your users are using browsers or devices that do not support TLSv1.1 or later. \nWhen both of the following are true, you must specify TLSv1 or later for the security policy: \n You're using a custom certificate: you specified a value for ACMCertificateArn or for IAMCertificateId \n You're using SNI: you specified sni-only for SSLSupportMethod \nIf you specify true for CloudFrontDefaultCertificate, CloudFront automatically sets the security policy to TLSv1 regardless of the value that you specify for MinimumProtocolVersion. \nFor 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.",
"CloudFrontDefaultCertificate" : "If you're using the CloudFront domain name for your distribution, such as d111111abcdef8.cloudfront.net, specify the following value: \n <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate> ",
"Certificate" : "This field is no longer used. Use one of the following fields instead: \n ACMCertificateArn \n IAMCertificateId \n CloudFrontDefaultCertificate "
},
"PriceClass" : "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. \nIf 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. \nFor 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 (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing. For price class information, scroll down to see the table at the bottom of the page.",
"DefaultCacheBehavior" : {
"Compress" : "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.",
"AllowedMethods" : {
"CachedMethods" : {
"Quantity" : "The number of HTTP methods for which you want CloudFront to cache responses. Valid values are 2 (for caching responses to GET and HEAD requests) and 3 (for caching responses to GET, HEAD, and OPTIONS requests).",
"Items" : [ {
"Method" : "string. Possible values: GET | HEAD | POST | PUT | PATCH | OPTIONS | DELETE"
} ]
},
"Quantity" : "The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).",
"Items" : [ {
"Method" : "string. Possible values: GET | HEAD | POST | PUT | PATCH | OPTIONS | DELETE"
} ]
},
"LambdaFunctionAssociations" : {
"Quantity" : "The number of Lambda function associations for this cache behavior.",
"Items" : [ {
"LambdaFunctionAssociation" : {
"IncludeBody" : "A flag that allows a Lambda function to have read access to the body content. For more information, see Accessing the Request Body by Choosing the Include Body Option in the Amazon CloudFront Developer Guide.",
"EventType" : "Specifies the event type that triggers a Lambda function invocation. You can specify the following values: \n 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. \n 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. \n 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. \n 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" : "The ARN of the Lambda function. You must specify the ARN of a function version; you can't specify a Lambda alias or $LATEST."
}
} ]
},
"SmoothStreaming" : "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, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern. ",
"TargetOriginId" : "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 in your distribution.",
"ViewerProtocolPolicy" : "The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options: \n allow-all: Viewers can use HTTP or HTTPS. \n 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. \n https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). \nFor more information about requiring the HTTPS protocol, see Using an HTTPS Connection to Access Your Objects in the Amazon CloudFront Developer Guide. \nThe 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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"ForwardedValues" : {
"QueryString" : "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 for QueryStringCacheKeys, if any: \nIf you specify true for QueryString and you don't specify any values for QueryStringCacheKeys, 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. \nIf you specify true for QueryString and you specify one or more values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. \nIf 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. \nFor more information, see Configuring CloudFront to Cache Based on Query String Parameters in the Amazon CloudFront Developer Guide.",
"Cookies" : {
"WhitelistedNames" : {
"Quantity" : "The number of different cookies that you want CloudFront to forward to the origin for this cache behavior.",
"Items" : [ {
"Name" : "string"
} ]
},
"Forward" : "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. \nAmazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the Forward element. "
},
"Headers" : {
"Quantity" : "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: \n Forward all headers to your origin: Specify 1 for Quantity and * for Name. CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin. \n 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. \n Forward only the default headers: Specify 0 for Quantity and omit Items. In this configuration, CloudFront doesn't cache based on the values in the request headers. \nRegardless 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: \n S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates \n Custom origin: See HTTP Request Headers and CloudFront Behavior ",
"Items" : [ {
"Name" : "string"
} ]
},
"QueryStringCacheKeys" : {
"Quantity" : "The number of whitelisted query string parameters for a cache behavior.",
"Items" : [ {
"Name" : "string"
} ]
}
},
"MinTTL" : "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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. \nYou must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin (under Headers, if you specify 1 for Quantity and * for Name).",
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : [ {
"AwsAccountNumber" : "string"
} ]
},
"MaxTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"DefaultTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"FieldLevelEncryptionId" : "The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for a cache behavior or for the default cache behavior in your distribution."
},
"CustomErrorResponses" : {
"Quantity" : "The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If Quantity is 0, you can omit Items.",
"Items" : [ {
"CustomErrorResponse" : {
"ResponseCode" : "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: \n 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. \n If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors. \n You might want to return a 200 status code (OK) and static website so your customers don't know that your website is down. \nIf you specify a value for ResponseCode, you must also specify a value for ResponsePagePath. If you don't want to specify a value, include an empty element, <ResponseCode>, in the XML document.",
"ErrorCachingMinTTL" : "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. \nIf you don't want to specify a value, include an empty element, <ErrorCachingMinTTL>, in the XML document. \nFor more information, see Customizing Error Responses in the Amazon CloudFront Developer Guide.",
"ErrorCode" : "The HTTP status code for which you want to specify a custom error page and/or a caching duration.",
"ResponsePagePath" : "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: \n 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/*. \n The value of TargetOriginId specifies the value of the ID element for the origin that contains your custom error pages. \nIf you specify a value for ResponsePagePath, you must also specify a value for ResponseCode. If you don't want to specify a value, include an empty element, <ResponsePagePath>, in the XML document. \nWe 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."
}
} ]
},
"OriginGroups" : {
"Quantity" : "The number of origin groups.",
"Items" : [ {
"OriginGroup" : {
"Id" : "The origin group's ID.",
"FailoverCriteria" : {
"StatusCodes" : {
"Quantity" : "The number of status codes.",
"Items" : "Required StatusCodeList"
}
},
"Members" : {
"Quantity" : "The number of origins in an origin group.",
"Items" : "Required OriginGroupMemberList"
}
}
} ]
},
"Enabled" : "From this field, you can enable or disable the selected distribution.",
"IsIPV6Enabled" : "If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution, specify true. If you specify false, CloudFront responds to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution. \nIn 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. \nIf 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: \n You enable IPv6 for the distribution \n You're using alternate domain names in the URLs for your objects \nFor more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name in the Amazon Route 53 Developer Guide. \nIf 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.",
"CallerReference" : "A unique value (for example, a date-time stamp) that ensures that the request can't be replayed. \nIf the value of CallerReference is new (regardless of the content of the DistributionConfig object), CloudFront creates a new distribution. \nIf CallerReference is a value that you already sent in a previous request to create a distribution, CloudFront returns a DistributionAlreadyExists error.",
"Aliases" : {
"Quantity" : "The number of CNAME aliases, if any, that you want to associate with this distribution.",
"Items" : [ {
"CNAME" : "string"
} ]
},
"WebACLId" : "A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution. \nAWS 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. ",
"HttpVersion" : "(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. \nFor viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support Server Name Identification (SNI). \nIn 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.\" ",
"Restrictions" : {
"GeoRestriction" : {
"Quantity" : "When geo restriction is enabled, this is the number of countries in your whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0, and you can omit Items.",
"Items" : [ {
"Location" : "string"
} ],
"RestrictionType" : "The method that you want to use to restrict distribution of your content by country: \n none: No geo restriction is enabled, meaning access to content is not restricted by client geo location. \n blacklist: The Location elements specify the countries in which you don't want CloudFront to distribute your content. \n whitelist: The Location elements specify the countries in which you want CloudFront to distribute your content. "
}
},
"CacheBehaviors" : {
"Quantity" : "The number of cache behaviors for this distribution. ",
"Items" : [ {
"CacheBehavior" : {
"Compress" : "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.",
"LambdaFunctionAssociations" : {
"Quantity" : "The number of Lambda function associations for this cache behavior.",
"Items" : "LambdaFunctionAssociationList"
},
"TargetOriginId" : "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 in your distribution.",
"ViewerProtocolPolicy" : "The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options: \n allow-all: Viewers can use HTTP or HTTPS. \n 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. \n https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). \nFor more information about requiring the HTTPS protocol, see Using an HTTPS Connection to Access Your Objects in the Amazon CloudFront Developer Guide. \nThe 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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : "AwsAccountNumberList"
},
"DefaultTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.",
"FieldLevelEncryptionId" : "The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for a cache behavior or for the default cache behavior in your distribution.",
"PathPattern" : "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. \nYou 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 /. \nThe 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. \nFor more information, see Path Pattern in the Amazon CloudFront Developer Guide.",
"AllowedMethods" : {
"CachedMethods" : {
"Quantity" : "The number of HTTP methods for which you want CloudFront to cache responses. Valid values are 2 (for caching responses to GET and HEAD requests) and 3 (for caching responses to GET, HEAD, and OPTIONS requests).",
"Items" : "Required MethodsList"
},
"Quantity" : "The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).",
"Items" : "Required MethodsList"
},
"SmoothStreaming" : "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, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern. ",
"ForwardedValues" : {
"QueryString" : "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 for QueryStringCacheKeys, if any: \nIf you specify true for QueryString and you don't specify any values for QueryStringCacheKeys, 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. \nIf you specify true for QueryString and you specify one or more values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. \nIf 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. \nFor more information, see Configuring CloudFront to Cache Based on Query String Parameters in the Amazon CloudFront Developer Guide.",
"Cookies" : {
"WhitelistedNames" : {
"Quantity" : "The number of different cookies that you want CloudFront to forward to the origin for this cache behavior.",
"Items" : "CookieNameList"
},
"Forward" : "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. \nAmazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the Forward element. "
},
"Headers" : {
"Quantity" : "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: \n Forward all headers to your origin: Specify 1 for Quantity and * for Name. CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin. \n 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. \n Forward only the default headers: Specify 0 for Quantity and omit Items. In this configuration, CloudFront doesn't cache based on the values in the request headers. \nRegardless 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: \n S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates \n Custom origin: See HTTP Request Headers and CloudFront Behavior ",
"Items" : "HeaderList"
},
"QueryStringCacheKeys" : {
"Quantity" : "The number of whitelisted query string parameters for a cache behavior.",
"Items" : "QueryStringCacheKeysList"
}
},
"MinTTL" : "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 Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide. \nYou must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin (under Headers, if you specify 1 for Quantity and * for Name).",
"MaxTTL" : "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, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide."
}
} ]
}
}
}

If-Match#

The value of the ETag header that you received when retrieving the distribution's configuration. For example: E2QWRUHAPOMQZL.

Type: string

update_field_level_encryption_config#

Update a field-level encryption configuration.

Parameters

Id (required)#

The ID of the configuration you want to update.

Type: string

$body#

Request to update a field-level encryption configuration.

Type: object

{
"FieldLevelEncryptionConfig" : {
"Comment" : "An optional comment about the configuration.",
"ContentTypeProfileConfig" : {
"ContentTypeProfiles" : {
"Quantity" : "The number of field-level encryption content type-profile mappings. ",
"Items" : [ {
"ContentTypeProfile" : {
"ProfileId" : "The profile ID for a field-level encryption content type-profile mapping. ",
"Format" : "The format for a field-level encryption content type-profile mapping. ",
"ContentType" : "The content type for a field-level encryption content type-profile mapping. "
}
} ]
},
"ForwardWhenContentTypeIsUnknown" : "The setting in a field-level encryption content type-profile mapping that specifies what to do when an unknown content type is provided for the profile. If true, content is forwarded without being encrypted when the content type is unknown. If false (the default), an error is returned when the content type is unknown. "
},
"QueryArgProfileConfig" : {
"QueryArgProfiles" : {
"Quantity" : "Number of profiles for query argument-profile mapping for field-level encryption.",
"Items" : [ {
"QueryArgProfile" : {
"ProfileId" : "ID of profile to use for field-level encryption query argument-profile mapping",
"QueryArg" : "Query argument for field-level encryption query argument-profile mapping."
}
} ]
},
"ForwardWhenQueryArgProfileIsUnknown" : "Flag to set if you want a request to be forwarded to the origin even if the profile specified by the field-level encryption query argument, fle-profile, is unknown."
},
"CallerReference" : "A unique number that ensures the request can't be replayed."
}
}

If-Match#

The value of the ETag header that you received when retrieving the configuration identity to update. For example: E2QWRUHAPOMQZL.

Type: string

update_field_level_encryption_profile#

Update a field-level encryption profile.

Parameters

Id (required)#

The ID of the field-level encryption profile request.

Type: string

$body#

Request to update a field-level encryption profile.

Type: object

{
"FieldLevelEncryptionProfileConfig" : {
"Comment" : "An optional comment for the field-level encryption profile.",
"CallerReference" : "A unique number that ensures that the request can't be replayed.",
"EncryptionEntities" : {
"Quantity" : "Number of field pattern items in a field-level encryption content type-profile mapping. ",
"Items" : [ {
"EncryptionEntity" : {
"ProviderId" : "The provider associated with the public key being used for encryption. This value must also be provided with the private key for applications to be able to decrypt data.",
"PublicKeyId" : "The public key associated with a set of field-level encryption patterns, to be used when encrypting the fields that match the patterns. ",
"FieldPatterns" : {
"Quantity" : "The number of field-level encryption field patterns.",
"Items" : "FieldPatternList"
}
}
} ]
},
"Name" : "Profile name for the field-level encryption profile."
}
}

If-Match#

The value of the ETag header that you received when retrieving the profile identity to update. For example: E2QWRUHAPOMQZL.

Type: string

update_public_key#

Update public key information. Note that the only value you can change is the comment.

Parameters

Id (required)#

ID of the public key to be updated.

Type: string

$body#

Request to update public key information.

Type: object

{
"PublicKeyConfig" : {
"Comment" : "An optional comment about a public key.",
"CallerReference" : "A unique number that ensures that the request can't be replayed.",
"EncodedKey" : "The encoded public key that you want to add to CloudFront to use with features like field-level encryption.",
"Name" : "The name for a public key you add to CloudFront to use with features like field-level encryption."
}
}

If-Match#

The value of the ETag header that you received when retrieving the public key to update. For example: E2QWRUHAPOMQZL.

Type: string

update_streaming_distribution#

Update a streaming distribution.

Parameters

Id (required)#

The streaming distribution's id.

Type: string

$body#

The streaming distribution's configuration information.

Type: object

{
"StreamingDistributionConfig" : {
"Logging" : {
"Bucket" : "The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.",
"Enabled" : "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 for Enabled, and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket and Prefix, the values are automatically deleted. ",
"Prefix" : "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 empty Prefix element in the Logging element."
},
"Comment" : "Any comments you want to include about the streaming distribution. ",
"PriceClass" : "A complex type that contains information about price class for this streaming distribution. ",
"S3Origin" : {
"DomainName" : "The DNS name of the Amazon S3 origin. ",
"OriginAccessIdentity" : "The CloudFront origin access identity to associate with the 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. \nIf 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. \nTo delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element. \nTo replace the origin access identity, update the distribution configuration and specify the new origin access identity. \nFor more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon CloudFront Developer Guide."
},
"Enabled" : "Whether the streaming distribution is enabled to accept user requests for content.",
"CallerReference" : "A unique value (for example, a date-time stamp) that ensures that the request can't be replayed. \nIf the value of CallerReference is new (regardless of the content of the StreamingDistributionConfig object), CloudFront creates a new distribution. \nIf CallerReference is a value that you already sent in a previous request to create a distribution, CloudFront returns a DistributionAlreadyExists error.",
"Aliases" : {
"Quantity" : "The number of CNAME aliases, if any, that you want to associate with this distribution.",
"Items" : [ {
"CNAME" : "string"
} ]
},
"TrustedSigners" : {
"Enabled" : "Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.",
"Quantity" : "The number of trusted signers for this cache behavior.",
"Items" : [ {
"AwsAccountNumber" : "string"
} ]
}
}
}

If-Match#

The value of the ETag header that you received when retrieving the streaming distribution's configuration. For example: E2QWRUHAPOMQZL.

Type: string