Skip to content

describe_fleet_port_settings

describe_fleet_port_settings(
    *,
    config_overrides: Optional[GameLiftClientConfig] = None,
    fleet_id: Optional[FleetIdOrArn] = None,
    location: Optional[LocationStringModel] = None,
) -> DescribeFleetPortSettingsOutput

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

Parameters:

  • fleet_id (Optional[FleetIdOrArn], default: None ) –

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

  • location (Optional[LocationStringModel], default: None ) –

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

Raises:

  • InternalServiceException –

    The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

  • InvalidRequestException –

    One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

  • NotFoundException –

    The requested resource was not found. The resource was either not created yet or deleted.

  • UnauthorizedException –

    The client failed authentication. Clients should not retry such requests.

  • UnsupportedRegionException –

    The requested operation is not supported in the Region specified.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_gamelift/_services/game_lift.py
def describe_fleet_port_settings(
    self,
    *,
    config_overrides: Optional[GameLiftClientConfig] = None,
    fleet_id: Optional["capo_gamelift.types.fleet_id_or_arn.FleetIdOrArn"] = None,
    location: Optional[
        "capo_gamelift.types.location_string_model.LocationStringModel"
    ] = None,
) -> "capo_gamelift.types.describe_fleet_port_settings_output.DescribeFleetPortSettingsOutput":
    """<p> <b>This API works with the following fleet types:</b> EC2</p> <p>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. </p> <p>Use this operation in the following ways: </p> <ul> <li> <p>To retrieve the port settings for a fleet, identify the fleet's unique identifier. </p> </li> <li> <p>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. </p> </li> </ul> <p>If successful, a set of <code>IpPermission</code> 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.</p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html">Setting up Amazon GameLift Servers fleets</a> </p>

    Args:
        fleet_id: <p>A unique identifier for the fleet to retrieve port settings for. You can use either the fleet ID or ARN value.</p>
        location: <p>A remote location to check for status of port setting updates. Use the Amazon Web Services Region code format, such as <code>us-west-2</code>.</p>

    Raises:
        capo_gamelift.errors.internal_service_exception.InternalServiceException: <p>The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.</p>
        capo_gamelift.errors.invalid_request_exception.InvalidRequestException: <p>One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.</p>
        capo_gamelift.errors.not_found_exception.NotFoundException: <p>The requested resource was not found. The resource was either not created yet or deleted.</p>
        capo_gamelift.errors.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
        capo_gamelift.errors.unsupported_region_exception.UnsupportedRegionException: <p>The requested operation is not supported in the Region specified.</p>
        capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_gamelift.types.describe_fleet_port_settings_input.DescribeFleetPortSettingsInput]",
    ) -> OperationResponse[
        "capo_gamelift.types.describe_fleet_port_settings_output.DescribeFleetPortSettingsOutput"
    ]:
        import capo_gamelift._operations.game_lift.describe_fleet_port_settings

        output, http_response = (
            capo_gamelift._operations.game_lift.describe_fleet_port_settings.describe_fleet_port_settings(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_gamelift.types.describe_fleet_port_settings_output.DescribeFleetPortSettingsOutput",
    ) -> dict[str, Any]:
        import capo_gamelift.types.describe_fleet_port_settings_output

        return capo_gamelift.types.describe_fleet_port_settings_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeFleetPortSettings", redact_output=_redact_output),
    )
    input_: capo_gamelift.types.describe_fleet_port_settings_input.DescribeFleetPortSettingsInput = {}
    if fleet_id is not None:
        input_["fleet_id"] = fleet_id
    if location is not None:
        input_["location"] = location

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output