updateDistribution
Updates the configuration for a CloudFront distribution.
The update process includes getting the current distribution configuration, updating it to make your changes, and then submitting an UpdateDistribution request to make the updates.
To update a web distribution using the CloudFront API
Use
GetDistributionConfigto get the current configuration, including the version identifier (ETag).Update the distribution configuration that was returned in the response. Note the following important requirements and restrictions:
You must copy the
ETagfield value from the response. (You'll use it for theIfMatchparameter in your request.) Then, remove theETagfield from the distribution configuration.You can't change the value of
CallerReference.Submit an
UpdateDistributionrequest, providing the updated distribution configuration. The new configuration replaces the existing configuration. The values that you specify in anUpdateDistributionrequest are not merged into your existing configuration. Make sure to include all fields: the ones that you modified and also the ones that you didn't.