Skip to content
v2.273.0

UnmanagedComputeEnvironmentProps Struct ​

Represents an UnmanagedComputeEnvironment.

Batch will not provision instances on your behalf in this ComputeEvironment.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const role: iam.Role;
const unmanagedComputeEnvironmentProps: batch.UnmanagedComputeEnvironmentProps = {
  computeEnvironmentName: 'computeEnvironmentName',
  enabled: false,
  serviceRole: role,
  unmanagedvCpus: 123,
};

Properties ​

computeEnvironmentNamestringcompute_environment_namestrcomputeEnvironmentNameStringComputeEnvironmentNamestringComputeEnvironmentName*string= generated by CloudFormation#
The name of the ComputeEnvironment.
enabledbooleanenabledboolenabledBooleanEnabledboolEnabled*bool= true#
Whether or not this ComputeEnvironment can accept jobs from a Queue.
notes

Enabled ComputeEnvironments can accept jobs from a Queue and can scale instances up or down. Disabled ComputeEnvironments cannot accept jobs from a Queue or scale instances up or down.

If you change a ComputeEnvironment from enabled to disabled while it is executing jobs, Jobs in the STARTED or RUNNING states will not be interrupted. As jobs complete, the ComputeEnvironment will scale instances down to minvCpus.

To ensure you aren't billed for unused capacity, set minvCpus to 0.

serviceRoleIRoleservice_roleIRoleserviceRoleIRoleServiceRoleIRoleServiceRoleIRole= a serviceRole will be created fo…#
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
default

Default: a serviceRole will be created for managed CEs, none for unmanaged CEs

unmanagedvCpusnumberunmanagedv_cpusint | floatunmanagedvCpusNumberUnmanagedvCpusdoubleUnmanagedvCpus*float64= 0#
The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs in `Queue`s that use `FairshareSchedulingPolicy`s.

If this parameter is not provided on a fairshare queue, no capacity is reserved; that is, the FairshareSchedulingPolicy is ignored.

Used as props by ​