AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Returns the current status of a change batch request. The status is one of the following values:
PENDING
indicates that the changes in this request have not propagated to
all Amazon Route 53 DNS servers managing the hosted zone. This is the initial status
of all change batch requests.
INSYNC
indicates that the changes have propagated to all Route 53 DNS servers
managing the hosted zone.
For .NET Core this operation is only available in asynchronous form. Please refer to GetChangeAsync.
Namespace: Amazon.Route53
Assembly: AWSSDK.Route53.dll
Version: 3.x.y.z
public abstract GetChangeResponse GetChange( GetChangeRequest request )
Container for the necessary parameters to execute the GetChange service method.
Exception | Condition |
---|---|
InvalidInputException | The input is not valid. |
NoSuchChangeException | A change with the specified change ID does not exist. |
This example shows how to create an Amazon Route 53 hosted zone and add a resource record set to the zone.
string domainName = "www.example.org"; IAmazonRoute53 route53Client = new AmazonRoute53Client(); CreateHostedZoneRequest zoneRequest = new CreateHostedZoneRequest { Name = domainName, CallerReference = "my_change_request" }; CreateHostedZoneResponse zoneResponse = route53Client.CreateHostedZone(zoneRequest); ResourceRecordSet recordSet = new ResourceRecordSet { Name = domainName, TTL = 60, Type = RRType.A, ResourceRecords = new List<ResourceRecord> { new ResourceRecord { Value = "192.0.2.235" } } }; Change change1 = new Change { ResourceRecordSet = recordSet, Action = ChangeAction.CREATE }; ChangeBatch changeBatch = new ChangeBatch { Changes = new List<Change> { change1 } }; ChangeResourceRecordSetsRequest recordsetRequest = new ChangeResourceRecordSetsRequest { HostedZoneId = zoneResponse.HostedZone.Id, ChangeBatch = changeBatch }; ChangeResourceRecordSetsResponse recordsetResponse = route53Client.ChangeResourceRecordSets(recordsetRequest); GetChangeRequest changeRequest = new GetChangeRequest { Id = recordsetResponse.ChangeInfo.Id }; while (route53Client.GetChange(changeRequest).ChangeInfo.Status == ChangeStatus.PENDING) { Console.WriteLine("Change is pending."); Thread.Sleep(TimeSpan.FromSeconds(15)); }
.NET Framework:
Supported in: 4.5, 4.0, 3.5