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

Amazonka.Route53.ChangeResourceRecordSets

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.

Deleting Resource Record Sets

To delete a resource record set, you must specify all the same values that you specified when you created it.

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. Route 53 validates the changes in the request and then either makes all or none of the changes in the change batch request. This ensures that DNS routing isn't adversely affected by partial changes to the resource record sets in a hosted zone.

For example, suppose a change batch request contains two changes: it deletes the CNAME resource record set for www.example.com and creates an alias resource record set for www.example.com. If validation for both records succeeds, Route 53 deletes the first resource record set and creates the second resource record set in a single operation. If validation for either the DELETE or the CREATE action fails, then the request is canceled, and the original CNAME record continues to exist.

If you try to delete the same resource record set more than once in a single change batch, 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 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, Amazon Web Services creates it. If a resource set does exist, 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 Route 53 DNS Servers

When you submit a ChangeResourceRecordSets request, Route 53 propagates your changes to all of the 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 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

data ChangeResourceRecordSets Source #

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

See: newChangeResourceRecordSets smart constructor.

Constructors

ChangeResourceRecordSets' 

Fields

Instances

Instances details
Eq ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Read ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Show ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Generic ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Associated Types

type Rep ChangeResourceRecordSets :: Type -> Type #

NFData ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Hashable ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

AWSRequest ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

ToHeaders ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

ToPath ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

ToQuery ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

ToElement ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

ToXML ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

type Rep ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

type Rep ChangeResourceRecordSets = D1 ('MetaData "ChangeResourceRecordSets" "Amazonka.Route53.ChangeResourceRecordSets" "libZSservicesZSamazonka-route53ZSamazonka-route53" 'False) (C1 ('MetaCons "ChangeResourceRecordSets'" 'PrefixI 'True) (S1 ('MetaSel ('Just "hostedZoneId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ResourceId) :*: S1 ('MetaSel ('Just "changeBatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChangeBatch)))
type AWSResponse ChangeResourceRecordSets Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

newChangeResourceRecordSets Source #

Create a value of ChangeResourceRecordSets 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:hostedZoneId:ChangeResourceRecordSets', changeResourceRecordSets_hostedZoneId - The ID of the hosted zone that contains the resource record sets that you want to change.

$sel:changeBatch:ChangeResourceRecordSets', changeResourceRecordSets_changeBatch - A complex type that contains an optional comment and the Changes element.

Request Lenses

changeResourceRecordSets_hostedZoneId :: Lens' ChangeResourceRecordSets ResourceId Source #

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

changeResourceRecordSets_changeBatch :: Lens' ChangeResourceRecordSets ChangeBatch Source #

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

Destructuring the Response

data ChangeResourceRecordSetsResponse Source #

A complex type containing the response for the request.

See: newChangeResourceRecordSetsResponse smart constructor.

Constructors

ChangeResourceRecordSetsResponse' 

Fields

  • httpStatus :: Int

    The response's http status code.

  • changeInfo :: ChangeInfo

    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.

Instances

Instances details
Eq ChangeResourceRecordSetsResponse Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Read ChangeResourceRecordSetsResponse Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Show ChangeResourceRecordSetsResponse Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Generic ChangeResourceRecordSetsResponse Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

Associated Types

type Rep ChangeResourceRecordSetsResponse :: Type -> Type #

NFData ChangeResourceRecordSetsResponse Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

type Rep ChangeResourceRecordSetsResponse Source # 
Instance details

Defined in Amazonka.Route53.ChangeResourceRecordSets

type Rep ChangeResourceRecordSetsResponse = D1 ('MetaData "ChangeResourceRecordSetsResponse" "Amazonka.Route53.ChangeResourceRecordSets" "libZSservicesZSamazonka-route53ZSamazonka-route53" 'False) (C1 ('MetaCons "ChangeResourceRecordSetsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "changeInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChangeInfo)))

newChangeResourceRecordSetsResponse Source #

Create a value of ChangeResourceRecordSetsResponse 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:httpStatus:ChangeResourceRecordSetsResponse', changeResourceRecordSetsResponse_httpStatus - The response's http status code.

$sel:changeInfo:ChangeResourceRecordSetsResponse', changeResourceRecordSetsResponse_changeInfo - 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.

Response Lenses

changeResourceRecordSetsResponse_changeInfo :: 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.