interface IUnmanagedComputeEnvironment
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Batch.IUnmanagedComputeEnvironment |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbatch#IUnmanagedComputeEnvironment |
Java | software.amazon.awscdk.services.batch.IUnmanagedComputeEnvironment |
Python | aws_cdk.aws_batch.IUnmanagedComputeEnvironment |
TypeScript (source) | aws-cdk-lib » aws_batch » IUnmanagedComputeEnvironment |
Implemented by
Unmanaged
Obtainable from
Unmanaged
.fromUnmanagedComputeEnvironmentArn()
Represents an UnmanagedComputeEnvironment.
Batch will not provision instances on your behalf in this ComputeEvironment.
Properties
Name | Type | Description |
---|---|---|
compute | string | The ARN of this compute environment. |
compute | string | The name of the ComputeEnvironment. |
enabled | boolean | Whether or not this ComputeEnvironment can accept jobs from a Queue. |
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
service | IRole | The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs. |
unmanagedv | number | The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs in Queue s that use FairshareSchedulingPolicy s. |
computeEnvironmentArn
Type:
string
The ARN of this compute environment.
computeEnvironmentName
Type:
string
The name of the ComputeEnvironment.
enabled
Type:
boolean
Whether or not this ComputeEnvironment can accept jobs from a Queue.
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
.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
serviceRole?
Type:
IRole
(optional, default: a serviceRole will be created for managed CEs, none for unmanaged CEs)
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
unmanagedvCPUs?
Type:
number
(optional)
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.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).