Interface ICfnComputeNodeGroupProps
Properties for defining a CfnComputeNodeGroup.
Namespace: Amazon.CDK.AWS.PCS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnComputeNodeGroupProps
Syntax (vb)
Public Interface ICfnComputeNodeGroupProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcs-computenodegroup.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.PCS;
var cfnComputeNodeGroupProps = new CfnComputeNodeGroupProps {
ClusterId = "clusterId",
CustomLaunchTemplate = new CustomLaunchTemplateProperty {
Version = "version",
// the properties below are optional
TemplateId = "templateId"
},
IamInstanceProfileArn = "iamInstanceProfileArn",
InstanceConfigs = new [] { new InstanceConfigProperty {
InstanceType = "instanceType"
} },
ScalingConfiguration = new ScalingConfigurationProperty {
MaxInstanceCount = 123,
MinInstanceCount = 123
},
SubnetIds = new [] { "subnetIds" },
// the properties below are optional
AmiId = "amiId",
Name = "name",
PurchaseOption = "purchaseOption",
SlurmConfiguration = new SlurmConfigurationProperty {
SlurmCustomSettings = new [] { new SlurmCustomSettingProperty {
ParameterName = "parameterName",
ParameterValue = "parameterValue"
} }
},
SpotOptions = new SpotOptionsProperty {
AllocationStrategy = "allocationStrategy"
},
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
};
Synopsis
Properties
| AmiId | The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances. |
| ClusterId | The ID of the cluster of the compute node group. |
| CustomLaunchTemplate | An Amazon EC2 launch template AWS PCS uses to launch compute nodes. |
| IamInstanceProfileArn | The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. |
| InstanceConfigs | A list of EC2 instance configurations that AWS PCS can provision in the compute node group. |
| Name | The name that identifies the compute node group. |
| PurchaseOption | Specifies how EC2 instances are purchased on your behalf. |
| ScalingConfiguration | Specifies the boundaries of the compute node group auto scaling. |
| SlurmConfiguration | Additional options related to the Slurm scheduler. |
| SpotOptions | Additional configuration when you specify |
| SubnetIds | The list of subnet IDs where instances are provisioned by the compute node group. |
| Tags | 1 or more tags added to the resource. |
Properties
AmiId
The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances.
string? AmiId { get; }
Property Value
Remarks
If not provided, AWS PCS uses the AMI ID specified in the custom launch template.
ClusterId
The ID of the cluster of the compute node group.
string ClusterId { get; }
Property Value
Remarks
CustomLaunchTemplate
An Amazon EC2 launch template AWS PCS uses to launch compute nodes.
object CustomLaunchTemplate { get; }
Property Value
Remarks
IamInstanceProfileArn
The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances.
string IamInstanceProfileArn { get; }
Property Value
Remarks
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 AWS PCS in the AWS PCS User Guide .
InstanceConfigs
A list of EC2 instance configurations that AWS PCS can provision in the compute node group.
object InstanceConfigs { get; }
Property Value
Remarks
Name
The name that identifies the compute node group.
string? Name { get; }
Property Value
Remarks
PurchaseOption
Specifies how EC2 instances are purchased on your behalf.
string? PurchaseOption { get; }
Property Value
Remarks
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.
ScalingConfiguration
Specifies the boundaries of the compute node group auto scaling.
object ScalingConfiguration { get; }
Property Value
Remarks
SlurmConfiguration
Additional options related to the Slurm scheduler.
object? SlurmConfiguration { get; }
Property Value
Remarks
SpotOptions
Additional configuration when you specify SPOT as the purchaseOption for the CreateComputeNodeGroup API action.
object? SpotOptions { get; }
Property Value
Remarks
SubnetIds
The list of subnet IDs where instances are provisioned by the compute node group.
string[] SubnetIds { get; }
Property Value
string[]
Remarks
The subnets must be in the same VPC as the cluster.
Tags
1 or more tags added to the resource.
IDictionary<string, string>? Tags { get; }
Property Value
Remarks
Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.