delete_task_set
async
¶
delete_task_set(
cluster: String,
service: String,
task_set: String,
*,
config_overrides: Optional[AsyncECSClientConfig] = None,
force: Optional[BoxedBoolean] = None,
) -> DeleteTaskSetResponse
Deletes a specified task set within a service. 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 found in to delete.
-
service(String) –The short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.
-
task_set(String) –The task set ID or full Amazon Resource Name (ARN) of the task set to delete.
-
force(Optional[BoxedBoolean], default:None) –If
true, you can delete a task set even if it hasn't been scaled down to zero.
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 delete a task set within a service that uses the EXTERNAL deployment controller type This example deletes a task set and uses the force flag to force deletion if it hasn't scaled to zero.
>>> await client.delete_task_set(cluster='MyCluster', service='MyService', task_set='arn:aws:ecs:us-west-2:123456789012:task-set/MyCluster/MyService/ecs-svc/1234567890123456789', force=True)
Source code in docs_src/capo_ecs/_services/async_ecs.py
7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 | |