delete_compute_environment
(**kwargs)¶Deletes an Batch compute environment.
Before you can delete a compute environment, you must set its state to DISABLED
with the UpdateComputeEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation. Compute environments that use Fargate resources must terminate all active jobs on that compute environment before deleting the compute environment. If this isn't done, the compute environment enters an invalid state.
See also: AWS API Documentation
Request Syntax
response = client.delete_compute_environment(
computeEnvironment='string'
)
[REQUIRED]
The name or Amazon Resource Name (ARN) of the compute environment to delete.
{}
Response Structure
Exceptions
Batch.Client.exceptions.ClientException
Batch.Client.exceptions.ServerException
Examples
This example deletes the P2OnDemand compute environment.
response = client.delete_compute_environment(
computeEnvironment='P2OnDemand',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}