Batch / Client / delete_compute_environment

delete_compute_environment#

Batch.Client.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'
)
Parameters:

computeEnvironment (string) –

[REQUIRED]

The name or Amazon Resource Name (ARN) of the compute environment to delete.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

Examples

This example deletes the P2OnDemand compute environment.

response = client.delete_compute_environment(
    computeEnvironment='P2OnDemand',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}