User guide

Table Of Contents
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 }
};
//[4] Update the zone's resource record sets
ChangeResourceRecordSetsRequest recordsetRequest = new ChangeResourceRe
cordSetsRequest()
{
HostedZoneId = zoneResponse.HostedZone.Id,
ChangeBatch = changeBatch
};
ChangeResourceRecordSetsResponse recordsetResponse = route53Cli
ent.ChangeResourceRecordSets(recordsetRequest);
//[5] Monitor the change status
GetChangeRequest changeRequest = new GetChangeRequest()
{
Id = recordsetResponse.ChangeInfo.Id
};
while (route53Client.GetChange(changeRequest).ChangeInfo.Status ==
ChangeStatus.PENDING)
{
Console.WriteLine("Change is pending.");
Thread.Sleep(15000);
}
Console.WriteLine("Change is complete.");
Console.ReadKey();
}
}
}
The numbers in the following sections are keyed to the comments in the preceding example.
[1] Create a Client Object
The AmazonRoute53Client class supports a set of public methods that you use to invoke Amazon
Route 53 actions.You create the client object by calling the appropriate object creation method on
the AWSClientFactory class.There are multiple methods, each corresponding to a different constructor.
The object must have the following information.
An AWS region.
When you call a client method, the underlying HTTP request is sent to this endpoint.
A credentials profile.
Version v2.0.0
65
AWS SDK for .NET Developer Guide
Updating Amazon Route 53 Resource Record Sets