Class CfnComputeNodeGroupMixinProps.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.pcs.CfnComputeNodeGroupMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnComputeNodeGroupMixinProps>
- Enclosing interface:
CfnComputeNodeGroupMixinProps
@Stability(Stable)
public static final class CfnComputeNodeGroupMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnComputeNodeGroupMixinProps>
A builder for
CfnComputeNodeGroupMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnComputeNodeGroupMixinProps.getAmiId()build()Builds the configured instance.Sets the value ofCfnComputeNodeGroupMixinProps.getClusterId()customLaunchTemplate(CfnComputeNodeGroupPropsMixin.CustomLaunchTemplateProperty customLaunchTemplate) Sets the value ofCfnComputeNodeGroupMixinProps.getCustomLaunchTemplate()customLaunchTemplate(IResolvable customLaunchTemplate) Sets the value ofCfnComputeNodeGroupMixinProps.getCustomLaunchTemplate()iamInstanceProfileArn(String iamInstanceProfileArn) Sets the value ofCfnComputeNodeGroupMixinProps.getIamInstanceProfileArn()instanceConfigs(List<? extends Object> instanceConfigs) Sets the value ofCfnComputeNodeGroupMixinProps.getInstanceConfigs()instanceConfigs(IResolvable instanceConfigs) Sets the value ofCfnComputeNodeGroupMixinProps.getInstanceConfigs()Sets the value ofCfnComputeNodeGroupMixinProps.getName()purchaseOption(String purchaseOption) Sets the value ofCfnComputeNodeGroupMixinProps.getPurchaseOption()scalingConfiguration(CfnComputeNodeGroupPropsMixin.ScalingConfigurationProperty scalingConfiguration) Sets the value ofCfnComputeNodeGroupMixinProps.getScalingConfiguration()scalingConfiguration(IResolvable scalingConfiguration) Sets the value ofCfnComputeNodeGroupMixinProps.getScalingConfiguration()slurmConfiguration(CfnComputeNodeGroupPropsMixin.SlurmConfigurationProperty slurmConfiguration) Sets the value ofCfnComputeNodeGroupMixinProps.getSlurmConfiguration()slurmConfiguration(IResolvable slurmConfiguration) Sets the value ofCfnComputeNodeGroupMixinProps.getSlurmConfiguration()Sets the value ofCfnComputeNodeGroupMixinProps.getSpotOptions()spotOptions(IResolvable spotOptions) Sets the value ofCfnComputeNodeGroupMixinProps.getSpotOptions()Sets the value ofCfnComputeNodeGroupMixinProps.getSubnetIds()Sets the value ofCfnComputeNodeGroupMixinProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
amiId
Sets the value ofCfnComputeNodeGroupMixinProps.getAmiId()- Parameters:
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.- Returns:
this
-
clusterId
Sets the value ofCfnComputeNodeGroupMixinProps.getClusterId()- Parameters:
clusterId- The ID of the cluster of the compute node group.- Returns:
this
-
customLaunchTemplate
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder customLaunchTemplate(IResolvable customLaunchTemplate) Sets the value ofCfnComputeNodeGroupMixinProps.getCustomLaunchTemplate()- Parameters:
customLaunchTemplate- An Amazon EC2 launch template AWS PCS uses to launch compute nodes.- Returns:
this
-
customLaunchTemplate
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder customLaunchTemplate(CfnComputeNodeGroupPropsMixin.CustomLaunchTemplateProperty customLaunchTemplate) Sets the value ofCfnComputeNodeGroupMixinProps.getCustomLaunchTemplate()- Parameters:
customLaunchTemplate- An Amazon EC2 launch template AWS PCS uses to launch compute nodes.- Returns:
this
-
iamInstanceProfileArn
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder iamInstanceProfileArn(String iamInstanceProfileArn) Sets the value ofCfnComputeNodeGroupMixinProps.getIamInstanceProfileArn()- Parameters:
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 thepcs:RegisterComputeNodeGroupInstancepermission and the role name must start withAWSPCSor must have the path/aws-pcs/. For more information, see IAM instance profiles for AWS PCS in the AWS PCS User Guide .- Returns:
this
-
instanceConfigs
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder instanceConfigs(IResolvable instanceConfigs) Sets the value ofCfnComputeNodeGroupMixinProps.getInstanceConfigs()- Parameters:
instanceConfigs- A list of EC2 instance configurations that AWS PCS can provision in the compute node group.- Returns:
this
-
instanceConfigs
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder instanceConfigs(List<? extends Object> instanceConfigs) Sets the value ofCfnComputeNodeGroupMixinProps.getInstanceConfigs()- Parameters:
instanceConfigs- A list of EC2 instance configurations that AWS PCS can provision in the compute node group.- Returns:
this
-
name
Sets the value ofCfnComputeNodeGroupMixinProps.getName()- Parameters:
name- The name that identifies the compute node group.- Returns:
this
-
purchaseOption
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder purchaseOption(String purchaseOption) Sets the value ofCfnComputeNodeGroupMixinProps.getPurchaseOption()- Parameters:
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.- Returns:
this
-
scalingConfiguration
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder scalingConfiguration(IResolvable scalingConfiguration) Sets the value ofCfnComputeNodeGroupMixinProps.getScalingConfiguration()- Parameters:
scalingConfiguration- Specifies the boundaries of the compute node group auto scaling.- Returns:
this
-
scalingConfiguration
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder scalingConfiguration(CfnComputeNodeGroupPropsMixin.ScalingConfigurationProperty scalingConfiguration) Sets the value ofCfnComputeNodeGroupMixinProps.getScalingConfiguration()- Parameters:
scalingConfiguration- Specifies the boundaries of the compute node group auto scaling.- Returns:
this
-
slurmConfiguration
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder slurmConfiguration(IResolvable slurmConfiguration) Sets the value ofCfnComputeNodeGroupMixinProps.getSlurmConfiguration()- Parameters:
slurmConfiguration- Additional options related to the Slurm scheduler.- Returns:
this
-
slurmConfiguration
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder slurmConfiguration(CfnComputeNodeGroupPropsMixin.SlurmConfigurationProperty slurmConfiguration) Sets the value ofCfnComputeNodeGroupMixinProps.getSlurmConfiguration()- Parameters:
slurmConfiguration- Additional options related to the Slurm scheduler.- Returns:
this
-
spotOptions
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder spotOptions(IResolvable spotOptions) Sets the value ofCfnComputeNodeGroupMixinProps.getSpotOptions()- Parameters:
spotOptions- Additional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action.- Returns:
this
-
spotOptions
@Stability(Stable) public CfnComputeNodeGroupMixinProps.Builder spotOptions(CfnComputeNodeGroupPropsMixin.SpotOptionsProperty spotOptions) Sets the value ofCfnComputeNodeGroupMixinProps.getSpotOptions()- Parameters:
spotOptions- Additional configuration when you specifySPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI action.- Returns:
this
-
subnetIds
Sets the value ofCfnComputeNodeGroupMixinProps.getSubnetIds()- Parameters:
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.- Returns:
this
-
tags
Sets the value ofCfnComputeNodeGroupMixinProps.getTags()- Parameters:
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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnComputeNodeGroupMixinProps>- Returns:
- a new instance of
CfnComputeNodeGroupMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-