amazonka-route53-1.6.0: Amazon Route 53 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.Route53.ChangeResourceRecordSets

Contents

Description

Creates, changes, or deletes a resource record set, which contains authoritative DNS information for a specified domain name or subdomain name. For example, you can use ChangeResourceRecordSets to create a resource record set that routes traffic for test.example.com to a web server that has an IP address of 192.0.2.44.

Change Batches and Transactional Changes

The request body must include a document with a ChangeResourceRecordSetsRequest element. The request body contains a list of change items, known as a change batch. Change batches are considered transactional changes. When using the Amazon Route 53 API to change resource record sets, Amazon Route 53 either makes all or none of the changes in a change batch request. This ensures that Amazon Route 53 never partially implements the intended changes to the resource record sets in a hosted zone.

For example, a change batch request that deletes the CNAME record for www.example.com and creates an alias resource record set for www.example.com. Amazon Route 53 deletes the first resource record set and creates the second resource record set in a single operation. If either the DELETE or the CREATE action fails, then both changes (plus any other changes in the batch) fail, and the original CNAME record continues to exist.

Important: Due to the nature of transactional changes, you can't delete the same resource record set more than once in a single change batch. If you attempt to delete the same change batch more than once, Amazon Route 53 returns an InvalidChangeBatch error.

Traffic Flow

To create resource record sets for complex routing configurations, use either the traffic flow visual editor in the Amazon Route 53 console or the API actions for traffic policies and traffic policy instances. Save the configuration as a traffic policy, then associate the traffic policy with one or more domain names (such as example.com) or subdomain names (such as www.example.com), in the same hosted zone or in multiple hosted zones. You can roll back the updates if the new configuration isn't performing as expected. For more information, see Using Traffic Flow to Route DNS Traffic in the Amazon Route 53 Developer Guide .

Create, Delete, and Upsert

Use ChangeResourceRecordsSetsRequest to perform the following actions:

  • CREATE : Creates a resource record set that has the specified values.
  • DELETE : Deletes an existing resource record set that has the specified values.
  • UPSERT : If a resource record set does not already exist, AWS creates it. If a resource set does exist, Amazon Route 53 updates it with the values in the request.

Syntaxes for Creating, Updating, and Deleting Resource Record Sets

The syntax for a request depends on the type of resource record set that you want to create, delete, or update, such as weighted, alias, or failover. The XML elements in your request must appear in the order listed in the syntax.

For an example for each type of resource record set, see "Examples."

Don't refer to the syntax in the "Parameter Syntax" section, which includes all of the elements for every kind of resource record set that you can create, delete, or update by using ChangeResourceRecordSets .

Change Propagation to Amazon Route 53 DNS Servers

When you submit a ChangeResourceRecordSets request, Amazon Route 53 propagates your changes to all of the Amazon Route 53 authoritative DNS servers. While your changes are propagating, GetChange returns a status of PENDING . When propagation is complete, GetChange returns a status of INSYNC . Changes generally propagate to all Amazon Route 53 name servers within 60 seconds. For more information, see GetChange .

Limits on ChangeResourceRecordSets Requests

For information about the limits on a ChangeResourceRecordSets request, see Limits in the Amazon Route 53 Developer Guide .

Synopsis

Creating a Request

changeResourceRecordSets Source #

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

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

  • crrsHostedZoneId - The ID of the hosted zone that contains the resource record sets that you want to change.
  • crrsChangeBatch - A complex type that contains an optional comment and the Changes element.

data ChangeResourceRecordSets Source #

A complex type that contains change information for the resource record set.

See: changeResourceRecordSets smart constructor.

Instances

Eq ChangeResourceRecordSets Source # 
Data ChangeResourceRecordSets Source # 

Methods

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

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

toConstr :: ChangeResourceRecordSets -> Constr #

dataTypeOf :: ChangeResourceRecordSets -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ChangeResourceRecordSets Source # 
Show ChangeResourceRecordSets Source # 
Generic ChangeResourceRecordSets Source # 
Hashable ChangeResourceRecordSets Source # 
NFData ChangeResourceRecordSets Source # 
AWSRequest ChangeResourceRecordSets Source # 
ToElement ChangeResourceRecordSets Source # 
ToXML ChangeResourceRecordSets Source # 
ToHeaders ChangeResourceRecordSets Source # 
ToPath ChangeResourceRecordSets Source # 
ToQuery ChangeResourceRecordSets Source # 
type Rep ChangeResourceRecordSets Source # 
type Rep ChangeResourceRecordSets = D1 * (MetaData "ChangeResourceRecordSets" "Network.AWS.Route53.ChangeResourceRecordSets" "amazonka-route53-1.6.0-Ak5sZypnFS3AFXHlAYIveI" False) (C1 * (MetaCons "ChangeResourceRecordSets'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_crrsHostedZoneId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * ResourceId)) (S1 * (MetaSel (Just Symbol "_crrsChangeBatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * ChangeBatch))))
type Rs ChangeResourceRecordSets Source # 

Request Lenses

crrsHostedZoneId :: Lens' ChangeResourceRecordSets ResourceId Source #

The ID of the hosted zone that contains the resource record sets that you want to change.

crrsChangeBatch :: Lens' ChangeResourceRecordSets ChangeBatch Source #

A complex type that contains an optional comment and the Changes element.

Destructuring the Response

changeResourceRecordSetsResponse Source #

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

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

  • crrsrsResponseStatus - -- | The response status code.
  • crrsrsChangeInfo - A complex type that contains information about changes made to your hosted zone. This element contains an ID that you use when performing a GetChange action to get detailed information about the change.

data ChangeResourceRecordSetsResponse Source #

A complex type containing the response for the request.

See: changeResourceRecordSetsResponse smart constructor.

Instances

Eq ChangeResourceRecordSetsResponse Source # 
Data ChangeResourceRecordSetsResponse Source # 

Methods

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

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

toConstr :: ChangeResourceRecordSetsResponse -> Constr #

dataTypeOf :: ChangeResourceRecordSetsResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ChangeResourceRecordSetsResponse Source # 
Show ChangeResourceRecordSetsResponse Source # 
Generic ChangeResourceRecordSetsResponse Source # 
NFData ChangeResourceRecordSetsResponse Source # 
type Rep ChangeResourceRecordSetsResponse Source # 
type Rep ChangeResourceRecordSetsResponse = D1 * (MetaData "ChangeResourceRecordSetsResponse" "Network.AWS.Route53.ChangeResourceRecordSets" "amazonka-route53-1.6.0-Ak5sZypnFS3AFXHlAYIveI" False) (C1 * (MetaCons "ChangeResourceRecordSetsResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_crrsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "_crrsrsChangeInfo") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * ChangeInfo))))

Response Lenses

crrsrsChangeInfo :: Lens' ChangeResourceRecordSetsResponse ChangeInfo Source #

A complex type that contains information about changes made to your hosted zone. This element contains an ID that you use when performing a GetChange action to get detailed information about the change.