describeFleetPortSettings method

Future<DescribeFleetPortSettingsOutput> describeFleetPortSettings({
  1. required String fleetId,
  2. String? location,
})

This API works with the following fleet types: EC2

Retrieves a fleet's inbound connection permissions. Connection permissions specify IP addresses and port settings that incoming traffic can use to access server processes in the fleet. Game server processes that are running in the fleet must use a port that falls within this range.

Use this operation in the following ways:

  • To retrieve the port settings for a fleet, identify the fleet's unique identifier.
  • To check the status of recent updates to a fleet remote location, specify the fleet ID and a location. Port setting updates can take time to propagate across all locations.
If successful, a set of IpPermission objects is returned for the requested fleet ID. When specifying a location, this operation returns a pending status. If the requested fleet has been deleted, the result set is empty.

Learn more

Setting up Amazon GameLift Servers fleets

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

Parameter fleetId : A unique identifier for the fleet to retrieve port settings for. You can use either the fleet ID or ARN value.

Parameter location : A remote location to check for status of port setting updates. Use the Amazon Web Services Region code format, such as us-west-2.

Implementation

Future<DescribeFleetPortSettingsOutput> describeFleetPortSettings({
  required String fleetId,
  String? location,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.DescribeFleetPortSettings'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FleetId': fleetId,
      if (location != null) 'Location': location,
    },
  );

  return DescribeFleetPortSettingsOutput.fromJson(jsonResponse.body);
}