CfnClusterPropsMixin
- class aws_cdk.mixins_preview.aws_pcs.mixins.CfnClusterPropsMixin(props, *, strategy=None)
Bases:
MixinCreates an AWS PCS cluster resource.
For more information, see Creating a cluster in AWS Parallel Computing Service in the AWS PCS User Guide .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcs-cluster.html
- CloudformationResource:
AWS::PCS::Cluster
- 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_cluster_props_mixin = pcs_mixins.CfnClusterPropsMixin(pcs_mixins.CfnClusterMixinProps( name="name", networking=pcs_mixins.CfnClusterPropsMixin.NetworkingProperty( network_type="networkType", security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"] ), scheduler=pcs_mixins.CfnClusterPropsMixin.SchedulerProperty( type="type", version="version" ), size="size", slurm_configuration=pcs_mixins.CfnClusterPropsMixin.SlurmConfigurationProperty( accounting=pcs_mixins.CfnClusterPropsMixin.AccountingProperty( default_purge_time_in_days=123, mode="mode" ), auth_key=pcs_mixins.CfnClusterPropsMixin.AuthKeyProperty( secret_arn="secretArn", secret_version="secretVersion" ), jwt_auth=pcs_mixins.CfnClusterPropsMixin.JwtAuthProperty( jwt_key=pcs_mixins.CfnClusterPropsMixin.JwtKeyProperty( secret_arn="secretArn", secret_version="secretVersion" ) ), scale_down_idle_time_in_seconds=123, slurm_custom_settings=[pcs_mixins.CfnClusterPropsMixin.SlurmCustomSettingProperty( parameter_name="parameterName", parameter_value="parameterValue" )], slurm_rest=pcs_mixins.CfnClusterPropsMixin.SlurmRestProperty( mode="mode" ) ), tags={ "tags_key": "tags" } ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::PCS::Cluster.- Parameters:
props (
Union[CfnClusterMixinProps,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 = ['name', 'networking', 'scheduler', 'size', 'slurmConfiguration', '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
AccountingProperty
- class CfnClusterPropsMixin.AccountingProperty(*, default_purge_time_in_days=None, mode=None)
Bases:
objectThe accounting configuration includes configurable settings for Slurm accounting.
- Parameters:
default_purge_time_in_days (
Union[int,float,None]) – The default value for all purge settings forslurmdbd.conf. For more information, see the slurmdbd.conf documentation at SchedMD . The default value fordefaultPurgeTimeInDaysis-1. A value of-1means there is no purge time and records persist as long as the cluster exists. .. epigraph::0isn’t a valid value. Default: - -1mode (
Optional[str]) – The default value formodeisSTANDARD. A value ofSTANDARDmeans Slurm accounting is enabled. Default: - “NONE”
- 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 accounting_property = pcs_mixins.CfnClusterPropsMixin.AccountingProperty( default_purge_time_in_days=123, mode="mode" )
Attributes
- default_purge_time_in_days
The default value for all purge settings for
slurmdbd.conf. For more information, see the slurmdbd.conf documentation at SchedMD .The default value for
defaultPurgeTimeInDaysis-1.A value of
-1means there is no purge time and records persist as long as the cluster exists. .. epigraph:``0`` isn't a valid value.
- mode
The default value for
modeisSTANDARD.A value of
STANDARDmeans Slurm accounting is enabled.
AuthKeyProperty
- class CfnClusterPropsMixin.AuthKeyProperty(*, secret_arn=None, secret_version=None)
Bases:
objectThe shared Slurm key for authentication, also known as the cluster secret .
- Parameters:
secret_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the shared Slurm key.secret_version (
Optional[str]) – The version of the shared Slurm key.
- 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 auth_key_property = pcs_mixins.CfnClusterPropsMixin.AuthKeyProperty( secret_arn="secretArn", secret_version="secretVersion" )
Attributes
- secret_arn
The Amazon Resource Name (ARN) of the shared Slurm key.
- secret_version
The version of the shared Slurm key.
EndpointProperty
- class CfnClusterPropsMixin.EndpointProperty(*, ipv6_address=None, port=None, private_ip_address=None, public_ip_address=None, type=None)
Bases:
objectAn endpoint available for interaction with the scheduler.
- Parameters:
ipv6_address (
Optional[str]) – The endpoint’s IPv6 address. Example:2001:db8::1port (
Optional[str]) – The endpoint’s connection port number. Example:1234private_ip_address (
Optional[str]) – For clusters that use IPv4, this is the endpoint’s private IP address. Example:10.1.2.3For clusters configured to use IPv6, this is an empty string.public_ip_address (
Optional[str]) – The endpoint’s public IP address. Example:192.0.2.1type (
Optional[str]) – Indicates the type of endpoint running at the specific IP address.
- 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 endpoint_property = pcs_mixins.CfnClusterPropsMixin.EndpointProperty( ipv6_address="ipv6Address", port="port", private_ip_address="privateIpAddress", public_ip_address="publicIpAddress", type="type" )
Attributes
- ipv6_address
The endpoint’s IPv6 address.
Example:
2001:db8::1
- port
The endpoint’s connection port number.
Example:
1234
- private_ip_address
For clusters that use IPv4, this is the endpoint’s private IP address.
Example:
10.1.2.3For clusters configured to use IPv6, this is an empty string.
- public_ip_address
The endpoint’s public IP address.
Example:
192.0.2.1
- type
Indicates the type of endpoint running at the specific IP address.
ErrorInfoProperty
- class CfnClusterPropsMixin.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.CfnClusterPropsMixin.ErrorInfoProperty( code="code", message="message" )
Attributes
- code
The short-form error code.
- message
The detailed error information.
JwtAuthProperty
- class CfnClusterPropsMixin.JwtAuthProperty(*, jwt_key=None)
Bases:
objectThe JWT authentication configuration for Slurm REST API access.
- Parameters:
jwt_key (
Union[IResolvable,JwtKeyProperty,Dict[str,Any],None]) – The JWT key for Slurm REST API authentication.- 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 jwt_auth_property = pcs_mixins.CfnClusterPropsMixin.JwtAuthProperty( jwt_key=pcs_mixins.CfnClusterPropsMixin.JwtKeyProperty( secret_arn="secretArn", secret_version="secretVersion" ) )
Attributes
- jwt_key
The JWT key for Slurm REST API authentication.
JwtKeyProperty
- class CfnClusterPropsMixin.JwtKeyProperty(*, secret_arn=None, secret_version=None)
Bases:
objectThe JWT key stored in AWS Secrets Manager for Slurm REST API authentication.
- Parameters:
secret_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the AWS Secrets Manager secret containing the JWT key.secret_version (
Optional[str]) – The version of the AWS Secrets Manager secret containing the JWT key.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-cluster-jwtkey.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.mixins_preview.aws_pcs import mixins as pcs_mixins jwt_key_property = pcs_mixins.CfnClusterPropsMixin.JwtKeyProperty( secret_arn="secretArn", secret_version="secretVersion" )
Attributes
- secret_arn
The Amazon Resource Name (ARN) of the AWS Secrets Manager secret containing the JWT key.
- secret_version
The version of the AWS Secrets Manager secret containing the JWT key.
NetworkingProperty
- class CfnClusterPropsMixin.NetworkingProperty(*, network_type=None, security_group_ids=None, subnet_ids=None)
Bases:
objectThe networking configuration for the cluster’s control plane.
- Parameters:
network_type (
Optional[str]) – The IP address version the cluster uses. The default isIPV4.security_group_ids (
Optional[Sequence[str]]) – The list of security group IDs associated with the Elastic Network Interface (ENI) created in subnets. The following rules are required: - Inbound rule 1 - Protocol: All - Ports: All - Source: Self - Outbound rule 1 - Protocol: All - Ports: All - Destination: 0.0.0.0/0 (IPv4) or ::/0 (IPv6) - Outbound rule 2 - Protocol: All - Ports: All - Destination: Selfsubnet_ids (
Optional[Sequence[str]]) – The ID of the subnet where AWS PCS creates an Elastic Network Interface (ENI) to enable communication between managed controllers and AWS PCS resources. The subnet must have an available IP address, cannot reside in AWS Outposts , AWS Wavelength , or an AWS Local Zone. Example:subnet-abcd1234
- 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 networking_property = pcs_mixins.CfnClusterPropsMixin.NetworkingProperty( network_type="networkType", security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"] )
Attributes
- network_type
The IP address version the cluster uses.
The default is
IPV4.
- security_group_ids
The list of security group IDs associated with the Elastic Network Interface (ENI) created in subnets.
The following rules are required:
Inbound rule 1
Protocol: All
Ports: All
Source: Self
Outbound rule 1
Protocol: All
Ports: All
Destination: 0.0.0.0/0 (IPv4) or ::/0 (IPv6)
Outbound rule 2
Protocol: All
Ports: All
Destination: Self
- subnet_ids
The ID of the subnet where AWS PCS creates an Elastic Network Interface (ENI) to enable communication between managed controllers and AWS PCS resources.
The subnet must have an available IP address, cannot reside in AWS Outposts , AWS Wavelength , or an AWS Local Zone.
Example:
subnet-abcd1234
SchedulerProperty
- class CfnClusterPropsMixin.SchedulerProperty(*, type=None, version=None)
Bases:
objectThe cluster management and job scheduling software associated with the cluster.
- Parameters:
type (
Optional[str]) – The software AWS PCS uses to manage cluster scaling and job scheduling.version (
Optional[str]) – The version of the specified scheduling software that AWS PCS uses to manage cluster scaling and job scheduling. For more information, see Slurm versions in AWS PCS in the AWS PCS User Guide . Valid Values:23.11 | 24.05 | 24.11
- 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 scheduler_property = pcs_mixins.CfnClusterPropsMixin.SchedulerProperty( type="type", version="version" )
Attributes
- type
The software AWS PCS uses to manage cluster scaling and job scheduling.
- version
The version of the specified scheduling software that AWS PCS uses to manage cluster scaling and job scheduling.
For more information, see Slurm versions in AWS PCS in the AWS PCS User Guide .
Valid Values:
23.11 | 24.05 | 24.11
SlurmConfigurationProperty
- class CfnClusterPropsMixin.SlurmConfigurationProperty(*, accounting=None, auth_key=None, jwt_auth=None, scale_down_idle_time_in_seconds=None, slurm_custom_settings=None, slurm_rest=None)
Bases:
objectAdditional options related to the Slurm scheduler.
- Parameters:
accounting (
Union[IResolvable,AccountingProperty,Dict[str,Any],None]) – The accounting configuration includes configurable settings for Slurm accounting.auth_key (
Union[IResolvable,AuthKeyProperty,Dict[str,Any],None]) – The shared Slurm key for authentication, also known as the cluster secret .jwt_auth (
Union[IResolvable,JwtAuthProperty,Dict[str,Any],None]) – The JWT authentication configuration for Slurm REST API access.scale_down_idle_time_in_seconds (
Union[int,float,None]) – The time (in seconds) before an idle node is scaled down. Default:600slurm_custom_settings (
Union[IResolvable,Sequence[Union[IResolvable,SlurmCustomSettingProperty,Dict[str,Any]]],None]) – Additional Slurm-specific configuration that directly maps to Slurm settings.slurm_rest (
Union[IResolvable,SlurmRestProperty,Dict[str,Any],None]) – The Slurm REST API configuration for the cluster.
- 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.CfnClusterPropsMixin.SlurmConfigurationProperty( accounting=pcs_mixins.CfnClusterPropsMixin.AccountingProperty( default_purge_time_in_days=123, mode="mode" ), auth_key=pcs_mixins.CfnClusterPropsMixin.AuthKeyProperty( secret_arn="secretArn", secret_version="secretVersion" ), jwt_auth=pcs_mixins.CfnClusterPropsMixin.JwtAuthProperty( jwt_key=pcs_mixins.CfnClusterPropsMixin.JwtKeyProperty( secret_arn="secretArn", secret_version="secretVersion" ) ), scale_down_idle_time_in_seconds=123, slurm_custom_settings=[pcs_mixins.CfnClusterPropsMixin.SlurmCustomSettingProperty( parameter_name="parameterName", parameter_value="parameterValue" )], slurm_rest=pcs_mixins.CfnClusterPropsMixin.SlurmRestProperty( mode="mode" ) )
Attributes
- accounting
The accounting configuration includes configurable settings for Slurm accounting.
- auth_key
The shared Slurm key for authentication, also known as the cluster secret .
- jwt_auth
The JWT authentication configuration for Slurm REST API access.
- scale_down_idle_time_in_seconds
The time (in seconds) before an idle node is scaled down.
Default:
600
- slurm_custom_settings
Additional Slurm-specific configuration that directly maps to Slurm settings.
- slurm_rest
The Slurm REST API configuration for the cluster.
SlurmCustomSettingProperty
- class CfnClusterPropsMixin.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.CfnClusterPropsMixin.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.
SlurmRestProperty
- class CfnClusterPropsMixin.SlurmRestProperty(*, mode=None)
Bases:
objectThe Slurm REST API configuration includes settings for enabling and configuring the Slurm REST API.
It’s a property of the ClusterSlurmConfiguration object.
- Parameters:
mode (
Optional[str]) – The default value formodeisSTANDARD. A value ofSTANDARDmeans the Slurm REST API is enabled. Default: - “NONE”- 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_rest_property = pcs_mixins.CfnClusterPropsMixin.SlurmRestProperty( mode="mode" )
Attributes
- mode
The default value for
modeisSTANDARD.A value of
STANDARDmeans the Slurm REST API is enabled.