CfnComputeNodeGroupPropsMixin
- class aws_cdk.mixins_preview.aws_pcs.mixins.CfnComputeNodeGroupPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_pcs import mixins as pcs_mixins cfn_compute_node_group_props_mixin = pcs_mixins.CfnComputeNodeGroupPropsMixin(pcs_mixins.CfnComputeNodeGroupMixinProps( ami_id="amiId", cluster_id="clusterId", custom_launch_template=pcs_mixins.CfnComputeNodeGroupPropsMixin.CustomLaunchTemplateProperty( template_id="templateId", version="version" ), iam_instance_profile_arn="iamInstanceProfileArn", instance_configs=[pcs_mixins.CfnComputeNodeGroupPropsMixin.InstanceConfigProperty( instance_type="instanceType" )], name="name", purchase_option="purchaseOption", scaling_configuration=pcs_mixins.CfnComputeNodeGroupPropsMixin.ScalingConfigurationProperty( max_instance_count=123, min_instance_count=123 ), slurm_configuration=pcs_mixins.CfnComputeNodeGroupPropsMixin.SlurmConfigurationProperty( slurm_custom_settings=[pcs_mixins.CfnComputeNodeGroupPropsMixin.SlurmCustomSettingProperty( parameter_name="parameterName", parameter_value="parameterValue" )] ), spot_options=pcs_mixins.CfnComputeNodeGroupPropsMixin.SpotOptionsProperty( allocation_strategy="allocationStrategy" ), subnet_ids=["subnetIds"], tags={ "tags_key": "tags" } ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::PCS::ComputeNodeGroup.- Parameters:
props (
Union[CfnComputeNodeGroupMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
CustomLaunchTemplateProperty
- class CfnComputeNodeGroupPropsMixin.CustomLaunchTemplateProperty(*, template_id=None, version=None)
Bases:
objectAn 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:
- 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.mixins_preview.aws_pcs import mixins as pcs_mixins custom_launch_template_property = pcs_mixins.CfnComputeNodeGroupPropsMixin.CustomLaunchTemplateProperty( template_id="templateId", version="version" )
Attributes
- template_id
The ID of the EC2 launch template to use to provision instances.
- version
The version of the EC2 launch template to use to provision instances.
ErrorInfoProperty
- class CfnComputeNodeGroupPropsMixin.ErrorInfoProperty(*, code=None, message=None)
Bases:
objectAn error that occurred during resource creation.
- Parameters:
code (
Optional[str]) – The short-form error code.message (
Optional[str]) – The detailed error information.
- See:
- 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.mixins_preview.aws_pcs import mixins as pcs_mixins error_info_property = pcs_mixins.CfnComputeNodeGroupPropsMixin.ErrorInfoProperty( code="code", message="message" )
Attributes
- code
The short-form error code.
- message
The detailed error information.
InstanceConfigProperty
- class CfnComputeNodeGroupPropsMixin.InstanceConfigProperty(*, instance_type=None)
Bases:
objectAn 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:
- 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.mixins_preview.aws_pcs import mixins as pcs_mixins instance_config_property = pcs_mixins.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
ScalingConfigurationProperty
- class CfnComputeNodeGroupPropsMixin.ScalingConfigurationProperty(*, max_instance_count=None, min_instance_count=None)
Bases:
objectSpecifies 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:
- 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.mixins_preview.aws_pcs import mixins as pcs_mixins scaling_configuration_property = pcs_mixins.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.
- min_instance_count
The lower bound of the number of instances allowed in the compute fleet.
SlurmConfigurationProperty
- class CfnComputeNodeGroupPropsMixin.SlurmConfigurationProperty(*, slurm_custom_settings=None)
Bases:
objectAdditional 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:
- 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.mixins_preview.aws_pcs import mixins as pcs_mixins slurm_configuration_property = pcs_mixins.CfnComputeNodeGroupPropsMixin.SlurmConfigurationProperty( slurm_custom_settings=[pcs_mixins.CfnComputeNodeGroupPropsMixin.SlurmCustomSettingProperty( parameter_name="parameterName", parameter_value="parameterValue" )] )
Attributes
- slurm_custom_settings
Additional Slurm-specific configuration that directly maps to Slurm settings.
SlurmCustomSettingProperty
- class CfnComputeNodeGroupPropsMixin.SlurmCustomSettingProperty(*, parameter_name=None, parameter_value=None)
Bases:
objectAdditional 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:
- 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.mixins_preview.aws_pcs import mixins as pcs_mixins slurm_custom_setting_property = pcs_mixins.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 .
- parameter_value
The values for the configured Slurm settings.
SpotOptionsProperty
- class CfnComputeNodeGroupPropsMixin.SpotOptionsProperty(*, allocation_strategy=None)
Bases:
objectAdditional configuration when you specify
SPOTas thepurchaseOptionfor theCreateComputeNodeGroupAPI 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:
- 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.mixins_preview.aws_pcs import mixins as pcs_mixins spot_options_property = pcs_mixins.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 .