AWS SDK Version 3 for .NET
API Reference

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.

A complex type containing the response information for the hosted zone.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.Route53.Model.CreateHostedZoneResponse

Namespace: Amazon.Route53.Model
Assembly: AWSSDK.Route53.dll
Version: 3.x.y.z

Syntax

C#
public class CreateHostedZoneResponse : AmazonWebServiceResponse

The CreateHostedZoneResponse type exposes the following members

Constructors

NameDescription
Public Method CreateHostedZoneResponse()

Properties

NameTypeDescription
Public Property ChangeInfo Amazon.Route53.Model.ChangeInfo

Gets and sets the property ChangeInfo.

A complex type that contains information about the CreateHostedZone request.

Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property DelegationSet Amazon.Route53.Model.DelegationSet

Gets and sets the property DelegationSet.

A complex type that describes the name servers for this hosted zone.

Public Property HostedZone Amazon.Route53.Model.HostedZone

Gets and sets the property HostedZone.

A complex type that contains general information about the hosted zone.

Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property Location System.String

Gets and sets the property Location.

The unique URL representing the new hosted zone.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property VPC Amazon.Route53.Model.VPC

Gets and sets the property VPC.

A complex type that contains information about an Amazon VPC that you associated with this hosted zone.

Examples

This example shows how to create an Amazon Route 53 hosted zone and add a resource record set to the zone.

Create a hosted zone and add a resource record set

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));
}
      

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5