GameLift / Client / update_fleet_attributes
update_fleet_attributes#
- GameLift.Client.update_fleet_attributes(**kwargs)#
Updates a fleet’s mutable attributes, such as game session protection and resource creation limits.
To update fleet attributes, specify the fleet ID and the property values that you want to change. If successful, Amazon GameLift returns the identifiers for the updated fleet.
Learn more
Setting up Amazon GameLift fleets
See also: AWS API Documentation
Request Syntax
response = client.update_fleet_attributes( FleetId='string', Name='string', Description='string', NewGameSessionProtectionPolicy='NoProtection'|'FullProtection', ResourceCreationLimitPolicy={ 'NewGameSessionsPerCreator': 123, 'PolicyPeriodInMinutes': 123 }, MetricGroups=[ 'string', ], AnywhereConfiguration={ 'Cost': 'string' } )
- Parameters:
FleetId (string) –
[REQUIRED]
A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value.
Name (string) – A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
Description (string) – A human-readable description of a fleet.
NewGameSessionProtectionPolicy (string) –
The game session protection policy to apply to all new game sessions created in this fleet. Game sessions that already exist are not affected. You can set protection for individual game sessions using UpdateGameSession .
NoProtection – The game session can be terminated during a scale-down event.
FullProtection – If the game session is in an
ACTIVE
status, it cannot be terminated during a scale-down event.
ResourceCreationLimitPolicy (dict) –
Policy settings that limit the number of game sessions an individual player can create over a span of time.
NewGameSessionsPerCreator (integer) –
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players’ ability to consume available resources.
The policy is evaluated when a player tries to create a new game session. On receiving a
CreateGameSession
request, Amazon GameLift checks that the player (identified byCreatorId
) has created fewer than game session limit in the specified time period.PolicyPeriodInMinutes (integer) –
The time span used in evaluating the resource creation limit policy.
MetricGroups (list) –
The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new name. A fleet can only be in one metric group at a time.
(string) –
AnywhereConfiguration (dict) –
Amazon GameLift Anywhere configuration options.
Cost (string) – [REQUIRED]
The cost to run your fleet per hour. Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Developer Guide.
- Return type:
dict
- Returns:
Response Syntax
{ 'FleetId': 'string', 'FleetArn': 'string' }
Response Structure
(dict) –
FleetId (string) –
A unique identifier for the fleet that was updated.
FleetArn (string) –
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is
arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
.
Exceptions
GameLift.Client.exceptions.NotFoundException
GameLift.Client.exceptions.ConflictException
GameLift.Client.exceptions.InvalidFleetStatusException
GameLift.Client.exceptions.LimitExceededException
GameLift.Client.exceptions.InternalServiceException
GameLift.Client.exceptions.InvalidRequestException
GameLift.Client.exceptions.UnauthorizedException