Skip to content

update_game_session_queue async

update_game_session_queue(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    name: Optional[GameSessionQueueNameOrArn] = None,
    timeout_in_seconds: Optional[WholeNumber] = None,
    player_latency_policies: Optional[PlayerLatencyPolicyList] = None,
    destinations: Optional[GameSessionQueueDestinationList] = None,
    filter_configuration: Optional[FilterConfiguration] = None,
    priority_configuration: Optional[PriorityConfiguration] = None,
    custom_event_data: Optional[QueueCustomEventData] = None,
    notification_target: Optional[QueueSnsArnStringModel] = None,
) -> UpdateGameSessionQueueOutput

This API works with the following fleet types: EC2, Anywhere, Container

Updates the configuration of a game session queue, which determines how the queue processes new game session requests. To update settings, specify the queue name to be updated and provide the new settings. When updating destinations, provide a complete list of destinations.

Learn more

Using Multi-Region Queues

Parameters:

  • name (Optional[GameSessionQueueNameOrArn], default: None ) –

    A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value.

  • timeout_in_seconds (Optional[WholeNumber], default: None ) –

    The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

    The minimum value is 10 and the maximum value is 600.

  • player_latency_policies (Optional[PlayerLatencyPolicyList], default: None ) –

    A set of policies that enforce a sliding cap on player latency when processing game sessions placement requests. Use multiple policies to gradually relax the cap over time if Amazon GameLift Servers can't make a placement. Policies are evaluated in order starting with the lowest maximum latency value. When updating policies, provide a complete collection of policies.

  • destinations (Optional[GameSessionQueueDestinationList], default: None ) –

    A list of fleets and/or fleet aliases that can be used to fulfill game session placement requests in the queue. Destinations are identified by either a fleet ARN or a fleet alias ARN, and are listed in order of placement preference. When updating this list, provide a complete list of destinations.

  • filter_configuration (Optional[FilterConfiguration], default: None ) –

    A list of locations where a queue is allowed to place new game sessions. Locations are specified in the form of Amazon Web Services Region codes, such as us-west-2. If this parameter is not set, game sessions can be placed in any queue location. To remove an existing filter configuration, pass in an empty set.

  • priority_configuration (Optional[PriorityConfiguration], default: None ) –

    Custom settings to use when prioritizing destinations and locations for game session placements. This configuration replaces the FleetIQ default prioritization process. Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. To remove an existing priority configuration, pass in an empty set.

  • custom_event_data (Optional[QueueCustomEventData], default: None ) –

    Information to be added to all events that are related to this game session queue.

  • notification_target (Optional[QueueSnsArnStringModel], default: None ) –

    An SNS topic ARN that is set up to receive game session placement notifications. See Setting up notifications for game session placement.

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.

  • UnknownServiceError –

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

Source code in docs_src/capo_gamelift/_services/async_game_lift.py
async def update_game_session_queue(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    name: Optional[
        "capo_gamelift.types.game_session_queue_name_or_arn.GameSessionQueueNameOrArn"
    ] = None,
    timeout_in_seconds: Optional[
        "capo_gamelift.types.whole_number.WholeNumber"
    ] = None,
    player_latency_policies: Optional[
        "capo_gamelift.types.player_latency_policy_list.PlayerLatencyPolicyList"
    ] = None,
    destinations: Optional[
        "capo_gamelift.types.game_session_queue_destination_list.GameSessionQueueDestinationList"
    ] = None,
    filter_configuration: Optional[
        "capo_gamelift.types.filter_configuration.FilterConfiguration"
    ] = None,
    priority_configuration: Optional[
        "capo_gamelift.types.priority_configuration.PriorityConfiguration"
    ] = None,
    custom_event_data: Optional[
        "capo_gamelift.types.queue_custom_event_data.QueueCustomEventData"
    ] = None,
    notification_target: Optional[
        "capo_gamelift.types.queue_sns_arn_string_model.QueueSnsArnStringModel"
    ] = None,
) -> "capo_gamelift.types.update_game_session_queue_output.UpdateGameSessionQueueOutput":
    """<p> <b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p> <p>Updates the configuration of a game session queue, which determines how the queue processes new game session requests. To update settings, specify the queue name to be updated and provide the new settings. When updating destinations, provide a complete list of destinations. </p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html"> Using Multi-Region Queues</a> </p>

    Args:
        name: <p>A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value. </p>
        timeout_in_seconds: <p>The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a <code>TIMED_OUT</code> status.</p> <note> <p>The minimum value is 10 and the maximum value is 600.</p> </note>
        player_latency_policies: <p>A set of policies that enforce a sliding cap on player latency when processing game sessions placement requests. Use multiple policies to gradually relax the cap over time if Amazon GameLift Servers can't make a placement. Policies are evaluated in order starting with the lowest maximum latency value. When updating policies, provide a complete collection of policies.</p>
        destinations: <p>A list of fleets and/or fleet aliases that can be used to fulfill game session placement requests in the queue. Destinations are identified by either a fleet ARN or a fleet alias ARN, and are listed in order of placement preference. When updating this list, provide a complete list of destinations.</p>
        filter_configuration: <p>A list of locations where a queue is allowed to place new game sessions. Locations are specified in the form of Amazon Web Services Region codes, such as <code>us-west-2</code>. If this parameter is not set, game sessions can be placed in any queue location. To remove an existing filter configuration, pass in an empty set.</p>
        priority_configuration: <p>Custom settings to use when prioritizing destinations and locations for game session placements. This configuration replaces the FleetIQ default prioritization process. Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. To remove an existing priority configuration, pass in an empty set.</p>
        custom_event_data: <p>Information to be added to all events that are related to this game session queue.</p>
        notification_target: <p>An SNS topic ARN that is set up to receive game session placement notifications. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html"> Setting up notifications for game session placement</a>.</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gamelift.types.update_game_session_queue_input.UpdateGameSessionQueueInput]",
    ) -> AsyncOperationResponse[
        "capo_gamelift.types.update_game_session_queue_output.UpdateGameSessionQueueOutput"
    ]:
        import capo_gamelift._operations.game_lift.update_game_session_queue

        (
            output,
            http_response,
        ) = await capo_gamelift._operations.game_lift.update_game_session_queue.async_update_game_session_queue(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_gamelift.types.update_game_session_queue_input.UpdateGameSessionQueueInput",
    ) -> dict[str, Any]:
        import capo_gamelift.types.update_game_session_queue_input

        return capo_gamelift.types.update_game_session_queue_input.redact_sensitive(
            input_
        )

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

        return (
            capo_gamelift.types.update_game_session_queue_output.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateGameSessionQueue",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_gamelift.types.update_game_session_queue_input.UpdateGameSessionQueueInput = {}
    if name is not None:
        input_["name"] = name
    if timeout_in_seconds is not None:
        input_["timeout_in_seconds"] = timeout_in_seconds
    if player_latency_policies is not None:
        input_["player_latency_policies"] = player_latency_policies
    if destinations is not None:
        input_["destinations"] = destinations
    if filter_configuration is not None:
        input_["filter_configuration"] = filter_configuration
    if priority_configuration is not None:
        input_["priority_configuration"] = priority_configuration
    if custom_event_data is not None:
        input_["custom_event_data"] = custom_event_data
    if notification_target is not None:
        input_["notification_target"] = notification_target

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output