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
6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 | |