Skip to content

update_matchmaking_configuration async

update_matchmaking_configuration(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    name: Optional[MatchmakingConfigurationName] = None,
    description: Optional[NonZeroAndMaxString] = None,
    game_session_queue_arns: Optional[QueueArnsList] = None,
    request_timeout_seconds: Optional[MatchmakingRequestTimeoutInteger] = None,
    acceptance_timeout_seconds: Optional[MatchmakingAcceptanceTimeoutInteger] = None,
    acceptance_required: Optional[BooleanModel] = None,
    rule_set_name: Optional[MatchmakingRuleSetName] = None,
    notification_target: Optional[SnsArnStringModel] = None,
    additional_player_count: Optional[WholeNumber] = None,
    custom_event_data: Optional[CustomEventData] = None,
    game_properties: Optional[GamePropertyList] = None,
    game_session_data: Optional[GameSessionData] = None,
    backfill_mode: Optional[BackfillMode] = None,
    flex_match_mode: Optional[FlexMatchMode] = None,
) -> UpdateMatchmakingConfigurationOutput

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

Updates settings for a FlexMatch matchmaking configuration. These changes affect all matches and game sessions that are created after the update. To update settings, specify the configuration name to be updated and provide the new settings.

Learn more

Design a FlexMatch matchmaker

Parameters:

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

    A unique identifier for the matchmaking configuration to update. You can use either the configuration name or ARN value.

  • description (Optional[NonZeroAndMaxString], default: None ) –

    A description for the matchmaking configuration.

  • game_session_queue_arns (Optional[QueueArnsList], default: None ) –

    The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift Servers game session queue resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:::gamesessionqueue/. Queues can be located in any Region. Queues are used to start new Amazon GameLift Servers-hosted game sessions for matches that are created with this matchmaking configuration. A matchmaking configuration supports only one queue; if you specify more than one ARN, the request fails with an InvalidRequestException. If FlexMatchMode is set to STANDALONE, do not set this parameter.

  • request_timeout_seconds (Optional[MatchmakingRequestTimeoutInteger], default: None ) –

    The maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

  • acceptance_timeout_seconds (Optional[MatchmakingAcceptanceTimeoutInteger], default: None ) –

    The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required.

  • acceptance_required (Optional[BooleanModel], default: None ) –

    A flag that indicates whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE. With this option enabled, matchmaking tickets use the status REQUIRES_ACCEPTANCE to indicate when a completed potential match is waiting for player acceptance.

  • rule_set_name (Optional[MatchmakingRuleSetName], default: None ) –

    A unique identifier for the matchmaking rule set to use with this configuration. You can use either the rule set name or ARN value. A matchmaking configuration can only use rule sets that are defined in the same Region.

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

    An SNS topic ARN that is set up to receive matchmaking notifications. See Setting up notifications for matchmaking for more information.

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

    The number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match. This parameter is not used if FlexMatchMode is set to STANDALONE.

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

    Information to add to all events related to the matchmaking configuration.

  • game_properties (Optional[GamePropertyList], default: None ) –

    A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}. This information is added to the new GameSession object that is created for a successful match. This parameter is not used if FlexMatchMode is set to STANDALONE.

    • Avoid using periods (".") in property keys if you plan to search for game sessions by properties. Property keys containing periods cannot be searched and will be filtered out from search results due to search index limitations.

    • If you use SearchGameSessions API, there is a limit of 500 game property keys across all game sessions and all fleets per region. If the limit is exceeded, there will potentially be game session entries missing from SearchGameSessions API results.

  • game_session_data (Optional[GameSessionData], default: None ) –

    A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session. This information is added to the game session that is created for a successful match. This parameter is not used if FlexMatchMode is set to STANDALONE.

  • backfill_mode (Optional[BackfillMode], default: None ) –

    The method that is used to backfill game sessions created with this matchmaking configuration. Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a match backfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch. Automatic backfill is not available when FlexMatchMode is set to STANDALONE.

  • flex_match_mode (Optional[FlexMatchMode], default: None ) –

    Indicates whether this matchmaking configuration is being used with Amazon GameLift Servers hosting or as a standalone matchmaking solution.

    • STANDALONE - FlexMatch forms matches and returns match information, including players and team assignments, in a MatchmakingSucceeded event.

    • WITH_QUEUE - FlexMatch forms matches and uses the specified Amazon GameLift Servers queue to start a game session for the match.

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.

  • 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/async_game_lift.py
async def update_matchmaking_configuration(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    name: Optional[
        "capo_gamelift.types.matchmaking_configuration_name.MatchmakingConfigurationName"
    ] = None,
    description: Optional[
        "capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
    ] = None,
    game_session_queue_arns: Optional[
        "capo_gamelift.types.queue_arns_list.QueueArnsList"
    ] = None,
    request_timeout_seconds: Optional[
        "capo_gamelift.types.matchmaking_request_timeout_integer.MatchmakingRequestTimeoutInteger"
    ] = None,
    acceptance_timeout_seconds: Optional[
        "capo_gamelift.types.matchmaking_acceptance_timeout_integer.MatchmakingAcceptanceTimeoutInteger"
    ] = None,
    acceptance_required: Optional[
        "capo_gamelift.types.boolean_model.BooleanModel"
    ] = None,
    rule_set_name: Optional[
        "capo_gamelift.types.matchmaking_rule_set_name.MatchmakingRuleSetName"
    ] = None,
    notification_target: Optional[
        "capo_gamelift.types.sns_arn_string_model.SnsArnStringModel"
    ] = None,
    additional_player_count: Optional[
        "capo_gamelift.types.whole_number.WholeNumber"
    ] = None,
    custom_event_data: Optional[
        "capo_gamelift.types.custom_event_data.CustomEventData"
    ] = None,
    game_properties: Optional[
        "capo_gamelift.types.game_property_list.GamePropertyList"
    ] = None,
    game_session_data: Optional[
        "capo_gamelift.types.game_session_data.GameSessionData"
    ] = None,
    backfill_mode: Optional[
        "capo_gamelift.types.backfill_mode.BackfillMode"
    ] = None,
    flex_match_mode: Optional[
        "capo_gamelift.types.flex_match_mode.FlexMatchMode"
    ] = None,
) -> "capo_gamelift.types.update_matchmaking_configuration_output.UpdateMatchmakingConfigurationOutput":
    """<p> <b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p> <p>Updates settings for a FlexMatch matchmaking configuration. These changes affect all matches and game sessions that are created after the update. To update settings, specify the configuration name to be updated and provide the new settings. </p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-configuration.html"> Design a FlexMatch matchmaker</a> </p>

    Args:
        name: <p>A unique identifier for the matchmaking configuration to update. You can use either the configuration name or ARN value. </p>
        description: <p>A description for the matchmaking configuration.</p>
        game_session_queue_arns: <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a Amazon GameLift Servers game session queue resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:<region>::gamesessionqueue/<queue name></code>. Queues can be located in any Region. Queues are used to start new Amazon GameLift Servers-hosted game sessions for matches that are created with this matchmaking configuration. A matchmaking configuration supports only one queue; if you specify more than one ARN, the request fails with an <code>InvalidRequestException</code>. If <code>FlexMatchMode</code> is set to <code>STANDALONE</code>, do not set this parameter.</p>
        request_timeout_seconds: <p>The maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.</p>
        acceptance_timeout_seconds: <p>The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required.</p>
        acceptance_required: <p>A flag that indicates whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE. With this option enabled, matchmaking tickets use the status <code>REQUIRES_ACCEPTANCE</code> to indicate when a completed potential match is waiting for player acceptance. </p>
        rule_set_name: <p>A unique identifier for the matchmaking rule set to use with this configuration. You can use either the rule set name or ARN value. A matchmaking configuration can only use rule sets that are defined in the same Region.</p>
        notification_target: <p>An SNS topic ARN that is set up to receive matchmaking notifications. See <a href="https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html"> Setting up notifications for matchmaking</a> for more information.</p>
        additional_player_count: <p>The number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match. This parameter is not used if <code>FlexMatchMode</code> is set to <code>STANDALONE</code>.</p>
        custom_event_data: <p>Information to add to all events related to the matchmaking configuration. </p>
        game_properties: <p>A set of key-value pairs that can store custom data in a game session. For example: <code>{"Key": "difficulty", "Value": "novice"}</code>. This information is added to the new <code>GameSession</code> object that is created for a successful match. This parameter is not used if <code>FlexMatchMode</code> is set to <code>STANDALONE</code>.</p> <note> <ul> <li> <p>Avoid using periods (".") in property keys if you plan to search for game sessions by properties. Property keys containing periods cannot be searched and will be filtered out from search results due to search index limitations.</p> </li> <li> <p>If you use SearchGameSessions API, there is a limit of 500 game property keys across all game sessions and all fleets per region. If the limit is exceeded, there will potentially be game session entries missing from SearchGameSessions API results.</p> </li> </ul> </note>
        game_session_data: <p>A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession">Start a game session</a>. This information is added to the game session that is created for a successful match. This parameter is not used if <code>FlexMatchMode</code> is set to <code>STANDALONE</code>.</p>
        backfill_mode: <p>The method that is used to backfill game sessions created with this matchmaking configuration. Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a match backfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in <a href="https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html">Backfill Existing Games with FlexMatch</a>. Automatic backfill is not available when <code>FlexMatchMode</code> is set to <code>STANDALONE</code>.</p>
        flex_match_mode: <p>Indicates whether this matchmaking configuration is being used with Amazon GameLift Servers hosting or as a standalone matchmaking solution. </p> <ul> <li> <p> <b>STANDALONE</b> - FlexMatch forms matches and returns match information, including players and team assignments, in a <a href="https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-events.html#match-events-matchmakingsucceeded"> MatchmakingSucceeded</a> event.</p> </li> <li> <p> <b>WITH_QUEUE</b> - FlexMatch forms matches and uses the specified Amazon GameLift Servers queue to start a game session for the match. </p> </li> </ul>

    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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gamelift.types.update_matchmaking_configuration_input.UpdateMatchmakingConfigurationInput]",
    ) -> AsyncOperationResponse[
        "capo_gamelift.types.update_matchmaking_configuration_output.UpdateMatchmakingConfigurationOutput"
    ]:
        import capo_gamelift._operations.game_lift.update_matchmaking_configuration

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

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

        return capo_gamelift.types.update_matchmaking_configuration_input.redact_sensitive(
            input_
        )

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

        return capo_gamelift.types.update_matchmaking_configuration_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateMatchmakingConfiguration",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_gamelift.types.update_matchmaking_configuration_input.UpdateMatchmakingConfigurationInput = {}
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if game_session_queue_arns is not None:
        input_["game_session_queue_arns"] = game_session_queue_arns
    if request_timeout_seconds is not None:
        input_["request_timeout_seconds"] = request_timeout_seconds
    if acceptance_timeout_seconds is not None:
        input_["acceptance_timeout_seconds"] = acceptance_timeout_seconds
    if acceptance_required is not None:
        input_["acceptance_required"] = acceptance_required
    if rule_set_name is not None:
        input_["rule_set_name"] = rule_set_name
    if notification_target is not None:
        input_["notification_target"] = notification_target
    if additional_player_count is not None:
        input_["additional_player_count"] = additional_player_count
    if custom_event_data is not None:
        input_["custom_event_data"] = custom_event_data
    if game_properties is not None:
        input_["game_properties"] = game_properties
    if game_session_data is not None:
        input_["game_session_data"] = game_session_data
    if backfill_mode is not None:
        input_["backfill_mode"] = backfill_mode
    if flex_match_mode is not None:
        input_["flex_match_mode"] = flex_match_mode

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