DescribeFleetPortSettings
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. To connect to game server processes on a container fleet, the port settings should include one or more of the fleet's connection ports.
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 fleets
Request Syntax
{
"FleetId": "string
",
"Location": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
Note
In the following list, the required parameters are described first.
- FleetId
-
A unique identifier for the fleet to retrieve port settings for. You can use either the fleet ID or ARN value.
Type: String
Pattern:
^fleet-\S+|^arn:.*:fleet\/fleet-\S+
Required: Yes
- Location
-
A remote location to check for status of port setting updates. Use the Amazon Region code format, such as
us-west-2
.Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[A-Za-z0-9\-]+
Required: No
Response Syntax
{
"FleetArn": "string",
"FleetId": "string",
"InboundPermissions": [
{
"FromPort": number,
"IpRange": "string",
"Protocol": "string",
"ToPort": number
}
],
"Location": "string",
"UpdateStatus": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- FleetArn
-
The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is
arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
.Type: String
Pattern:
^arn:.*:fleet\/fleet-\S+
- FleetId
-
A unique identifier for the fleet that was requested.
Type: String
Pattern:
^fleet-\S+
- InboundPermissions
-
The port settings for the requested fleet ID.
Type: Array of IpPermission objects
Array Members: Maximum number of 50 items.
- Location
-
The requested fleet location, expressed as an Amazon Region code, such as
us-west-2
.Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[A-Za-z0-9\-]+
- UpdateStatus
-
The current status of updates to the fleet's port settings in the requested fleet location. A status of
PENDING_UPDATE
indicates that an update was requested for the fleet but has not yet been completed for the location.Type: String
Valid Values:
PENDING_UPDATE
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServiceException
-
The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
HTTP Status Code: 500
- InvalidRequestException
-
One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
HTTP Status Code: 400
- NotFoundException
-
The requested resources was not found. The resource was either not created yet or deleted.
HTTP Status Code: 400
- UnauthorizedException
-
The client failed authentication. Clients should not retry such requests.
HTTP Status Code: 400
- UnsupportedRegionException
-
The requested operation is not supported in the Region specified.
HTTP Status Code: 400
Examples
Request inbound connection permissions for a fleet
This example retrieves connection settings for a specified fleet.
HTTP requests are authenticated using an Amazon Signature Version 4 signature in the Authorization
header field.
Sample Request
{
"FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa"
}
Sample Response
{
"FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
"FleetArn": "arn:aws:gamelift:us-east-2::fleet/fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
"InboundPermissions": [
{
"FromPort": 33400,
"ToPort": 33500,
"IpRange": "0.0.0.0/0",
"Protocol": "UDP"
},
{
"FromPort": 1900,
"ToPort": 2000,
"IpRange": "0.0.0.0/0",
"Protocol": "TCP"
}
]
}
Check port setting updates in a remote location
This example retrieves the current status of recent port setting updates for a specified remote location.
HTTP requests are authenticated using an Amazon Signature Version 4 signature in the Authorization
header field.
Sample Request
{
"FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
"Location": "us-west-2"
}
Sample Response
{
"FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
"FleetArn": "arn:aws:gamelift:us-east-2::fleet/fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
"InboundPermissions": [
{
"FromPort": 33400,
"ToPort": 33500,
"IpRange": "0.0.0.0/0",
"Protocol": "UDP"
},
{
"FromPort": 1900,
"ToPort": 2000,
"IpRange": "0.0.0.0/0",
"Protocol": "TCP"
}
],
"Location": "us-west-2",
"Status": "PENDING_UPDATE"
}
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: