Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Amazonka.CloudFront.UpdateDistribution
Description
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
GetDistributionConfig
to 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 rename the
ETag
field toIfMatch
, leaving the value unchanged. (Set the value ofIfMatch
to the value ofETag
, then remove theETag
field.) - You can't change the value of
CallerReference
.
- You must rename the
- Submit an
UpdateDistribution
request, providing the distribution configuration. The new configuration replaces the existing configuration. The values that you specify in anUpdateDistribution
request 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.
Synopsis
- data UpdateDistribution = UpdateDistribution' {}
- newUpdateDistribution :: DistributionConfig -> Text -> UpdateDistribution
- updateDistribution_ifMatch :: Lens' UpdateDistribution (Maybe Text)
- updateDistribution_distributionConfig :: Lens' UpdateDistribution DistributionConfig
- updateDistribution_id :: Lens' UpdateDistribution Text
- data UpdateDistributionResponse = UpdateDistributionResponse' {
- distribution :: Maybe Distribution
- eTag :: Maybe Text
- httpStatus :: Int
- newUpdateDistributionResponse :: Int -> UpdateDistributionResponse
- updateDistributionResponse_distribution :: Lens' UpdateDistributionResponse (Maybe Distribution)
- updateDistributionResponse_eTag :: Lens' UpdateDistributionResponse (Maybe Text)
- updateDistributionResponse_httpStatus :: Lens' UpdateDistributionResponse Int
Creating a Request
data UpdateDistribution Source #
The request to update a distribution.
See: newUpdateDistribution
smart constructor.
Constructors
UpdateDistribution' | |
Fields
|
Instances
newUpdateDistribution Source #
Create a value of UpdateDistribution
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:ifMatch:UpdateDistribution'
, updateDistribution_ifMatch
- The value of the ETag
header that you received when retrieving the
distribution's configuration. For example: E2QWRUHAPOMQZL
.
UpdateDistribution
, updateDistribution_distributionConfig
- The distribution's configuration information.
UpdateDistribution
, updateDistribution_id
- The distribution's id.
Request Lenses
updateDistribution_ifMatch :: Lens' UpdateDistribution (Maybe Text) Source #
The value of the ETag
header that you received when retrieving the
distribution's configuration. For example: E2QWRUHAPOMQZL
.
updateDistribution_distributionConfig :: Lens' UpdateDistribution DistributionConfig Source #
The distribution's configuration information.
updateDistribution_id :: Lens' UpdateDistribution Text Source #
The distribution's id.
Destructuring the Response
data UpdateDistributionResponse Source #
The returned result of the corresponding request.
See: newUpdateDistributionResponse
smart constructor.
Constructors
UpdateDistributionResponse' | |
Fields
|
Instances
newUpdateDistributionResponse Source #
Create a value of UpdateDistributionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:distribution:UpdateDistributionResponse'
, updateDistributionResponse_distribution
- The distribution's information.
$sel:eTag:UpdateDistributionResponse'
, updateDistributionResponse_eTag
- The current version of the configuration. For example: E2QWRUHAPOMQZL
.
$sel:httpStatus:UpdateDistributionResponse'
, updateDistributionResponse_httpStatus
- The response's http status code.
Response Lenses
updateDistributionResponse_distribution :: Lens' UpdateDistributionResponse (Maybe Distribution) Source #
The distribution's information.
updateDistributionResponse_eTag :: Lens' UpdateDistributionResponse (Maybe Text) Source #
The current version of the configuration. For example: E2QWRUHAPOMQZL
.
updateDistributionResponse_httpStatus :: Lens' UpdateDistributionResponse Int Source #
The response's http status code.