UpdateFleetAttributes - GameLift Service

UpdateFleetAttributes

Updates a fleet's mutable attributes, including 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, an updated FleetAttributes object is returned.

Learn more

Setting up GameLift fleets

Related actions

CreateFleetLocations | UpdateFleetAttributes | UpdateFleetCapacity | UpdateFleetPortSettings | UpdateRuntimeConfiguration | StopFleetActions | StartFleetActions | PutScalingPolicy | DeleteFleet | DeleteFleetLocations | DeleteScalingPolicy | All APIs by task

Request Syntax

{ "Description": "string", "FleetId": "string", "MetricGroups": [ "string" ], "Name": "string", "NewGameSessionProtectionPolicy": "string", "ResourceCreationLimitPolicy": { "NewGameSessionsPerCreator": number, "PolicyPeriodInMinutes": number } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

FleetId

A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value.

Type: String

Pattern: ^fleet-\S+|^arn:.*:fleet\/fleet-\S+

Required: Yes

Description

A human-readable description of a fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

MetricGroups

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.

Type: Array of strings

Array Members: Maximum number of 1 item.

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

Name

A descriptive label that is associated with a fleet. Fleet names do not need to be unique.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

NewGameSessionProtectionPolicy

The game session protection policy to apply to all new instances created in this fleet. Instances that already exist are not affected. You can set protection for individual instances 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.

Type: String

Valid Values: NoProtection | FullProtection

Required: No

ResourceCreationLimitPolicy

Policy settings that limit the number of game sessions an individual player can create over a span of time.

Type: ResourceCreationLimitPolicy object

Required: No

Response Syntax

{ "FleetId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

FleetId

A unique identifier for the fleet that was updated.

Type: String

Pattern: ^fleet-\S+

Errors

For information about the errors that are common to all actions, see Common Errors.

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.

HTTP Status Code: 400

InternalServiceException

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

HTTP Status Code: 500

InvalidFleetStatusException

The requested operation would cause a conflict with the current state of a resource associated with the request and/or the fleet. Resolve the conflict before retrying.

HTTP Status Code: 400

InvalidRequestException

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

HTTP Status Code: 400

LimitExceededException

The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.

HTTP Status Code: 400

NotFoundException

A service resource associated with the request could not be found. Clients should not retry such requests.

HTTP Status Code: 400

UnauthorizedException

The client failed authentication. Clients should not retry such requests.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: