deleteVpcPeeringAuthorization method

Future<void> deleteVpcPeeringAuthorization({
  1. required String gameLiftAwsAccountId,
  2. required String peerVpcId,
})

This API works with the following fleet types: EC2

Cancels a pending VPC peering authorization for the specified VPC. If you need to delete an existing VPC peering connection, use DeleteVpcPeeringConnection.

Related actions

All APIs by task

May throw InternalServiceException. May throw InvalidRequestException. May throw NotFoundException. May throw UnauthorizedException.

Parameter gameLiftAwsAccountId : A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift Servers fleet. You can find your Account ID in the Amazon Web Services Management Console under account settings.

Parameter peerVpcId : A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Servers Fleets.

Implementation

Future<void> deleteVpcPeeringAuthorization({
  required String gameLiftAwsAccountId,
  required String peerVpcId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.DeleteVpcPeeringAuthorization'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GameLiftAwsAccountId': gameLiftAwsAccountId,
      'PeerVpcId': peerVpcId,
    },
  );
}