Class CfnComputeNodeGroup.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnComputeNodeGroup>
- Enclosing class:
CfnComputeNodeGroup
CfnComputeNodeGroup
.-
Method Summary
Modifier and TypeMethodDescriptionThe ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances.build()
The ID of the cluster of the compute node group.static CfnComputeNodeGroup.Builder
customLaunchTemplate
(IResolvable customLaunchTemplate) An Amazon EC2 launch template AWS PCS uses to launch compute nodes.customLaunchTemplate
(CfnComputeNodeGroup.CustomLaunchTemplateProperty customLaunchTemplate) An Amazon EC2 launch template AWS PCS uses to launch compute nodes.iamInstanceProfileArn
(String iamInstanceProfileArn) The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances.instanceConfigs
(List<? extends Object> instanceConfigs) A list of EC2 instance configurations that AWS PCS can provision in the compute node group.instanceConfigs
(IResolvable instanceConfigs) A list of EC2 instance configurations that AWS PCS can provision in the compute node group.The name that identifies the compute node group.purchaseOption
(String purchaseOption) Specifies how EC2 instances are purchased on your behalf.scalingConfiguration
(IResolvable scalingConfiguration) Specifies the boundaries of the compute node group auto scaling.scalingConfiguration
(CfnComputeNodeGroup.ScalingConfigurationProperty scalingConfiguration) Specifies the boundaries of the compute node group auto scaling.slurmConfiguration
(IResolvable slurmConfiguration) Additional options related to the Slurm scheduler.slurmConfiguration
(CfnComputeNodeGroup.SlurmConfigurationProperty slurmConfiguration) Additional options related to the Slurm scheduler.spotOptions
(IResolvable spotOptions) Additional configuration when you specifySPOT
as thepurchaseOption
for theCreateComputeNodeGroup
API action.spotOptions
(CfnComputeNodeGroup.SpotOptionsProperty spotOptions) Additional configuration when you specifySPOT
as thepurchaseOption
for theCreateComputeNodeGroup
API action.The list of subnet IDs where instances are provisioned by the compute node group.1 or more tags added to the resource.
-
Method Details
-
create
@Stability(Stable) public static CfnComputeNodeGroup.Builder create(software.constructs.Construct scope, String id) - 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.- Returns:
- a new instance of
CfnComputeNodeGroup.Builder
.
-
clusterId
The ID of the cluster of the compute node group.- Parameters:
clusterId
- The ID of the cluster of the compute node group. This parameter is required.- Returns:
this
- See Also:
-
customLaunchTemplate
@Stability(Stable) public CfnComputeNodeGroup.Builder customLaunchTemplate(IResolvable customLaunchTemplate) An Amazon EC2 launch template AWS PCS uses to launch compute nodes.- Parameters:
customLaunchTemplate
- An Amazon EC2 launch template AWS PCS uses to launch compute nodes. This parameter is required.- Returns:
this
- See Also:
-
customLaunchTemplate
@Stability(Stable) public CfnComputeNodeGroup.Builder customLaunchTemplate(CfnComputeNodeGroup.CustomLaunchTemplateProperty customLaunchTemplate) An Amazon EC2 launch template AWS PCS uses to launch compute nodes.- Parameters:
customLaunchTemplate
- An Amazon EC2 launch template AWS PCS uses to launch compute nodes. This parameter is required.- Returns:
this
- See Also:
-
iamInstanceProfileArn
@Stability(Stable) public CfnComputeNodeGroup.Builder iamInstanceProfileArn(String iamInstanceProfileArn) The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances.The role contained in your instance profile must have the
pcs:RegisterComputeNodeGroupInstance
permission and the role name must start withAWSPCS
or must have the path/aws-pcs/
. For more information, see IAM instance profiles for AWS PCS in the AWS PCS User Guide .- Parameters:
iamInstanceProfileArn
- The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. This parameter is required.- Returns:
this
- See Also:
-
instanceConfigs
A list of EC2 instance configurations that AWS PCS can provision in the compute node group.- Parameters:
instanceConfigs
- A list of EC2 instance configurations that AWS PCS can provision in the compute node group. This parameter is required.- Returns:
this
- See Also:
-
instanceConfigs
@Stability(Stable) public CfnComputeNodeGroup.Builder instanceConfigs(List<? extends Object> instanceConfigs) A list of EC2 instance configurations that AWS PCS can provision in the compute node group.- Parameters:
instanceConfigs
- A list of EC2 instance configurations that AWS PCS can provision in the compute node group. This parameter is required.- Returns:
this
- See Also:
-
scalingConfiguration
@Stability(Stable) public CfnComputeNodeGroup.Builder scalingConfiguration(IResolvable scalingConfiguration) Specifies the boundaries of the compute node group auto scaling.- Parameters:
scalingConfiguration
- Specifies the boundaries of the compute node group auto scaling. This parameter is required.- Returns:
this
- See Also:
-
scalingConfiguration
@Stability(Stable) public CfnComputeNodeGroup.Builder scalingConfiguration(CfnComputeNodeGroup.ScalingConfigurationProperty scalingConfiguration) Specifies the boundaries of the compute node group auto scaling.- Parameters:
scalingConfiguration
- Specifies the boundaries of the compute node group auto scaling. This parameter is required.- Returns:
this
- See Also:
-
subnetIds
The list of subnet IDs where instances are provisioned by the compute node group.The subnets must be in the same VPC as the cluster.
- Parameters:
subnetIds
- The list of subnet IDs where instances are provisioned by the compute node group. This parameter is required.- Returns:
this
- See Also:
-
amiId
The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances.If not provided, AWS PCS uses the AMI ID specified in the custom launch template.
- Parameters:
amiId
- The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances. This parameter is required.- Returns:
this
- See Also:
-
name
The name that identifies the compute node group.- Parameters:
name
- The name that identifies the compute node group. This parameter is required.- Returns:
this
- See Also:
-
purchaseOption
Specifies how EC2 instances are purchased on your behalf.AWS PCS supports On-Demand Instances, Spot Instances, and Amazon EC2 Capacity Blocks for ML. For more information, see Amazon EC2 billing and purchasing options in the Amazon Elastic Compute Cloud User Guide . For more information about AWS PCS support for Capacity Blocks, see Using Amazon EC2 Capacity Blocks for ML with AWS PCS in the AWS PCS User Guide . If you don't provide this option, it defaults to On-Demand.
- Parameters:
purchaseOption
- Specifies how EC2 instances are purchased on your behalf. This parameter is required.- Returns:
this
- See Also:
-
slurmConfiguration
@Stability(Stable) public CfnComputeNodeGroup.Builder slurmConfiguration(IResolvable slurmConfiguration) Additional options related to the Slurm scheduler.- Parameters:
slurmConfiguration
- Additional options related to the Slurm scheduler. This parameter is required.- Returns:
this
- See Also:
-
slurmConfiguration
@Stability(Stable) public CfnComputeNodeGroup.Builder slurmConfiguration(CfnComputeNodeGroup.SlurmConfigurationProperty slurmConfiguration) Additional options related to the Slurm scheduler.- Parameters:
slurmConfiguration
- Additional options related to the Slurm scheduler. This parameter is required.- Returns:
this
- See Also:
-
spotOptions
Additional configuration when you specifySPOT
as thepurchaseOption
for theCreateComputeNodeGroup
API action.- Parameters:
spotOptions
- Additional configuration when you specifySPOT
as thepurchaseOption
for theCreateComputeNodeGroup
API action. This parameter is required.- Returns:
this
- See Also:
-
spotOptions
@Stability(Stable) public CfnComputeNodeGroup.Builder spotOptions(CfnComputeNodeGroup.SpotOptionsProperty spotOptions) Additional configuration when you specifySPOT
as thepurchaseOption
for theCreateComputeNodeGroup
API action.- Parameters:
spotOptions
- Additional configuration when you specifySPOT
as thepurchaseOption
for theCreateComputeNodeGroup
API action. This parameter is required.- Returns:
this
- See Also:
-
tags
1 or more tags added to the resource.Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
- Parameters:
tags
- 1 or more tags added to the resource. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnComputeNodeGroup>
- Returns:
- a newly built instance of
CfnComputeNodeGroup
.
-