GameLift / Client / describe_fleet_attributes
describe_fleet_attributes#
- GameLift.Client.describe_fleet_attributes(**kwargs)#
Retrieves core fleet-wide properties for fleets in an Amazon Web Services Region. Properties include the computing hardware and deployment configuration for instances in the fleet.
You can use this operation in the following ways:
To get attributes for specific fleets, provide a list of fleet IDs or fleet ARNs.
To get attributes for all fleets, do not provide a fleet identifier.
When requesting attributes for multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a
FleetAttributes
object is returned for each fleet requested, unless the fleet identifier is not found.Note
Some API operations limit the number of fleet IDs that allowed in one request. If a request exceeds this limit, the request fails and the error message contains the maximum allowed number.
Learn more
Setting up Amazon GameLift fleets
See also: AWS API Documentation
Request Syntax
response = client.describe_fleet_attributes( FleetIds=[ 'string', ], Limit=123, NextToken='string' )
- Parameters:
FleetIds (list) –
A list of unique fleet identifiers to retrieve attributes for. You can use either the fleet ID or ARN value. To retrieve attributes for all current fleets, do not include this parameter.
(string) –
Limit (integer) – The maximum number of results to return. Use this parameter with
NextToken
to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.NextToken (string) – A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.
- Return type:
dict
- Returns:
Response Syntax
{ 'FleetAttributes': [ { 'FleetId': 'string', 'FleetArn': 'string', 'FleetType': 'ON_DEMAND'|'SPOT', 'InstanceType': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'r7g.medium'|'r7g.large'|'r7g.xlarge'|'r7g.2xlarge'|'r7g.4xlarge'|'r7g.8xlarge'|'r7g.12xlarge'|'r7g.16xlarge'|'m7g.medium'|'m7g.large'|'m7g.xlarge'|'m7g.2xlarge'|'m7g.4xlarge'|'m7g.8xlarge'|'m7g.12xlarge'|'m7g.16xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge', 'Description': 'string', 'Name': 'string', 'CreationTime': datetime(2015, 1, 1), 'TerminationTime': datetime(2015, 1, 1), 'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND', 'BuildId': 'string', 'BuildArn': 'string', 'ScriptId': 'string', 'ScriptArn': 'string', 'ServerLaunchPath': 'string', 'ServerLaunchParameters': 'string', 'LogPaths': [ 'string', ], 'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection', 'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'WINDOWS_2016'|'AMAZON_LINUX_2023', 'ResourceCreationLimitPolicy': { 'NewGameSessionsPerCreator': 123, 'PolicyPeriodInMinutes': 123 }, 'MetricGroups': [ 'string', ], 'StoppedActions': [ 'AUTO_SCALING', ], 'InstanceRoleArn': 'string', 'CertificateConfiguration': { 'CertificateType': 'DISABLED'|'GENERATED' }, 'ComputeType': 'EC2'|'ANYWHERE', 'AnywhereConfiguration': { 'Cost': 'string' }, 'InstanceRoleCredentialsProvider': 'SHARED_CREDENTIAL_FILE' }, ], 'NextToken': 'string' }
Response Structure
(dict) –
FleetAttributes (list) –
A collection of objects containing attribute metadata for each requested fleet ID. Attribute objects are returned only for fleets that currently exist.
(dict) –
Describes an Amazon GameLift fleet of game hosting resources. Attributes differ based on the fleet’s compute type, as follows:
EC2 fleet attributes identify a
Build
resource (for fleets with customer game server builds) or aScript
resource (for Realtime Servers fleets).Amazon GameLift Anywhere fleets have an abbreviated set of attributes, because most fleet configurations are set directly on the fleet’s computes. Attributes include fleet identifiers and descriptive properties, creation/termination time, and fleet status.
Returned by: DescribeFleetAttributes
FleetId (string) –
A unique identifier for the fleet.
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
. In a GameLift fleet ARN, the resource ID matches theFleetId
value.FleetType (string) –
Indicates whether the fleet uses On-Demand or Spot instances. For more information, see On-Demand versus Spot Instances. This fleet property can’t be changed after the fleet is created.
InstanceType (string) –
The Amazon EC2 instance type that the fleet uses. Instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions. This attribute is used with fleets where
ComputeType
is “EC2”.Description (string) –
A human-readable description of the fleet.
Name (string) –
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
CreationTime (datetime) –
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).TerminationTime (datetime) –
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).Status (string) –
Current status of the fleet. Possible fleet statuses include the following:
NEW – A new fleet resource has been defined and Amazon GameLift has started creating the fleet. Desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING – Amazon GameLift is download the game server build, running install scripts, and then validating the build files. When complete, Amazon GameLift launches a fleet instance.
ACTIVATING – Amazon GameLift is launching a game server process and testing its connectivity with the Amazon GameLift service.
ACTIVE – The fleet is now ready to host game sessions.
ERROR – An error occurred when downloading, validating, building, or activating the fleet.
DELETING – Hosts are responding to a delete fleet request.
TERMINATED – The fleet no longer exists.
BuildId (string) –
A unique identifier for the build resource that is deployed on instances in this fleet. This attribute is used with fleets where
ComputeType
is “EC2”.BuildArn (string) –
The Amazon Resource Name ( ARN) associated with the Amazon GameLift build resource that is deployed on instances in this fleet. In a GameLift build ARN, the resource ID matches the
BuildId
value. This attribute is used with fleets whereComputeType
is “EC2”.ScriptId (string) –
A unique identifier for the Realtime script resource that is deployed on instances in this fleet. This attribute is used with fleets where
ComputeType
is “EC2”.ScriptArn (string) –
The Amazon Resource Name ( ARN) associated with the GameLift script resource that is deployed on instances in this fleet. In a GameLift script ARN, the resource ID matches the
ScriptId
value.ServerLaunchPath (string) –
This parameter is no longer used. Server launch paths are now defined using the fleet’s RuntimeConfiguration. Requests that use this parameter continue to be valid.
ServerLaunchParameters (string) –
This parameter is no longer used. Server launch parameters are now defined using the fleet’s runtime configuration. Requests that use this parameter continue to be valid.
LogPaths (list) –
This parameter is no longer used. Game session log paths are now defined using the Amazon GameLift server API
ProcessReady()
logParameters
. See more information in the Server API Reference.(string) –
NewGameSessionProtectionPolicy (string) –
The type of game session protection to set on all new instances that are started in the fleet. This attribute is used with fleets where
ComputeType
is “EC2”.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.
OperatingSystem (string) –
The operating system of the fleet’s computing resources. A fleet’s operating system is determined by the OS of the build or script that is deployed on this fleet. This attribute is used with fleets where
ComputeType
is “EC2”.Note
Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the Amazon Linux 2 FAQs. For game servers that are hosted on AL2 and use Amazon GameLift server SDK 4.x, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to Amazon GameLift server SDK version 5.
ResourceCreationLimitPolicy (dict) –
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.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) –
Name of a metric group that metrics for this fleet are added to. In Amazon CloudWatch, you can view aggregated metrics for fleets that are in a metric group. A fleet can be included in only one metric group at a time. This attribute is used with fleets where
ComputeType
is “EC2”.(string) –
StoppedActions (list) –
A list of fleet activity that has been suspended using StopFleetActions. This includes fleet auto-scaling. This attribute is used with fleets where
ComputeType
is “EC2”.(string) –
InstanceRoleArn (string) –
A unique identifier for an IAM role that manages access to your Amazon Web Services services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role’s ARN by using the IAM dashboard in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server. This attribute is used with fleets where
ComputeType
is “EC2”.CertificateConfiguration (dict) –
Determines whether a TLS/SSL certificate is generated for a fleet. This feature must be enabled when creating the fleet. All instances in a fleet share the same certificate.
CertificateType (string) –
Indicates whether a TLS/SSL certificate is generated for a fleet.
Valid values include:
GENERATED – Generate a TLS/SSL certificate for this fleet.
DISABLED – (default) Do not generate a TLS/SSL certificate for this fleet.
ComputeType (string) –
The type of compute resource used to host your game servers. You can use your own compute resources with Amazon GameLift Anywhere or use Amazon EC2 instances with managed Amazon GameLift.
AnywhereConfiguration (dict) –
Amazon GameLift Anywhere configuration options.
Cost (string) –
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.
InstanceRoleCredentialsProvider (string) –
Indicates that fleet instances maintain a shared credentials file for the IAM role defined in
InstanceRoleArn
. Shared credentials allow applications that are deployed with the game server executable to communicate with other Amazon Web Services resources. This property is used only when the game server is integrated with the server SDK version 5.x. For more information about using shared credentials, see Communicate with other Amazon Web Services resources from your fleets. This attribute is used with fleets whereComputeType
is “EC2”.
NextToken (string) –
A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list.
Exceptions
GameLift.Client.exceptions.InternalServiceException
GameLift.Client.exceptions.NotFoundException
GameLift.Client.exceptions.InvalidRequestException
GameLift.Client.exceptions.UnauthorizedException