Skip to main content

compute_environments

Creates, updates, deletes or gets a compute_environment resource or lists compute_environments in a region

Overview

Namecompute_environments
TypeResource
DescriptionResource Type definition for AWS::Batch::ComputeEnvironment
Idaws.batch.compute_environments

Fields

NameDatatypeDescription
compute_environment_arnstring
compute_environment_namestring
compute_resourcesobject
replace_compute_environmentboolean
service_rolestring
statestring
tagsobjectA key-value pair to associate with a resource.
typestring
update_policyobject
unmanagedv_cpusinteger
eks_configurationobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTType, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all compute_environments in a region.

SELECT
region,
compute_environment_arn,
compute_environment_name,
compute_resources,
replace_compute_environment,
service_role,
state,
tags,
type,
update_policy,
unmanagedv_cpus,
eks_configuration
FROM aws.batch.compute_environments
WHERE region = 'us-east-1';

Gets all properties from an individual compute_environment.

SELECT
region,
compute_environment_arn,
compute_environment_name,
compute_resources,
replace_compute_environment,
service_role,
state,
tags,
type,
update_policy,
unmanagedv_cpus,
eks_configuration
FROM aws.batch.compute_environments
WHERE region = 'us-east-1' AND data__Identifier = '<ComputeEnvironmentArn>';

INSERT example

Use the following StackQL query and manifest file to create a new compute_environment resource, using stack-deploy.

/*+ create */
INSERT INTO aws.batch.compute_environments (
Type,
region
)
SELECT
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.batch.compute_environments
WHERE data__Identifier = '<ComputeEnvironmentArn>'
AND region = 'us-east-1';

Permissions

To operate on the compute_environments resource, the following permissions are required:

Create

Batch:CreateComputeEnvironment,
Batch:TagResource,
Batch:DescribeComputeEnvironments,
iam:CreateServiceLinkedRole,
Iam:PassRole,
Eks:DescribeCluster

Read

Batch:DescribeComputeEnvironments

Update

Batch:UpdateComputeEnvironment,
Batch:DescribeComputeEnvironments,
Batch:TagResource,
Batch:UnTagResource,
Iam:PassRole,
Eks:DescribeCluster

Delete

Batch:DeleteComputeEnvironment,
Batch:DescribeComputeEnvironments,
Batch:UpdateComputeEnvironment,
Iam:PassRole,
Eks:DescribeCluster

List

Batch:DescribeComputeEnvironments