Skip to content

CreateComputeNodeGroupRequest

Source code in docs_src/capo_pcs/types/create_compute_node_group_request.py
class CreateComputeNodeGroupRequest(TypedDict, closed=True):
    cluster_identifier: "capo_pcs.types.cluster_identifier.ClusterIdentifier"
    """<p>The name or ID of the cluster to create a compute node group in.</p>"""
    compute_node_group_name: (
        "capo_pcs.types.compute_node_group_name.ComputeNodeGroupName"
    )
    """<p>A name to identify the cluster. Example: <code>MyCluster</code> </p>"""
    ami_id: NotRequired["capo_pcs.types.ami_id.AmiId"]
    """<p> The ID of the Amazon Machine Image (AMI) that PCS uses to launch compute nodes (Amazon EC2 instances). If you don't provide this value, PCS uses the AMI ID specified in the custom launch template.</p>"""
    subnet_ids: "capo_pcs.types.string_list.StringList"
    """<p>The list of subnet IDs where the compute node group launches instances. Subnets must be in the same VPC as the cluster.</p>"""
    purchase_option: NotRequired["capo_pcs.types.purchase_option.PurchaseOption"]
    """<p>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 <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html">Amazon EC2 billing and purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about PCS support for Capacity Blocks, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/capacity-blocks.html">Using Amazon EC2 Capacity Blocks for ML with PCS</a> in the <i>PCS User Guide</i>. For more information about PCS support for interruptible capacity reservations, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/capacity-reservations-iodcr.html">Using I-ODCRs with PCS</a> in the <i>PCS User Guide</i>. Choose On-Demand if you plan to use an On-Demand Capacity Reservation (ODCR). For more information, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/capacity-reservations-odcr.html">Using ODCRs with PCS</a>. If you don't provide this option, it defaults to On-Demand.</p>"""
    custom_launch_template: "capo_pcs.types.custom_launch_template.CustomLaunchTemplate"
    iam_instance_profile_arn: "capo_pcs.types.instance_profile_arn.InstanceProfileArn"
    """<p>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 <code>pcs:RegisterComputeNodeGroupInstance</code> permission and the role name must start with <code>AWSPCS</code> or must have the path <code>/aws-pcs/</code>. For more information, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/security-instance-profiles.html">IAM instance profiles for PCS</a> in the <i>PCS User Guide</i>.</p>"""
    scaling_configuration: (
        "capo_pcs.types.scaling_configuration_request.ScalingConfigurationRequest"
    )
    """<p>Specifies the boundaries of the compute node group auto scaling.</p>"""
    instance_configs: "capo_pcs.types.instance_list.InstanceList"
    """<p>A list of EC2 instance configurations that PCS can provision in the compute node group.</p>"""
    spot_options: NotRequired["capo_pcs.types.spot_options.SpotOptions"]
    slurm_configuration: NotRequired[
        "capo_pcs.types.compute_node_group_slurm_configuration_request.ComputeNodeGroupSlurmConfigurationRequest"
    ]
    """<p>Additional options related to the Slurm scheduler.</p>"""
    node_lifecycle_actions: NotRequired[
        "capo_pcs.types.node_lifecycle_actions_request.NodeLifecycleActionsRequest"
    ]
    """<p>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.</p>"""
    client_token: NotRequired["capo_pcs.types.sb_client_token.SBClientToken"]
    """<p>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 1 for you.</p>"""
    tags: NotRequired["capo_pcs.types.request_tag_map.RequestTagMap"]
    """<p>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.</p>"""

ami_id instance-attribute

ami_id: NotRequired[AmiId]

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

client_token instance-attribute

client_token: NotRequired[SBClientToken]

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 1 for you.

cluster_identifier instance-attribute

cluster_identifier: ClusterIdentifier

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

compute_node_group_name instance-attribute

compute_node_group_name: ComputeNodeGroupName

A name to identify the cluster. Example: MyCluster

custom_launch_template instance-attribute

custom_launch_template: CustomLaunchTemplate

iam_instance_profile_arn instance-attribute

iam_instance_profile_arn: InstanceProfileArn

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.

instance_configs instance-attribute

instance_configs: InstanceList

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

node_lifecycle_actions instance-attribute

node_lifecycle_actions: NotRequired[NodeLifecycleActionsRequest]

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.

purchase_option instance-attribute

purchase_option: NotRequired[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.

scaling_configuration instance-attribute

scaling_configuration: ScalingConfigurationRequest

Specifies the boundaries of the compute node group auto scaling.

slurm_configuration instance-attribute

slurm_configuration: NotRequired[ComputeNodeGroupSlurmConfigurationRequest]

Additional options related to the Slurm scheduler.

spot_options instance-attribute

spot_options: NotRequired[SpotOptions]

subnet_ids instance-attribute

subnet_ids: StringList

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

tags instance-attribute

tags: NotRequired[RequestTagMap]

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.