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.

Container for the parameters to the AssociateVPCWithHostedZone operation. Associates an Amazon VPC with a private hosted zone.

To perform the association, the VPC and the private hosted zone must already exist. You can't convert a public hosted zone into a private hosted zone.

If you want to associate a VPC that was created by using one AWS account with a private hosted zone that was created by using a different account, the AWS account that created the private hosted zone must first submit a CreateVPCAssociationAuthorization request. Then the account that created the VPC must submit an AssociateVPCWithHostedZone request.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Route53.AmazonRoute53Request
      Amazon.Route53.Model.AssociateVPCWithHostedZoneRequest

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

Syntax

C#
public class AssociateVPCWithHostedZoneRequest : AmazonRoute53Request
         IAmazonWebServiceRequest

The AssociateVPCWithHostedZoneRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Comment System.String

Gets and sets the property Comment.

Optional: A comment about the association request.

Public Property HostedZoneId System.String

Gets and sets the property HostedZoneId.

The ID of the private hosted zone that you want to associate an Amazon VPC with.

Note that you can't associate a VPC with a hosted zone that doesn't have an existing VPC association.

Public Property VPC Amazon.Route53.Model.VPC

Gets and sets the property VPC.

A complex type that contains information about the VPC that you want to associate with a private hosted zone.

Examples

The following example associates the VPC with ID vpc-1a2b3c4d with the hosted zone with ID Z3M3LMPEXAMPLE.

To associate a VPC with a hosted zone


var response = client.AssociateVPCWithHostedZone(new AssociateVPCWithHostedZoneRequest 
{
    Comment = "",
    HostedZoneId = "Z3M3LMPEXAMPLE",
    VPC = new VPC {
        VPCId = "vpc-1a2b3c4d",
        VPCRegion = "us-east-2"
    }
});

ChangeInfo changeInfo = response.ChangeInfo;

            

Version Information

.NET Standard:
Supported in: 1.3

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

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms