update_game_session
¶
update_game_session(
*,
config_overrides: Optional[GameLiftClientConfig] = None,
game_session_id: Optional[ArnStringModel] = None,
maximum_player_session_count: Optional[WholeNumber] = None,
name: Optional[NonZeroAndMaxString] = None,
player_session_creation_policy: Optional[PlayerSessionCreationPolicy] = None,
protection_policy: Optional[ProtectionPolicy] = None,
game_properties: Optional[GamePropertyList] = None,
) -> UpdateGameSessionOutput
This API works with the following fleet types: EC2, Anywhere, Container
Updates the mutable properties of a game session.
To update a game session, specify the game session ID and the values you want to change.
If successful, the updated GameSession object is returned.
Parameters:
-
game_session_id(Optional[ArnStringModel], default:None) –An identifier for the game session that is unique across all regions to update. The value is always a full ARN in the following format: For Home Region game session -
arn:aws:gamelift:. For Remote Location game session -::gamesession/ / arn:aws:gamelift:.::gamesession/ / / -
maximum_player_session_count(Optional[WholeNumber], default:None) –The maximum number of players that can be connected simultaneously to the game session.
-
name(Optional[NonZeroAndMaxString], default:None) –A descriptive label that is associated with a game session. Session names do not need to be unique.
-
player_session_creation_policy(Optional[PlayerSessionCreationPolicy], default:None) –A policy that determines whether the game session is accepting new players.
-
protection_policy(Optional[ProtectionPolicy], default:None) –Game session protection policy to apply to this game session only.
-
NoProtection-- The game session can be terminated during a scale-down event. -
FullProtection-- If the game session is in anACTIVEstatus, it cannot be terminated during a scale-down event.
-
-
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"}. You can use this parameter to modify game properties in an active game session. This action adds new properties and modifies existing properties. There is no way to delete properties. For an example, see Update the value of a game property.-
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.
-
Raises:
-
ConflictException–The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
-
InternalServiceException–The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
InvalidGameSessionStatusException–The requested operation would cause a conflict with the current state of a resource associated with the request and/or the game instance. Resolve the conflict before retrying.
-
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.
-
NotReadyException–The operation failed because Amazon GameLift Servers has not yet finished validating this compute. We recommend attempting 8 to 10 retries over 3 to 5 minutes with exponential backoffs and jitter.
-
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/game_lift.py
9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 | |