CfnComputeNodeGroupPropsMixin

class aws_cdk.cfn_property_mixins.aws_pcs.CfnComputeNodeGroupPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates an AWS PCS compute node group resource.

For more information, see Creating a compute node group in AWS PCS in the AWS PCS User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcs-computenodegroup.html

CloudformationResource:

AWS::PCS::ComputeNodeGroup

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_pcs as pcs
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_compute_node_group_props_mixin = pcs.CfnComputeNodeGroupPropsMixin(pcs.CfnComputeNodeGroupMixinProps(
    ami_id="amiId",
    cluster_id="clusterId",
    custom_launch_template=pcs.CfnComputeNodeGroupPropsMixin.CustomLaunchTemplateProperty(
        template_id="templateId",
        version="version"
    ),
    iam_instance_profile_arn="iamInstanceProfileArn",
    instance_configs=[pcs.CfnComputeNodeGroupPropsMixin.InstanceConfigProperty(
        instance_type="instanceType"
    )],
    name="name",
    purchase_option="purchaseOption",
    scaling_configuration=pcs.CfnComputeNodeGroupPropsMixin.ScalingConfigurationProperty(
        max_instance_count=123,
        min_instance_count=123
    ),
    slurm_configuration=pcs.CfnComputeNodeGroupPropsMixin.SlurmConfigurationProperty(
        slurm_custom_settings=[pcs.CfnComputeNodeGroupPropsMixin.SlurmCustomSettingProperty(
            parameter_name="parameterName",
            parameter_value="parameterValue"
        )]
    ),
    spot_options=pcs.CfnComputeNodeGroupPropsMixin.SpotOptionsProperty(
        allocation_strategy="allocationStrategy"
    ),
    subnet_ids=["subnetIds"],
    tags={
        "tags_key": "tags"
    }
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::PCS::ComputeNodeGroup.

Parameters:
  • props (Union[CfnComputeNodeGroupMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['amiId', 'clusterId', 'customLaunchTemplate', 'iamInstanceProfileArn', 'instanceConfigs', 'name', 'purchaseOption', 'scalingConfiguration', 'slurmConfiguration', 'spotOptions', 'subnetIds', 'tags']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

CustomLaunchTemplateProperty

class CfnComputeNodeGroupPropsMixin.CustomLaunchTemplateProperty(*, template_id=None, version=None)

Bases: object

An Amazon EC2 launch template AWS PCS uses to launch compute nodes.

Parameters:
  • template_id (Optional[str]) – The ID of the EC2 launch template to use to provision instances.

  • version (Optional[str]) – The version of the EC2 launch template to use to provision instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-customlaunchtemplate.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_pcs as pcs

custom_launch_template_property = pcs.CfnComputeNodeGroupPropsMixin.CustomLaunchTemplateProperty(
    template_id="templateId",
    version="version"
)

Attributes

template_id

The ID of the EC2 launch template to use to provision instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-customlaunchtemplate.html#cfn-pcs-computenodegroup-customlaunchtemplate-templateid

version

The version of the EC2 launch template to use to provision instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-customlaunchtemplate.html#cfn-pcs-computenodegroup-customlaunchtemplate-version

ErrorInfoProperty

class CfnComputeNodeGroupPropsMixin.ErrorInfoProperty(*, code=None, message=None)

Bases: object

An error that occurred during resource creation.

Parameters:
  • code (Optional[str]) – The short-form error code.

  • message (Optional[str]) – The detailed error information.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-errorinfo.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_pcs as pcs

error_info_property = pcs.CfnComputeNodeGroupPropsMixin.ErrorInfoProperty(
    code="code",
    message="message"
)

Attributes

code

The short-form error code.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-errorinfo.html#cfn-pcs-computenodegroup-errorinfo-code

message

The detailed error information.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-errorinfo.html#cfn-pcs-computenodegroup-errorinfo-message

InstanceConfigProperty

class CfnComputeNodeGroupPropsMixin.InstanceConfigProperty(*, instance_type=None)

Bases: object

An EC2 instance configuration AWS PCS uses to launch compute nodes.

Parameters:

instance_type (Optional[str]) – The EC2 instance type that AWS PCS can provision in the compute node group. Example: t2.xlarge

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-instanceconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_pcs as pcs

instance_config_property = pcs.CfnComputeNodeGroupPropsMixin.InstanceConfigProperty(
    instance_type="instanceType"
)

Attributes

instance_type

The EC2 instance type that AWS PCS can provision in the compute node group.

Example: t2.xlarge

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-instanceconfig.html#cfn-pcs-computenodegroup-instanceconfig-instancetype

ScalingConfigurationProperty

class CfnComputeNodeGroupPropsMixin.ScalingConfigurationProperty(*, max_instance_count=None, min_instance_count=None)

Bases: object

Specifies the boundaries of the compute node group auto scaling.

Parameters:
  • max_instance_count (Union[int, float, None]) – The upper bound of the number of instances allowed in the compute fleet.

  • min_instance_count (Union[int, float, None]) – The lower bound of the number of instances allowed in the compute fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-scalingconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_pcs as pcs

scaling_configuration_property = pcs.CfnComputeNodeGroupPropsMixin.ScalingConfigurationProperty(
    max_instance_count=123,
    min_instance_count=123
)

Attributes

max_instance_count

The upper bound of the number of instances allowed in the compute fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-scalingconfiguration.html#cfn-pcs-computenodegroup-scalingconfiguration-maxinstancecount

min_instance_count

The lower bound of the number of instances allowed in the compute fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-scalingconfiguration.html#cfn-pcs-computenodegroup-scalingconfiguration-mininstancecount

SlurmConfigurationProperty

class CfnComputeNodeGroupPropsMixin.SlurmConfigurationProperty(*, slurm_custom_settings=None)

Bases: object

Additional options related to the Slurm scheduler.

Parameters:

slurm_custom_settings (Union[IResolvable, Sequence[Union[IResolvable, SlurmCustomSettingProperty, Dict[str, Any]]], None]) – Additional Slurm-specific configuration that directly maps to Slurm settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-slurmconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_pcs as pcs

slurm_configuration_property = pcs.CfnComputeNodeGroupPropsMixin.SlurmConfigurationProperty(
    slurm_custom_settings=[pcs.CfnComputeNodeGroupPropsMixin.SlurmCustomSettingProperty(
        parameter_name="parameterName",
        parameter_value="parameterValue"
    )]
)

Attributes

slurm_custom_settings

Additional Slurm-specific configuration that directly maps to Slurm settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-slurmconfiguration.html#cfn-pcs-computenodegroup-slurmconfiguration-slurmcustomsettings

SlurmCustomSettingProperty

class CfnComputeNodeGroupPropsMixin.SlurmCustomSettingProperty(*, parameter_name=None, parameter_value=None)

Bases: object

Additional settings that directly map to Slurm settings.

AWS PCS supports a subset of Slurm settings. For more information, see Configuring custom Slurm settings in AWS PCS in the AWS PCS User Guide .

Parameters:
  • parameter_name (Optional[str]) –

    AWS PCS supports custom Slurm settings for clusters, compute node groups, and queues. For more information, see Configuring custom Slurm settings in AWS PCS in the AWS PCS User Guide .

  • parameter_value (Optional[str]) – The values for the configured Slurm settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-slurmcustomsetting.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_pcs as pcs

slurm_custom_setting_property = pcs.CfnComputeNodeGroupPropsMixin.SlurmCustomSettingProperty(
    parameter_name="parameterName",
    parameter_value="parameterValue"
)

Attributes

parameter_name

AWS PCS supports custom Slurm settings for clusters, compute node groups, and queues.

For more information, see Configuring custom Slurm settings in AWS PCS in the AWS PCS User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-slurmcustomsetting.html#cfn-pcs-computenodegroup-slurmcustomsetting-parametername

parameter_value

The values for the configured Slurm settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-slurmcustomsetting.html#cfn-pcs-computenodegroup-slurmcustomsetting-parametervalue

SpotOptionsProperty

class CfnComputeNodeGroupPropsMixin.SpotOptionsProperty(*, allocation_strategy=None)

Bases: object

Additional configuration when you specify SPOT as the purchaseOption for the CreateComputeNodeGroup API action.

Parameters:

allocation_strategy (Optional[str]) – The Amazon EC2 allocation strategy AWS PCS uses to provision EC2 instances. AWS PCS supports lowest price , capacity optimized , and price capacity optimized . For more information, see Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity in the Amazon Elastic Compute Cloud User Guide . If you don’t provide this option, it defaults to price capacity optimized .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-spotoptions.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_pcs as pcs

spot_options_property = pcs.CfnComputeNodeGroupPropsMixin.SpotOptionsProperty(
    allocation_strategy="allocationStrategy"
)

Attributes

allocation_strategy

The Amazon EC2 allocation strategy AWS PCS uses to provision EC2 instances.

AWS PCS supports lowest price , capacity optimized , and price capacity optimized . For more information, see Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity in the Amazon Elastic Compute Cloud User Guide . If you don’t provide this option, it defaults to price capacity optimized .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-computenodegroup-spotoptions.html#cfn-pcs-computenodegroup-spotoptions-allocationstrategy