deleteVpcPeeringAuthorization method

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

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

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

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

Parameter peerVpcId : A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

Implementation

Future<void> deleteVpcPeeringAuthorization({
  required String gameLiftAwsAccountId,
  required String peerVpcId,
}) async {
  ArgumentError.checkNotNull(gameLiftAwsAccountId, 'gameLiftAwsAccountId');
  _s.validateStringLength(
    'gameLiftAwsAccountId',
    gameLiftAwsAccountId,
    1,
    1024,
    isRequired: true,
  );
  ArgumentError.checkNotNull(peerVpcId, 'peerVpcId');
  _s.validateStringLength(
    'peerVpcId',
    peerVpcId,
    1,
    1024,
    isRequired: true,
  );
  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,
    },
  );
}