amazonka-cloudfront-1.6.0: Amazon CloudFront SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CloudFront.UpdateDistribution

Contents

Description

Updates the configuration for a web distribution. Perform the following steps.

For information about updating a distribution using the CloudFront console, see Creating or Updating a Web Distribution Using the CloudFront Console 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.
  • Update the XML document that was returned in the response to your GetDistributionConfig request to include the desired changes. You can't change the value of CallerReference . If you try to change this value, CloudFront returns an IllegalUpdate error.

Important: The new configuration replaces the existing configuration; the values that you specify in an UpdateDistribution request are not merged into the 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 .

Important: 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 distribution. 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 you're actually specifying.

Synopsis

Creating a Request

updateDistribution Source #

Creates a value of UpdateDistribution with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • udIfMatch - The value of the ETag header that you received when retrieving the distribution's configuration. For example: E2QWRUHAPOMQZL .
  • udDistributionConfig - The distribution's configuration information.
  • udId - The distribution's id.

data UpdateDistribution Source #

The request to update a distribution.

See: updateDistribution smart constructor.

Instances

Eq UpdateDistribution Source # 
Data UpdateDistribution Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdateDistribution -> c UpdateDistribution #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdateDistribution #

toConstr :: UpdateDistribution -> Constr #

dataTypeOf :: UpdateDistribution -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UpdateDistribution) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdateDistribution) #

gmapT :: (forall b. Data b => b -> b) -> UpdateDistribution -> UpdateDistribution #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdateDistribution -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdateDistribution -> r #

gmapQ :: (forall d. Data d => d -> u) -> UpdateDistribution -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdateDistribution -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdateDistribution -> m UpdateDistribution #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateDistribution -> m UpdateDistribution #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateDistribution -> m UpdateDistribution #

Read UpdateDistribution Source # 
Show UpdateDistribution Source # 
Generic UpdateDistribution Source # 
Hashable UpdateDistribution Source # 
NFData UpdateDistribution Source # 

Methods

rnf :: UpdateDistribution -> () #

AWSRequest UpdateDistribution Source # 
ToElement UpdateDistribution Source # 
ToHeaders UpdateDistribution Source # 
ToPath UpdateDistribution Source # 
ToQuery UpdateDistribution Source # 
type Rep UpdateDistribution Source # 
type Rep UpdateDistribution = D1 * (MetaData "UpdateDistribution" "Network.AWS.CloudFront.UpdateDistribution" "amazonka-cloudfront-1.6.0-GTmJBWQTc5OFcqzFNdHHM3" False) (C1 * (MetaCons "UpdateDistribution'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_udIfMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_udDistributionConfig") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * DistributionConfig)) (S1 * (MetaSel (Just Symbol "_udId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))
type Rs UpdateDistribution Source # 

Request Lenses

udIfMatch :: Lens' UpdateDistribution (Maybe Text) Source #

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

udDistributionConfig :: Lens' UpdateDistribution DistributionConfig Source #

The distribution's configuration information.

udId :: Lens' UpdateDistribution Text Source #

The distribution's id.

Destructuring the Response

updateDistributionResponse Source #

Creates a value of UpdateDistributionResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data UpdateDistributionResponse Source #

The returned result of the corresponding request.

See: updateDistributionResponse smart constructor.

Instances

Eq UpdateDistributionResponse Source # 
Data UpdateDistributionResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdateDistributionResponse -> c UpdateDistributionResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdateDistributionResponse #

toConstr :: UpdateDistributionResponse -> Constr #

dataTypeOf :: UpdateDistributionResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UpdateDistributionResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdateDistributionResponse) #

gmapT :: (forall b. Data b => b -> b) -> UpdateDistributionResponse -> UpdateDistributionResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdateDistributionResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdateDistributionResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> UpdateDistributionResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdateDistributionResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdateDistributionResponse -> m UpdateDistributionResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateDistributionResponse -> m UpdateDistributionResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateDistributionResponse -> m UpdateDistributionResponse #

Read UpdateDistributionResponse Source # 
Show UpdateDistributionResponse Source # 
Generic UpdateDistributionResponse Source # 
NFData UpdateDistributionResponse Source # 
type Rep UpdateDistributionResponse Source # 
type Rep UpdateDistributionResponse = D1 * (MetaData "UpdateDistributionResponse" "Network.AWS.CloudFront.UpdateDistribution" "amazonka-cloudfront-1.6.0-GTmJBWQTc5OFcqzFNdHHM3" False) (C1 * (MetaCons "UpdateDistributionResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_udrsETag") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_udrsDistribution") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Distribution))) (S1 * (MetaSel (Just Symbol "_udrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

Response Lenses

udrsETag :: Lens' UpdateDistributionResponse (Maybe Text) Source #

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