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.

Authorizes the Amazon Web Services account that created a specified VPC to submit an AssociateVPCWithHostedZone request to associate the VPC with a specified hosted zone that was created by a different account. To submit a CreateVPCAssociationAuthorization request, you must use the account that created the hosted zone. After you authorize the association, use the account that created the VPC to submit an AssociateVPCWithHostedZone request.

If you want to associate multiple VPCs that you created by using one account with a hosted zone that you created by using a different account, you must submit one authorization request for each VPC.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginCreateVPCAssociationAuthorization and EndCreateVPCAssociationAuthorization.

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

Syntax

C#
public abstract Task<CreateVPCAssociationAuthorizationResponse> CreateVPCAssociationAuthorizationAsync(
         CreateVPCAssociationAuthorizationRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.Route53.Model.CreateVPCAssociationAuthorizationRequest

Container for the necessary parameters to execute the CreateVPCAssociationAuthorization service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the CreateVPCAssociationAuthorization service method, as returned by Route53.

Exceptions

ExceptionCondition
ConcurrentModificationException Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request.
InvalidInputException The input is not valid.
InvalidVPCIdException The VPC ID that you specified either isn't a valid ID or the current account is not authorized to access this VPC.
NoSuchHostedZoneException No hosted zone exists with the ID that you specified.
TooManyVPCAssociationAuthorizationsException You've created the maximum number of authorizations that can be created for the specified hosted zone. To authorize another VPC to be associated with the hosted zone, submit a DeleteVPCAssociationAuthorization request to remove an existing authorization. To get a list of existing authorizations, submit a ListVPCAssociationAuthorizations request.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also