GameLift / Client / update_fleet_port_settings

update_fleet_port_settings#

GameLift.Client.update_fleet_port_settings(**kwargs)#

Updates permissions that allow inbound traffic to connect to game sessions that are being hosted on instances in the fleet.

To update settings, specify the fleet ID to be updated and specify the changes to be made. List the permissions you want to add in InboundPermissionAuthorizations, and permissions you want to remove in InboundPermissionRevocations. Permissions to be removed must match existing fleet permissions.

If successful, the fleet ID for the updated fleet is returned. For fleets with remote locations, port setting updates can take time to propagate across all locations. You can check the status of updates in each location by calling DescribeFleetPortSettings with a location name.

Learn more

Setting up GameLift fleets

See also: AWS API Documentation

Request Syntax

response = client.update_fleet_port_settings(
    FleetId='string',
    InboundPermissionAuthorizations=[
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ],
    InboundPermissionRevocations=[
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ]
)
Parameters:
  • FleetId (string) –

    [REQUIRED]

    A unique identifier for the fleet to update port settings for. You can use either the fleet ID or ARN value.

  • InboundPermissionAuthorizations (list) –

    A collection of port settings to be added to the fleet resource.

    • (dict) –

      A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet. New game sessions are assigned an IP address/port number combination, which must fall into the fleet’s allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.

      • FromPort (integer) – [REQUIRED]

        A starting value for a range of allowed port numbers.

        For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

      • ToPort (integer) – [REQUIRED]

        An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort.

        For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

      • IpRange (string) – [REQUIRED]

        A range of allowed IP addresses. This value must be expressed in CIDR notation. Example: “ 000.000.000.000/[subnet mask]” or optionally the shortened version “ 0.0.0.0/[subnet mask]”.

      • Protocol (string) – [REQUIRED]

        The network communication protocol used by the fleet.

  • InboundPermissionRevocations (list) –

    A collection of port settings to be removed from the fleet resource.

    • (dict) –

      A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet. New game sessions are assigned an IP address/port number combination, which must fall into the fleet’s allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.

      • FromPort (integer) – [REQUIRED]

        A starting value for a range of allowed port numbers.

        For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

      • ToPort (integer) – [REQUIRED]

        An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort.

        For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

      • IpRange (string) – [REQUIRED]

        A range of allowed IP addresses. This value must be expressed in CIDR notation. Example: “ 000.000.000.000/[subnet mask]” or optionally the shortened version “ 0.0.0.0/[subnet mask]”.

      • Protocol (string) – [REQUIRED]

        The network communication protocol used by the fleet.

Return type:

dict

Returns:

Response Syntax

{
    'FleetId': 'string',
    'FleetArn': 'string'
}

Response Structure

  • (dict) –

    • FleetId (string) –

      A unique identifier for the fleet that was updated.

    • FleetArn (string) –

      The Amazon Resource Name ( ARN) that is assigned to a 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.

Exceptions

  • GameLift.Client.exceptions.NotFoundException

  • GameLift.Client.exceptions.ConflictException

  • GameLift.Client.exceptions.InvalidFleetStatusException

  • GameLift.Client.exceptions.LimitExceededException

  • GameLift.Client.exceptions.InternalServiceException

  • GameLift.Client.exceptions.InvalidRequestException

  • GameLift.Client.exceptions.UnauthorizedException