|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 8 | +import { BatchDeleteClusterNodesRequest, BatchDeleteClusterNodesResponse } from "../models/models_0"; |
| 9 | +import { de_BatchDeleteClusterNodesCommand, se_BatchDeleteClusterNodesCommand } from "../protocols/Aws_json1_1"; |
| 10 | +import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export type { __MetadataBearer }; |
| 16 | +export { $Command }; |
| 17 | +/** |
| 18 | + * @public |
| 19 | + * |
| 20 | + * The input for {@link BatchDeleteClusterNodesCommand}. |
| 21 | + */ |
| 22 | +export interface BatchDeleteClusterNodesCommandInput extends BatchDeleteClusterNodesRequest {} |
| 23 | +/** |
| 24 | + * @public |
| 25 | + * |
| 26 | + * The output of {@link BatchDeleteClusterNodesCommand}. |
| 27 | + */ |
| 28 | +export interface BatchDeleteClusterNodesCommandOutput extends BatchDeleteClusterNodesResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p>Deletes specific nodes within a SageMaker HyperPod cluster. <code>BatchDeleteClusterNodes</code> |
| 32 | + * accepts a cluster name and a list of node IDs.</p> |
| 33 | + * <important> |
| 34 | + * <ul> |
| 35 | + * <li> |
| 36 | + * <p>To safeguard your work, back up your data to Amazon S3 or an FSx for |
| 37 | + * Lustre file system before invoking the API on a worker node group. This will help |
| 38 | + * prevent any potential data loss from the instance root volume. For more |
| 39 | + * information about backup, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-operate-cli-command.html#sagemaker-hyperpod-operate-cli-command-update-cluster-software-backup">Use the backup script provided by SageMaker HyperPod</a>. </p> |
| 40 | + * </li> |
| 41 | + * <li> |
| 42 | + * <p>If you want to invoke this API on an existing cluster, you'll first need to |
| 43 | + * patch the cluster by running the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateClusterSoftware.html">UpdateClusterSoftware API</a>. For more information about patching a |
| 44 | + * cluster, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-operate-cli-command.html#sagemaker-hyperpod-operate-cli-command-update-cluster-software">Update the SageMaker HyperPod platform software of a cluster</a>.</p> |
| 45 | + * </li> |
| 46 | + * </ul> |
| 47 | + * </important> |
| 48 | + * @example |
| 49 | + * Use a bare-bones client and the command you need to make an API call. |
| 50 | + * ```javascript |
| 51 | + * import { SageMakerClient, BatchDeleteClusterNodesCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import |
| 52 | + * // const { SageMakerClient, BatchDeleteClusterNodesCommand } = require("@aws-sdk/client-sagemaker"); // CommonJS import |
| 53 | + * const client = new SageMakerClient(config); |
| 54 | + * const input = { // BatchDeleteClusterNodesRequest |
| 55 | + * ClusterName: "STRING_VALUE", // required |
| 56 | + * NodeIds: [ // ClusterNodeIds // required |
| 57 | + * "STRING_VALUE", |
| 58 | + * ], |
| 59 | + * }; |
| 60 | + * const command = new BatchDeleteClusterNodesCommand(input); |
| 61 | + * const response = await client.send(command); |
| 62 | + * // { // BatchDeleteClusterNodesResponse |
| 63 | + * // Failed: [ // BatchDeleteClusterNodesErrorList |
| 64 | + * // { // BatchDeleteClusterNodesError |
| 65 | + * // Code: "NodeIdNotFound" || "InvalidNodeStatus" || "NodeIdInUse", // required |
| 66 | + * // Message: "STRING_VALUE", // required |
| 67 | + * // NodeId: "STRING_VALUE", // required |
| 68 | + * // }, |
| 69 | + * // ], |
| 70 | + * // Successful: [ // ClusterNodeIds |
| 71 | + * // "STRING_VALUE", |
| 72 | + * // ], |
| 73 | + * // }; |
| 74 | + * |
| 75 | + * ``` |
| 76 | + * |
| 77 | + * @param BatchDeleteClusterNodesCommandInput - {@link BatchDeleteClusterNodesCommandInput} |
| 78 | + * @returns {@link BatchDeleteClusterNodesCommandOutput} |
| 79 | + * @see {@link BatchDeleteClusterNodesCommandInput} for command's `input` shape. |
| 80 | + * @see {@link BatchDeleteClusterNodesCommandOutput} for command's `response` shape. |
| 81 | + * @see {@link SageMakerClientResolvedConfig | config} for SageMakerClient's `config` shape. |
| 82 | + * |
| 83 | + * @throws {@link ResourceNotFound} (client fault) |
| 84 | + * <p>Resource being access is not found.</p> |
| 85 | + * |
| 86 | + * @throws {@link SageMakerServiceException} |
| 87 | + * <p>Base exception class for all service exceptions from SageMaker service.</p> |
| 88 | + * |
| 89 | + * @public |
| 90 | + */ |
| 91 | +export class BatchDeleteClusterNodesCommand extends $Command |
| 92 | + .classBuilder< |
| 93 | + BatchDeleteClusterNodesCommandInput, |
| 94 | + BatchDeleteClusterNodesCommandOutput, |
| 95 | + SageMakerClientResolvedConfig, |
| 96 | + ServiceInputTypes, |
| 97 | + ServiceOutputTypes |
| 98 | + >() |
| 99 | + .ep(commonParams) |
| 100 | + .m(function (this: any, Command: any, cs: any, config: SageMakerClientResolvedConfig, o: any) { |
| 101 | + return [ |
| 102 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 103 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 104 | + ]; |
| 105 | + }) |
| 106 | + .s("SageMaker", "BatchDeleteClusterNodes", {}) |
| 107 | + .n("SageMakerClient", "BatchDeleteClusterNodesCommand") |
| 108 | + .f(void 0, void 0) |
| 109 | + .ser(se_BatchDeleteClusterNodesCommand) |
| 110 | + .de(de_BatchDeleteClusterNodesCommand) |
| 111 | + .build() { |
| 112 | + /** @internal type navigation helper, not in runtime. */ |
| 113 | + protected declare static __types: { |
| 114 | + api: { |
| 115 | + input: BatchDeleteClusterNodesRequest; |
| 116 | + output: BatchDeleteClusterNodesResponse; |
| 117 | + }; |
| 118 | + sdk: { |
| 119 | + input: BatchDeleteClusterNodesCommandInput; |
| 120 | + output: BatchDeleteClusterNodesCommandOutput; |
| 121 | + }; |
| 122 | + }; |
| 123 | +} |
0 commit comments