describeVpcPeeringConnections method
This API works with the following fleet types: EC2
Retrieves information on VPC peering connections. Use this operation to get peering information for all fleets or for one specific fleet ID.
To retrieve connection information, call this operation from the Amazon Web Services account that is used to manage the Amazon GameLift Servers fleets. Specify a fleet ID or leave the parameter empty to retrieve all connection records. If successful, the retrieved information includes both active and pending connections. Active connections identify the IpV4 CIDR block that the VPC uses to connect.
Related actions
May throw InternalServiceException.
May throw InvalidRequestException.
May throw NotFoundException.
May throw UnauthorizedException.
Parameter fleetId :
A unique identifier for the fleet. You can use either the fleet ID or ARN
value.
Implementation
Future<DescribeVpcPeeringConnectionsOutput> describeVpcPeeringConnections({
String? fleetId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.DescribeVpcPeeringConnections'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (fleetId != null) 'FleetId': fleetId,
},
);
return DescribeVpcPeeringConnectionsOutput.fromJson(jsonResponse.body);
}