update_container_fleet
async
¶
update_container_fleet(
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = None,
fleet_id: Optional[FleetIdOrArn] = None,
game_server_container_group_definition_name: Optional[
ContainerGroupDefinitionNameOrArn
] = None,
per_instance_container_group_definition_name: Optional[
ContainerGroupDefinitionNameOrArn
] = None,
game_server_container_groups_per_instance: Optional[
GameServerContainerGroupsPerInstance
] = None,
instance_connection_port_range: Optional[ConnectionPortRange] = None,
instance_inbound_permission_authorizations: Optional[IpPermissionsList] = None,
instance_inbound_permission_revocations: Optional[IpPermissionsList] = None,
deployment_configuration: Optional[DeploymentConfiguration] = None,
description: Optional[NonZeroAndMaxString] = None,
metric_groups: Optional[MetricGroupList] = None,
new_game_session_protection_policy: Optional[ProtectionPolicy] = None,
game_session_creation_limit_policy: Optional[GameSessionCreationLimitPolicy] = None,
log_configuration: Optional[LogConfiguration] = None,
remove_attributes: Optional[ContainerFleetRemoveAttributeList] = None,
) -> UpdateContainerFleetOutput
This API works with the following fleet types: Container
Updates the properties of a managed container fleet. Depending on the properties being updated, this operation might initiate a fleet deployment. You can track deployments for a fleet using https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetDeployment.html.
A managed fleet's runtime environment, which depends on the fleet's Amazon Machine Image (AMI) version, can't be updated. You must create a new fleet. As a best practice, we recommend replacing your managed fleets every 30 days to maintain a secure and up-to-date runtime environment for your hosted game servers. For guidance, see Security best practices for Amazon GameLift Servers.
Request options
As with CreateContainerFleet, many fleet properties use common defaults or are calculated based on the fleet's container group definitions.
-
Update fleet properties that result in a fleet deployment. Include only those properties that you want to change. Specify deployment configuration settings.
-
Update fleet properties that don't result in a fleet deployment. Include only those properties that you want to change.
Changes to the following properties initiate a fleet deployment:
-
GameServerContainerGroupDefinition -
PerInstanceContainerGroupDefinition -
GameServerContainerGroupsPerInstance -
InstanceInboundPermissions -
InstanceConnectionPortRange -
LogConfiguration
Results
If successful, this operation updates the container fleet resource, and might initiate a new deployment of fleet resources using the deployment configuration provided. A deployment replaces existing fleet instances with new instances that are deployed with the updated fleet properties. The fleet is placed in UPDATING status until the deployment is complete, then returns to ACTIVE.
You can have only one update deployment active at a time for a fleet. If a second update request initiates a deployment while another deployment is in progress, the first deployment is cancelled.
Parameters:
-
fleet_id(Optional[FleetIdOrArn], default:None) –A unique identifier for the container fleet to update. You can use either the fleet ID or ARN value.
-
game_server_container_group_definition_name(Optional[ContainerGroupDefinitionNameOrArn], default:None) –The name or ARN value of a new game server container group definition to deploy on the fleet. If you're updating the fleet to a specific version of a container group definition, use the ARN value and include the version number. If you're updating the fleet to the latest version of a container group definition, you can use the name value. You can't remove a fleet's game server container group definition, you can only update or replace it with another definition.
Update a container group definition by calling UpdateContainerGroupDefinition. This operation creates a ContainerGroupDefinition resource with an incremented version.
-
per_instance_container_group_definition_name(Optional[ContainerGroupDefinitionNameOrArn], default:None) –The name or ARN value of a new per-instance container group definition to deploy on the fleet. If you're updating the fleet to a specific version of a container group definition, use the ARN value and include the version number. If you're updating the fleet to the latest version of a container group definition, you can use the name value.
Update a container group definition by calling UpdateContainerGroupDefinition. This operation creates a ContainerGroupDefinition resource with an incremented version.
To remove a fleet's per-instance container group definition, leave this parameter empty and use the parameter
RemoveAttributes. -
game_server_container_groups_per_instance(Optional[GameServerContainerGroupsPerInstance], default:None) –The number of times to replicate the game server container group on each fleet instance. By default, Amazon GameLift Servers calculates the maximum number of game server container groups that can fit on each instance. You can remove this property value to use the calculated value, or set it manually. If you set this number manually, Amazon GameLift Servers uses your value as long as it's less than the calculated maximum.
-
instance_connection_port_range(Optional[ConnectionPortRange], default:None) –A revised set of port numbers to open on each fleet instance. By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. If you previously set this parameter manually, you can't reset this to use the calculated settings.
The port range must not overlap with the Amazon GameLift Servers reserved port range
4092-4191. This range is reserved for internal Amazon GameLift Servers services. -
instance_inbound_permission_authorizations(Optional[IpPermissionsList], default:None) –A set of ports to add to the container fleet's inbound permissions.
The port range must not overlap with the Amazon GameLift Servers reserved port range
4092-4191. This range is reserved for internal Amazon GameLift Servers services. -
instance_inbound_permission_revocations(Optional[IpPermissionsList], default:None) –A set of ports to remove from the container fleet's inbound permissions.
-
deployment_configuration(Optional[DeploymentConfiguration], default:None) –Instructions for how to deploy updates to a container fleet, if the fleet update initiates a deployment. The deployment configuration lets you determine how to replace fleet instances and what actions to take if the deployment fails.
-
description(Optional[NonZeroAndMaxString], default:None) –A meaningful description of the container fleet.
-
metric_groups(Optional[MetricGroupList], default:None) –The name of an Amazon Web Services CloudWatch metric group to add this fleet to.
-
new_game_session_protection_policy(Optional[ProtectionPolicy], default:None) –The game session protection policy to apply to all new game sessions that are started in this fleet. Game sessions that already exist are not affected.
-
game_session_creation_limit_policy(Optional[GameSessionCreationLimitPolicy], default:None) –A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.
-
log_configuration(Optional[LogConfiguration], default:None) –The method for collecting container logs for the fleet.
-
remove_attributes(Optional[ContainerFleetRemoveAttributeList], default:None) –If set, this update removes a fleet's per-instance container group definition. You can't remove a fleet's game server container group definition.
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.
-
LimitExceededException–The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue 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.
-
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/async_game_lift.py
10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 | |