aws_sdk_pcs/client/create_compute_node_group.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateComputeNodeGroup`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`cluster_identifier(impl Into<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::cluster_identifier) / [`set_cluster_identifier(Option<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_cluster_identifier):<br>required: **true**<br><p>The name or ID of the cluster to create a compute node group in.</p><br>
7 /// - [`compute_node_group_name(impl Into<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::compute_node_group_name) / [`set_compute_node_group_name(Option<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_compute_node_group_name):<br>required: **true**<br><p>A name to identify the cluster. Example: <code>MyCluster</code></p><br>
8 /// - [`ami_id(impl Into<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::ami_id) / [`set_ami_id(Option<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_ami_id):<br>required: **false**<br><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><br>
9 /// - [`subnet_ids(impl Into<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::subnet_ids) / [`set_subnet_ids(Option<Vec::<String>>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_subnet_ids):<br>required: **true**<br><p>The list of subnet IDs where the compute node group launches instances. Subnets must be in the same VPC as the cluster.</p><br>
10 /// - [`purchase_option(PurchaseOption)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::purchase_option) / [`set_purchase_option(Option<PurchaseOption>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_purchase_option):<br>required: **false**<br><p>Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, 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>. If you don't provide this option, it defaults to On-Demand.</p><br>
11 /// - [`custom_launch_template(CustomLaunchTemplate)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::custom_launch_template) / [`set_custom_launch_template(Option<CustomLaunchTemplate>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_custom_launch_template):<br>required: **true**<br><p>An Amazon EC2 launch template PCS uses to launch compute nodes.</p><br>
12 /// - [`iam_instance_profile_arn(impl Into<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::iam_instance_profile_arn) / [`set_iam_instance_profile_arn(Option<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_iam_instance_profile_arn):<br>required: **true**<br><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><br>
13 /// - [`scaling_configuration(ScalingConfigurationRequest)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::scaling_configuration) / [`set_scaling_configuration(Option<ScalingConfigurationRequest>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_scaling_configuration):<br>required: **true**<br><p>Specifies the boundaries of the compute node group auto scaling.</p><br>
14 /// - [`instance_configs(InstanceConfig)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::instance_configs) / [`set_instance_configs(Option<Vec::<InstanceConfig>>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_instance_configs):<br>required: **true**<br><p>A list of EC2 instance configurations that PCS can provision in the compute node group.</p><br>
15 /// - [`spot_options(SpotOptions)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::spot_options) / [`set_spot_options(Option<SpotOptions>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_spot_options):<br>required: **false**<br><p>Additional configuration when you specify <code>SPOT</code> as the <code>purchaseOption</code> for the <code>CreateComputeNodeGroup</code> API action.</p><br>
16 /// - [`slurm_configuration(ComputeNodeGroupSlurmConfigurationRequest)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::slurm_configuration) / [`set_slurm_configuration(Option<ComputeNodeGroupSlurmConfigurationRequest>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_slurm_configuration):<br>required: **false**<br><p>Additional options related to the Slurm scheduler.</p><br>
17 /// - [`client_token(impl Into<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_client_token):<br>required: **false**<br><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><br>
18 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::set_tags):<br>required: **false**<br><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><br>
19 /// - On success, responds with [`CreateComputeNodeGroupOutput`](crate::operation::create_compute_node_group::CreateComputeNodeGroupOutput) with field(s):
20 /// - [`compute_node_group(Option<ComputeNodeGroup>)`](crate::operation::create_compute_node_group::CreateComputeNodeGroupOutput::compute_node_group): <p>A compute node group associated with a cluster.</p>
21 /// - On failure, responds with [`SdkError<CreateComputeNodeGroupError>`](crate::operation::create_compute_node_group::CreateComputeNodeGroupError)
22 pub fn create_compute_node_group(&self) -> crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder {
23 crate::operation::create_compute_node_group::builders::CreateComputeNodeGroupFluentBuilder::new(self.handle.clone())
24 }
25}