ParallelComputingService / Client / update_compute_node_group

update_compute_node_group#

ParallelComputingService.Client.update_compute_node_group(**kwargs)#

Updates a compute node group. You can update many of the fields related to your compute node group including the configurations for networking, compute nodes, and settings specific to your scheduler (such as Slurm).

See also: AWS API Documentation

Request Syntax

response = client.update_compute_node_group(
    clusterIdentifier='string',
    computeNodeGroupIdentifier='string',
    amiId='string',
    subnetIds=[
        'string',
    ],
    customLaunchTemplate={
        'id': 'string',
        'version': 'string'
    },
    purchaseOption='ONDEMAND'|'SPOT',
    spotOptions={
        'allocationStrategy': 'lowest-price'|'capacity-optimized'|'price-capacity-optimized'
    },
    scalingConfiguration={
        'minInstanceCount': 123,
        'maxInstanceCount': 123
    },
    iamInstanceProfileArn='string',
    slurmConfiguration={
        'slurmCustomSettings': [
            {
                'parameterName': 'string',
                'parameterValue': 'string'
            },
        ]
    },
    clientToken='string'
)
Parameters:
  • clusterIdentifier (string) –

    [REQUIRED]

    The name or ID of the cluster of the compute node group.

  • computeNodeGroupIdentifier (string) –

    [REQUIRED]

    The name or ID of the compute node group.

  • amiId (string) – The ID of the Amazon Machine Image (AMI) that Amazon Web Services PCS uses to launch instances. If not provided, Amazon Web Services PCS uses the AMI ID specified in the custom launch template.

  • subnetIds (list) –

    The list of subnet IDs where the compute node group provisions instances. The subnets must be in the same VPC as the cluster.

    • (string) –

  • customLaunchTemplate (dict) –

    An Amazon EC2 launch template Amazon Web Services PCS uses to launch compute nodes.

    • id (string) – [REQUIRED]

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

      Example: lt-xxxx

    • version (string) – [REQUIRED]

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

  • purchaseOption (string) – Specifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see Instance purchasing options in the Amazon Elastic Compute Cloud User Guide. If you don’t provide this option, it defaults to On-Demand.

  • spotOptions (dict) –

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

  • scalingConfiguration (dict) –

    Specifies the boundaries of the compute node group auto scaling.

    • minInstanceCount (integer) – [REQUIRED]

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

    • maxInstanceCount (integer) – [REQUIRED]

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

  • iamInstanceProfileArn (string) – 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 pcs:RegisterComputeNodeGroupInstance permissions attached to provision instances correctly.

  • slurmConfiguration (dict) –

    Additional options related to the Slurm scheduler.

    • slurmCustomSettings (list) –

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

      • (dict) –

        Additional settings that directly map to Slurm settings.

        • parameterName (string) – [REQUIRED]

          Amazon Web Services PCS supports configuration of the following Slurm parameters: Prolog, Epilog, and SelectTypeParameters.

        • parameterValue (string) – [REQUIRED]

          The values for the configured Slurm settings.

  • clientToken (string) –

    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.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'computeNodeGroup': {
        'name': 'string',
        'id': 'string',
        'arn': 'string',
        'clusterId': 'string',
        'createdAt': datetime(2015, 1, 1),
        'modifiedAt': datetime(2015, 1, 1),
        'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATE_FAILED'|'DELETE_FAILED'|'UPDATE_FAILED'|'DELETED',
        'amiId': 'string',
        'subnetIds': [
            'string',
        ],
        'purchaseOption': 'ONDEMAND'|'SPOT',
        'customLaunchTemplate': {
            'id': 'string',
            'version': 'string'
        },
        'iamInstanceProfileArn': 'string',
        'scalingConfiguration': {
            'minInstanceCount': 123,
            'maxInstanceCount': 123
        },
        'instanceConfigs': [
            {
                'instanceType': 'string'
            },
        ],
        'spotOptions': {
            'allocationStrategy': 'lowest-price'|'capacity-optimized'|'price-capacity-optimized'
        },
        'slurmConfiguration': {
            'slurmCustomSettings': [
                {
                    'parameterName': 'string',
                    'parameterValue': 'string'
                },
            ]
        },
        'errorInfo': [
            {
                'code': 'string',
                'message': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • computeNodeGroup (dict) –

      A compute node group associated with a cluster.

      • name (string) –

        The name that identifies the compute node group.

      • id (string) –

        The generated unique ID of the compute node group.

      • arn (string) –

        The unique Amazon Resource Name (ARN) of the compute node group.

      • clusterId (string) –

        The ID of the cluster of the compute node group.

      • createdAt (datetime) –

        The date and time the resource was created.

      • modifiedAt (datetime) –

        The date and time the resource was modified.

      • status (string) –

        The provisioning status of the compute node group.

        Note

        The provisioning status doesn’t indicate the overall health of the compute node group.

      • amiId (string) –

        The ID of the Amazon Machine Image (AMI) that Amazon Web Services PCS uses to launch instances. If not provided, Amazon Web Services PCS uses the AMI ID specified in the custom launch template.

      • subnetIds (list) –

        The list of subnet IDs where instances are provisioned by the compute node group. The subnets must be in the same VPC as the cluster.

        • (string) –

      • purchaseOption (string) –

        Specifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see Instance purchasing options in the Amazon Elastic Compute Cloud User Guide. If you don’t provide this option, it defaults to On-Demand.

      • customLaunchTemplate (dict) –

        An Amazon EC2 launch template Amazon Web Services PCS uses to launch compute nodes.

        • id (string) –

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

          Example: lt-xxxx

        • version (string) –

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

      • iamInstanceProfileArn (string) –

        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 pcs:RegisterComputeNodeGroupInstance permissions attached to provision instances correctly.

      • scalingConfiguration (dict) –

        Specifies the boundaries of the compute node group auto scaling.

        • minInstanceCount (integer) –

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

        • maxInstanceCount (integer) –

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

      • instanceConfigs (list) –

        A list of EC2 instance configurations that Amazon Web Services PCS can provision in the compute node group.

        • (dict) –

          An EC2 instance configuration Amazon Web Services PCS uses to launch compute nodes.

          • instanceType (string) –

            The EC2 instance type that Amazon Web Services PCS can provision in the compute node group.

            Example: t2.xlarge

      • spotOptions (dict) –

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

      • slurmConfiguration (dict) –

        Additional options related to the Slurm scheduler.

        • slurmCustomSettings (list) –

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

          • (dict) –

            Additional settings that directly map to Slurm settings.

            • parameterName (string) –

              Amazon Web Services PCS supports configuration of the following Slurm parameters: Prolog, Epilog, and SelectTypeParameters.

            • parameterValue (string) –

              The values for the configured Slurm settings.

      • errorInfo (list) –

        The list of errors that occurred during compute node group provisioning.

        • (dict) –

          An error that occurred during resource creation.

          • code (string) –

            The short-form error code.

          • message (string) –

            The detailed error information.

Exceptions

  • ParallelComputingService.Client.exceptions.ServiceQuotaExceededException

  • ParallelComputingService.Client.exceptions.ThrottlingException

  • ParallelComputingService.Client.exceptions.ValidationException

  • ParallelComputingService.Client.exceptions.ConflictException

  • ParallelComputingService.Client.exceptions.ResourceNotFoundException

  • ParallelComputingService.Client.exceptions.InternalServerException

  • ParallelComputingService.Client.exceptions.AccessDeniedException