amazonka-cloudfront-2.0: Amazon CloudFront SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

  1. Use GetDistributionConfig to get the current configuration, including the version identifier (ETag).
  2. Update the distribution configuration that was returned in the response. Note the following important requirements and restrictions:

    • You must rename the ETag field to IfMatch, leaving the value unchanged. (Set the value of IfMatch to the value of ETag, then remove the ETag field.)
    • You can't change the value of CallerReference.
  3. Submit an UpdateDistribution request, providing the distribution configuration. The new configuration replaces the existing configuration. The values that you specify in an UpdateDistribution 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

Creating a Request

data UpdateDistribution Source #

The request to update a distribution.

See: newUpdateDistribution smart constructor.

Constructors

UpdateDistribution' 

Fields

Instances

Instances details
ToHeaders UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

ToPath UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

ToQuery UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

ToElement UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

AWSRequest UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

Associated Types

type AWSResponse UpdateDistribution #

Generic UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

Associated Types

type Rep UpdateDistribution :: Type -> Type #

Show UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

NFData UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

Methods

rnf :: UpdateDistribution -> () #

Eq UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

Hashable UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

type AWSResponse UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

type Rep UpdateDistribution Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

type Rep UpdateDistribution = D1 ('MetaData "UpdateDistribution" "Amazonka.CloudFront.UpdateDistribution" "amazonka-cloudfront-2.0-8Jb7luniAuUfLdUxCxW4K" 'False) (C1 ('MetaCons "UpdateDistribution'" 'PrefixI 'True) (S1 ('MetaSel ('Just "ifMatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "distributionConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DistributionConfig) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

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.

Destructuring the Response

data UpdateDistributionResponse Source #

The returned result of the corresponding request.

See: newUpdateDistributionResponse smart constructor.

Constructors

UpdateDistributionResponse' 

Fields

Instances

Instances details
Generic UpdateDistributionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

Associated Types

type Rep UpdateDistributionResponse :: Type -> Type #

Show UpdateDistributionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

NFData UpdateDistributionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

Eq UpdateDistributionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

type Rep UpdateDistributionResponse Source # 
Instance details

Defined in Amazonka.CloudFront.UpdateDistribution

type Rep UpdateDistributionResponse = D1 ('MetaData "UpdateDistributionResponse" "Amazonka.CloudFront.UpdateDistribution" "amazonka-cloudfront-2.0-8Jb7luniAuUfLdUxCxW4K" 'False) (C1 ('MetaCons "UpdateDistributionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "distribution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Distribution)) :*: (S1 ('MetaSel ('Just "eTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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_eTag :: Lens' UpdateDistributionResponse (Maybe Text) Source #

The current version of the configuration. For example: E2QWRUHAPOMQZL.