deleteVPCAssociationAuthorization method
Removes authorization to submit an AssociateVPCWithHostedZone
request to associate a specified VPC with a hosted zone that was created
by a different account. You must use the account that created the hosted
zone to submit a DeleteVPCAssociationAuthorization
request.
May throw ConcurrentModification. May throw VPCAssociationAuthorizationNotFound. May throw NoSuchHostedZone. May throw InvalidVPCId. May throw InvalidInput.
Parameter hostedZoneId
:
When removing authorization to associate a VPC that was created by one AWS
account with a hosted zone that was created with a different AWS account,
the ID of the hosted zone.
Parameter vpc
:
When removing authorization to associate a VPC that was created by one AWS
account with a hosted zone that was created with a different AWS account,
a complex type that includes the ID and region of the VPC.
Implementation
Future<void> deleteVPCAssociationAuthorization({
required String hostedZoneId,
required VPC vpc,
}) async {
ArgumentError.checkNotNull(hostedZoneId, 'hostedZoneId');
_s.validateStringLength(
'hostedZoneId',
hostedZoneId,
0,
32,
isRequired: true,
);
ArgumentError.checkNotNull(vpc, 'vpc');
await _protocol.send(
method: 'POST',
requestUri:
'/2013-04-01/hostedzone/${Uri.encodeComponent(hostedZoneId)}/deauthorizevpcassociation',
payload: DeleteVPCAssociationAuthorizationRequest(
hostedZoneId: hostedZoneId, vpc: vpc)
.toXml(
'DeleteVPCAssociationAuthorizationRequest',
attributes: [
_s.XmlAttribute(_s.XmlName('xmlns'),
'https://route53.amazonaws.com/doc/2013-04-01/'),
],
),
exceptionFnMap: _exceptionFns,
);
}