update_task_set
¶
update_task_set(
cluster: String,
service: String,
task_set: String,
scale: Scale,
*,
config_overrides: Optional[ECSClientConfig] = None,
) -> UpdateTaskSetResponse
Modifies a task set. This is used when a service uses the EXTERNAL deployment controller type. For more information, see Amazon ECS Deployment Types in the Amazon Elastic Container Service Developer Guide.
Parameters:
-
cluster(String) –The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set is found in.
-
service(String) –The short name or full Amazon Resource Name (ARN) of the service that the task set is found in.
-
task_set(String) –The short name or full Amazon Resource Name (ARN) of the task set to update.
-
scale(Scale) –A floating-point percentage of the desired number of tasks to place and keep running in the task set.
Raises:
-
AccessDeniedException–You don't have authorization to perform the requested action.
-
ClientException–These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.
-
ClusterNotFoundException–The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.
-
InvalidParameterException–The specified parameter isn't valid. Review the available parameters for the API request.
For more information about service event errors, see Amazon ECS service event messages.
-
LimitExceededException–The limit for the resource was exceeded.
-
ServerException–These errors are usually caused by a server issue.
-
ServiceNotActiveException–The specified service isn't active. You can't update a service that's inactive. If you have previously deleted a service, you can re-create it with CreateService.
-
ServiceNotFoundException–The specified service wasn't found. You can view your available services with ListServices. Amazon ECS services are cluster specific and Region specific.
-
TaskSetNotFoundException–The specified task set wasn't found. You can view your available task sets with DescribeTaskSets. Task sets are specific to each cluster, service and Region.
-
UnsupportedFeatureException–The specified task isn't supported in this Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update a task set This example updates the task set to adjust the scale.
>>> client.update_task_set(cluster='MyCluster', service='MyService', task_set='arn:aws:ecs:us-west-2:123456789012:task-set/MyCluster/MyService/ecs-svc/1234567890123456789', scale={'value': 50, 'unit': 'PERCENT'})
Source code in docs_src/capo_ecs/_services/ecs.py
6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 | |