createVPCAssociationAuthorization method
- required String hostedZoneId,
- required VPC vpc,
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.
May throw ConcurrentModification.
May throw InvalidInput.
May throw InvalidVPCId.
May throw NoSuchHostedZone.
May throw TooManyVPCAssociationAuthorizations.
Parameter hostedZoneId :
The ID of the private hosted zone that you want to authorize associating a
VPC with.
Parameter vpc :
A complex type that contains the VPC ID and region for the VPC that you
want to authorize associating with your hosted zone.
Implementation
Future<CreateVPCAssociationAuthorizationResponse>
createVPCAssociationAuthorization({
required String hostedZoneId,
required VPC vpc,
}) async {
final $result = await _protocol.send(
method: 'POST',
requestUri:
'/2013-04-01/hostedzone/${Uri.encodeComponent(hostedZoneId)}/authorizevpcassociation',
payload: CreateVPCAssociationAuthorizationRequest(
hostedZoneId: hostedZoneId, vpc: vpc)
.toXml('CreateVPCAssociationAuthorizationRequest'),
exceptionFnMap: _exceptionFns,
);
return CreateVPCAssociationAuthorizationResponse.fromXml($result.body);
}