update_compute_node_group
¶
update_compute_node_group(
cluster_identifier: ClusterIdentifier,
compute_node_group_identifier: ComputeNodeGroupIdentifier,
*,
config_overrides: Optional[PCSClientConfig] = None,
ami_id: Optional[AmiId] = None,
subnet_ids: Optional[StringList] = None,
custom_launch_template: Optional[CustomLaunchTemplate] = None,
purchase_option: Optional[PurchaseOption] = None,
spot_options: Optional[SpotOptions] = None,
scaling_configuration: Optional[ScalingConfigurationRequest] = None,
iam_instance_profile_arn: Optional[InstanceProfileArn] = None,
slurm_configuration: Optional[
UpdateComputeNodeGroupSlurmConfigurationRequest
] = None,
node_lifecycle_actions: Optional[UpdateNodeLifecycleActionsRequest] = None,
client_token: Optional[SBClientToken] = None,
) -> UpdateComputeNodeGroupResponse
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).
Parameters:
-
cluster_identifier(ClusterIdentifier) –The name or ID of the cluster of the compute node group.
-
compute_node_group_identifier(ComputeNodeGroupIdentifier) –The name or ID of the compute node group.
-
ami_id(Optional[AmiId], default:None) –The ID of the Amazon Machine Image (AMI) that PCS uses to launch instances. If not provided, PCS uses the AMI ID specified in the custom launch template.
-
subnet_ids(Optional[StringList], default:None) –The list of subnet IDs where the compute node group provisions instances. The subnets must be in the same VPC as the cluster.
-
purchase_option(Optional[PurchaseOption], default:None) –Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, Interruptible Capacity Reservations, On-Demand Capacity Reservations, 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 PCS support for Capacity Blocks, see Using Amazon EC2 Capacity Blocks for ML with PCS in the PCS User Guide. For more information about PCS support for interruptible capacity reservations, see Using I-ODCRs with PCS in the PCS User Guide. Choose On-Demand if you plan to use an On-Demand Capacity Reservation (ODCR). For more information, see Using ODCRs with PCS. If you don't provide this option, it defaults to On-Demand.
-
scaling_configuration(Optional[ScalingConfigurationRequest], default:None) –Specifies the boundaries of the compute node group auto scaling.
-
iam_instance_profile_arn(Optional[InstanceProfileArn], default:None) –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 the
pcs:RegisterComputeNodeGroupInstancepermission and the role name must start withAWSPCSor must have the path/aws-pcs/. For more information, see IAM instance profiles for PCS in the PCS User Guide. -
slurm_configuration(Optional[UpdateComputeNodeGroupSlurmConfigurationRequest], default:None) –Additional options related to the Slurm scheduler.
-
node_lifecycle_actions(Optional[UpdateNodeLifecycleActionsRequest], default:None) –The lifecycle actions to run on compute nodes in the compute node group. Use lifecycle actions to run custom scripts at defined stages of a compute node's lifecycle, such as when a compute node finishes bootstrapping or becomes ready to accept jobs.
-
client_token(Optional[SBClientToken], default:None) –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.
Raises:
-
AccessDeniedException–You don't have permission to perform the action.
Examples
-
The launch template instance profile doesn't pass
iam:PassRoleverification. -
There is a mismatch between the account ID and cluster ID.
-
The cluster ID doesn't exist.
-
The EC2 instance isn't present.
-
-
ConflictException–Your request has conflicting operations. This can occur if you're trying to perform more than 1 operation on the same resource at the same time.
Examples
-
A cluster with the same name already exists.
-
A cluster isn't in
ACTIVEstatus. -
A cluster to delete is in an unstable state. For example, because it still has
ACTIVEnode groups or queues. -
A queue already exists in a cluster.
-
-
InternalServerException–PCS can't process your request right now. Try again later.
-
ResourceNotFoundException–The requested resource can't be found. The cluster, node group, or queue you're attempting to get, update, list, or delete doesn't exist.
Examples
-
ServiceQuotaExceededException–You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account. To learn how to increase your service quota, see Requesting a quota increase in the Service Quotas User Guide
Examples
-
The max number of clusters or queues has been reached for the account.
-
The max number of compute node groups has been reached for the associated cluster.
-
The total of
maxInstancesacross all compute node groups has been reached for associated cluster.
-
-
ThrottlingException–Your request exceeded a request rate quota. Check the resource's request rate quota and try again.
-
ValidationException–The request isn't valid.
Examples
-
Your request contains malformed JSON or unsupported characters.
-
The scheduler version isn't supported.
-
There are networking related errors, such as network validation failure.
-
AMI type is
CUSTOMand the launch template doesn't define the AMI ID, or the AMI type is AL2 and the launch template defines the AMI.
-
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_pcs/_services/pcs.py
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | |