Class IManagedEc2EcsComputeEnvironment.Jsii$Proxy
- All Implemented Interfaces:
IResource
,IResource.Jsii$Default
,ITaggable
,ITaggable.Jsii$Default
,IComputeEnvironment
,IComputeEnvironment.Jsii$Default
,IManagedComputeEnvironment
,IManagedComputeEnvironment.Jsii$Default
,IManagedEc2EcsComputeEnvironment
,IManagedEc2EcsComputeEnvironment.Jsii$Default
,IConnectable
,IConnectable.Jsii$Default
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IConstruct.Jsii$Default
,software.constructs.IDependable
,software.constructs.IDependable.Jsii$Default
- Enclosing interface:
IManagedEc2EcsComputeEnvironment
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.batch.IComputeEnvironment
IComputeEnvironment.Jsii$Default, IComputeEnvironment.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IDependable
software.constructs.IDependable.Jsii$Default, software.constructs.IDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.batch.IManagedComputeEnvironment
IManagedComputeEnvironment.Jsii$Default, IManagedComputeEnvironment.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.batch.IManagedEc2EcsComputeEnvironment
IManagedEc2EcsComputeEnvironment.Jsii$Default, IManagedEc2EcsComputeEnvironment.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addInstanceClass
(InstanceClass instanceClass) Add an instance class to this compute environment.final void
addInstanceType
(InstanceType instanceType) Add an instance type to this compute environment.final void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.final AllocationStrategy
The allocation strategy to use if not enough instances of the best fitting instance type can be allocated.final String
The ARN of this compute environment.final String
The name of the ComputeEnvironment.final Connections
The network connections associated with this resource.final Boolean
Whether or not this ComputeEnvironment can accept jobs from a Queue.final ResourceEnvironment
getEnv()
The environment this resource belongs to.final List<EcsMachineImage>
Configure which AMIs this Compute Environment can launch.final List<InstanceClass>
The instance classes that this Compute Environment can launch.final IRole
The execution Role that instances launched by this Compute Environment will use.final List<InstanceType>
The instance types that this Compute Environment can launch.final ILaunchTemplate
The Launch Template that this Compute Environment will use to provision EC2 Instances.final Number
The maximum vCpus thisManagedComputeEnvironment
can scale up to.final Number
The minimum vCPUs that an environment should maintain, even if the compute environment is DISABLED.final software.constructs.Node
getNode()
The tree node.final IPlacementGroup
The EC2 placement group to associate with your compute resources.final Boolean
Specifies whether this Compute Environment is replaced if an update is made that requires replacing its instances.final List<ISecurityGroup>
The security groups this Compute Environment will launch instances in.final IRole
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.final Boolean
getSpot()
Whether or not to use spot instances.final Number
The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.final IRole
The service-linked role that Spot Fleet needs to launch instances on your behalf.final Stack
getStack()
The stack in which this resource is defined.final TagManager
getTags()
TagManager to set, remove and format tags.final Boolean
Whether or not any running jobs will be immediately terminated when an infrastructure update occurs.final Duration
Only meaningful ifterminateOnUpdate
isfalse
.final Boolean
Whether or not the AMI is updated to the latest one supported by Batch when an infrastructure update occurs.final Boolean
Whether or not to use batch's optimal instance type.final SubnetSelection
The VPC Subnets this Compute Environment will launch instances in.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
-
-
Method Details
-
getNode
@Stability(Stable) @NotNull public final software.constructs.Node getNode()The tree node.- Specified by:
getNode
in interfaceIComputeEnvironment.Jsii$Default
- Specified by:
getNode
in interfacesoftware.constructs.IConstruct
- Specified by:
getNode
in interfacesoftware.constructs.IConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getNode
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- Specified by:
getNode
in interfaceIResource.Jsii$Default
-
getEnv
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.
- Specified by:
getEnv
in interfaceIComputeEnvironment.Jsii$Default
- Specified by:
getEnv
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getEnv
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- Specified by:
getEnv
in interfaceIResource
- Specified by:
getEnv
in interfaceIResource.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStack
in interfaceIComputeEnvironment.Jsii$Default
- Specified by:
getStack
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getStack
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- Specified by:
getStack
in interfaceIResource
- Specified by:
getStack
in interfaceIResource.Jsii$Default
-
getComputeEnvironmentArn
The ARN of this compute environment.- Specified by:
getComputeEnvironmentArn
in interfaceIComputeEnvironment
- Specified by:
getComputeEnvironmentArn
in interfaceIComputeEnvironment.Jsii$Default
- Specified by:
getComputeEnvironmentArn
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getComputeEnvironmentArn
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getComputeEnvironmentName
The name of the ComputeEnvironment.- Specified by:
getComputeEnvironmentName
in interfaceIComputeEnvironment
- Specified by:
getComputeEnvironmentName
in interfaceIComputeEnvironment.Jsii$Default
- Specified by:
getComputeEnvironmentName
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getComputeEnvironmentName
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getEnabled
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
.- Specified by:
getEnabled
in interfaceIComputeEnvironment
- Specified by:
getEnabled
in interfaceIComputeEnvironment.Jsii$Default
- Specified by:
getEnabled
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getEnabled
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getServiceRole
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
- Specified by:
getServiceRole
in interfaceIComputeEnvironment
- Specified by:
getServiceRole
in interfaceIComputeEnvironment.Jsii$Default
- Specified by:
getServiceRole
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getServiceRole
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getConnections
The network connections associated with this resource.- Specified by:
getConnections
in interfaceIConnectable
- Specified by:
getConnections
in interfaceIConnectable.Jsii$Default
- Specified by:
getConnections
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getConnections
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getTags
TagManager to set, remove and format tags.- Specified by:
getTags
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getTags
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- Specified by:
getTags
in interfaceITaggable
- Specified by:
getTags
in interfaceITaggable.Jsii$Default
-
getMaxvCpus
The maximum vCpus thisManagedComputeEnvironment
can scale up to.Note: if this Compute Environment uses EC2 resources (not Fargate) with either
AllocationStrategy.BEST_FIT_PROGRESSIVE
orAllocationStrategy.SPOT_CAPACITY_OPTIMIZED
, orAllocationStrategy.BEST_FIT
with Spot instances, The scheduler may exceed this number by at most one of the instances specified ininstanceTypes
orinstanceClasses
.- Specified by:
getMaxvCpus
in interfaceIManagedComputeEnvironment
- Specified by:
getMaxvCpus
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getMaxvCpus
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getSecurityGroups
The security groups this Compute Environment will launch instances in.- Specified by:
getSecurityGroups
in interfaceIManagedComputeEnvironment
- Specified by:
getSecurityGroups
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getSecurityGroups
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getReplaceComputeEnvironment
Specifies whether this Compute Environment is replaced if an update is made that requires replacing its instances.To enable more properties to be updated, set this property to
false
. When changing the value of this property to false, do not change any other properties at the same time. If other properties are changed at the same time, and the change needs to be rolled back but it can't, it's possible for the stack to go into the UPDATE_ROLLBACK_FAILED state. You can't update a stack that is in the UPDATE_ROLLBACK_FAILED state. However, if you can continue to roll it back, you can return the stack to its original settings and then try to update it again.The properties which require a replacement of the Compute Environment are:
- Specified by:
getReplaceComputeEnvironment
in interfaceIManagedComputeEnvironment
- Specified by:
getReplaceComputeEnvironment
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getReplaceComputeEnvironment
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- See Also:
-
getSpot
Whether or not to use spot instances.Spot instances are less expensive EC2 instances that can be reclaimed by EC2 at any time; your job will be given two minutes of notice before reclamation.
Default: false
- Specified by:
getSpot
in interfaceIManagedComputeEnvironment
- Specified by:
getSpot
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getSpot
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getTerminateOnUpdate
Whether or not any running jobs will be immediately terminated when an infrastructure update occurs.If this is enabled, any terminated jobs may be retried, depending on the job's retry policy.
Default: false
- Specified by:
getTerminateOnUpdate
in interfaceIManagedComputeEnvironment
- Specified by:
getTerminateOnUpdate
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getTerminateOnUpdate
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- See Also:
-
getUpdateTimeout
Only meaningful ifterminateOnUpdate
isfalse
.If so, when an infrastructure update is triggered, any running jobs will be allowed to run until
updateTimeout
has expired.Default: 30 minutes
- Specified by:
getUpdateTimeout
in interfaceIManagedComputeEnvironment
- Specified by:
getUpdateTimeout
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getUpdateTimeout
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- See Also:
-
getUpdateToLatestImageVersion
Whether or not the AMI is updated to the latest one supported by Batch when an infrastructure update occurs.If you specify a specific AMI, this property will be ignored.
Note: the CDK will never set this value by default,
false
will set by CFN. This is to avoid a deployment failure that occurs when this value is set.Default: false
- Specified by:
getUpdateToLatestImageVersion
in interfaceIManagedComputeEnvironment
- Specified by:
getUpdateToLatestImageVersion
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getUpdateToLatestImageVersion
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- See Also:
-
getVpcSubnets
The VPC Subnets this Compute Environment will launch instances in.- Specified by:
getVpcSubnets
in interfaceIManagedComputeEnvironment
- Specified by:
getVpcSubnets
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
getVpcSubnets
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getInstanceClasses
The instance classes that this Compute Environment can launch.Which one is chosen depends on the
AllocationStrategy
used. Batch will automatically choose the size.- Specified by:
getInstanceClasses
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getInstanceClasses
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getInstanceTypes
The instance types that this Compute Environment can launch.Which one is chosen depends on the
AllocationStrategy
used.- Specified by:
getInstanceTypes
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getInstanceTypes
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getAllocationStrategy
The allocation strategy to use if not enough instances of the best fitting instance type can be allocated.Default: - `BEST_FIT_PROGRESSIVE` if not using Spot instances, `SPOT_CAPACITY_OPTIMIZED` if using Spot instances.
- Specified by:
getAllocationStrategy
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getAllocationStrategy
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getImages
Configure which AMIs this Compute Environment can launch.Leave this
undefined
to allow Batch to choose the latest AMIs it supports for each instance that it launches.Default: - ECS_AL2 compatible AMI ids for non-GPU instances, ECS_AL2_NVIDIA compatible AMI ids for GPU instances
- Specified by:
getImages
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getImages
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getInstanceRole
The execution Role that instances launched by this Compute Environment will use.Default: - a role will be created
- Specified by:
getInstanceRole
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getInstanceRole
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getLaunchTemplate
The Launch Template that this Compute Environment will use to provision EC2 Instances.Note: if
securityGroups
is specified on both your launch template and this Compute Environment, **thesecurityGroup
s on the Compute Environment override the ones on the launch template.Default: no launch template
- Specified by:
getLaunchTemplate
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getLaunchTemplate
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getMinvCpus
The minimum vCPUs that an environment should maintain, even if the compute environment is DISABLED.Default: 0
- Specified by:
getMinvCpus
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getMinvCpus
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getPlacementGroup
The EC2 placement group to associate with your compute resources.If you intend to submit multi-node parallel jobs to this Compute Environment, you should consider creating a cluster placement group and associate it with your compute resources. This keeps your multi-node parallel job on a logical grouping of instances within a single Availability Zone with high network flow potential.
Default: - no placement group
- Specified by:
getPlacementGroup
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getPlacementGroup
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- See Also:
-
getSpotBidPercentage
The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.For example, if your maximum percentage is 20%, the Spot price must be less than 20% of the current On-Demand price for that Instance. You always pay the lowest market price and never more than your maximum percentage. For most use cases, Batch recommends leaving this field empty.
Default: - 100%
- Specified by:
getSpotBidPercentage
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getSpotBidPercentage
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
getSpotFleetRole
The service-linked role that Spot Fleet needs to launch instances on your behalf.Default: - a new Role will be created
- Specified by:
getSpotFleetRole
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getSpotFleetRole
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- See Also:
-
getUseOptimalInstanceClasses
Whether or not to use batch's optimal instance type.The optimal instance type is equivalent to adding the C4, M4, and R4 instance classes. You can specify other instance classes (of the same architecture) in addition to the optimal instance classes.
Default: true
- Specified by:
getUseOptimalInstanceClasses
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
getUseOptimalInstanceClasses
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
-
applyRemovalPolicy
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
).- Specified by:
applyRemovalPolicy
in interfaceIComputeEnvironment.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIManagedComputeEnvironment.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIResource
- Specified by:
applyRemovalPolicy
in interfaceIResource.Jsii$Default
- Parameters:
policy
- This parameter is required.
-
addInstanceClass
Add an instance class to this compute environment.- Specified by:
addInstanceClass
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
addInstanceClass
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- Parameters:
instanceClass
- This parameter is required.
-
addInstanceType
Add an instance type to this compute environment.- Specified by:
addInstanceType
in interfaceIManagedEc2EcsComputeEnvironment
- Specified by:
addInstanceType
in interfaceIManagedEc2EcsComputeEnvironment.Jsii$Default
- Parameters:
instanceType
- This parameter is required.
-