deleteVPCAssociationAuthorization method

Future<void> deleteVPCAssociationAuthorization({
  1. required String hostedZoneId,
  2. required VPC vpc,
})

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 InvalidInput. May throw InvalidVPCId. May throw NoSuchHostedZone. May throw VPCAssociationAuthorizationNotFound.

Parameter hostedZoneId : When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone.

Parameter vpc : When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, a complex type that includes the ID and region of the VPC.

Implementation

Future<void> deleteVPCAssociationAuthorization({
  required String hostedZoneId,
  required VPC vpc,
}) async {
  await _protocol.send(
    method: 'POST',
    requestUri:
        '/2013-04-01/hostedzone/${Uri.encodeComponent(hostedZoneId)}/deauthorizevpcassociation',
    payload: DeleteVPCAssociationAuthorizationRequest(
            hostedZoneId: hostedZoneId, vpc: vpc)
        .toXml('DeleteVPCAssociationAuthorizationRequest'),
    exceptionFnMap: _exceptionFns,
  );
}