Class CfnComputeNodeGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.pcs.CfnComputeNodeGroup
- All Implemented Interfaces:
IInspectable,ITaggableV2,IComputeNodeGroupRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:16.567Z")
@Stability(Stable)
public class CfnComputeNodeGroup
extends CfnResource
implements IInspectable, IComputeNodeGroupRef, ITaggableV2
Creates an AWS PCS compute node group resource.
For more information, see Creating a compute node group in AWS PCS in the AWS PCS User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.pcs.*;
CfnComputeNodeGroup cfnComputeNodeGroup = CfnComputeNodeGroup.Builder.create(this, "MyCfnComputeNodeGroup")
.clusterId("clusterId")
.customLaunchTemplate(CustomLaunchTemplateProperty.builder()
.version("version")
// the properties below are optional
.templateId("templateId")
.build())
.iamInstanceProfileArn("iamInstanceProfileArn")
.instanceConfigs(List.of(InstanceConfigProperty.builder()
.instanceType("instanceType")
.build()))
.scalingConfiguration(ScalingConfigurationProperty.builder()
.maxInstanceCount(123)
.minInstanceCount(123)
.build())
.subnetIds(List.of("subnetIds"))
// the properties below are optional
.amiId("amiId")
.name("name")
.purchaseOption("purchaseOption")
.slurmConfiguration(SlurmConfigurationProperty.builder()
.slurmCustomSettings(List.of(SlurmCustomSettingProperty.builder()
.parameterName("parameterName")
.parameterValue("parameterValue")
.build()))
.build())
.spotOptions(SpotOptionsProperty.builder()
.allocationStrategy("allocationStrategy")
.build())
.tags(Map.of(
"tagsKey", "tags"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnComputeNodeGroup.static interfaceAn Amazon EC2 launch template AWS PCS uses to launch compute nodes.static interfaceAn error that occurred during resource creation.static interfaceAn EC2 instance configuration AWS PCS uses to launch compute nodes.static interfaceSpecifies the boundaries of the compute node group auto scaling.static interfaceAdditional options related to the Slurm scheduler.static interfaceAdditional settings that directly map to Slurm settings.static interfaceAdditional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.pcs.IComputeNodeGroupRef
IComputeNodeGroupRef.Jsii$Default, IComputeNodeGroupRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnComputeNodeGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnComputeNodeGroup(software.amazon.jsii.JsiiObjectRef objRef) CfnComputeNodeGroup(software.constructs.Construct scope, String id, CfnComputeNodeGroupProps props) -
Method Summary
Modifier and TypeMethodDescriptiongetAmiId()The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances.The unique Amazon Resource Name (ARN) of the compute node group.The list of errors that occurred during compute node group provisioning.The generated unique ID of the compute node group.The provisioning status of the compute node group.Tag Manager which manages the tags for this resource.The ID of the cluster of the compute node group.A reference to a ComputeNodeGroup resource.An Amazon EC2 launch template AWS PCS uses to launch compute nodes.The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances.A list of EC2 instance configurations that AWS PCS can provision in the compute node group.getName()The name that identifies the compute node group.Specifies how EC2 instances are purchased on your behalf.Specifies the boundaries of the compute node group auto scaling.Additional options related to the Slurm scheduler.Additional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action.The list of subnet IDs where instances are provisioned by the compute node group.getTags()1 or more tags added to the resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances.voidsetClusterId(String value) The ID of the cluster of the compute node group.voidAn Amazon EC2 launch template AWS PCS uses to launch compute nodes.voidAn Amazon EC2 launch template AWS PCS uses to launch compute nodes.voidsetIamInstanceProfileArn(String value) The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances.voidsetInstanceConfigs(List<Object> value) A list of EC2 instance configurations that AWS PCS can provision in the compute node group.voidsetInstanceConfigs(IResolvable value) A list of EC2 instance configurations that AWS PCS can provision in the compute node group.voidThe name that identifies the compute node group.voidsetPurchaseOption(String value) Specifies how EC2 instances are purchased on your behalf.voidSpecifies the boundaries of the compute node group auto scaling.voidSpecifies the boundaries of the compute node group auto scaling.voidsetSlurmConfiguration(IResolvable value) Additional options related to the Slurm scheduler.voidAdditional options related to the Slurm scheduler.voidsetSpotOptions(IResolvable value) Additional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action.voidAdditional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action.voidsetSubnetIds(List<String> value) The list of subnet IDs where instances are provisioned by the compute node group.void1 or more tags added to the resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnComputeNodeGroup
protected CfnComputeNodeGroup(software.amazon.jsii.JsiiObjectRef objRef) -
CfnComputeNodeGroup
protected CfnComputeNodeGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnComputeNodeGroup
@Stability(Stable) public CfnComputeNodeGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnComputeNodeGroupProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The unique Amazon Resource Name (ARN) of the compute node group. -
getAttrErrorInfo
The list of errors that occurred during compute node group provisioning. -
getAttrId
The generated unique ID of the compute node group. -
getAttrStatus
The provisioning status of the compute node group.The provisioning status doesn't indicate the overall health of the compute node group. > The resource enters the
SUSPENDINGandSUSPENDEDstates when the scheduler is beyond end of life and we have suspended the cluster. When in these states, you can't use the cluster. The cluster controller is down and all compute instances are terminated. The resources still count toward your service quotas. You can delete a resource if its status isSUSPENDED. For more information, see Frequently asked questions about Slurm versions in AWS PCS in the AWS PCS User Guide . -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getComputeNodeGroupRef
A reference to a ComputeNodeGroup resource.- Specified by:
getComputeNodeGroupRefin interfaceIComputeNodeGroupRef
-
getClusterId
The ID of the cluster of the compute node group. -
setClusterId
The ID of the cluster of the compute node group. -
getCustomLaunchTemplate
An Amazon EC2 launch template AWS PCS uses to launch compute nodes. -
setCustomLaunchTemplate
An Amazon EC2 launch template AWS PCS uses to launch compute nodes. -
setCustomLaunchTemplate
@Stability(Stable) public void setCustomLaunchTemplate(@NotNull CfnComputeNodeGroup.CustomLaunchTemplateProperty value) An Amazon EC2 launch template AWS PCS uses to launch compute nodes. -
getIamInstanceProfileArn
The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. -
setIamInstanceProfileArn
The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. -
getInstanceConfigs
A list of EC2 instance configurations that AWS PCS can provision in the compute node group. -
setInstanceConfigs
A list of EC2 instance configurations that AWS PCS can provision in the compute node group. -
setInstanceConfigs
A list of EC2 instance configurations that AWS PCS can provision in the compute node group. -
getScalingConfiguration
Specifies the boundaries of the compute node group auto scaling. -
setScalingConfiguration
Specifies the boundaries of the compute node group auto scaling. -
setScalingConfiguration
@Stability(Stable) public void setScalingConfiguration(@NotNull CfnComputeNodeGroup.ScalingConfigurationProperty value) Specifies the boundaries of the compute node group auto scaling. -
getSubnetIds
The list of subnet IDs where instances are provisioned by the compute node group. -
setSubnetIds
The list of subnet IDs where instances are provisioned by the compute node group. -
getAmiId
The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances. -
setAmiId
The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances. -
getName
The name that identifies the compute node group. -
setName
The name that identifies the compute node group. -
getPurchaseOption
Specifies how EC2 instances are purchased on your behalf. -
setPurchaseOption
Specifies how EC2 instances are purchased on your behalf. -
getSlurmConfiguration
Additional options related to the Slurm scheduler. -
setSlurmConfiguration
Additional options related to the Slurm scheduler. -
setSlurmConfiguration
@Stability(Stable) public void setSlurmConfiguration(@Nullable CfnComputeNodeGroup.SlurmConfigurationProperty value) Additional options related to the Slurm scheduler. -
getSpotOptions
Additional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action. -
setSpotOptions
Additional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action. -
setSpotOptions
@Stability(Stable) public void setSpotOptions(@Nullable CfnComputeNodeGroup.SpotOptionsProperty value) Additional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action. -
getTags
1 or more tags added to the resource. -
setTags
1 or more tags added to the resource.
-