UnmanagedComputeEnvironmentProps
- class aws_cdk.aws_batch.UnmanagedComputeEnvironmentProps(*, compute_environment_name=None, enabled=None, service_role=None, unmanagedv_cpus=None)
Bases:
ComputeEnvironmentProps
Represents an UnmanagedComputeEnvironment.
Batch will not provision instances on your behalf in this ComputeEvironment.
- Parameters:
compute_environment_name (
Optional
[str
]) – The name of the ComputeEnvironment. Default: - generated by CloudFormationenabled (
Optional
[bool
]) – 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 theSTARTED
orRUNNING
states will not be interrupted. As jobs complete, the ComputeEnvironment will scale instances down tominvCpus
. To ensure you aren’t billed for unused capacity, setminvCpus
to0
. Default: trueservice_role (
Optional
[IRole
]) – The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs. Default: - a serviceRole will be created for managed CEs, none for unmanaged CEsunmanagedv_cpus (
Union
[int
,float
,None
]) – The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs inQueue``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. Default: 0
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_batch as batch from aws_cdk import aws_iam as iam # role: iam.Role unmanaged_compute_environment_props = batch.UnmanagedComputeEnvironmentProps( compute_environment_name="computeEnvironmentName", enabled=False, service_role=role, unmanagedv_cpus=123 )
Attributes
- compute_environment_name
The name of the ComputeEnvironment.
- Default:
generated by CloudFormation
- enabled
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
orRUNNING
states will not be interrupted. As jobs complete, the ComputeEnvironment will scale instances down tominvCpus
.To ensure you aren’t billed for unused capacity, set
minvCpus
to0
.- Default:
true
- service_role
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
- Default:
a serviceRole will be created for managed CEs, none for unmanaged CEs
- unmanagedv_cpus
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.- Default:
0