update_game_session
async
¶
update_game_session(
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = 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/async_game_lift.py
9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 | |