Interface CreateComputeNodeGroupRequest.Builder

  • Method Details

    • amiId

      The ID of the Amazon Machine Image (AMI) that PCS uses to launch compute nodes (Amazon EC2 instances). This value overrides the AMI ID in the custom launch template. If you don't provide this value, PCS uses the AMI ID specified in the custom launch template. You must provide this value if launchTemplateMode is MANAGED.

      Parameters:
      amiId - The ID of the Amazon Machine Image (AMI) that PCS uses to launch compute nodes (Amazon EC2 instances). This value overrides the AMI ID in the custom launch template. If you don't provide this value, PCS uses the AMI ID specified in the custom launch template. You must provide this value if launchTemplateMode is MANAGED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • securityGroupIds

      CreateComputeNodeGroupRequest.Builder securityGroupIds(Collection<String> securityGroupIds)

      The IDs of the EC2 security groups to configure directly on the compute node group. The security groups must be in the same VPC as the cluster. PCS uses these security groups instead of the security groups in the custom launch template. You can't specify this value if the custom launch template defines network interfaces. If you don't provide this value, PCS uses the security groups in the custom launch template. You must provide this value if launchTemplateMode is MANAGED. For more information, see Configuring instance settings for compute node groups in PCS in the PCS User Guide.

      Parameters:
      securityGroupIds - The IDs of the EC2 security groups to configure directly on the compute node group. The security groups must be in the same VPC as the cluster. PCS uses these security groups instead of the security groups in the custom launch template. You can't specify this value if the custom launch template defines network interfaces. If you don't provide this value, PCS uses the security groups in the custom launch template. You must provide this value if launchTemplateMode is MANAGED. For more information, see Configuring instance settings for compute node groups in PCS in the PCS User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • securityGroupIds

      CreateComputeNodeGroupRequest.Builder securityGroupIds(String... securityGroupIds)

      The IDs of the EC2 security groups to configure directly on the compute node group. The security groups must be in the same VPC as the cluster. PCS uses these security groups instead of the security groups in the custom launch template. You can't specify this value if the custom launch template defines network interfaces. If you don't provide this value, PCS uses the security groups in the custom launch template. You must provide this value if launchTemplateMode is MANAGED. For more information, see Configuring instance settings for compute node groups in PCS in the PCS User Guide.

      Parameters:
      securityGroupIds - The IDs of the EC2 security groups to configure directly on the compute node group. The security groups must be in the same VPC as the cluster. PCS uses these security groups instead of the security groups in the custom launch template. You can't specify this value if the custom launch template defines network interfaces. If you don't provide this value, PCS uses the security groups in the custom launch template. You must provide this value if launchTemplateMode is MANAGED. For more information, see Configuring instance settings for compute node groups in PCS in the PCS User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sshKeyName

      The name of the EC2 key pair to configure directly on the compute node group. The key pair must exist in your account and Amazon Web Services Region. PCS uses this key pair instead of the key pair in the custom launch template. If you don't provide this value, PCS uses the key pair in the custom launch template, if one is specified. You must have permission for ec2:DescribeKeyPairs. If you delete the key pair later, future instance launches can fail. For more information, see Configuring instance settings for compute node groups in PCS in the PCS User Guide.

      Parameters:
      sshKeyName - The name of the EC2 key pair to configure directly on the compute node group. The key pair must exist in your account and Amazon Web Services Region. PCS uses this key pair instead of the key pair in the custom launch template. If you don't provide this value, PCS uses the key pair in the custom launch template, if one is specified. You must have permission for ec2:DescribeKeyPairs. If you delete the key pair later, future instance launches can fail. For more information, see Configuring instance settings for compute node groups in PCS in the PCS User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • clusterIdentifier

      CreateComputeNodeGroupRequest.Builder clusterIdentifier(String clusterIdentifier)

      The name or ID of the cluster to create a compute node group in.

      Parameters:
      clusterIdentifier - The name or ID of the cluster to create a compute node group in.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • computeNodeGroupName

      CreateComputeNodeGroupRequest.Builder computeNodeGroupName(String computeNodeGroupName)

      A name to identify the cluster. Example: MyCluster

      Parameters:
      computeNodeGroupName - A name to identify the cluster. Example: MyCluster
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • subnetIds

      The list of subnet IDs where the compute node group launches instances. Subnets must be in the same VPC as the cluster.

      Parameters:
      subnetIds - The list of subnet IDs where the compute node group launches instances. Subnets must be in the same VPC as the cluster.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • subnetIds

      The list of subnet IDs where the compute node group launches instances. Subnets must be in the same VPC as the cluster.

      Parameters:
      subnetIds - The list of subnet IDs where the compute node group launches instances. Subnets must be in the same VPC as the cluster.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • purchaseOption

      CreateComputeNodeGroupRequest.Builder purchaseOption(String purchaseOption)

      Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, Interruptible Capacity Reservations, On-Demand Capacity Reservations, 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 PCS support for Capacity Blocks, see Using Amazon EC2 Capacity Blocks for ML with PCS in the PCS User Guide. For more information about PCS support for interruptible capacity reservations, see Using I-ODCRs with PCS in the PCS User Guide. Choose On-Demand if you plan to use an On-Demand Capacity Reservation (ODCR). For more information, see Using ODCRs with PCS. If you don't provide this option, it defaults to On-Demand.

      Parameters:
      purchaseOption - Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, Interruptible Capacity Reservations, On-Demand Capacity Reservations, 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 PCS support for Capacity Blocks, see Using Amazon EC2 Capacity Blocks for ML with PCS in the PCS User Guide. For more information about PCS support for interruptible capacity reservations, see Using I-ODCRs with PCS in the PCS User Guide. Choose On-Demand if you plan to use an On-Demand Capacity Reservation (ODCR). For more information, see Using ODCRs with PCS. If you don't provide this option, it defaults to On-Demand.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • purchaseOption

      CreateComputeNodeGroupRequest.Builder purchaseOption(PurchaseOption purchaseOption)

      Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, Interruptible Capacity Reservations, On-Demand Capacity Reservations, 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 PCS support for Capacity Blocks, see Using Amazon EC2 Capacity Blocks for ML with PCS in the PCS User Guide. For more information about PCS support for interruptible capacity reservations, see Using I-ODCRs with PCS in the PCS User Guide. Choose On-Demand if you plan to use an On-Demand Capacity Reservation (ODCR). For more information, see Using ODCRs with PCS. If you don't provide this option, it defaults to On-Demand.

      Parameters:
      purchaseOption - Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, Interruptible Capacity Reservations, On-Demand Capacity Reservations, 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 PCS support for Capacity Blocks, see Using Amazon EC2 Capacity Blocks for ML with PCS in the PCS User Guide. For more information about PCS support for interruptible capacity reservations, see Using I-ODCRs with PCS in the PCS User Guide. Choose On-Demand if you plan to use an On-Demand Capacity Reservation (ODCR). For more information, see Using ODCRs with PCS. If you don't provide this option, it defaults to On-Demand.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • launchTemplateMode

      CreateComputeNodeGroupRequest.Builder launchTemplateMode(String launchTemplateMode)

      Specifies whether the compute node group uses a custom launch template or a launch template that PCS manages. The default value is CUSTOM.

      If the value is CUSTOM, provide customLaunchTemplate. If the value is MANAGED, omit customLaunchTemplate and provide amiId and securityGroupIds.

      Parameters:
      launchTemplateMode - Specifies whether the compute node group uses a custom launch template or a launch template that PCS manages. The default value is CUSTOM.

      If the value is CUSTOM, provide customLaunchTemplate. If the value is MANAGED, omit customLaunchTemplate and provide amiId and securityGroupIds.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • launchTemplateMode

      CreateComputeNodeGroupRequest.Builder launchTemplateMode(LaunchTemplateMode launchTemplateMode)

      Specifies whether the compute node group uses a custom launch template or a launch template that PCS manages. The default value is CUSTOM.

      If the value is CUSTOM, provide customLaunchTemplate. If the value is MANAGED, omit customLaunchTemplate and provide amiId and securityGroupIds.

      Parameters:
      launchTemplateMode - Specifies whether the compute node group uses a custom launch template or a launch template that PCS manages. The default value is CUSTOM.

      If the value is CUSTOM, provide customLaunchTemplate. If the value is MANAGED, omit customLaunchTemplate and provide amiId and securityGroupIds.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • customLaunchTemplate

      CreateComputeNodeGroupRequest.Builder customLaunchTemplate(CustomLaunchTemplate customLaunchTemplate)

      The custom Amazon EC2 launch template to associate with the compute node group. Specify the launch template id and version when launchTemplateMode is CUSTOM. Don't specify this value when launchTemplateMode is MANAGED.

      Parameters:
      customLaunchTemplate - The custom Amazon EC2 launch template to associate with the compute node group. Specify the launch template id and version when launchTemplateMode is CUSTOM. Don't specify this value when launchTemplateMode is MANAGED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • customLaunchTemplate

      default CreateComputeNodeGroupRequest.Builder customLaunchTemplate(Consumer<CustomLaunchTemplate.Builder> customLaunchTemplate)

      The custom Amazon EC2 launch template to associate with the compute node group. Specify the launch template id and version when launchTemplateMode is CUSTOM. Don't specify this value when launchTemplateMode is MANAGED.

      This is a convenience method that creates an instance of the CustomLaunchTemplate.Builder avoiding the need to create one manually via CustomLaunchTemplate.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to customLaunchTemplate(CustomLaunchTemplate).

      Parameters:
      customLaunchTemplate - a consumer that will call methods on CustomLaunchTemplate.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • iamInstanceProfileArn

      CreateComputeNodeGroupRequest.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 with AWSPCS or must have the path /aws-pcs/. For more information, see IAM instance profiles for PCS in the 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. The role contained in your instance profile must have the pcs:RegisterComputeNodeGroupInstance permission and the role name must start with AWSPCS or must have the path /aws-pcs/. For more information, see IAM instance profiles for PCS in the PCS User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scalingConfiguration

      CreateComputeNodeGroupRequest.Builder scalingConfiguration(ScalingConfigurationRequest scalingConfiguration)

      Specifies the boundaries of the compute node group auto scaling.

      Parameters:
      scalingConfiguration - Specifies the boundaries of the compute node group auto scaling.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scalingConfiguration

      default CreateComputeNodeGroupRequest.Builder scalingConfiguration(Consumer<ScalingConfigurationRequest.Builder> scalingConfiguration)

      Specifies the boundaries of the compute node group auto scaling.

      This is a convenience method that creates an instance of the ScalingConfigurationRequest.Builder avoiding the need to create one manually via ScalingConfigurationRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to scalingConfiguration(ScalingConfigurationRequest).

      Parameters:
      scalingConfiguration - a consumer that will call methods on ScalingConfigurationRequest.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • instanceConfigs

      A list of EC2 instance configurations that PCS can provision in the compute node group.

      Parameters:
      instanceConfigs - A list of EC2 instance configurations that PCS can provision in the compute node group.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • instanceConfigs

      CreateComputeNodeGroupRequest.Builder instanceConfigs(InstanceConfig... instanceConfigs)

      A list of EC2 instance configurations that PCS can provision in the compute node group.

      Parameters:
      instanceConfigs - A list of EC2 instance configurations that PCS can provision in the compute node group.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • instanceConfigs

      A list of EC2 instance configurations that PCS can provision in the compute node group.

      This is a convenience method that creates an instance of the InstanceConfig.Builder avoiding the need to create one manually via InstanceConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to instanceConfigs(List<InstanceConfig>).

      Parameters:
      instanceConfigs - a consumer that will call methods on InstanceConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • spotOptions

      Sets the value of the SpotOptions property for this object.
      Parameters:
      spotOptions - The new value for the SpotOptions property for this object.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • spotOptions

      Sets the value of the SpotOptions property for this object. This is a convenience method that creates an instance of the SpotOptions.Builder avoiding the need to create one manually via SpotOptions.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to spotOptions(SpotOptions).

      Parameters:
      spotOptions - a consumer that will call methods on SpotOptions.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • slurmConfiguration

      Additional options related to the Slurm scheduler.

      Parameters:
      slurmConfiguration - Additional options related to the Slurm scheduler.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • slurmConfiguration

      Additional options related to the Slurm scheduler.

      This is a convenience method that creates an instance of the ComputeNodeGroupSlurmConfigurationRequest.Builder avoiding the need to create one manually via ComputeNodeGroupSlurmConfigurationRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to slurmConfiguration(ComputeNodeGroupSlurmConfigurationRequest).

      Parameters:
      slurmConfiguration - a consumer that will call methods on ComputeNodeGroupSlurmConfigurationRequest.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • nodeLifecycleActions

      CreateComputeNodeGroupRequest.Builder nodeLifecycleActions(NodeLifecycleActionsRequest nodeLifecycleActions)

      The lifecycle actions to run on compute nodes in the compute node group. Use lifecycle actions to run custom scripts at defined stages of a compute node's lifecycle, such as when a compute node finishes bootstrapping or becomes ready to accept jobs.

      Parameters:
      nodeLifecycleActions - The lifecycle actions to run on compute nodes in the compute node group. Use lifecycle actions to run custom scripts at defined stages of a compute node's lifecycle, such as when a compute node finishes bootstrapping or becomes ready to accept jobs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • nodeLifecycleActions

      default CreateComputeNodeGroupRequest.Builder nodeLifecycleActions(Consumer<NodeLifecycleActionsRequest.Builder> nodeLifecycleActions)

      The lifecycle actions to run on compute nodes in the compute node group. Use lifecycle actions to run custom scripts at defined stages of a compute node's lifecycle, such as when a compute node finishes bootstrapping or becomes ready to accept jobs.

      This is a convenience method that creates an instance of the NodeLifecycleActionsRequest.Builder avoiding the need to create one manually via NodeLifecycleActionsRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to nodeLifecycleActions(NodeLifecycleActionsRequest).

      Parameters:
      nodeLifecycleActions - a consumer that will call methods on NodeLifecycleActionsRequest.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • instanceHealthChecks

      CreateComputeNodeGroupRequest.Builder instanceHealthChecks(InstanceHealthChecksRequest instanceHealthChecks)

      The instance health check settings for the compute node group. Instance health checks detect faults on instances in the compute node group and respond with the repair action that you choose. You can configure health monitoring, deep health checks, or both. You can't specify an empty object ({}). Instance health checks require Slurm version 26.05 or later.

      Parameters:
      instanceHealthChecks - The instance health check settings for the compute node group. Instance health checks detect faults on instances in the compute node group and respond with the repair action that you choose. You can configure health monitoring, deep health checks, or both. You can't specify an empty object ( {}). Instance health checks require Slurm version 26.05 or later.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • instanceHealthChecks

      default CreateComputeNodeGroupRequest.Builder instanceHealthChecks(Consumer<InstanceHealthChecksRequest.Builder> instanceHealthChecks)

      The instance health check settings for the compute node group. Instance health checks detect faults on instances in the compute node group and respond with the repair action that you choose. You can configure health monitoring, deep health checks, or both. You can't specify an empty object ({}). Instance health checks require Slurm version 26.05 or later.

      This is a convenience method that creates an instance of the InstanceHealthChecksRequest.Builder avoiding the need to create one manually via InstanceHealthChecksRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to instanceHealthChecks(InstanceHealthChecksRequest).

      Parameters:
      instanceHealthChecks - a consumer that will call methods on InstanceHealthChecksRequest.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • clientToken

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate one for you.

      Parameters:
      clientToken - A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate one for you.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      CreateComputeNodeGroupRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.