list_compute
¶
list_compute(
*,
config_overrides: Optional[GameLiftClientConfig] = None,
fleet_id: Optional[FleetIdOrArn] = None,
location: Optional[LocationStringModel] = None,
container_group_definition_name: Optional[ContainerGroupDefinitionNameOrArn] = None,
compute_status: Optional[ListComputeInputStatus] = None,
limit: Optional[PositiveInteger] = None,
next_token: Optional[NonZeroAndMaxString] = None,
) -> ListComputeOutput
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves information on the compute resources in an Amazon GameLift Servers fleet. Use the pagination parameters to retrieve results in a set of sequential pages.
Request options
-
Retrieve a list of all computes in a fleet. Specify a fleet ID.
-
Retrieve a list of all computes in a specific fleet location. Specify a fleet ID and location.
Results
If successful, this operation returns information on a set of computes. Depending on the type of fleet, the result includes the following information:
-
For a managed EC2 fleet (compute type
EC2), this operation returns information about the EC2 instance. Compute names are EC2 instance IDs. -
For an Anywhere fleet (compute type
ANYWHERE), this operation returns compute names and details from when the compute was registered withRegisterCompute. This includesGameLiftServiceSdkEndpointorGameLiftAgentEndpoint.
Parameters:
-
fleet_id(Optional[FleetIdOrArn], default:None) –A unique identifier for the fleet to retrieve compute resources for.
-
location(Optional[LocationStringModel], default:None) –The name of a location to retrieve compute resources for. For an Amazon GameLift Servers Anywhere fleet, use a custom location. For a managed fleet, provide a Amazon Web Services Region or Local Zone code (for example:
us-west-2orus-west-2-lax-1). -
container_group_definition_name(Optional[ContainerGroupDefinitionNameOrArn], default:None) –For computes in a managed container fleet, the name of the deployed container group definition.
-
compute_status(Optional[ListComputeInputStatus], default:None) –The status of computes in a managed container fleet, based on the success of the latest update deployment.
-
ACTIVE-- The compute is deployed with the correct container definitions. It is ready to process game servers and host game sessions. -
IMPAIRED-- An update deployment to the compute failed, and the compute is deployed with incorrect container definitions.
-
-
limit(Optional[PositiveInteger], default:None) –The maximum number of results to return. Use this parameter with
NextTokento get results as a set of sequential pages. -
next_token(Optional[NonZeroAndMaxString], default:None) –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.
Raises:
-
InternalServiceException–The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
InvalidRequestException–One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
-
UnauthorizedException–The client failed authentication. Clients should not retry such requests.
-
UnsupportedRegionException–The requested operation is not supported in the Region specified.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_gamelift/_services/game_lift.py
7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 | |