update_cluster
¶
update_cluster(
cluster_identifier: ClusterIdentifier,
*,
config_overrides: Optional[PCSClientConfig] = None,
client_token: Optional[SBClientToken] = None,
slurm_configuration: Optional[UpdateClusterSlurmConfigurationRequest] = None,
scheduler: Optional[UpdateSchedulerRequest] = None,
) -> UpdateClusterResponse
Updates a cluster configuration. You can update the scheduler version, modify scheduler settings, and update accounting configuration for an existing cluster. For more information about updating the scheduler version, see Updating the scheduler version on a cluster in the PCS User Guide.
You can only update clusters that are in ACTIVE, UPDATE_FAILED, or SUSPENDED state. All associated resources (queues and compute node groups) must be in ACTIVE state before you can update the cluster.
Parameters:
-
cluster_identifier(ClusterIdentifier) –The name or ID of the cluster to update.
-
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.
-
slurm_configuration(Optional[UpdateClusterSlurmConfigurationRequest], default:None) –Additional options related to the Slurm scheduler.
-
scheduler(Optional[UpdateSchedulerRequest], default:None) –The scheduler configuration to update for the cluster. Use this to update the scheduler version. For more information, see Updating the scheduler version on a cluster in the PCS User Guide.
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
-
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.