diff --git a/clients/client-pcs/.gitignore b/clients/client-pcs/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-pcs/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-pcs/LICENSE b/clients/client-pcs/LICENSE new file mode 100644 index 000000000000..1349aa7c9923 --- /dev/null +++ b/clients/client-pcs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-pcs/README.md b/clients/client-pcs/README.md new file mode 100644 index 000000000000..10065c5caeb1 --- /dev/null +++ b/clients/client-pcs/README.md @@ -0,0 +1,366 @@ + + +# @aws-sdk/client-pcs + +## Description + +AWS SDK for JavaScript PCS Client for Node.js, Browser and React Native. + +

Amazon Web Services Parallel Computing Service (Amazon Web Services PCS) is a managed service that makes it easier for +you to run and scale your high performance computing (HPC) workloads, +and build scientific and engineering models on Amazon Web Services using Slurm. +For more information, see +the Amazon Web Services Parallel Computing Service +User Guide.

+

This reference describes the actions and data types of the service management API. You can use the +Amazon Web Services SDKs to call the API actions in software, or use the Command Line Interface (CLI) to call the API +actions manually. These API actions manage the service through an Amazon Web Services account.

+

The API actions operate on Amazon Web Services PCS resources. A resource is +an entity in Amazon Web Services that you can work with. Amazon Web Services services create resources when you use +the features of the service. Examples of Amazon Web Services PCS resources include clusters, compute +node groups, and queues. For more information about resources in Amazon Web Services, see Resource in the Resource Explorer User Guide.

+

An Amazon Web Services PCS compute node is an Amazon EC2 instance. You don't launch +compute nodes directly. Amazon Web Services PCS uses configuration information that you provide to launch +compute nodes in your Amazon Web Services account. You receive billing charges for your running compute nodes. +Amazon Web Services PCS automatically terminates your compute nodes when you delete the Amazon Web Services PCS resources +related to those compute nodes.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-pcs +using your favorite package manager: + +- `npm install @aws-sdk/client-pcs` +- `yarn add @aws-sdk/client-pcs` +- `pnpm add @aws-sdk/client-pcs` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `PCSClient` and +the commands you need, for example `ListClustersCommand`: + +```js +// ES5 example +const { PCSClient, ListClustersCommand } = require("@aws-sdk/client-pcs"); +``` + +```ts +// ES6+ example +import { PCSClient, ListClustersCommand } from "@aws-sdk/client-pcs"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new PCSClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListClustersCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-pcs"; +const client = new AWS.PCS({ region: "REGION" }); + +// async/await. +try { + const data = await client.listClusters(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listClusters(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listClusters(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-pcs` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +CreateCluster + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/CreateClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/CreateClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/CreateClusterCommandOutput/) + +
+
+ +CreateComputeNodeGroup + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/CreateComputeNodeGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/CreateComputeNodeGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/CreateComputeNodeGroupCommandOutput/) + +
+
+ +CreateQueue + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/CreateQueueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/CreateQueueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/CreateQueueCommandOutput/) + +
+
+ +DeleteCluster + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/DeleteClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/DeleteClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/DeleteClusterCommandOutput/) + +
+
+ +DeleteComputeNodeGroup + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/DeleteComputeNodeGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/DeleteComputeNodeGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/DeleteComputeNodeGroupCommandOutput/) + +
+
+ +DeleteQueue + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/DeleteQueueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/DeleteQueueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/DeleteQueueCommandOutput/) + +
+
+ +GetCluster + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/GetClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/GetClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/GetClusterCommandOutput/) + +
+
+ +GetComputeNodeGroup + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/GetComputeNodeGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/GetComputeNodeGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/GetComputeNodeGroupCommandOutput/) + +
+
+ +GetQueue + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/GetQueueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/GetQueueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/GetQueueCommandOutput/) + +
+
+ +ListClusters + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/ListClustersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/ListClustersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/ListClustersCommandOutput/) + +
+
+ +ListComputeNodeGroups + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/ListComputeNodeGroupsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/ListComputeNodeGroupsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/ListComputeNodeGroupsCommandOutput/) + +
+
+ +ListQueues + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/ListQueuesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/ListQueuesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/ListQueuesCommandOutput/) + +
+
+ +ListTagsForResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/ListTagsForResourceCommandOutput/) + +
+
+ +RegisterComputeNodeGroupInstance + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/RegisterComputeNodeGroupInstanceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/RegisterComputeNodeGroupInstanceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/RegisterComputeNodeGroupInstanceCommandOutput/) + +
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/TagResourceCommandOutput/) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/UntagResourceCommandOutput/) + +
+
+ +UpdateComputeNodeGroup + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/UpdateComputeNodeGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/UpdateComputeNodeGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/UpdateComputeNodeGroupCommandOutput/) + +
+
+ +UpdateQueue + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pcs/command/UpdateQueueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/UpdateQueueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pcs/Interface/UpdateQueueCommandOutput/) + +
diff --git a/clients/client-pcs/api-extractor.json b/clients/client-pcs/api-extractor.json new file mode 100644 index 000000000000..d5bf5ffeee85 --- /dev/null +++ b/clients/client-pcs/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "/dist-types/index.d.ts" +} diff --git a/clients/client-pcs/package.json b/clients/client-pcs/package.json new file mode 100644 index 000000000000..d2ec66adc93f --- /dev/null +++ b/clients/client-pcs/package.json @@ -0,0 +1,103 @@ +{ + "name": "@aws-sdk/client-pcs", + "description": "AWS SDK for JavaScript Pcs Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo pcs" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "*", + "@aws-sdk/client-sts": "*", + "@aws-sdk/core": "*", + "@aws-sdk/credential-provider-node": "*", + "@aws-sdk/middleware-host-header": "*", + "@aws-sdk/middleware-logger": "*", + "@aws-sdk/middleware-recursion-detection": "*", + "@aws-sdk/middleware-user-agent": "*", + "@aws-sdk/region-config-resolver": "*", + "@aws-sdk/types": "*", + "@aws-sdk/util-endpoints": "*", + "@aws-sdk/util-user-agent-browser": "*", + "@aws-sdk/util-user-agent-node": "*", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "devDependencies": { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + "@types/uuid": "^9.0.4", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=16.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-pcs", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-pcs" + } +} diff --git a/clients/client-pcs/src/PCS.ts b/clients/client-pcs/src/PCS.ts new file mode 100644 index 000000000000..4c2ea012f3fb --- /dev/null +++ b/clients/client-pcs/src/PCS.ts @@ -0,0 +1,355 @@ +// smithy-typescript generated code +import { createAggregatedClient } from "@smithy/smithy-client"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; + +import { + CreateClusterCommand, + CreateClusterCommandInput, + CreateClusterCommandOutput, +} from "./commands/CreateClusterCommand"; +import { + CreateComputeNodeGroupCommand, + CreateComputeNodeGroupCommandInput, + CreateComputeNodeGroupCommandOutput, +} from "./commands/CreateComputeNodeGroupCommand"; +import { CreateQueueCommand, CreateQueueCommandInput, CreateQueueCommandOutput } from "./commands/CreateQueueCommand"; +import { + DeleteClusterCommand, + DeleteClusterCommandInput, + DeleteClusterCommandOutput, +} from "./commands/DeleteClusterCommand"; +import { + DeleteComputeNodeGroupCommand, + DeleteComputeNodeGroupCommandInput, + DeleteComputeNodeGroupCommandOutput, +} from "./commands/DeleteComputeNodeGroupCommand"; +import { DeleteQueueCommand, DeleteQueueCommandInput, DeleteQueueCommandOutput } from "./commands/DeleteQueueCommand"; +import { GetClusterCommand, GetClusterCommandInput, GetClusterCommandOutput } from "./commands/GetClusterCommand"; +import { + GetComputeNodeGroupCommand, + GetComputeNodeGroupCommandInput, + GetComputeNodeGroupCommandOutput, +} from "./commands/GetComputeNodeGroupCommand"; +import { GetQueueCommand, GetQueueCommandInput, GetQueueCommandOutput } from "./commands/GetQueueCommand"; +import { + ListClustersCommand, + ListClustersCommandInput, + ListClustersCommandOutput, +} from "./commands/ListClustersCommand"; +import { + ListComputeNodeGroupsCommand, + ListComputeNodeGroupsCommandInput, + ListComputeNodeGroupsCommandOutput, +} from "./commands/ListComputeNodeGroupsCommand"; +import { ListQueuesCommand, ListQueuesCommandInput, ListQueuesCommandOutput } from "./commands/ListQueuesCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + RegisterComputeNodeGroupInstanceCommand, + RegisterComputeNodeGroupInstanceCommandInput, + RegisterComputeNodeGroupInstanceCommandOutput, +} from "./commands/RegisterComputeNodeGroupInstanceCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateComputeNodeGroupCommand, + UpdateComputeNodeGroupCommandInput, + UpdateComputeNodeGroupCommandOutput, +} from "./commands/UpdateComputeNodeGroupCommand"; +import { UpdateQueueCommand, UpdateQueueCommandInput, UpdateQueueCommandOutput } from "./commands/UpdateQueueCommand"; +import { PCSClient, PCSClientConfig } from "./PCSClient"; + +const commands = { + CreateClusterCommand, + CreateComputeNodeGroupCommand, + CreateQueueCommand, + DeleteClusterCommand, + DeleteComputeNodeGroupCommand, + DeleteQueueCommand, + GetClusterCommand, + GetComputeNodeGroupCommand, + GetQueueCommand, + ListClustersCommand, + ListComputeNodeGroupsCommand, + ListQueuesCommand, + ListTagsForResourceCommand, + RegisterComputeNodeGroupInstanceCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateComputeNodeGroupCommand, + UpdateQueueCommand, +}; + +export interface PCS { + /** + * @see {@link CreateClusterCommand} + */ + createCluster(args: CreateClusterCommandInput, options?: __HttpHandlerOptions): Promise; + createCluster(args: CreateClusterCommandInput, cb: (err: any, data?: CreateClusterCommandOutput) => void): void; + createCluster( + args: CreateClusterCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateClusterCommandOutput) => void + ): void; + + /** + * @see {@link CreateComputeNodeGroupCommand} + */ + createComputeNodeGroup( + args: CreateComputeNodeGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createComputeNodeGroup( + args: CreateComputeNodeGroupCommandInput, + cb: (err: any, data?: CreateComputeNodeGroupCommandOutput) => void + ): void; + createComputeNodeGroup( + args: CreateComputeNodeGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateComputeNodeGroupCommandOutput) => void + ): void; + + /** + * @see {@link CreateQueueCommand} + */ + createQueue(args: CreateQueueCommandInput, options?: __HttpHandlerOptions): Promise; + createQueue(args: CreateQueueCommandInput, cb: (err: any, data?: CreateQueueCommandOutput) => void): void; + createQueue( + args: CreateQueueCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateQueueCommandOutput) => void + ): void; + + /** + * @see {@link DeleteClusterCommand} + */ + deleteCluster(args: DeleteClusterCommandInput, options?: __HttpHandlerOptions): Promise; + deleteCluster(args: DeleteClusterCommandInput, cb: (err: any, data?: DeleteClusterCommandOutput) => void): void; + deleteCluster( + args: DeleteClusterCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteClusterCommandOutput) => void + ): void; + + /** + * @see {@link DeleteComputeNodeGroupCommand} + */ + deleteComputeNodeGroup( + args: DeleteComputeNodeGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteComputeNodeGroup( + args: DeleteComputeNodeGroupCommandInput, + cb: (err: any, data?: DeleteComputeNodeGroupCommandOutput) => void + ): void; + deleteComputeNodeGroup( + args: DeleteComputeNodeGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteComputeNodeGroupCommandOutput) => void + ): void; + + /** + * @see {@link DeleteQueueCommand} + */ + deleteQueue(args: DeleteQueueCommandInput, options?: __HttpHandlerOptions): Promise; + deleteQueue(args: DeleteQueueCommandInput, cb: (err: any, data?: DeleteQueueCommandOutput) => void): void; + deleteQueue( + args: DeleteQueueCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteQueueCommandOutput) => void + ): void; + + /** + * @see {@link GetClusterCommand} + */ + getCluster(args: GetClusterCommandInput, options?: __HttpHandlerOptions): Promise; + getCluster(args: GetClusterCommandInput, cb: (err: any, data?: GetClusterCommandOutput) => void): void; + getCluster( + args: GetClusterCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetClusterCommandOutput) => void + ): void; + + /** + * @see {@link GetComputeNodeGroupCommand} + */ + getComputeNodeGroup( + args: GetComputeNodeGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getComputeNodeGroup( + args: GetComputeNodeGroupCommandInput, + cb: (err: any, data?: GetComputeNodeGroupCommandOutput) => void + ): void; + getComputeNodeGroup( + args: GetComputeNodeGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetComputeNodeGroupCommandOutput) => void + ): void; + + /** + * @see {@link GetQueueCommand} + */ + getQueue(args: GetQueueCommandInput, options?: __HttpHandlerOptions): Promise; + getQueue(args: GetQueueCommandInput, cb: (err: any, data?: GetQueueCommandOutput) => void): void; + getQueue( + args: GetQueueCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetQueueCommandOutput) => void + ): void; + + /** + * @see {@link ListClustersCommand} + */ + listClusters(): Promise; + listClusters(args: ListClustersCommandInput, options?: __HttpHandlerOptions): Promise; + listClusters(args: ListClustersCommandInput, cb: (err: any, data?: ListClustersCommandOutput) => void): void; + listClusters( + args: ListClustersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListClustersCommandOutput) => void + ): void; + + /** + * @see {@link ListComputeNodeGroupsCommand} + */ + listComputeNodeGroups( + args: ListComputeNodeGroupsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listComputeNodeGroups( + args: ListComputeNodeGroupsCommandInput, + cb: (err: any, data?: ListComputeNodeGroupsCommandOutput) => void + ): void; + listComputeNodeGroups( + args: ListComputeNodeGroupsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListComputeNodeGroupsCommandOutput) => void + ): void; + + /** + * @see {@link ListQueuesCommand} + */ + listQueues(args: ListQueuesCommandInput, options?: __HttpHandlerOptions): Promise; + listQueues(args: ListQueuesCommandInput, cb: (err: any, data?: ListQueuesCommandOutput) => void): void; + listQueues( + args: ListQueuesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListQueuesCommandOutput) => void + ): void; + + /** + * @see {@link ListTagsForResourceCommand} + */ + listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + + /** + * @see {@link RegisterComputeNodeGroupInstanceCommand} + */ + registerComputeNodeGroupInstance( + args: RegisterComputeNodeGroupInstanceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + registerComputeNodeGroupInstance( + args: RegisterComputeNodeGroupInstanceCommandInput, + cb: (err: any, data?: RegisterComputeNodeGroupInstanceCommandOutput) => void + ): void; + registerComputeNodeGroupInstance( + args: RegisterComputeNodeGroupInstanceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RegisterComputeNodeGroupInstanceCommandOutput) => void + ): void; + + /** + * @see {@link TagResourceCommand} + */ + tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UntagResourceCommand} + */ + untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UpdateComputeNodeGroupCommand} + */ + updateComputeNodeGroup( + args: UpdateComputeNodeGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateComputeNodeGroup( + args: UpdateComputeNodeGroupCommandInput, + cb: (err: any, data?: UpdateComputeNodeGroupCommandOutput) => void + ): void; + updateComputeNodeGroup( + args: UpdateComputeNodeGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateComputeNodeGroupCommandOutput) => void + ): void; + + /** + * @see {@link UpdateQueueCommand} + */ + updateQueue(args: UpdateQueueCommandInput, options?: __HttpHandlerOptions): Promise; + updateQueue(args: UpdateQueueCommandInput, cb: (err: any, data?: UpdateQueueCommandOutput) => void): void; + updateQueue( + args: UpdateQueueCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateQueueCommandOutput) => void + ): void; +} + +/** + *

Amazon Web Services Parallel Computing Service (Amazon Web Services PCS) is a managed service that makes it easier for + * you to run and scale your high performance computing (HPC) workloads, + * and build scientific and engineering models on Amazon Web Services using Slurm. + * For more information, see + * the Amazon Web Services Parallel Computing Service + * User Guide.

+ *

This reference describes the actions and data types of the service management API. You can use the + * Amazon Web Services SDKs to call the API actions in software, or use the Command Line Interface (CLI) to call the API + * actions manually. These API actions manage the service through an Amazon Web Services account.

+ *

The API actions operate on Amazon Web Services PCS resources. A resource is + * an entity in Amazon Web Services that you can work with. Amazon Web Services services create resources when you use + * the features of the service. Examples of Amazon Web Services PCS resources include clusters, compute + * node groups, and queues. For more information about resources in Amazon Web Services, see Resource in the Resource Explorer User Guide.

+ *

An Amazon Web Services PCS compute node is an Amazon EC2 instance. You don't launch + * compute nodes directly. Amazon Web Services PCS uses configuration information that you provide to launch + * compute nodes in your Amazon Web Services account. You receive billing charges for your running compute nodes. + * Amazon Web Services PCS automatically terminates your compute nodes when you delete the Amazon Web Services PCS resources + * related to those compute nodes.

+ * @public + */ +export class PCS extends PCSClient implements PCS {} +createAggregatedClient(commands, PCS); diff --git a/clients/client-pcs/src/PCSClient.ts b/clients/client-pcs/src/PCSClient.ts new file mode 100644 index 000000000000..c05bc4f5aff1 --- /dev/null +++ b/clients/client-pcs/src/PCSClient.ts @@ -0,0 +1,393 @@ +// smithy-typescript generated code +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { + DefaultIdentityProviderConfig, + getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpSigningPlugin, +} from "@smithy/core"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + AwsCredentialIdentityProvider, + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + EndpointV2 as __EndpointV2, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; + +import { + defaultPCSHttpAuthSchemeParametersProvider, + HttpAuthSchemeInputConfig, + HttpAuthSchemeResolvedConfig, + resolveHttpAuthSchemeConfig, +} from "./auth/httpAuthSchemeProvider"; +import { CreateClusterCommandInput, CreateClusterCommandOutput } from "./commands/CreateClusterCommand"; +import { + CreateComputeNodeGroupCommandInput, + CreateComputeNodeGroupCommandOutput, +} from "./commands/CreateComputeNodeGroupCommand"; +import { CreateQueueCommandInput, CreateQueueCommandOutput } from "./commands/CreateQueueCommand"; +import { DeleteClusterCommandInput, DeleteClusterCommandOutput } from "./commands/DeleteClusterCommand"; +import { + DeleteComputeNodeGroupCommandInput, + DeleteComputeNodeGroupCommandOutput, +} from "./commands/DeleteComputeNodeGroupCommand"; +import { DeleteQueueCommandInput, DeleteQueueCommandOutput } from "./commands/DeleteQueueCommand"; +import { GetClusterCommandInput, GetClusterCommandOutput } from "./commands/GetClusterCommand"; +import { + GetComputeNodeGroupCommandInput, + GetComputeNodeGroupCommandOutput, +} from "./commands/GetComputeNodeGroupCommand"; +import { GetQueueCommandInput, GetQueueCommandOutput } from "./commands/GetQueueCommand"; +import { ListClustersCommandInput, ListClustersCommandOutput } from "./commands/ListClustersCommand"; +import { + ListComputeNodeGroupsCommandInput, + ListComputeNodeGroupsCommandOutput, +} from "./commands/ListComputeNodeGroupsCommand"; +import { ListQueuesCommandInput, ListQueuesCommandOutput } from "./commands/ListQueuesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + RegisterComputeNodeGroupInstanceCommandInput, + RegisterComputeNodeGroupInstanceCommandOutput, +} from "./commands/RegisterComputeNodeGroupInstanceCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + UpdateComputeNodeGroupCommandInput, + UpdateComputeNodeGroupCommandOutput, +} from "./commands/UpdateComputeNodeGroupCommand"; +import { UpdateQueueCommandInput, UpdateQueueCommandOutput } from "./commands/UpdateQueueCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | CreateClusterCommandInput + | CreateComputeNodeGroupCommandInput + | CreateQueueCommandInput + | DeleteClusterCommandInput + | DeleteComputeNodeGroupCommandInput + | DeleteQueueCommandInput + | GetClusterCommandInput + | GetComputeNodeGroupCommandInput + | GetQueueCommandInput + | ListClustersCommandInput + | ListComputeNodeGroupsCommandInput + | ListQueuesCommandInput + | ListTagsForResourceCommandInput + | RegisterComputeNodeGroupInstanceCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateComputeNodeGroupCommandInput + | UpdateQueueCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | CreateClusterCommandOutput + | CreateComputeNodeGroupCommandOutput + | CreateQueueCommandOutput + | DeleteClusterCommandOutput + | DeleteComputeNodeGroupCommandOutput + | DeleteQueueCommandOutput + | GetClusterCommandOutput + | GetComputeNodeGroupCommandOutput + | GetQueueCommandOutput + | ListClustersCommandOutput + | ListComputeNodeGroupsCommandOutput + | ListQueuesCommandOutput + | ListTagsForResourceCommandOutput + | RegisterComputeNodeGroupInstanceCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateComputeNodeGroupCommandOutput + | UpdateQueueCommandOutput; + +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandlerUserInput; + + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + + /** + * Default credentials provider; Not available in browser runtime. + * @deprecated + * @internal + */ + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} + +/** + * @public + */ +export type PCSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + UserAgentInputConfig & + RetryInputConfig & + RegionInputConfig & + HostHeaderInputConfig & + EndpointInputConfig & + HttpAuthSchemeInputConfig & + ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of PCSClient class constructor that set the region, credentials and other options. + */ +export interface PCSClientConfig extends PCSClientConfigType {} + +/** + * @public + */ +export type PCSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + UserAgentResolvedConfig & + RetryResolvedConfig & + RegionResolvedConfig & + HostHeaderResolvedConfig & + EndpointResolvedConfig & + HttpAuthSchemeResolvedConfig & + ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of PCSClient class. This is resolved and normalized from the {@link PCSClientConfig | constructor configuration interface}. + */ +export interface PCSClientResolvedConfig extends PCSClientResolvedConfigType {} + +/** + *

Amazon Web Services Parallel Computing Service (Amazon Web Services PCS) is a managed service that makes it easier for + * you to run and scale your high performance computing (HPC) workloads, + * and build scientific and engineering models on Amazon Web Services using Slurm. + * For more information, see + * the Amazon Web Services Parallel Computing Service + * User Guide.

+ *

This reference describes the actions and data types of the service management API. You can use the + * Amazon Web Services SDKs to call the API actions in software, or use the Command Line Interface (CLI) to call the API + * actions manually. These API actions manage the service through an Amazon Web Services account.

+ *

The API actions operate on Amazon Web Services PCS resources. A resource is + * an entity in Amazon Web Services that you can work with. Amazon Web Services services create resources when you use + * the features of the service. Examples of Amazon Web Services PCS resources include clusters, compute + * node groups, and queues. For more information about resources in Amazon Web Services, see Resource in the Resource Explorer User Guide.

+ *

An Amazon Web Services PCS compute node is an Amazon EC2 instance. You don't launch + * compute nodes directly. Amazon Web Services PCS uses configuration information that you provide to launch + * compute nodes in your Amazon Web Services account. You receive billing charges for your running compute nodes. + * Amazon Web Services PCS automatically terminates your compute nodes when you delete the Amazon Web Services PCS resources + * related to those compute nodes.

+ * @public + */ +export class PCSClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + PCSClientResolvedConfig +> { + /** + * The resolved configuration of PCSClient class. This is resolved and normalized from the {@link PCSClientConfig | constructor configuration interface}. + */ + readonly config: PCSClientResolvedConfig; + + constructor(...[configuration]: __CheckOptionalClientConfig) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveRegionConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveEndpointConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use( + getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultPCSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config: PCSClientResolvedConfig) => + new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }), + }) + ); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-pcs/src/auth/httpAuthExtensionConfiguration.ts b/clients/client-pcs/src/auth/httpAuthExtensionConfiguration.ts new file mode 100644 index 000000000000..3a7744a9d3d0 --- /dev/null +++ b/clients/client-pcs/src/auth/httpAuthExtensionConfiguration.ts @@ -0,0 +1,72 @@ +// smithy-typescript generated code +import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types"; + +import { PCSHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; + +/** + * @internal + */ +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider(httpAuthSchemeProvider: PCSHttpAuthSchemeProvider): void; + httpAuthSchemeProvider(): PCSHttpAuthSchemeProvider; + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void; + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined; +} + +/** + * @internal + */ +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: PCSHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; + +/** + * @internal + */ +export const getHttpAuthExtensionConfiguration = ( + runtimeConfig: HttpAuthRuntimeConfig +): HttpAuthExtensionConfiguration => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes!; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider!; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes(): HttpAuthScheme[] { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider: PCSHttpAuthSchemeProvider): void { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider(): PCSHttpAuthSchemeProvider { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void { + _credentials = credentials; + }, + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined { + return _credentials; + }, + }; +}; + +/** + * @internal + */ +export const resolveHttpAuthRuntimeConfig = (config: HttpAuthExtensionConfiguration): HttpAuthRuntimeConfig => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; diff --git a/clients/client-pcs/src/auth/httpAuthSchemeProvider.ts b/clients/client-pcs/src/auth/httpAuthSchemeProvider.ts new file mode 100644 index 000000000000..b018442e0af5 --- /dev/null +++ b/clients/client-pcs/src/auth/httpAuthSchemeProvider.ts @@ -0,0 +1,137 @@ +// smithy-typescript generated code +import { + AwsSdkSigV4AuthInputConfig, + AwsSdkSigV4AuthResolvedConfig, + AwsSdkSigV4PreviouslyResolved, + resolveAwsSdkSigV4Config, +} from "@aws-sdk/core"; +import { + HandlerExecutionContext, + HttpAuthOption, + HttpAuthScheme, + HttpAuthSchemeParameters, + HttpAuthSchemeParametersProvider, + HttpAuthSchemeProvider, +} from "@smithy/types"; +import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware"; + +import { PCSClientConfig, PCSClientResolvedConfig } from "../PCSClient"; + +/** + * @internal + */ +export interface PCSHttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} + +/** + * @internal + */ +export interface PCSHttpAuthSchemeParametersProvider + extends HttpAuthSchemeParametersProvider< + PCSClientResolvedConfig, + HandlerExecutionContext, + PCSHttpAuthSchemeParameters, + object + > {} + +/** + * @internal + */ +export const defaultPCSHttpAuthSchemeParametersProvider = async ( + config: PCSClientResolvedConfig, + context: HandlerExecutionContext, + input: object +): Promise => { + return { + operation: getSmithyContext(context).operation as string, + region: + (await normalizeProvider(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; + +function createAwsAuthSigv4HttpAuthOption(authParameters: PCSHttpAuthSchemeParameters): HttpAuthOption { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "pcs", + region: authParameters.region, + }, + propertiesExtractor: (config: Partial, context) => ({ + /** + * @internal + */ + signingProperties: { + config, + context, + }, + }), + }; +} + +/** + * @internal + */ +export interface PCSHttpAuthSchemeProvider extends HttpAuthSchemeProvider {} + +/** + * @internal + */ +export const defaultPCSHttpAuthSchemeProvider: PCSHttpAuthSchemeProvider = (authParameters) => { + const options: HttpAuthOption[] = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; + +/** + * @internal + */ +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + /** + * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + httpAuthSchemes?: HttpAuthScheme[]; + + /** + * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + httpAuthSchemeProvider?: PCSHttpAuthSchemeProvider; +} + +/** + * @internal + */ +export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig { + /** + * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + readonly httpAuthSchemes: HttpAuthScheme[]; + + /** + * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + readonly httpAuthSchemeProvider: PCSHttpAuthSchemeProvider; +} + +/** + * @internal + */ +export const resolveHttpAuthSchemeConfig = ( + config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved +): T & HttpAuthSchemeResolvedConfig => { + const config_0 = resolveAwsSdkSigV4Config(config); + return { + ...config_0, + } as T & HttpAuthSchemeResolvedConfig; +}; diff --git a/clients/client-pcs/src/commands/CreateClusterCommand.ts b/clients/client-pcs/src/commands/CreateClusterCommand.ts new file mode 100644 index 000000000000..9d50a8bcdb81 --- /dev/null +++ b/clients/client-pcs/src/commands/CreateClusterCommand.ts @@ -0,0 +1,259 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { CreateClusterRequest, CreateClusterResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_CreateClusterCommand, se_CreateClusterCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateClusterCommand}. + */ +export interface CreateClusterCommandInput extends CreateClusterRequest {} +/** + * @public + * + * The output of {@link CreateClusterCommand}. + */ +export interface CreateClusterCommandOutput extends CreateClusterResponse, __MetadataBearer {} + +/** + *

Creates a cluster in your account. Amazon Web Services PCS creates the cluster controller in a + * service-owned account. The cluster controller communicates with the cluster resources in + * your account. The subnets and security groups for the cluster must already exist before you + * use this API action.

+ * + *

It takes time for Amazon Web Services PCS to create the cluster. The cluster is in + * a Creating state until it is ready to use. There can only be 1 + * cluster in a Creating state per Amazon Web Services Region per Amazon Web Services account. + * CreateCluster + * fails with a ServiceQuotaExceededException if there is already + * a cluster in a Creating state.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, CreateClusterCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, CreateClusterCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // CreateClusterRequest + * clusterName: "STRING_VALUE", // required + * scheduler: { // SchedulerRequest + * type: "SLURM", // required + * version: "STRING_VALUE", // required + * }, + * size: "SMALL" || "MEDIUM" || "LARGE", // required + * networking: { // NetworkingRequest + * subnetIds: [ // SubnetIdList + * "STRING_VALUE", + * ], + * securityGroupIds: [ // SecurityGroupIdList + * "STRING_VALUE", + * ], + * }, + * slurmConfiguration: { // ClusterSlurmConfigurationRequest + * scaleDownIdleTimeInSeconds: Number("int"), + * slurmCustomSettings: [ // SlurmCustomSettings + * { // SlurmCustomSetting + * parameterName: "STRING_VALUE", // required + * parameterValue: "STRING_VALUE", // required + * }, + * ], + * }, + * clientToken: "STRING_VALUE", + * tags: { // RequestTagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateClusterCommand(input); + * const response = await client.send(command); + * // { // CreateClusterResponse + * // cluster: { // Cluster + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // scheduler: { // Scheduler + * // type: "SLURM", // required + * // version: "STRING_VALUE", // required + * // }, + * // size: "SMALL" || "MEDIUM" || "LARGE", // required + * // slurmConfiguration: { // ClusterSlurmConfiguration + * // scaleDownIdleTimeInSeconds: Number("int"), + * // slurmCustomSettings: [ // SlurmCustomSettings + * // { // SlurmCustomSetting + * // parameterName: "STRING_VALUE", // required + * // parameterValue: "STRING_VALUE", // required + * // }, + * // ], + * // authKey: { // SlurmAuthKey + * // secretArn: "STRING_VALUE", // required + * // secretVersion: "STRING_VALUE", // required + * // }, + * // }, + * // networking: { // Networking + * // subnetIds: [ // SubnetIdList + * // "STRING_VALUE", + * // ], + * // securityGroupIds: [ // SecurityGroupIdList + * // "STRING_VALUE", + * // ], + * // }, + * // endpoints: [ // Endpoints + * // { // Endpoint + * // type: "SLURMCTLD" || "SLURMDBD", // required + * // privateIpAddress: "STRING_VALUE", // required + * // publicIpAddress: "STRING_VALUE", + * // port: "STRING_VALUE", // required + * // }, + * // ], + * // errorInfo: [ // ErrorInfoList + * // { // ErrorInfo + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param CreateClusterCommandInput - {@link CreateClusterCommandInput} + * @returns {@link CreateClusterCommandOutput} + * @see {@link CreateClusterCommandInput} for command's `input` shape. + * @see {@link CreateClusterCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

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 maxInstances across all compute node groups has been + * reached for associated cluster.

    + *
  • + *
+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class CreateClusterCommand extends $Command + .classBuilder< + CreateClusterCommandInput, + CreateClusterCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "CreateCluster", {}) + .n("PCSClient", "CreateClusterCommand") + .f(void 0, void 0) + .ser(se_CreateClusterCommand) + .de(de_CreateClusterCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/CreateComputeNodeGroupCommand.ts b/clients/client-pcs/src/commands/CreateComputeNodeGroupCommand.ts new file mode 100644 index 000000000000..265ac7715ea4 --- /dev/null +++ b/clients/client-pcs/src/commands/CreateComputeNodeGroupCommand.ts @@ -0,0 +1,269 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { CreateComputeNodeGroupRequest, CreateComputeNodeGroupResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_CreateComputeNodeGroupCommand, se_CreateComputeNodeGroupCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateComputeNodeGroupCommand}. + */ +export interface CreateComputeNodeGroupCommandInput extends CreateComputeNodeGroupRequest {} +/** + * @public + * + * The output of {@link CreateComputeNodeGroupCommand}. + */ +export interface CreateComputeNodeGroupCommandOutput extends CreateComputeNodeGroupResponse, __MetadataBearer {} + +/** + *

Creates a managed set of compute nodes. You associate a compute node group with a + * cluster through 1 or more Amazon Web Services PCS queues or as part of the login fleet. A compute node + * group includes the definition of the compute properties and lifecycle management. + * Amazon Web Services PCS uses the information you provide to this API action to launch compute nodes in + * your account. You can only specify subnets in the same Amazon VPC as your cluster. You receive + * billing charges for the compute nodes that Amazon Web Services PCS launches in your account. You must + * already have a launch template before you call this API. For more information, see Launch an + * instance from a launch template in the Amazon Elastic Compute Cloud User Guide for Linux + * Instances.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, CreateComputeNodeGroupCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, CreateComputeNodeGroupCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // CreateComputeNodeGroupRequest + * clusterIdentifier: "STRING_VALUE", // required + * computeNodeGroupName: "STRING_VALUE", // required + * amiId: "STRING_VALUE", + * subnetIds: [ // StringList // required + * "STRING_VALUE", + * ], + * purchaseOption: "ONDEMAND" || "SPOT", + * customLaunchTemplate: { // CustomLaunchTemplate + * id: "STRING_VALUE", // required + * version: "STRING_VALUE", // required + * }, + * iamInstanceProfileArn: "STRING_VALUE", // required + * scalingConfiguration: { // ScalingConfigurationRequest + * minInstanceCount: Number("int"), // required + * maxInstanceCount: Number("int"), // required + * }, + * instanceConfigs: [ // InstanceList // required + * { // InstanceConfig + * instanceType: "STRING_VALUE", + * }, + * ], + * spotOptions: { // SpotOptions + * allocationStrategy: "lowest-price" || "capacity-optimized" || "price-capacity-optimized", + * }, + * slurmConfiguration: { // ComputeNodeGroupSlurmConfigurationRequest + * slurmCustomSettings: [ // SlurmCustomSettings + * { // SlurmCustomSetting + * parameterName: "STRING_VALUE", // required + * parameterValue: "STRING_VALUE", // required + * }, + * ], + * }, + * clientToken: "STRING_VALUE", + * tags: { // RequestTagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateComputeNodeGroupCommand(input); + * const response = await client.send(command); + * // { // CreateComputeNodeGroupResponse + * // computeNodeGroup: { // ComputeNodeGroup + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // clusterId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED" || "DELETED", // required + * // amiId: "STRING_VALUE", + * // subnetIds: [ // SubnetIdList // required + * // "STRING_VALUE", + * // ], + * // purchaseOption: "ONDEMAND" || "SPOT", + * // customLaunchTemplate: { // CustomLaunchTemplate + * // id: "STRING_VALUE", // required + * // version: "STRING_VALUE", // required + * // }, + * // iamInstanceProfileArn: "STRING_VALUE", // required + * // scalingConfiguration: { // ScalingConfiguration + * // minInstanceCount: Number("int"), // required + * // maxInstanceCount: Number("int"), // required + * // }, + * // instanceConfigs: [ // InstanceList // required + * // { // InstanceConfig + * // instanceType: "STRING_VALUE", + * // }, + * // ], + * // spotOptions: { // SpotOptions + * // allocationStrategy: "lowest-price" || "capacity-optimized" || "price-capacity-optimized", + * // }, + * // slurmConfiguration: { // ComputeNodeGroupSlurmConfiguration + * // slurmCustomSettings: [ // SlurmCustomSettings + * // { // SlurmCustomSetting + * // parameterName: "STRING_VALUE", // required + * // parameterValue: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // errorInfo: [ // ErrorInfoList + * // { // ErrorInfo + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param CreateComputeNodeGroupCommandInput - {@link CreateComputeNodeGroupCommandInput} + * @returns {@link CreateComputeNodeGroupCommandOutput} + * @see {@link CreateComputeNodeGroupCommandInput} for command's `input` shape. + * @see {@link CreateComputeNodeGroupCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

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 maxInstances across all compute node groups has been + * reached for associated cluster.

    + *
  • + *
+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class CreateComputeNodeGroupCommand extends $Command + .classBuilder< + CreateComputeNodeGroupCommandInput, + CreateComputeNodeGroupCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "CreateComputeNodeGroup", {}) + .n("PCSClient", "CreateComputeNodeGroupCommand") + .f(void 0, void 0) + .ser(se_CreateComputeNodeGroupCommand) + .de(de_CreateComputeNodeGroupCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/CreateQueueCommand.ts b/clients/client-pcs/src/commands/CreateQueueCommand.ts new file mode 100644 index 000000000000..b89bc3b3ea58 --- /dev/null +++ b/clients/client-pcs/src/commands/CreateQueueCommand.ts @@ -0,0 +1,212 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { CreateQueueRequest, CreateQueueResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_CreateQueueCommand, se_CreateQueueCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateQueueCommand}. + */ +export interface CreateQueueCommandInput extends CreateQueueRequest {} +/** + * @public + * + * The output of {@link CreateQueueCommand}. + */ +export interface CreateQueueCommandOutput extends CreateQueueResponse, __MetadataBearer {} + +/** + *

Creates a job queue. You must associate 1 or more compute node groups with the queue. + * You can associate 1 compute node group with multiple queues.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, CreateQueueCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, CreateQueueCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // CreateQueueRequest + * clusterIdentifier: "STRING_VALUE", // required + * queueName: "STRING_VALUE", // required + * computeNodeGroupConfigurations: [ // ComputeNodeGroupConfigurationList + * { // ComputeNodeGroupConfiguration + * computeNodeGroupId: "STRING_VALUE", + * }, + * ], + * clientToken: "STRING_VALUE", + * tags: { // RequestTagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateQueueCommand(input); + * const response = await client.send(command); + * // { // CreateQueueResponse + * // queue: { // Queue + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // clusterId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED", // required + * // computeNodeGroupConfigurations: [ // ComputeNodeGroupConfigurationList // required + * // { // ComputeNodeGroupConfiguration + * // computeNodeGroupId: "STRING_VALUE", + * // }, + * // ], + * // errorInfo: [ // ErrorInfoList + * // { // ErrorInfo + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param CreateQueueCommandInput - {@link CreateQueueCommandInput} + * @returns {@link CreateQueueCommandOutput} + * @see {@link CreateQueueCommandInput} for command's `input` shape. + * @see {@link CreateQueueCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

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 maxInstances across all compute node groups has been + * reached for associated cluster.

    + *
  • + *
+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class CreateQueueCommand extends $Command + .classBuilder< + CreateQueueCommandInput, + CreateQueueCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "CreateQueue", {}) + .n("PCSClient", "CreateQueueCommand") + .f(void 0, void 0) + .ser(se_CreateQueueCommand) + .de(de_CreateQueueCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/DeleteClusterCommand.ts b/clients/client-pcs/src/commands/DeleteClusterCommand.ts new file mode 100644 index 000000000000..100e0e142d51 --- /dev/null +++ b/clients/client-pcs/src/commands/DeleteClusterCommand.ts @@ -0,0 +1,159 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteClusterRequest, DeleteClusterResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_DeleteClusterCommand, se_DeleteClusterCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteClusterCommand}. + */ +export interface DeleteClusterCommandInput extends DeleteClusterRequest {} +/** + * @public + * + * The output of {@link DeleteClusterCommand}. + */ +export interface DeleteClusterCommandOutput extends DeleteClusterResponse, __MetadataBearer {} + +/** + *

Deletes a cluster and all its linked resources. You must delete all queues and compute + * node groups associated with the cluster before you can delete the cluster.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, DeleteClusterCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, DeleteClusterCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // DeleteClusterRequest + * clusterIdentifier: "STRING_VALUE", // required + * clientToken: "STRING_VALUE", + * }; + * const command = new DeleteClusterCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteClusterCommandInput - {@link DeleteClusterCommandInput} + * @returns {@link DeleteClusterCommandOutput} + * @see {@link DeleteClusterCommandInput} for command's `input` shape. + * @see {@link DeleteClusterCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class DeleteClusterCommand extends $Command + .classBuilder< + DeleteClusterCommandInput, + DeleteClusterCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "DeleteCluster", {}) + .n("PCSClient", "DeleteClusterCommand") + .f(void 0, void 0) + .ser(se_DeleteClusterCommand) + .de(de_DeleteClusterCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/DeleteComputeNodeGroupCommand.ts b/clients/client-pcs/src/commands/DeleteComputeNodeGroupCommand.ts new file mode 100644 index 000000000000..f284358e172c --- /dev/null +++ b/clients/client-pcs/src/commands/DeleteComputeNodeGroupCommand.ts @@ -0,0 +1,160 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteComputeNodeGroupRequest, DeleteComputeNodeGroupResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_DeleteComputeNodeGroupCommand, se_DeleteComputeNodeGroupCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteComputeNodeGroupCommand}. + */ +export interface DeleteComputeNodeGroupCommandInput extends DeleteComputeNodeGroupRequest {} +/** + * @public + * + * The output of {@link DeleteComputeNodeGroupCommand}. + */ +export interface DeleteComputeNodeGroupCommandOutput extends DeleteComputeNodeGroupResponse, __MetadataBearer {} + +/** + *

Deletes a compute node group. You must delete all queues associated with the compute + * node group first.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, DeleteComputeNodeGroupCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, DeleteComputeNodeGroupCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // DeleteComputeNodeGroupRequest + * clusterIdentifier: "STRING_VALUE", // required + * computeNodeGroupIdentifier: "STRING_VALUE", // required + * clientToken: "STRING_VALUE", + * }; + * const command = new DeleteComputeNodeGroupCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteComputeNodeGroupCommandInput - {@link DeleteComputeNodeGroupCommandInput} + * @returns {@link DeleteComputeNodeGroupCommandOutput} + * @see {@link DeleteComputeNodeGroupCommandInput} for command's `input` shape. + * @see {@link DeleteComputeNodeGroupCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class DeleteComputeNodeGroupCommand extends $Command + .classBuilder< + DeleteComputeNodeGroupCommandInput, + DeleteComputeNodeGroupCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "DeleteComputeNodeGroup", {}) + .n("PCSClient", "DeleteComputeNodeGroupCommand") + .f(void 0, void 0) + .ser(se_DeleteComputeNodeGroupCommand) + .de(de_DeleteComputeNodeGroupCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/DeleteQueueCommand.ts b/clients/client-pcs/src/commands/DeleteQueueCommand.ts new file mode 100644 index 000000000000..f53d4c523a95 --- /dev/null +++ b/clients/client-pcs/src/commands/DeleteQueueCommand.ts @@ -0,0 +1,161 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteQueueRequest, DeleteQueueResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_DeleteQueueCommand, se_DeleteQueueCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteQueueCommand}. + */ +export interface DeleteQueueCommandInput extends DeleteQueueRequest {} +/** + * @public + * + * The output of {@link DeleteQueueCommand}. + */ +export interface DeleteQueueCommandOutput extends DeleteQueueResponse, __MetadataBearer {} + +/** + *

Deletes a job queue. If the compute node group associated with this queue isn't + * associated with any other queues, Amazon Web Services PCS terminates all the compute nodes for this + * queue.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, DeleteQueueCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, DeleteQueueCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // DeleteQueueRequest + * clusterIdentifier: "STRING_VALUE", // required + * queueIdentifier: "STRING_VALUE", // required + * clientToken: "STRING_VALUE", + * }; + * const command = new DeleteQueueCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteQueueCommandInput - {@link DeleteQueueCommandInput} + * @returns {@link DeleteQueueCommandOutput} + * @see {@link DeleteQueueCommandInput} for command's `input` shape. + * @see {@link DeleteQueueCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class DeleteQueueCommand extends $Command + .classBuilder< + DeleteQueueCommandInput, + DeleteQueueCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "DeleteQueue", {}) + .n("PCSClient", "DeleteQueueCommand") + .f(void 0, void 0) + .ser(se_DeleteQueueCommand) + .de(de_DeleteQueueCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/GetClusterCommand.ts b/clients/client-pcs/src/commands/GetClusterCommand.ts new file mode 100644 index 000000000000..eb7c08ce4d91 --- /dev/null +++ b/clients/client-pcs/src/commands/GetClusterCommand.ts @@ -0,0 +1,208 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetClusterRequest, GetClusterResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_GetClusterCommand, se_GetClusterCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetClusterCommand}. + */ +export interface GetClusterCommandInput extends GetClusterRequest {} +/** + * @public + * + * The output of {@link GetClusterCommand}. + */ +export interface GetClusterCommandOutput extends GetClusterResponse, __MetadataBearer {} + +/** + *

Returns detailed information about a running cluster in your account. This API action + * provides networking information, endpoint information for communication with the scheduler, + * and provisioning status.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, GetClusterCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, GetClusterCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // GetClusterRequest + * clusterIdentifier: "STRING_VALUE", // required + * }; + * const command = new GetClusterCommand(input); + * const response = await client.send(command); + * // { // GetClusterResponse + * // cluster: { // Cluster + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // scheduler: { // Scheduler + * // type: "SLURM", // required + * // version: "STRING_VALUE", // required + * // }, + * // size: "SMALL" || "MEDIUM" || "LARGE", // required + * // slurmConfiguration: { // ClusterSlurmConfiguration + * // scaleDownIdleTimeInSeconds: Number("int"), + * // slurmCustomSettings: [ // SlurmCustomSettings + * // { // SlurmCustomSetting + * // parameterName: "STRING_VALUE", // required + * // parameterValue: "STRING_VALUE", // required + * // }, + * // ], + * // authKey: { // SlurmAuthKey + * // secretArn: "STRING_VALUE", // required + * // secretVersion: "STRING_VALUE", // required + * // }, + * // }, + * // networking: { // Networking + * // subnetIds: [ // SubnetIdList + * // "STRING_VALUE", + * // ], + * // securityGroupIds: [ // SecurityGroupIdList + * // "STRING_VALUE", + * // ], + * // }, + * // endpoints: [ // Endpoints + * // { // Endpoint + * // type: "SLURMCTLD" || "SLURMDBD", // required + * // privateIpAddress: "STRING_VALUE", // required + * // publicIpAddress: "STRING_VALUE", + * // port: "STRING_VALUE", // required + * // }, + * // ], + * // errorInfo: [ // ErrorInfoList + * // { // ErrorInfo + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param GetClusterCommandInput - {@link GetClusterCommandInput} + * @returns {@link GetClusterCommandOutput} + * @see {@link GetClusterCommandInput} for command's `input` shape. + * @see {@link GetClusterCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class GetClusterCommand extends $Command + .classBuilder< + GetClusterCommandInput, + GetClusterCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "GetCluster", {}) + .n("PCSClient", "GetClusterCommand") + .f(void 0, void 0) + .ser(se_GetClusterCommand) + .de(de_GetClusterCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/GetComputeNodeGroupCommand.ts b/clients/client-pcs/src/commands/GetComputeNodeGroupCommand.ts new file mode 100644 index 000000000000..081380769f18 --- /dev/null +++ b/clients/client-pcs/src/commands/GetComputeNodeGroupCommand.ts @@ -0,0 +1,206 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetComputeNodeGroupRequest, GetComputeNodeGroupResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_GetComputeNodeGroupCommand, se_GetComputeNodeGroupCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetComputeNodeGroupCommand}. + */ +export interface GetComputeNodeGroupCommandInput extends GetComputeNodeGroupRequest {} +/** + * @public + * + * The output of {@link GetComputeNodeGroupCommand}. + */ +export interface GetComputeNodeGroupCommandOutput extends GetComputeNodeGroupResponse, __MetadataBearer {} + +/** + *

Returns detailed information about a compute node group. This API action provides + * networking information, EC2 instance type, compute node group status, and scheduler (such + * as Slurm) configuration.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, GetComputeNodeGroupCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, GetComputeNodeGroupCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // GetComputeNodeGroupRequest + * clusterIdentifier: "STRING_VALUE", // required + * computeNodeGroupIdentifier: "STRING_VALUE", // required + * }; + * const command = new GetComputeNodeGroupCommand(input); + * const response = await client.send(command); + * // { // GetComputeNodeGroupResponse + * // computeNodeGroup: { // ComputeNodeGroup + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // clusterId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED" || "DELETED", // required + * // amiId: "STRING_VALUE", + * // subnetIds: [ // SubnetIdList // required + * // "STRING_VALUE", + * // ], + * // purchaseOption: "ONDEMAND" || "SPOT", + * // customLaunchTemplate: { // CustomLaunchTemplate + * // id: "STRING_VALUE", // required + * // version: "STRING_VALUE", // required + * // }, + * // iamInstanceProfileArn: "STRING_VALUE", // required + * // scalingConfiguration: { // ScalingConfiguration + * // minInstanceCount: Number("int"), // required + * // maxInstanceCount: Number("int"), // required + * // }, + * // instanceConfigs: [ // InstanceList // required + * // { // InstanceConfig + * // instanceType: "STRING_VALUE", + * // }, + * // ], + * // spotOptions: { // SpotOptions + * // allocationStrategy: "lowest-price" || "capacity-optimized" || "price-capacity-optimized", + * // }, + * // slurmConfiguration: { // ComputeNodeGroupSlurmConfiguration + * // slurmCustomSettings: [ // SlurmCustomSettings + * // { // SlurmCustomSetting + * // parameterName: "STRING_VALUE", // required + * // parameterValue: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // errorInfo: [ // ErrorInfoList + * // { // ErrorInfo + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param GetComputeNodeGroupCommandInput - {@link GetComputeNodeGroupCommandInput} + * @returns {@link GetComputeNodeGroupCommandOutput} + * @see {@link GetComputeNodeGroupCommandInput} for command's `input` shape. + * @see {@link GetComputeNodeGroupCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class GetComputeNodeGroupCommand extends $Command + .classBuilder< + GetComputeNodeGroupCommandInput, + GetComputeNodeGroupCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "GetComputeNodeGroup", {}) + .n("PCSClient", "GetComputeNodeGroupCommand") + .f(void 0, void 0) + .ser(se_GetComputeNodeGroupCommand) + .de(de_GetComputeNodeGroupCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/GetQueueCommand.ts b/clients/client-pcs/src/commands/GetQueueCommand.ts new file mode 100644 index 000000000000..a2f011d9cbbf --- /dev/null +++ b/clients/client-pcs/src/commands/GetQueueCommand.ts @@ -0,0 +1,180 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetQueueRequest, GetQueueResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_GetQueueCommand, se_GetQueueCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetQueueCommand}. + */ +export interface GetQueueCommandInput extends GetQueueRequest {} +/** + * @public + * + * The output of {@link GetQueueCommand}. + */ +export interface GetQueueCommandOutput extends GetQueueResponse, __MetadataBearer {} + +/** + *

Returns detailed information about a queue. The information includes the compute node + * groups that the queue uses to schedule jobs.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, GetQueueCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, GetQueueCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // GetQueueRequest + * clusterIdentifier: "STRING_VALUE", // required + * queueIdentifier: "STRING_VALUE", // required + * }; + * const command = new GetQueueCommand(input); + * const response = await client.send(command); + * // { // GetQueueResponse + * // queue: { // Queue + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // clusterId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED", // required + * // computeNodeGroupConfigurations: [ // ComputeNodeGroupConfigurationList // required + * // { // ComputeNodeGroupConfiguration + * // computeNodeGroupId: "STRING_VALUE", + * // }, + * // ], + * // errorInfo: [ // ErrorInfoList + * // { // ErrorInfo + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param GetQueueCommandInput - {@link GetQueueCommandInput} + * @returns {@link GetQueueCommandOutput} + * @see {@link GetQueueCommandInput} for command's `input` shape. + * @see {@link GetQueueCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class GetQueueCommand extends $Command + .classBuilder< + GetQueueCommandInput, + GetQueueCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "GetQueue", {}) + .n("PCSClient", "GetQueueCommand") + .f(void 0, void 0) + .ser(se_GetQueueCommand) + .de(de_GetQueueCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/ListClustersCommand.ts b/clients/client-pcs/src/commands/ListClustersCommand.ts new file mode 100644 index 000000000000..1a95e00150cf --- /dev/null +++ b/clients/client-pcs/src/commands/ListClustersCommand.ts @@ -0,0 +1,170 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListClustersRequest, ListClustersResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_ListClustersCommand, se_ListClustersCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListClustersCommand}. + */ +export interface ListClustersCommandInput extends ListClustersRequest {} +/** + * @public + * + * The output of {@link ListClustersCommand}. + */ +export interface ListClustersCommandOutput extends ListClustersResponse, __MetadataBearer {} + +/** + *

Returns a list of running clusters in your account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, ListClustersCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, ListClustersCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // ListClustersRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListClustersCommand(input); + * const response = await client.send(command); + * // { // ListClustersResponse + * // clusters: [ // ClusterList // required + * // { // ClusterSummary + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED", // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListClustersCommandInput - {@link ListClustersCommandInput} + * @returns {@link ListClustersCommandOutput} + * @see {@link ListClustersCommandInput} for command's `input` shape. + * @see {@link ListClustersCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class ListClustersCommand extends $Command + .classBuilder< + ListClustersCommandInput, + ListClustersCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "ListClusters", {}) + .n("PCSClient", "ListClustersCommand") + .f(void 0, void 0) + .ser(se_ListClustersCommand) + .de(de_ListClustersCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/ListComputeNodeGroupsCommand.ts b/clients/client-pcs/src/commands/ListComputeNodeGroupsCommand.ts new file mode 100644 index 000000000000..a5c4502b032c --- /dev/null +++ b/clients/client-pcs/src/commands/ListComputeNodeGroupsCommand.ts @@ -0,0 +1,172 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListComputeNodeGroupsRequest, ListComputeNodeGroupsResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_ListComputeNodeGroupsCommand, se_ListComputeNodeGroupsCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListComputeNodeGroupsCommand}. + */ +export interface ListComputeNodeGroupsCommandInput extends ListComputeNodeGroupsRequest {} +/** + * @public + * + * The output of {@link ListComputeNodeGroupsCommand}. + */ +export interface ListComputeNodeGroupsCommandOutput extends ListComputeNodeGroupsResponse, __MetadataBearer {} + +/** + *

Returns a list of all compute node groups associated with a cluster.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, ListComputeNodeGroupsCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, ListComputeNodeGroupsCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // ListComputeNodeGroupsRequest + * clusterIdentifier: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListComputeNodeGroupsCommand(input); + * const response = await client.send(command); + * // { // ListComputeNodeGroupsResponse + * // computeNodeGroups: [ // ComputeNodeGroupList // required + * // { // ComputeNodeGroupSummary + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // clusterId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED" || "DELETED", // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListComputeNodeGroupsCommandInput - {@link ListComputeNodeGroupsCommandInput} + * @returns {@link ListComputeNodeGroupsCommandOutput} + * @see {@link ListComputeNodeGroupsCommandInput} for command's `input` shape. + * @see {@link ListComputeNodeGroupsCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class ListComputeNodeGroupsCommand extends $Command + .classBuilder< + ListComputeNodeGroupsCommandInput, + ListComputeNodeGroupsCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "ListComputeNodeGroups", {}) + .n("PCSClient", "ListComputeNodeGroupsCommand") + .f(void 0, void 0) + .ser(se_ListComputeNodeGroupsCommand) + .de(de_ListComputeNodeGroupsCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/ListQueuesCommand.ts b/clients/client-pcs/src/commands/ListQueuesCommand.ts new file mode 100644 index 000000000000..729bdcde360c --- /dev/null +++ b/clients/client-pcs/src/commands/ListQueuesCommand.ts @@ -0,0 +1,172 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListQueuesRequest, ListQueuesResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_ListQueuesCommand, se_ListQueuesCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListQueuesCommand}. + */ +export interface ListQueuesCommandInput extends ListQueuesRequest {} +/** + * @public + * + * The output of {@link ListQueuesCommand}. + */ +export interface ListQueuesCommandOutput extends ListQueuesResponse, __MetadataBearer {} + +/** + *

Returns a list of all queues associated with a cluster.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, ListQueuesCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, ListQueuesCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // ListQueuesRequest + * clusterIdentifier: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListQueuesCommand(input); + * const response = await client.send(command); + * // { // ListQueuesResponse + * // queues: [ // QueueList // required + * // { // QueueSummary + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // clusterId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED", // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListQueuesCommandInput - {@link ListQueuesCommandInput} + * @returns {@link ListQueuesCommandOutput} + * @see {@link ListQueuesCommandInput} for command's `input` shape. + * @see {@link ListQueuesCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class ListQueuesCommand extends $Command + .classBuilder< + ListQueuesCommandInput, + ListQueuesCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "ListQueues", {}) + .n("PCSClient", "ListQueuesCommand") + .f(void 0, void 0) + .ser(se_ListQueuesCommand) + .de(de_ListQueuesCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/ListTagsForResourceCommand.ts b/clients/client-pcs/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..1d4b6a82597a --- /dev/null +++ b/clients/client-pcs/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,91 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + *

Returns a list of all tags on an Amazon Web Services PCS resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, ListTagsForResourceCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, ListTagsForResourceCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // ListTagsForResourceRequest + * resourceArn: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // tags: { // ResponseTagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class ListTagsForResourceCommand extends $Command + .classBuilder< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "ListTagsForResource", {}) + .n("PCSClient", "ListTagsForResourceCommand") + .f(void 0, void 0) + .ser(se_ListTagsForResourceCommand) + .de(de_ListTagsForResourceCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/RegisterComputeNodeGroupInstanceCommand.ts b/clients/client-pcs/src/commands/RegisterComputeNodeGroupInstanceCommand.ts new file mode 100644 index 000000000000..2e4e68e6b1fd --- /dev/null +++ b/clients/client-pcs/src/commands/RegisterComputeNodeGroupInstanceCommand.ts @@ -0,0 +1,128 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { + RegisterComputeNodeGroupInstanceRequest, + RegisterComputeNodeGroupInstanceResponse, + RegisterComputeNodeGroupInstanceResponseFilterSensitiveLog, +} from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { + de_RegisterComputeNodeGroupInstanceCommand, + se_RegisterComputeNodeGroupInstanceCommand, +} from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link RegisterComputeNodeGroupInstanceCommand}. + */ +export interface RegisterComputeNodeGroupInstanceCommandInput extends RegisterComputeNodeGroupInstanceRequest {} +/** + * @public + * + * The output of {@link RegisterComputeNodeGroupInstanceCommand}. + */ +export interface RegisterComputeNodeGroupInstanceCommandOutput + extends RegisterComputeNodeGroupInstanceResponse, + __MetadataBearer {} + +/** + * + *

This API action isn't intended for you to use.

+ *
+ *

Amazon Web Services PCS uses this API action to register the compute nodes it launches in your account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, RegisterComputeNodeGroupInstanceCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, RegisterComputeNodeGroupInstanceCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // RegisterComputeNodeGroupInstanceRequest + * clusterIdentifier: "STRING_VALUE", // required + * bootstrapId: "STRING_VALUE", // required + * }; + * const command = new RegisterComputeNodeGroupInstanceCommand(input); + * const response = await client.send(command); + * // { // RegisterComputeNodeGroupInstanceResponse + * // nodeID: "STRING_VALUE", // required + * // sharedSecret: "STRING_VALUE", // required + * // endpoints: [ // Endpoints // required + * // { // Endpoint + * // type: "SLURMCTLD" || "SLURMDBD", // required + * // privateIpAddress: "STRING_VALUE", // required + * // publicIpAddress: "STRING_VALUE", + * // port: "STRING_VALUE", // required + * // }, + * // ], + * // }; + * + * ``` + * + * @param RegisterComputeNodeGroupInstanceCommandInput - {@link RegisterComputeNodeGroupInstanceCommandInput} + * @returns {@link RegisterComputeNodeGroupInstanceCommandOutput} + * @see {@link RegisterComputeNodeGroupInstanceCommandInput} for command's `input` shape. + * @see {@link RegisterComputeNodeGroupInstanceCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class RegisterComputeNodeGroupInstanceCommand extends $Command + .classBuilder< + RegisterComputeNodeGroupInstanceCommandInput, + RegisterComputeNodeGroupInstanceCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "RegisterComputeNodeGroupInstance", {}) + .n("PCSClient", "RegisterComputeNodeGroupInstanceCommand") + .f(void 0, RegisterComputeNodeGroupInstanceResponseFilterSensitiveLog) + .ser(se_RegisterComputeNodeGroupInstanceCommand) + .de(de_RegisterComputeNodeGroupInstanceCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/TagResourceCommand.ts b/clients/client-pcs/src/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..032b2b763fe5 --- /dev/null +++ b/clients/client-pcs/src/commands/TagResourceCommand.ts @@ -0,0 +1,93 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { TagResourceRequest } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends __MetadataBearer {} + +/** + *

Adds or edits tags on an Amazon Web Services PCS resource. Each tag consists of a tag key and a tag + * value. The tag key and tag value are case-sensitive strings. The tag value can be an empty + * (null) string. To add a tag, specify a new tag key and a tag value. To edit a tag, specify + * an existing tag key and a new tag value.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, TagResourceCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, TagResourceCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // TagResourceRequest + * resourceArn: "STRING_VALUE", // required + * tags: { // RequestTagMap // required + * "": "STRING_VALUE", + * }, + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class TagResourceCommand extends $Command + .classBuilder< + TagResourceCommandInput, + TagResourceCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "TagResource", {}) + .n("PCSClient", "TagResourceCommand") + .f(void 0, void 0) + .ser(se_TagResourceCommand) + .de(de_TagResourceCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/UntagResourceCommand.ts b/clients/client-pcs/src/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..5bc44ee6e5c9 --- /dev/null +++ b/clients/client-pcs/src/commands/UntagResourceCommand.ts @@ -0,0 +1,91 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { UntagResourceRequest } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends __MetadataBearer {} + +/** + *

Deletes tags from an Amazon Web Services PCS resource. To delete a tag, specify the tag key and the + * Amazon Resource Name (ARN) of the Amazon Web Services PCS resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, UntagResourceCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, UntagResourceCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // UntagResourceRequest + * resourceArn: "STRING_VALUE", // required + * tagKeys: [ // TagKeys // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class UntagResourceCommand extends $Command + .classBuilder< + UntagResourceCommandInput, + UntagResourceCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "UntagResource", {}) + .n("PCSClient", "UntagResourceCommand") + .f(void 0, void 0) + .ser(se_UntagResourceCommand) + .de(de_UntagResourceCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/UpdateComputeNodeGroupCommand.ts b/clients/client-pcs/src/commands/UpdateComputeNodeGroupCommand.ts new file mode 100644 index 000000000000..93198af95afc --- /dev/null +++ b/clients/client-pcs/src/commands/UpdateComputeNodeGroupCommand.ts @@ -0,0 +1,255 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateComputeNodeGroupRequest, UpdateComputeNodeGroupResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_UpdateComputeNodeGroupCommand, se_UpdateComputeNodeGroupCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateComputeNodeGroupCommand}. + */ +export interface UpdateComputeNodeGroupCommandInput extends UpdateComputeNodeGroupRequest {} +/** + * @public + * + * The output of {@link UpdateComputeNodeGroupCommand}. + */ +export interface UpdateComputeNodeGroupCommandOutput extends UpdateComputeNodeGroupResponse, __MetadataBearer {} + +/** + *

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).

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, UpdateComputeNodeGroupCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, UpdateComputeNodeGroupCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // UpdateComputeNodeGroupRequest + * clusterIdentifier: "STRING_VALUE", // required + * computeNodeGroupIdentifier: "STRING_VALUE", // required + * amiId: "STRING_VALUE", + * subnetIds: [ // StringList + * "STRING_VALUE", + * ], + * customLaunchTemplate: { // CustomLaunchTemplate + * id: "STRING_VALUE", // required + * version: "STRING_VALUE", // required + * }, + * purchaseOption: "ONDEMAND" || "SPOT", + * spotOptions: { // SpotOptions + * allocationStrategy: "lowest-price" || "capacity-optimized" || "price-capacity-optimized", + * }, + * scalingConfiguration: { // ScalingConfigurationRequest + * minInstanceCount: Number("int"), // required + * maxInstanceCount: Number("int"), // required + * }, + * iamInstanceProfileArn: "STRING_VALUE", + * slurmConfiguration: { // UpdateComputeNodeGroupSlurmConfigurationRequest + * slurmCustomSettings: [ // SlurmCustomSettings + * { // SlurmCustomSetting + * parameterName: "STRING_VALUE", // required + * parameterValue: "STRING_VALUE", // required + * }, + * ], + * }, + * clientToken: "STRING_VALUE", + * }; + * const command = new UpdateComputeNodeGroupCommand(input); + * const response = await client.send(command); + * // { // UpdateComputeNodeGroupResponse + * // computeNodeGroup: { // ComputeNodeGroup + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // clusterId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED" || "DELETED", // required + * // amiId: "STRING_VALUE", + * // subnetIds: [ // SubnetIdList // required + * // "STRING_VALUE", + * // ], + * // purchaseOption: "ONDEMAND" || "SPOT", + * // customLaunchTemplate: { // CustomLaunchTemplate + * // id: "STRING_VALUE", // required + * // version: "STRING_VALUE", // required + * // }, + * // iamInstanceProfileArn: "STRING_VALUE", // required + * // scalingConfiguration: { // ScalingConfiguration + * // minInstanceCount: Number("int"), // required + * // maxInstanceCount: Number("int"), // required + * // }, + * // instanceConfigs: [ // InstanceList // required + * // { // InstanceConfig + * // instanceType: "STRING_VALUE", + * // }, + * // ], + * // spotOptions: { // SpotOptions + * // allocationStrategy: "lowest-price" || "capacity-optimized" || "price-capacity-optimized", + * // }, + * // slurmConfiguration: { // ComputeNodeGroupSlurmConfiguration + * // slurmCustomSettings: [ // SlurmCustomSettings + * // { // SlurmCustomSetting + * // parameterName: "STRING_VALUE", // required + * // parameterValue: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // errorInfo: [ // ErrorInfoList + * // { // ErrorInfo + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param UpdateComputeNodeGroupCommandInput - {@link UpdateComputeNodeGroupCommandInput} + * @returns {@link UpdateComputeNodeGroupCommandOutput} + * @see {@link UpdateComputeNodeGroupCommandInput} for command's `input` shape. + * @see {@link UpdateComputeNodeGroupCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

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 maxInstances across all compute node groups has been + * reached for associated cluster.

    + *
  • + *
+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class UpdateComputeNodeGroupCommand extends $Command + .classBuilder< + UpdateComputeNodeGroupCommandInput, + UpdateComputeNodeGroupCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "UpdateComputeNodeGroup", {}) + .n("PCSClient", "UpdateComputeNodeGroupCommand") + .f(void 0, void 0) + .ser(se_UpdateComputeNodeGroupCommand) + .de(de_UpdateComputeNodeGroupCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/UpdateQueueCommand.ts b/clients/client-pcs/src/commands/UpdateQueueCommand.ts new file mode 100644 index 000000000000..4ba165021a38 --- /dev/null +++ b/clients/client-pcs/src/commands/UpdateQueueCommand.ts @@ -0,0 +1,209 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateQueueRequest, UpdateQueueResponse } from "../models/models_0"; +import { PCSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PCSClient"; +import { de_UpdateQueueCommand, se_UpdateQueueCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateQueueCommand}. + */ +export interface UpdateQueueCommandInput extends UpdateQueueRequest {} +/** + * @public + * + * The output of {@link UpdateQueueCommand}. + */ +export interface UpdateQueueCommandOutput extends UpdateQueueResponse, __MetadataBearer {} + +/** + *

Updates the compute node group configuration of a queue. Use this API to change the + * compute node groups that the queue can send jobs to.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PCSClient, UpdateQueueCommand } from "@aws-sdk/client-pcs"; // ES Modules import + * // const { PCSClient, UpdateQueueCommand } = require("@aws-sdk/client-pcs"); // CommonJS import + * const client = new PCSClient(config); + * const input = { // UpdateQueueRequest + * clusterIdentifier: "STRING_VALUE", // required + * queueIdentifier: "STRING_VALUE", // required + * computeNodeGroupConfigurations: [ // ComputeNodeGroupConfigurationList + * { // ComputeNodeGroupConfiguration + * computeNodeGroupId: "STRING_VALUE", + * }, + * ], + * clientToken: "STRING_VALUE", + * }; + * const command = new UpdateQueueCommand(input); + * const response = await client.send(command); + * // { // UpdateQueueResponse + * // queue: { // Queue + * // name: "STRING_VALUE", // required + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // clusterId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // modifiedAt: new Date("TIMESTAMP"), // required + * // status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED" || "UPDATE_FAILED", // required + * // computeNodeGroupConfigurations: [ // ComputeNodeGroupConfigurationList // required + * // { // ComputeNodeGroupConfiguration + * // computeNodeGroupId: "STRING_VALUE", + * // }, + * // ], + * // errorInfo: [ // ErrorInfoList + * // { // ErrorInfo + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param UpdateQueueCommandInput - {@link UpdateQueueCommandInput} + * @returns {@link UpdateQueueCommandOutput} + * @see {@link UpdateQueueCommandInput} for command's `input` shape. + * @see {@link UpdateQueueCommandOutput} for command's `response` shape. + * @see {@link PCSClientResolvedConfig | config} for PCSClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * + * @throws {@link ConflictException} (client fault) + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 + *

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

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 maxInstances across all compute node groups has been + * reached for associated cluster.

    + *
  • + *
+ * + * @throws {@link ThrottlingException} (client fault) + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * + * @throws {@link ValidationException} (client fault) + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * + * @throws {@link PCSServiceException} + *

Base exception class for all service exceptions from PCS service.

+ * + * @public + */ +export class UpdateQueueCommand extends $Command + .classBuilder< + UpdateQueueCommandInput, + UpdateQueueCommandOutput, + PCSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: PCSClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSParallelComputingService", "UpdateQueue", {}) + .n("PCSClient", "UpdateQueueCommand") + .f(void 0, void 0) + .ser(se_UpdateQueueCommand) + .de(de_UpdateQueueCommand) + .build() {} diff --git a/clients/client-pcs/src/commands/index.ts b/clients/client-pcs/src/commands/index.ts new file mode 100644 index 000000000000..43400ee0df05 --- /dev/null +++ b/clients/client-pcs/src/commands/index.ts @@ -0,0 +1,19 @@ +// smithy-typescript generated code +export * from "./CreateClusterCommand"; +export * from "./CreateComputeNodeGroupCommand"; +export * from "./CreateQueueCommand"; +export * from "./DeleteClusterCommand"; +export * from "./DeleteComputeNodeGroupCommand"; +export * from "./DeleteQueueCommand"; +export * from "./GetClusterCommand"; +export * from "./GetComputeNodeGroupCommand"; +export * from "./GetQueueCommand"; +export * from "./ListClustersCommand"; +export * from "./ListComputeNodeGroupsCommand"; +export * from "./ListQueuesCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./RegisterComputeNodeGroupInstanceCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateComputeNodeGroupCommand"; +export * from "./UpdateQueueCommand"; diff --git a/clients/client-pcs/src/endpoint/EndpointParameters.ts b/clients/client-pcs/src/endpoint/EndpointParameters.ts new file mode 100644 index 000000000000..e538409b8469 --- /dev/null +++ b/clients/client-pcs/src/endpoint/EndpointParameters.ts @@ -0,0 +1,41 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; +} + +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; + +export const resolveClientEndpointParameters = ( + options: T & ClientInputEndpointParameters +): T & ClientResolvedEndpointParameters => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "pcs", + }; +}; + +export const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +} as const; + +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/clients/client-pcs/src/endpoint/endpointResolver.ts b/clients/client-pcs/src/endpoint/endpointResolver.ts new file mode 100644 index 000000000000..26fe4c3775a6 --- /dev/null +++ b/clients/client-pcs/src/endpoint/endpointResolver.ts @@ -0,0 +1,19 @@ +// smithy-typescript generated code +import { awsEndpointFunctions } from "@aws-sdk/util-endpoints"; +import { EndpointV2, Logger } from "@smithy/types"; +import { customEndpointFunctions, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints"; + +import { EndpointParameters } from "./EndpointParameters"; +import { ruleSet } from "./ruleset"; + +export const defaultEndpointResolver = ( + endpointParams: EndpointParameters, + context: { logger?: Logger } = {} +): EndpointV2 => { + return resolveEndpoint(ruleSet, { + endpointParams: endpointParams as EndpointParams, + logger: context.logger, + }); +}; + +customEndpointFunctions.aws = awsEndpointFunctions; diff --git a/clients/client-pcs/src/endpoint/ruleset.ts b/clients/client-pcs/src/endpoint/ruleset.ts new file mode 100644 index 000000000000..b33bea27b936 --- /dev/null +++ b/clients/client-pcs/src/endpoint/ruleset.ts @@ -0,0 +1,32 @@ +// @ts-nocheck +// generated code, do not edit +import { RuleSetObject } from "@smithy/types"; + +/* This file is compressed. Log this object + or see "smithy.rules#endpointRuleSet" + in codegen/sdk-codegen/aws-models/pcs.json */ + +const s="required", +t="fn", +u="argv", +v="ref"; +const a=true, +b="isSet", +c="booleanEquals", +d="error", +e="endpoint", +f="tree", +g="PartitionResult", +h={[s]:false,"type":"String"}, +i={[s]:true,"default":false,"type":"Boolean"}, +j={[v]:"Endpoint"}, +k={[t]:c,[u]:[{[v]:"UseFIPS"},true]}, +l={[t]:c,[u]:[{[v]:"UseDualStack"},true]}, +m={}, +n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]}, +o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]}, +p=[k], +q=[l], +r=[{[v]:"Region"}]; +const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f}],type:f},{rules:[{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{rules:[{endpoint:{url:"https://pcs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{rules:[{endpoint:{url:"https://pcs-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{rules:[{endpoint:{url:"https://pcs.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{rules:[{endpoint:{url:"https://pcs.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]}; +export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-pcs/src/extensionConfiguration.ts b/clients/client-pcs/src/extensionConfiguration.ts new file mode 100644 index 000000000000..968cf38ea3fa --- /dev/null +++ b/clients/client-pcs/src/extensionConfiguration.ts @@ -0,0 +1,15 @@ +// smithy-typescript generated code +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; + +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; + +/** + * @internal + */ +export interface PCSExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration, + HttpAuthExtensionConfiguration {} diff --git a/clients/client-pcs/src/index.ts b/clients/client-pcs/src/index.ts new file mode 100644 index 000000000000..db408dc2a689 --- /dev/null +++ b/clients/client-pcs/src/index.ts @@ -0,0 +1,34 @@ +// smithy-typescript generated code +/* eslint-disable */ +/** + *

Amazon Web Services Parallel Computing Service (Amazon Web Services PCS) is a managed service that makes it easier for + * you to run and scale your high performance computing (HPC) workloads, + * and build scientific and engineering models on Amazon Web Services using Slurm. + * For more information, see + * the Amazon Web Services Parallel Computing Service + * User Guide.

+ *

This reference describes the actions and data types of the service management API. You can use the + * Amazon Web Services SDKs to call the API actions in software, or use the Command Line Interface (CLI) to call the API + * actions manually. These API actions manage the service through an Amazon Web Services account.

+ *

The API actions operate on Amazon Web Services PCS resources. A resource is + * an entity in Amazon Web Services that you can work with. Amazon Web Services services create resources when you use + * the features of the service. Examples of Amazon Web Services PCS resources include clusters, compute + * node groups, and queues. For more information about resources in Amazon Web Services, see Resource in the Resource Explorer User Guide.

+ *

An Amazon Web Services PCS compute node is an Amazon EC2 instance. You don't launch + * compute nodes directly. Amazon Web Services PCS uses configuration information that you provide to launch + * compute nodes in your Amazon Web Services account. You receive billing charges for your running compute nodes. + * Amazon Web Services PCS automatically terminates your compute nodes when you delete the Amazon Web Services PCS resources + * related to those compute nodes.

+ * + * @packageDocumentation + */ +export * from "./PCSClient"; +export * from "./PCS"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export type { RuntimeExtension } from "./runtimeExtensions"; +export type { PCSExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +export { PCSServiceException } from "./models/PCSServiceException"; diff --git a/clients/client-pcs/src/models/PCSServiceException.ts b/clients/client-pcs/src/models/PCSServiceException.ts new file mode 100644 index 000000000000..9fc5f9f7be1f --- /dev/null +++ b/clients/client-pcs/src/models/PCSServiceException.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export type { __ServiceExceptionOptions }; + +export { __ServiceException }; + +/** + * @public + * + * Base exception class for all service exceptions from PCS service. + */ +export class PCSServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, PCSServiceException.prototype); + } +} diff --git a/clients/client-pcs/src/models/index.ts b/clients/client-pcs/src/models/index.ts new file mode 100644 index 000000000000..9eaceb12865f --- /dev/null +++ b/clients/client-pcs/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-pcs/src/models/models_0.ts b/clients/client-pcs/src/models/models_0.ts new file mode 100644 index 000000000000..88ecfa77267f --- /dev/null +++ b/clients/client-pcs/src/models/models_0.ts @@ -0,0 +1,2156 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; + +import { PCSServiceException as __BaseException } from "./PCSServiceException"; + +/** + *

You don't have permission to perform the action.

+ *

+ * Examples + *

+ *
    + *
  • + *

    The launch template instance profile doesn't pass iam:PassRole + * verification.

    + *
  • + *
  • + *

    There is a mismatch between the account ID and cluster ID.

    + *
  • + *
  • + *

    The cluster ID doesn't exist.

    + *
  • + *
  • + *

    The EC2 instance isn't present.

    + *
  • + *
+ * @public + */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + } +} + +/** + *

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 ACTIVE status.

    + *
  • + *
  • + *

    A cluster to delete is in an unstable state. For example, because it still has + * ACTIVE node groups or queues.

    + *
  • + *
  • + *

    A queue already exists in a cluster.

    + *
  • + *
+ * @public + */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + *

+ * The unique identifier of the resource that caused the conflict exception. + *

+ * @public + */ + resourceId: string | undefined; + + /** + *

+ * The type or category of the resource that caused the conflict exception." + *

+ * @public + */ + resourceType: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + this.resourceId = opts.resourceId; + this.resourceType = opts.resourceType; + } +} + +/** + *

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

+ * @public + */ +export interface CustomLaunchTemplate { + /** + *

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

+ *

Example: lt-xxxx + *

+ * @public + */ + id: string | undefined; + + /** + *

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

+ * @public + */ + version: string | undefined; +} + +/** + *

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

+ * @public + */ +export interface InstanceConfig { + /** + *

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

+ *

Example: t2.xlarge + *

+ * @public + */ + instanceType?: string; +} + +/** + * @public + * @enum + */ +export const PurchaseOption = { + ONDEMAND: "ONDEMAND", + SPOT: "SPOT", +} as const; + +/** + * @public + */ +export type PurchaseOption = (typeof PurchaseOption)[keyof typeof PurchaseOption]; + +/** + *

Specifies the boundaries of the compute node group auto scaling.

+ * @public + */ +export interface ScalingConfigurationRequest { + /** + *

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

+ * @public + */ + minInstanceCount: number | undefined; + + /** + *

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

+ * @public + */ + maxInstanceCount: number | undefined; +} + +/** + *

Additional settings that directly map to Slurm settings.

+ * @public + */ +export interface SlurmCustomSetting { + /** + *

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

+ * @public + */ + parameterName: string | undefined; + + /** + *

The values for the configured Slurm settings.

+ * @public + */ + parameterValue: string | undefined; +} + +/** + *

Additional options related to the Slurm scheduler.

+ * @public + */ +export interface ComputeNodeGroupSlurmConfigurationRequest { + /** + *

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

+ * @public + */ + slurmCustomSettings?: SlurmCustomSetting[]; +} + +/** + * @public + * @enum + */ +export const SpotAllocationStrategy = { + CAPACITY_OPTIMIZED: "capacity-optimized", + LOWEST_PRICE: "lowest-price", + PRICE_CAPACITY_OPTIMIZED: "price-capacity-optimized", +} as const; + +/** + * @public + */ +export type SpotAllocationStrategy = (typeof SpotAllocationStrategy)[keyof typeof SpotAllocationStrategy]; + +/** + *

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

+ * @public + */ +export interface SpotOptions { + /** + *

The Amazon EC2 allocation strategy Amazon Web Services PCS uses to provision EC2 instances. + * Amazon Web Services PCS supports lowest price, + * capacity optimized, and + * price capacity optimized. + * For more information, see Use + * allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand + * capacity in the Amazon Elastic Compute Cloud User Guide. If you don't provide this option, + * it defaults to price capacity optimized.

+ * @public + */ + allocationStrategy?: SpotAllocationStrategy; +} + +/** + * @public + */ +export interface CreateComputeNodeGroupRequest { + /** + *

The name or ID of the cluster to create a compute node group in.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

A name to identify the cluster. Example: MyCluster + *

+ * @public + */ + computeNodeGroupName: string | undefined; + + /** + *

The ID of the Amazon Machine Image (AMI) that Amazon Web Services PCS uses to launch compute nodes + * (Amazon EC2 instances). If you don't provide this value, Amazon Web Services PCS uses the AMI ID specified + * in the custom launch template.

+ * @public + */ + amiId?: string; + + /** + *

The list of subnet IDs where the compute node group launches instances. + * Subnets must be in the same VPC as the cluster.

+ * @public + */ + subnetIds: string[] | undefined; + + /** + *

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.

+ * @public + */ + purchaseOption?: PurchaseOption; + + /** + *

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

+ * @public + */ + customLaunchTemplate: CustomLaunchTemplate | undefined; + + /** + *

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 in order to + * provision instances correctly. The resource identifier of the ARN must start with + * AWSPCS. For example, arn:aws:iam:123456789012:instance-profile/AWSPCSMyComputeNodeInstanceProfile. + *

+ * @public + */ + iamInstanceProfileArn: string | undefined; + + /** + *

Specifies the boundaries of the compute node group auto scaling.

+ * @public + */ + scalingConfiguration: ScalingConfigurationRequest | undefined; + + /** + *

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

+ * @public + */ + instanceConfigs: InstanceConfig[] | undefined; + + /** + *

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

+ * @public + */ + spotOptions?: SpotOptions; + + /** + *

Additional options related to the Slurm scheduler.

+ * @public + */ + slurmConfiguration?: ComputeNodeGroupSlurmConfigurationRequest; + + /** + *

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.

+ * @public + */ + clientToken?: string; + + /** + *

1 or more tags added to the resource. Each tag consists of a + * tag key and tag value. The tag value is optional and can be an empty + * string.

+ * @public + */ + tags?: Record; +} + +/** + *

An error that occurred during resource creation.

+ * @public + */ +export interface ErrorInfo { + /** + *

The short-form error code.

+ * @public + */ + code?: string; + + /** + *

The detailed error information.

+ * @public + */ + message?: string; +} + +/** + *

Specifies the boundaries of the compute node group auto scaling.

+ * @public + */ +export interface ScalingConfiguration { + /** + *

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

+ * @public + */ + minInstanceCount: number | undefined; + + /** + *

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

+ * @public + */ + maxInstanceCount: number | undefined; +} + +/** + *

Additional options related to the Slurm scheduler.

+ * @public + */ +export interface ComputeNodeGroupSlurmConfiguration { + /** + *

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

+ * @public + */ + slurmCustomSettings?: SlurmCustomSetting[]; +} + +/** + * @public + * @enum + */ +export const ComputeNodeGroupStatus = { + ACTIVE: "ACTIVE", + CREATE_FAILED: "CREATE_FAILED", + CREATING: "CREATING", + DELETED: "DELETED", + DELETE_FAILED: "DELETE_FAILED", + DELETING: "DELETING", + UPDATE_FAILED: "UPDATE_FAILED", + UPDATING: "UPDATING", +} as const; + +/** + * @public + */ +export type ComputeNodeGroupStatus = (typeof ComputeNodeGroupStatus)[keyof typeof ComputeNodeGroupStatus]; + +/** + *

A compute node group associated with a cluster.

+ * @public + */ +export interface ComputeNodeGroup { + /** + *

The name that identifies the compute node group.

+ * @public + */ + name: string | undefined; + + /** + *

The generated unique ID of the compute node group.

+ * @public + */ + id: string | undefined; + + /** + *

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

+ * @public + */ + arn: string | undefined; + + /** + *

The ID of the cluster of the compute node group.

+ * @public + */ + clusterId: string | undefined; + + /** + *

The date and time the resource was created.

+ * @public + */ + createdAt: Date | undefined; + + /** + *

The date and time the resource was modified.

+ * @public + */ + modifiedAt: Date | undefined; + + /** + *

The provisioning status of the compute node group.

+ * + *

The provisioning status doesn't indicate the overall health of the compute node + * group.

+ *
+ * @public + */ + status: ComputeNodeGroupStatus | undefined; + + /** + *

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.

+ * @public + */ + amiId?: string; + + /** + *

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.

+ * @public + */ + subnetIds: string[] | undefined; + + /** + *

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.

+ * @public + */ + purchaseOption?: PurchaseOption; + + /** + *

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

+ * @public + */ + customLaunchTemplate: CustomLaunchTemplate | undefined; + + /** + *

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.

+ * @public + */ + iamInstanceProfileArn: string | undefined; + + /** + *

Specifies the boundaries of the compute node group auto scaling.

+ * @public + */ + scalingConfiguration: ScalingConfiguration | undefined; + + /** + *

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

+ * @public + */ + instanceConfigs: InstanceConfig[] | undefined; + + /** + *

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

+ * @public + */ + spotOptions?: SpotOptions; + + /** + *

Additional options related to the Slurm scheduler.

+ * @public + */ + slurmConfiguration?: ComputeNodeGroupSlurmConfiguration; + + /** + *

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

+ * @public + */ + errorInfo?: ErrorInfo[]; +} + +/** + * @public + */ +export interface CreateComputeNodeGroupResponse { + /** + *

A compute node group associated with a cluster.

+ * @public + */ + computeNodeGroup?: ComputeNodeGroup; +} + +/** + *

Amazon Web Services PCS can't process your request right now. Try again later.

+ * @public + */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + $retryable = {}; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + } +} + +/** + *

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 + *

+ * @public + */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + *

+ * The unique identifier of the resource that was not found. + *

+ * @public + */ + resourceId: string | undefined; + + /** + *

+ * The type or category of the resource that was not found. + *

+ * @public + */ + resourceType: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.resourceId = opts.resourceId; + this.resourceType = opts.resourceType; + } +} + +/** + *

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 maxInstances across all compute node groups has been + * reached for associated cluster.

    + *
  • + *
+ * @public + */ +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + /** + *

+ * The service code associated with the quota that was exceeded. + *

+ * @public + */ + serviceCode: string | undefined; + + /** + *

+ * The unique identifier of the resource that caused the quota to be exceeded. + *

+ * @public + */ + resourceId?: string; + + /** + *

+ * The type or category of the resource that caused the quota to be exceeded. + *

+ * @public + */ + resourceType?: string; + + /** + *

+ * The quota code of the service quota that was exceeded. + *

+ * @public + */ + quotaCode?: string; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + this.serviceCode = opts.serviceCode; + this.resourceId = opts.resourceId; + this.resourceType = opts.resourceType; + this.quotaCode = opts.quotaCode; + } +} + +/** + *

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

+ * @public + */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + $retryable = {}; + /** + *

+ * The number of seconds to wait before retrying the request. + *

+ * @public + */ + retryAfterSeconds?: number; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + this.retryAfterSeconds = opts.retryAfterSeconds; + } +} + +/** + *

Stores information about a field in a request that caused an exception.

+ * @public + */ +export interface ValidationExceptionField { + /** + *

The name of the exception.

+ * @public + */ + name: string | undefined; + + /** + *

The message body of the exception.

+ * @public + */ + message: string | undefined; +} + +/** + * @public + * @enum + */ +export const ValidationExceptionReason = { + CANNOT_PARSE: "cannotParse", + FIELD_VALIDATION_FAILED: "fieldValidationFailed", + OTHER: "other", + UNKNOWN_OPERATION: "unknownOperation", +} as const; + +/** + * @public + */ +export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason]; + +/** + *

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 CUSTOM and the launch template doesn't define the AMI ID, + * or the AMI type is AL2 and the launch template defines the AMI.

    + *
  • + *
+ * @public + */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + /** + *

+ * The specific reason or cause of the validation error. + *

+ * @public + */ + reason: ValidationExceptionReason | undefined; + + /** + *

+ * A list of fields or properties that failed validation. + *

+ * @public + */ + fieldList?: ValidationExceptionField[]; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ValidationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ValidationException.prototype); + this.reason = opts.reason; + this.fieldList = opts.fieldList; + } +} + +/** + * @public + */ +export interface DeleteComputeNodeGroupRequest { + /** + *

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

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The name or ID of the compute node group to delete.

+ * @public + */ + computeNodeGroupIdentifier: string | undefined; + + /** + *

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.

+ * @public + */ + clientToken?: string; +} + +/** + * @public + */ +export interface DeleteComputeNodeGroupResponse {} + +/** + * @public + */ +export interface GetComputeNodeGroupRequest { + /** + *

The name or ID of the cluster.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The name or ID of the compute node group.

+ * @public + */ + computeNodeGroupIdentifier: string | undefined; +} + +/** + * @public + */ +export interface GetComputeNodeGroupResponse { + /** + *

A compute node group associated with a cluster.

+ * @public + */ + computeNodeGroup?: ComputeNodeGroup; +} + +/** + * @public + */ +export interface ListComputeNodeGroupsRequest { + /** + *

The name or ID of the cluster to list compute node groups for.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The value of nextToken is a unique pagination token + * for each page of results returned. If nextToken is returned, there are more + * results available. Make the call again using the returned token to retrieve the next page. + * Keep all other arguments unchanged. Each pagination token expires after 24 hours. + * Using an expired pagination token returns an HTTP 400 InvalidToken + * error.

+ * @public + */ + nextToken?: string; + + /** + *

The maximum number of results that are returned per call. + * You can use nextToken to obtain further pages of results. The default + * is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses + * the default.

+ * @public + */ + maxResults?: number; +} + +/** + *

The object returned by the ListComputeNodeGroups API action.

+ * @public + */ +export interface ComputeNodeGroupSummary { + /** + *

The name that identifies the compute node group.

+ * @public + */ + name: string | undefined; + + /** + *

The generated unique ID of the compute node group.

+ * @public + */ + id: string | undefined; + + /** + *

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

+ * @public + */ + arn: string | undefined; + + /** + *

The ID of the cluster of the compute node group.

+ * @public + */ + clusterId: string | undefined; + + /** + *

The date and time the resource was created.

+ * @public + */ + createdAt: Date | undefined; + + /** + *

The date and time the resource was modified.

+ * @public + */ + modifiedAt: Date | undefined; + + /** + *

The provisioning status of the compute node group.

+ * + *

The provisioning status doesn't indicate the overall health of the compute node + * group.

+ *
+ * @public + */ + status: ComputeNodeGroupStatus | undefined; +} + +/** + * @public + */ +export interface ListComputeNodeGroupsResponse { + /** + *

The list of compute node groups for the cluster.

+ * @public + */ + computeNodeGroups: ComputeNodeGroupSummary[] | undefined; + + /** + *

The value of nextToken is a unique pagination token + * for each page of results returned. If nextToken is returned, there are more + * results available. Make the call again using the returned token to retrieve the next page. + * Keep all other arguments unchanged. Each pagination token expires after 24 hours. + * Using an expired pagination token returns an HTTP 400 InvalidToken + * error.

+ * @public + */ + nextToken?: string; +} + +/** + *

Additional options related to the Slurm scheduler.

+ * @public + */ +export interface UpdateComputeNodeGroupSlurmConfigurationRequest { + /** + *

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

+ * @public + */ + slurmCustomSettings?: SlurmCustomSetting[]; +} + +/** + * @public + */ +export interface UpdateComputeNodeGroupRequest { + /** + *

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

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The name or ID of the compute node group.

+ * @public + */ + computeNodeGroupIdentifier: string | undefined; + + /** + *

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.

+ * @public + */ + amiId?: string; + + /** + *

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

+ * @public + */ + subnetIds?: string[]; + + /** + *

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

+ * @public + */ + customLaunchTemplate?: CustomLaunchTemplate; + + /** + *

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.

+ * @public + */ + purchaseOption?: PurchaseOption; + + /** + *

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

+ * @public + */ + spotOptions?: SpotOptions; + + /** + *

Specifies the boundaries of the compute node group auto scaling.

+ * @public + */ + scalingConfiguration?: ScalingConfigurationRequest; + + /** + *

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.

+ * @public + */ + iamInstanceProfileArn?: string; + + /** + *

Additional options related to the Slurm scheduler.

+ * @public + */ + slurmConfiguration?: UpdateComputeNodeGroupSlurmConfigurationRequest; + + /** + *

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.

+ * @public + */ + clientToken?: string; +} + +/** + * @public + */ +export interface UpdateComputeNodeGroupResponse { + /** + *

A compute node group associated with a cluster.

+ * @public + */ + computeNodeGroup?: ComputeNodeGroup; +} + +/** + *

The networking configuration for the cluster's control plane.

+ * @public + */ +export interface NetworkingRequest { + /** + *

The list of subnet IDs where Amazon Web Services PCS creates an + * Elastic Network Interface (ENI) to enable communication between managed controllers + * and Amazon Web Services PCS resources. Subnet IDs have the form subnet-0123456789abcdef0.

+ *

Subnets can't be in Outposts, Wavelength or an Amazon Web Services Local Zone.

+ * + *

Amazon Web Services PCS currently supports only 1 subnet in this list.

+ *
+ * @public + */ + subnetIds?: string[]; + + /** + *

A list of security group IDs associated with the Elastic Network Interface (ENI) created in subnets.

+ * @public + */ + securityGroupIds?: string[]; +} + +/** + * @public + * @enum + */ +export const SchedulerType = { + SLURM: "SLURM", +} as const; + +/** + * @public + */ +export type SchedulerType = (typeof SchedulerType)[keyof typeof SchedulerType]; + +/** + *

The cluster management and job scheduling software associated with the cluster.

+ * @public + */ +export interface SchedulerRequest { + /** + *

The software Amazon Web Services PCS uses to manage cluster scaling and job scheduling.

+ * @public + */ + type: SchedulerType | undefined; + + /** + *

The version of the specified scheduling software that Amazon Web Services PCS uses to manage cluster scaling and job scheduling.

+ * @public + */ + version: string | undefined; +} + +/** + * @public + * @enum + */ +export const Size = { + LARGE: "LARGE", + MEDIUM: "MEDIUM", + SMALL: "SMALL", +} as const; + +/** + * @public + */ +export type Size = (typeof Size)[keyof typeof Size]; + +/** + *

Additional options related to the Slurm scheduler.

+ * @public + */ +export interface ClusterSlurmConfigurationRequest { + /** + *

The time before an idle node is scaled down.

+ * @public + */ + scaleDownIdleTimeInSeconds?: number; + + /** + *

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

+ * @public + */ + slurmCustomSettings?: SlurmCustomSetting[]; +} + +/** + * @public + */ +export interface CreateClusterRequest { + /** + *

A name to identify the cluster. Example: MyCluster + *

+ * @public + */ + clusterName: string | undefined; + + /** + *

The cluster management and job scheduling software associated with the cluster.

+ * @public + */ + scheduler: SchedulerRequest | undefined; + + /** + *

A value that determines the maximum number of compute nodes in the cluster and the + * maximum number of jobs (active and queued).

+ *
    + *
  • + *

    + * SMALL: 32 compute nodes and 256 jobs

    + *
  • + *
  • + *

    + * MEDIUM: 512 compute nodes and 8192 jobs

    + *
  • + *
  • + *

    + * LARGE: 2048 compute nodes and 16,384 jobs

    + *
  • + *
+ * @public + */ + size: Size | undefined; + + /** + *

The networking configuration used to set up the cluster's control plane.

+ * @public + */ + networking: NetworkingRequest | undefined; + + /** + *

Additional options related to the Slurm scheduler.

+ * @public + */ + slurmConfiguration?: ClusterSlurmConfigurationRequest; + + /** + *

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.

+ * @public + */ + clientToken?: string; + + /** + *

1 or more tags added to the resource. Each tag consists of a + * tag key and tag value. The tag value is optional and can be an empty + * string.

+ * @public + */ + tags?: Record; +} + +/** + * @public + * @enum + */ +export const EndpointType = { + SLURMCTLD: "SLURMCTLD", + SLURMDBD: "SLURMDBD", +} as const; + +/** + * @public + */ +export type EndpointType = (typeof EndpointType)[keyof typeof EndpointType]; + +/** + *

An endpoint available for interaction with the scheduler.

+ * @public + */ +export interface Endpoint { + /** + *

Indicates the type of endpoint running at the specific IP address.

+ * @public + */ + type: EndpointType | undefined; + + /** + *

The endpoint's private IP address.

+ *

Example: 2.2.2.2 + *

+ * @public + */ + privateIpAddress: string | undefined; + + /** + *

The endpoint's public IP address.

+ *

Example: 1.1.1.1 + *

+ * @public + */ + publicIpAddress?: string; + + /** + *

The endpoint's connection port number.

+ *

Example: 1234 + *

+ * @public + */ + port: string | undefined; +} + +/** + *

The networking configuration for the cluster's control plane.

+ * @public + */ +export interface Networking { + /** + *

The ID of the subnet where Amazon Web Services PCS creates an Elastic Network Interface (ENI) to + * enable communication between managed controllers and Amazon Web Services 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 + *

+ * @public + */ + subnetIds?: string[]; + + /** + *

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)

      + *
    • + *
    + *
  • + *
  • + *

    Outbound rule 2

    + *
      + *
    • + *

      Protocol: All

      + *
    • + *
    • + *

      Ports: All

      + *
    • + *
    • + *

      Destination: Self

      + *
    • + *
    + *
  • + *
+ * @public + */ + securityGroupIds?: string[]; +} + +/** + *

The cluster management and job scheduling software associated with the cluster.

+ * @public + */ +export interface Scheduler { + /** + *

The software Amazon Web Services PCS uses to manage cluster scaling and job scheduling.

+ * @public + */ + type: SchedulerType | undefined; + + /** + *

The version of the specified scheduling software that Amazon Web Services PCS uses to manage cluster scaling and job scheduling.

+ * @public + */ + version: string | undefined; +} + +/** + *

The shared Slurm key for authentication, also known as the cluster secret.

+ * @public + */ +export interface SlurmAuthKey { + /** + *

The Amazon Resource Name (ARN) of the the shared Slurm key.

+ * @public + */ + secretArn: string | undefined; + + /** + *

The version of the shared Slurm key.

+ * @public + */ + secretVersion: string | undefined; +} + +/** + *

Additional options related to the Slurm scheduler.

+ * @public + */ +export interface ClusterSlurmConfiguration { + /** + *

The time before an idle node is scaled down.

+ * @public + */ + scaleDownIdleTimeInSeconds?: number; + + /** + *

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

+ * @public + */ + slurmCustomSettings?: SlurmCustomSetting[]; + + /** + *

The shared Slurm key for authentication, also known as the cluster secret.

+ * @public + */ + authKey?: SlurmAuthKey; +} + +/** + * @public + * @enum + */ +export const ClusterStatus = { + ACTIVE: "ACTIVE", + CREATE_FAILED: "CREATE_FAILED", + CREATING: "CREATING", + DELETE_FAILED: "DELETE_FAILED", + DELETING: "DELETING", + UPDATE_FAILED: "UPDATE_FAILED", + UPDATING: "UPDATING", +} as const; + +/** + * @public + */ +export type ClusterStatus = (typeof ClusterStatus)[keyof typeof ClusterStatus]; + +/** + *

The cluster resource and configuration.

+ * @public + */ +export interface Cluster { + /** + *

The name that identifies the cluster.

+ * @public + */ + name: string | undefined; + + /** + *

The generated unique ID of the cluster.

+ * @public + */ + id: string | undefined; + + /** + *

The unique Amazon Resource Name (ARN) of the cluster.

+ * @public + */ + arn: string | undefined; + + /** + *

The provisioning status of the cluster.

+ * + *

The provisioning status doesn't indicate the overall health of the cluster.

+ *
+ * @public + */ + status: ClusterStatus | undefined; + + /** + *

The date and time the resource was created.

+ * @public + */ + createdAt: Date | undefined; + + /** + *

The date and time the resource was modified.

+ * @public + */ + modifiedAt: Date | undefined; + + /** + *

The cluster management and job scheduling software associated with the cluster.

+ * @public + */ + scheduler: Scheduler | undefined; + + /** + *

The size of the cluster.

+ *
    + *
  • + *

    + * SMALL: 32 compute nodes and 256 jobs

    + *
  • + *
  • + *

    + * MEDIUM: 512 compute nodes and 8192 jobs

    + *
  • + *
  • + *

    + * LARGE: 2048 compute nodes and 16,384 jobs

    + *
  • + *
+ * @public + */ + size: Size | undefined; + + /** + *

Additional options related to the Slurm scheduler.

+ * @public + */ + slurmConfiguration?: ClusterSlurmConfiguration; + + /** + *

The networking configuration for the cluster's control plane.

+ * @public + */ + networking: Networking | undefined; + + /** + *

The list of endpoints available for interaction with the scheduler.

+ * @public + */ + endpoints?: Endpoint[]; + + /** + *

The list of errors that occurred during cluster provisioning.

+ * @public + */ + errorInfo?: ErrorInfo[]; +} + +/** + * @public + */ +export interface CreateClusterResponse { + /** + *

The cluster resource.

+ * @public + */ + cluster?: Cluster; +} + +/** + * @public + */ +export interface DeleteClusterRequest { + /** + *

The name or ID of the cluster to delete.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

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.

+ * @public + */ + clientToken?: string; +} + +/** + * @public + */ +export interface DeleteClusterResponse {} + +/** + * @public + */ +export interface GetClusterRequest { + /** + *

The name or ID of the cluster of the queue.

+ * @public + */ + clusterIdentifier: string | undefined; +} + +/** + * @public + */ +export interface GetClusterResponse { + /** + *

The cluster resource.

+ * @public + */ + cluster?: Cluster; +} + +/** + * @public + */ +export interface ListClustersRequest { + /** + *

The value of nextToken is a unique pagination token + * for each page of results returned. If nextToken is returned, there are more + * results available. Make the call again using the returned token to retrieve the next page. + * Keep all other arguments unchanged. Each pagination token expires after 24 hours. + * Using an expired pagination token returns an HTTP 400 InvalidToken + * error.

+ * @public + */ + nextToken?: string; + + /** + *

The maximum number of results that are returned per call. + * You can use nextToken to obtain further pages of results. The default + * is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses + * the default.

+ * @public + */ + maxResults?: number; +} + +/** + *

The object returned by the ListClusters API action.

+ * @public + */ +export interface ClusterSummary { + /** + *

The name that identifies the cluster.

+ * @public + */ + name: string | undefined; + + /** + *

The generated unique ID of the cluster.

+ * @public + */ + id: string | undefined; + + /** + *

The unique Amazon Resource Name (ARN) of the cluster.

+ * @public + */ + arn: string | undefined; + + /** + *

The date and time the resource was created.

+ * @public + */ + createdAt: Date | undefined; + + /** + *

The date and time the resource was modified.

+ * @public + */ + modifiedAt: Date | undefined; + + /** + *

The provisioning status of the cluster.

+ * + *

The provisioning status doesn't indicate the overall health of the cluster.

+ *
+ * @public + */ + status: ClusterStatus | undefined; +} + +/** + * @public + */ +export interface ListClustersResponse { + /** + *

The list of clusters.

+ * @public + */ + clusters: ClusterSummary[] | undefined; + + /** + *

The value of nextToken is a unique pagination token + * for each page of results returned. If nextToken is returned, there are more + * results available. Make the call again using the returned token to retrieve the next page. + * Keep all other arguments unchanged. Each pagination token expires after 24 hours. + * Using an expired pagination token returns an HTTP 400 InvalidToken + * error.

+ * @public + */ + nextToken?: string; +} + +/** + *

The compute node group configuration for a queue.

+ * @public + */ +export interface ComputeNodeGroupConfiguration { + /** + *

The compute node group ID for the compute node group configuration.

+ * @public + */ + computeNodeGroupId?: string; +} + +/** + * @public + */ +export interface CreateQueueRequest { + /** + *

The name or ID of the cluster for which to create a queue.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

A name to identify the queue.

+ * @public + */ + queueName: string | undefined; + + /** + *

The list of compute node group configurations to associate with the queue. Queues + * assign jobs to associated compute node groups.

+ * @public + */ + computeNodeGroupConfigurations?: ComputeNodeGroupConfiguration[]; + + /** + *

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.

+ * @public + */ + clientToken?: string; + + /** + *

1 or more tags added to the resource. Each tag consists of a + * tag key and tag value. The tag value is optional and can be an empty + * string.

+ * @public + */ + tags?: Record; +} + +/** + * @public + * @enum + */ +export const QueueStatus = { + ACTIVE: "ACTIVE", + CREATE_FAILED: "CREATE_FAILED", + CREATING: "CREATING", + DELETE_FAILED: "DELETE_FAILED", + DELETING: "DELETING", + UPDATE_FAILED: "UPDATE_FAILED", + UPDATING: "UPDATING", +} as const; + +/** + * @public + */ +export type QueueStatus = (typeof QueueStatus)[keyof typeof QueueStatus]; + +/** + *

A queue resource.

+ * @public + */ +export interface Queue { + /** + *

The name that identifies the queue.

+ * @public + */ + name: string | undefined; + + /** + *

The generated unique ID of the queue.

+ * @public + */ + id: string | undefined; + + /** + *

The unique Amazon Resource Name (ARN) of the queue.

+ * @public + */ + arn: string | undefined; + + /** + *

The ID of the cluster of the queue.

+ * @public + */ + clusterId: string | undefined; + + /** + *

The date and time the resource was created.

+ * @public + */ + createdAt: Date | undefined; + + /** + *

The date and time the resource was modified.

+ * @public + */ + modifiedAt: Date | undefined; + + /** + *

The provisioning status of the queue.

+ * + *

The provisioning status doesn't indicate the overall health of the queue.

+ *
+ * @public + */ + status: QueueStatus | undefined; + + /** + *

The list of compute node group configurations associated with the queue. Queues + * assign jobs to associated compute node groups.

+ * @public + */ + computeNodeGroupConfigurations: ComputeNodeGroupConfiguration[] | undefined; + + /** + *

The list of errors that occurred during queue provisioning.

+ * @public + */ + errorInfo?: ErrorInfo[]; +} + +/** + * @public + */ +export interface CreateQueueResponse { + /** + *

A queue resource.

+ * @public + */ + queue?: Queue; +} + +/** + * @public + */ +export interface DeleteQueueRequest { + /** + *

The name or ID of the cluster of the queue.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The name or ID of the queue to delete.

+ * @public + */ + queueIdentifier: string | undefined; + + /** + *

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.

+ * @public + */ + clientToken?: string; +} + +/** + * @public + */ +export interface DeleteQueueResponse {} + +/** + * @public + */ +export interface GetQueueRequest { + /** + *

The name or ID of the cluster of the queue.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The name or ID of the queue.

+ * @public + */ + queueIdentifier: string | undefined; +} + +/** + * @public + */ +export interface GetQueueResponse { + /** + *

A queue resource.

+ * @public + */ + queue?: Queue; +} + +/** + * @public + */ +export interface ListQueuesRequest { + /** + *

The name or ID of the cluster to list queues for.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The value of nextToken is a unique pagination token + * for each page of results returned. If nextToken is returned, there are more + * results available. Make the call again using the returned token to retrieve the next page. + * Keep all other arguments unchanged. Each pagination token expires after 24 hours. + * Using an expired pagination token returns an HTTP 400 InvalidToken + * error.

+ * @public + */ + nextToken?: string; + + /** + *

The maximum number of results that are returned per call. + * You can use nextToken to obtain further pages of results. The default + * is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses + * the default.

+ * @public + */ + maxResults?: number; +} + +/** + *

The object returned by the ListQueues API action.

+ * @public + */ +export interface QueueSummary { + /** + *

The name that identifies the queue.

+ * @public + */ + name: string | undefined; + + /** + *

The generated unique ID of the queue.

+ * @public + */ + id: string | undefined; + + /** + *

The unique Amazon Resource Name (ARN) of the queue.

+ * @public + */ + arn: string | undefined; + + /** + *

The ID of the cluster of the queue.

+ * @public + */ + clusterId: string | undefined; + + /** + *

The date and time the resource was created.

+ * @public + */ + createdAt: Date | undefined; + + /** + *

The date and time the resource was modified.

+ * @public + */ + modifiedAt: Date | undefined; + + /** + *

The provisioning status of the queue.

+ * + *

The provisioning status doesn't indicate the overall health of the queue.

+ *
+ * @public + */ + status: QueueStatus | undefined; +} + +/** + * @public + */ +export interface ListQueuesResponse { + /** + *

The list of queues associated with the cluster.

+ * @public + */ + queues: QueueSummary[] | undefined; + + /** + *

The value of nextToken is a unique pagination token + * for each page of results returned. If nextToken is returned, there are more + * results available. Make the call again using the returned token to retrieve the next page. + * Keep all other arguments unchanged. Each pagination token expires after 24 hours. + * Using an expired pagination token returns an HTTP 400 InvalidToken + * error.

+ * @public + */ + nextToken?: string; +} + +/** + * @public + */ +export interface UpdateQueueRequest { + /** + *

The name or ID of the cluster of the queue.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The name or ID of the queue.

+ * @public + */ + queueIdentifier: string | undefined; + + /** + *

The list of compute node group configurations to associate with the queue. Queues + * assign jobs to associated compute node groups.

+ * @public + */ + computeNodeGroupConfigurations?: ComputeNodeGroupConfiguration[]; + + /** + *

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.

+ * @public + */ + clientToken?: string; +} + +/** + * @public + */ +export interface UpdateQueueResponse { + /** + *

A queue resource.

+ * @public + */ + queue?: Queue; +} + +/** + * @public + */ +export interface RegisterComputeNodeGroupInstanceRequest { + /** + *

The name or ID of the cluster to register the compute node group instance in.

+ * @public + */ + clusterIdentifier: string | undefined; + + /** + *

The client-generated token to allow for retries.

+ * @public + */ + bootstrapId: string | undefined; +} + +/** + * @public + */ +export interface RegisterComputeNodeGroupInstanceResponse { + /** + *

The scheduler node ID for this instance.

+ * @public + */ + nodeID: string | undefined; + + /** + *

For the Slurm scheduler, this is the shared Munge key the scheduler uses to + * authenticate compute node group instances.

+ * @public + */ + sharedSecret: string | undefined; + + /** + *

The list of endpoints available for interaction with the scheduler.

+ * @public + */ + endpoints: Endpoint[] | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceRequest { + /** + *

The Amazon Resource Name (ARN) of the resource for which to list tags.

+ * @public + */ + resourceArn: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + *

1 or more tags added to the resource. Each tag consists of a + * tag key and tag value. The tag value is optional and can be an empty + * string.

+ * @public + */ + tags?: Record; +} + +/** + * @public + */ +export interface TagResourceRequest { + /** + *

The Amazon Resource Name (ARN) of the resource.

+ * @public + */ + resourceArn: string | undefined; + + /** + *

1 or more tags added to the resource. Each tag consists of a + * tag key and tag value. The tag value is optional and can be an empty + * string.

+ * @public + */ + tags: Record | undefined; +} + +/** + * @public + */ +export interface UntagResourceRequest { + /** + *

The Amazon Resource Name (ARN) of the resource.

+ * @public + */ + resourceArn: string | undefined; + + /** + *

1 or more tag keys to remove from the resource. Specify only tag keys and not tag + * values.

+ * @public + */ + tagKeys: string[] | undefined; +} + +/** + * @internal + */ +export const RegisterComputeNodeGroupInstanceResponseFilterSensitiveLog = ( + obj: RegisterComputeNodeGroupInstanceResponse +): any => ({ + ...obj, + ...(obj.sharedSecret && { sharedSecret: SENSITIVE_STRING }), +}); diff --git a/clients/client-pcs/src/pagination/Interfaces.ts b/clients/client-pcs/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..b22ef5bf625c --- /dev/null +++ b/clients/client-pcs/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { PCSClient } from "../PCSClient"; + +/** + * @public + */ +export interface PCSPaginationConfiguration extends PaginationConfiguration { + client: PCSClient; +} diff --git a/clients/client-pcs/src/pagination/ListClustersPaginator.ts b/clients/client-pcs/src/pagination/ListClustersPaginator.ts new file mode 100644 index 000000000000..94df87f0c060 --- /dev/null +++ b/clients/client-pcs/src/pagination/ListClustersPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListClustersCommand, + ListClustersCommandInput, + ListClustersCommandOutput, +} from "../commands/ListClustersCommand"; +import { PCSClient } from "../PCSClient"; +import { PCSPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListClusters: ( + config: PCSPaginationConfiguration, + input: ListClustersCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + PCSPaginationConfiguration, + ListClustersCommandInput, + ListClustersCommandOutput +>(PCSClient, ListClustersCommand, "nextToken", "nextToken", "maxResults"); diff --git a/clients/client-pcs/src/pagination/ListComputeNodeGroupsPaginator.ts b/clients/client-pcs/src/pagination/ListComputeNodeGroupsPaginator.ts new file mode 100644 index 000000000000..f2c472a1a9a2 --- /dev/null +++ b/clients/client-pcs/src/pagination/ListComputeNodeGroupsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListComputeNodeGroupsCommand, + ListComputeNodeGroupsCommandInput, + ListComputeNodeGroupsCommandOutput, +} from "../commands/ListComputeNodeGroupsCommand"; +import { PCSClient } from "../PCSClient"; +import { PCSPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListComputeNodeGroups: ( + config: PCSPaginationConfiguration, + input: ListComputeNodeGroupsCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + PCSPaginationConfiguration, + ListComputeNodeGroupsCommandInput, + ListComputeNodeGroupsCommandOutput +>(PCSClient, ListComputeNodeGroupsCommand, "nextToken", "nextToken", "maxResults"); diff --git a/clients/client-pcs/src/pagination/ListQueuesPaginator.ts b/clients/client-pcs/src/pagination/ListQueuesPaginator.ts new file mode 100644 index 000000000000..b04ff8250798 --- /dev/null +++ b/clients/client-pcs/src/pagination/ListQueuesPaginator.ts @@ -0,0 +1,20 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { ListQueuesCommand, ListQueuesCommandInput, ListQueuesCommandOutput } from "../commands/ListQueuesCommand"; +import { PCSClient } from "../PCSClient"; +import { PCSPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListQueues: ( + config: PCSPaginationConfiguration, + input: ListQueuesCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + PCSPaginationConfiguration, + ListQueuesCommandInput, + ListQueuesCommandOutput +>(PCSClient, ListQueuesCommand, "nextToken", "nextToken", "maxResults"); diff --git a/clients/client-pcs/src/pagination/index.ts b/clients/client-pcs/src/pagination/index.ts new file mode 100644 index 000000000000..716d8b07d1d2 --- /dev/null +++ b/clients/client-pcs/src/pagination/index.ts @@ -0,0 +1,5 @@ +// smithy-typescript generated code +export * from "./Interfaces"; +export * from "./ListClustersPaginator"; +export * from "./ListComputeNodeGroupsPaginator"; +export * from "./ListQueuesPaginator"; diff --git a/clients/client-pcs/src/protocols/Aws_json1_0.ts b/clients/client-pcs/src/protocols/Aws_json1_0.ts new file mode 100644 index 000000000000..12bb218a63ae --- /dev/null +++ b/clients/client-pcs/src/protocols/Aws_json1_0.ts @@ -0,0 +1,1376 @@ +// smithy-typescript generated code +import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectNonNull as __expectNonNull, + expectString as __expectString, + parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; +import { v4 as generateIdempotencyToken } from "uuid"; + +import { CreateClusterCommandInput, CreateClusterCommandOutput } from "../commands/CreateClusterCommand"; +import { + CreateComputeNodeGroupCommandInput, + CreateComputeNodeGroupCommandOutput, +} from "../commands/CreateComputeNodeGroupCommand"; +import { CreateQueueCommandInput, CreateQueueCommandOutput } from "../commands/CreateQueueCommand"; +import { DeleteClusterCommandInput, DeleteClusterCommandOutput } from "../commands/DeleteClusterCommand"; +import { + DeleteComputeNodeGroupCommandInput, + DeleteComputeNodeGroupCommandOutput, +} from "../commands/DeleteComputeNodeGroupCommand"; +import { DeleteQueueCommandInput, DeleteQueueCommandOutput } from "../commands/DeleteQueueCommand"; +import { GetClusterCommandInput, GetClusterCommandOutput } from "../commands/GetClusterCommand"; +import { + GetComputeNodeGroupCommandInput, + GetComputeNodeGroupCommandOutput, +} from "../commands/GetComputeNodeGroupCommand"; +import { GetQueueCommandInput, GetQueueCommandOutput } from "../commands/GetQueueCommand"; +import { ListClustersCommandInput, ListClustersCommandOutput } from "../commands/ListClustersCommand"; +import { + ListComputeNodeGroupsCommandInput, + ListComputeNodeGroupsCommandOutput, +} from "../commands/ListComputeNodeGroupsCommand"; +import { ListQueuesCommandInput, ListQueuesCommandOutput } from "../commands/ListQueuesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { + RegisterComputeNodeGroupInstanceCommandInput, + RegisterComputeNodeGroupInstanceCommandOutput, +} from "../commands/RegisterComputeNodeGroupInstanceCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { + UpdateComputeNodeGroupCommandInput, + UpdateComputeNodeGroupCommandOutput, +} from "../commands/UpdateComputeNodeGroupCommand"; +import { UpdateQueueCommandInput, UpdateQueueCommandOutput } from "../commands/UpdateQueueCommand"; +import { + AccessDeniedException, + Cluster, + ClusterSlurmConfigurationRequest, + ClusterSummary, + ComputeNodeGroup, + ComputeNodeGroupConfiguration, + ComputeNodeGroupSlurmConfigurationRequest, + ComputeNodeGroupSummary, + ConflictException, + CreateClusterRequest, + CreateClusterResponse, + CreateComputeNodeGroupRequest, + CreateComputeNodeGroupResponse, + CreateQueueRequest, + CreateQueueResponse, + CustomLaunchTemplate, + DeleteClusterRequest, + DeleteComputeNodeGroupRequest, + DeleteQueueRequest, + GetClusterRequest, + GetClusterResponse, + GetComputeNodeGroupRequest, + GetComputeNodeGroupResponse, + GetQueueRequest, + GetQueueResponse, + InstanceConfig, + InternalServerException, + ListClustersRequest, + ListClustersResponse, + ListComputeNodeGroupsRequest, + ListComputeNodeGroupsResponse, + ListQueuesRequest, + ListQueuesResponse, + ListTagsForResourceRequest, + NetworkingRequest, + Queue, + QueueSummary, + RegisterComputeNodeGroupInstanceRequest, + ResourceNotFoundException, + ScalingConfigurationRequest, + SchedulerRequest, + ServiceQuotaExceededException, + SlurmCustomSetting, + SpotOptions, + TagResourceRequest, + ThrottlingException, + UntagResourceRequest, + UpdateComputeNodeGroupRequest, + UpdateComputeNodeGroupResponse, + UpdateComputeNodeGroupSlurmConfigurationRequest, + UpdateQueueRequest, + UpdateQueueResponse, + ValidationException, +} from "../models/models_0"; +import { PCSServiceException as __BaseException } from "../models/PCSServiceException"; + +/** + * serializeAws_json1_0CreateClusterCommand + */ +export const se_CreateClusterCommand = async ( + input: CreateClusterCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateCluster"); + let body: any; + body = JSON.stringify(se_CreateClusterRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0CreateComputeNodeGroupCommand + */ +export const se_CreateComputeNodeGroupCommand = async ( + input: CreateComputeNodeGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateComputeNodeGroup"); + let body: any; + body = JSON.stringify(se_CreateComputeNodeGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0CreateQueueCommand + */ +export const se_CreateQueueCommand = async ( + input: CreateQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateQueue"); + let body: any; + body = JSON.stringify(se_CreateQueueRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0DeleteClusterCommand + */ +export const se_DeleteClusterCommand = async ( + input: DeleteClusterCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteCluster"); + let body: any; + body = JSON.stringify(se_DeleteClusterRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0DeleteComputeNodeGroupCommand + */ +export const se_DeleteComputeNodeGroupCommand = async ( + input: DeleteComputeNodeGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteComputeNodeGroup"); + let body: any; + body = JSON.stringify(se_DeleteComputeNodeGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0DeleteQueueCommand + */ +export const se_DeleteQueueCommand = async ( + input: DeleteQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteQueue"); + let body: any; + body = JSON.stringify(se_DeleteQueueRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0GetClusterCommand + */ +export const se_GetClusterCommand = async ( + input: GetClusterCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetCluster"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0GetComputeNodeGroupCommand + */ +export const se_GetComputeNodeGroupCommand = async ( + input: GetComputeNodeGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetComputeNodeGroup"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0GetQueueCommand + */ +export const se_GetQueueCommand = async ( + input: GetQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetQueue"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ListClustersCommand + */ +export const se_ListClustersCommand = async ( + input: ListClustersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListClusters"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ListComputeNodeGroupsCommand + */ +export const se_ListComputeNodeGroupsCommand = async ( + input: ListComputeNodeGroupsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListComputeNodeGroups"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ListQueuesCommand + */ +export const se_ListQueuesCommand = async ( + input: ListQueuesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListQueues"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ListTagsForResourceCommand + */ +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0RegisterComputeNodeGroupInstanceCommand + */ +export const se_RegisterComputeNodeGroupInstanceCommand = async ( + input: RegisterComputeNodeGroupInstanceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("RegisterComputeNodeGroupInstance"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0TagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("TagResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0UntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UntagResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0UpdateComputeNodeGroupCommand + */ +export const se_UpdateComputeNodeGroupCommand = async ( + input: UpdateComputeNodeGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UpdateComputeNodeGroup"); + let body: any; + body = JSON.stringify(se_UpdateComputeNodeGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0UpdateQueueCommand + */ +export const se_UpdateQueueCommand = async ( + input: UpdateQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UpdateQueue"); + let body: any; + body = JSON.stringify(se_UpdateQueueRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * deserializeAws_json1_0CreateClusterCommand + */ +export const de_CreateClusterCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_CreateClusterResponse(data, context); + const response: CreateClusterCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0CreateComputeNodeGroupCommand + */ +export const de_CreateComputeNodeGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_CreateComputeNodeGroupResponse(data, context); + const response: CreateComputeNodeGroupCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0CreateQueueCommand + */ +export const de_CreateQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_CreateQueueResponse(data, context); + const response: CreateQueueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0DeleteClusterCommand + */ +export const de_DeleteClusterCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteClusterCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0DeleteComputeNodeGroupCommand + */ +export const de_DeleteComputeNodeGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteComputeNodeGroupCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0DeleteQueueCommand + */ +export const de_DeleteQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteQueueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0GetClusterCommand + */ +export const de_GetClusterCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetClusterResponse(data, context); + const response: GetClusterCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0GetComputeNodeGroupCommand + */ +export const de_GetComputeNodeGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetComputeNodeGroupResponse(data, context); + const response: GetComputeNodeGroupCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0GetQueueCommand + */ +export const de_GetQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetQueueResponse(data, context); + const response: GetQueueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ListClustersCommand + */ +export const de_ListClustersCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListClustersResponse(data, context); + const response: ListClustersCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ListComputeNodeGroupsCommand + */ +export const de_ListComputeNodeGroupsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListComputeNodeGroupsResponse(data, context); + const response: ListComputeNodeGroupsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ListQueuesCommand + */ +export const de_ListQueuesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListQueuesResponse(data, context); + const response: ListQueuesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ListTagsForResourceCommand + */ +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0RegisterComputeNodeGroupInstanceCommand + */ +export const de_RegisterComputeNodeGroupInstanceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: RegisterComputeNodeGroupInstanceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0TagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0UntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0UpdateComputeNodeGroupCommand + */ +export const de_UpdateComputeNodeGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_UpdateComputeNodeGroupResponse(data, context); + const response: UpdateComputeNodeGroupCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0UpdateQueueCommand + */ +export const de_UpdateQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_UpdateQueueResponse(data, context); + const response: UpdateQueueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserialize_Aws_json1_0CommandError + */ +const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.pcs#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.pcs#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.pcs#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.pcs#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.pcs#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.pcs#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.pcs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }) as never; + } +}; + +/** + * deserializeAws_json1_0AccessDeniedExceptionRes + */ +const de_AccessDeniedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0ConflictExceptionRes + */ +const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InternalServerExceptionRes + */ +const de_InternalServerExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0ResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0ServiceQuotaExceededExceptionRes + */ +const de_ServiceQuotaExceededExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ServiceQuotaExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0ThrottlingExceptionRes + */ +const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0ValidationExceptionRes + */ +const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ValidationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +// se_ClusterSlurmConfigurationRequest omitted. + +// se_ComputeNodeGroupConfiguration omitted. + +// se_ComputeNodeGroupConfigurationList omitted. + +// se_ComputeNodeGroupSlurmConfigurationRequest omitted. + +/** + * serializeAws_json1_0CreateClusterRequest + */ +const se_CreateClusterRequest = (input: CreateClusterRequest, context: __SerdeContext): any => { + return take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + clusterName: [], + networking: _json, + scheduler: _json, + size: [], + slurmConfiguration: _json, + tags: _json, + }); +}; + +/** + * serializeAws_json1_0CreateComputeNodeGroupRequest + */ +const se_CreateComputeNodeGroupRequest = (input: CreateComputeNodeGroupRequest, context: __SerdeContext): any => { + return take(input, { + amiId: [], + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + clusterIdentifier: [], + computeNodeGroupName: [], + customLaunchTemplate: _json, + iamInstanceProfileArn: [], + instanceConfigs: _json, + purchaseOption: [], + scalingConfiguration: _json, + slurmConfiguration: _json, + spotOptions: _json, + subnetIds: _json, + tags: _json, + }); +}; + +/** + * serializeAws_json1_0CreateQueueRequest + */ +const se_CreateQueueRequest = (input: CreateQueueRequest, context: __SerdeContext): any => { + return take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + clusterIdentifier: [], + computeNodeGroupConfigurations: _json, + queueName: [], + tags: _json, + }); +}; + +// se_CustomLaunchTemplate omitted. + +/** + * serializeAws_json1_0DeleteClusterRequest + */ +const se_DeleteClusterRequest = (input: DeleteClusterRequest, context: __SerdeContext): any => { + return take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + clusterIdentifier: [], + }); +}; + +/** + * serializeAws_json1_0DeleteComputeNodeGroupRequest + */ +const se_DeleteComputeNodeGroupRequest = (input: DeleteComputeNodeGroupRequest, context: __SerdeContext): any => { + return take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + clusterIdentifier: [], + computeNodeGroupIdentifier: [], + }); +}; + +/** + * serializeAws_json1_0DeleteQueueRequest + */ +const se_DeleteQueueRequest = (input: DeleteQueueRequest, context: __SerdeContext): any => { + return take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + clusterIdentifier: [], + queueIdentifier: [], + }); +}; + +// se_GetClusterRequest omitted. + +// se_GetComputeNodeGroupRequest omitted. + +// se_GetQueueRequest omitted. + +// se_InstanceConfig omitted. + +// se_InstanceList omitted. + +// se_ListClustersRequest omitted. + +// se_ListComputeNodeGroupsRequest omitted. + +// se_ListQueuesRequest omitted. + +// se_ListTagsForResourceRequest omitted. + +// se_NetworkingRequest omitted. + +// se_RegisterComputeNodeGroupInstanceRequest omitted. + +// se_RequestTagMap omitted. + +// se_ScalingConfigurationRequest omitted. + +// se_SchedulerRequest omitted. + +// se_SecurityGroupIdList omitted. + +// se_SlurmCustomSetting omitted. + +// se_SlurmCustomSettings omitted. + +// se_SpotOptions omitted. + +// se_StringList omitted. + +// se_SubnetIdList omitted. + +// se_TagKeys omitted. + +// se_TagResourceRequest omitted. + +// se_UntagResourceRequest omitted. + +/** + * serializeAws_json1_0UpdateComputeNodeGroupRequest + */ +const se_UpdateComputeNodeGroupRequest = (input: UpdateComputeNodeGroupRequest, context: __SerdeContext): any => { + return take(input, { + amiId: [], + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + clusterIdentifier: [], + computeNodeGroupIdentifier: [], + customLaunchTemplate: _json, + iamInstanceProfileArn: [], + purchaseOption: [], + scalingConfiguration: _json, + slurmConfiguration: _json, + spotOptions: _json, + subnetIds: _json, + }); +}; + +// se_UpdateComputeNodeGroupSlurmConfigurationRequest omitted. + +/** + * serializeAws_json1_0UpdateQueueRequest + */ +const se_UpdateQueueRequest = (input: UpdateQueueRequest, context: __SerdeContext): any => { + return take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + clusterIdentifier: [], + computeNodeGroupConfigurations: _json, + queueIdentifier: [], + }); +}; + +// de_AccessDeniedException omitted. + +/** + * deserializeAws_json1_0Cluster + */ +const de_Cluster = (output: any, context: __SerdeContext): Cluster => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + endpoints: _json, + errorInfo: _json, + id: __expectString, + modifiedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + networking: _json, + scheduler: _json, + size: __expectString, + slurmConfiguration: _json, + status: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0ClusterList + */ +const de_ClusterList = (output: any, context: __SerdeContext): ClusterSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ClusterSummary(entry, context); + }); + return retVal; +}; + +// de_ClusterSlurmConfiguration omitted. + +/** + * deserializeAws_json1_0ClusterSummary + */ +const de_ClusterSummary = (output: any, context: __SerdeContext): ClusterSummary => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + modifiedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + status: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0ComputeNodeGroup + */ +const de_ComputeNodeGroup = (output: any, context: __SerdeContext): ComputeNodeGroup => { + return take(output, { + amiId: __expectString, + arn: __expectString, + clusterId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + customLaunchTemplate: _json, + errorInfo: _json, + iamInstanceProfileArn: __expectString, + id: __expectString, + instanceConfigs: _json, + modifiedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + purchaseOption: __expectString, + scalingConfiguration: _json, + slurmConfiguration: _json, + spotOptions: _json, + status: __expectString, + subnetIds: _json, + }) as any; +}; + +// de_ComputeNodeGroupConfiguration omitted. + +// de_ComputeNodeGroupConfigurationList omitted. + +/** + * deserializeAws_json1_0ComputeNodeGroupList + */ +const de_ComputeNodeGroupList = (output: any, context: __SerdeContext): ComputeNodeGroupSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ComputeNodeGroupSummary(entry, context); + }); + return retVal; +}; + +// de_ComputeNodeGroupSlurmConfiguration omitted. + +/** + * deserializeAws_json1_0ComputeNodeGroupSummary + */ +const de_ComputeNodeGroupSummary = (output: any, context: __SerdeContext): ComputeNodeGroupSummary => { + return take(output, { + arn: __expectString, + clusterId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + modifiedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + status: __expectString, + }) as any; +}; + +// de_ConflictException omitted. + +/** + * deserializeAws_json1_0CreateClusterResponse + */ +const de_CreateClusterResponse = (output: any, context: __SerdeContext): CreateClusterResponse => { + return take(output, { + cluster: (_: any) => de_Cluster(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_0CreateComputeNodeGroupResponse + */ +const de_CreateComputeNodeGroupResponse = (output: any, context: __SerdeContext): CreateComputeNodeGroupResponse => { + return take(output, { + computeNodeGroup: (_: any) => de_ComputeNodeGroup(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_0CreateQueueResponse + */ +const de_CreateQueueResponse = (output: any, context: __SerdeContext): CreateQueueResponse => { + return take(output, { + queue: (_: any) => de_Queue(_, context), + }) as any; +}; + +// de_CustomLaunchTemplate omitted. + +// de_DeleteClusterResponse omitted. + +// de_DeleteComputeNodeGroupResponse omitted. + +// de_DeleteQueueResponse omitted. + +// de_Endpoint omitted. + +// de_Endpoints omitted. + +// de_ErrorInfo omitted. + +// de_ErrorInfoList omitted. + +/** + * deserializeAws_json1_0GetClusterResponse + */ +const de_GetClusterResponse = (output: any, context: __SerdeContext): GetClusterResponse => { + return take(output, { + cluster: (_: any) => de_Cluster(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_0GetComputeNodeGroupResponse + */ +const de_GetComputeNodeGroupResponse = (output: any, context: __SerdeContext): GetComputeNodeGroupResponse => { + return take(output, { + computeNodeGroup: (_: any) => de_ComputeNodeGroup(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_0GetQueueResponse + */ +const de_GetQueueResponse = (output: any, context: __SerdeContext): GetQueueResponse => { + return take(output, { + queue: (_: any) => de_Queue(_, context), + }) as any; +}; + +// de_InstanceConfig omitted. + +// de_InstanceList omitted. + +// de_InternalServerException omitted. + +/** + * deserializeAws_json1_0ListClustersResponse + */ +const de_ListClustersResponse = (output: any, context: __SerdeContext): ListClustersResponse => { + return take(output, { + clusters: (_: any) => de_ClusterList(_, context), + nextToken: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0ListComputeNodeGroupsResponse + */ +const de_ListComputeNodeGroupsResponse = (output: any, context: __SerdeContext): ListComputeNodeGroupsResponse => { + return take(output, { + computeNodeGroups: (_: any) => de_ComputeNodeGroupList(_, context), + nextToken: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0ListQueuesResponse + */ +const de_ListQueuesResponse = (output: any, context: __SerdeContext): ListQueuesResponse => { + return take(output, { + nextToken: __expectString, + queues: (_: any) => de_QueueList(_, context), + }) as any; +}; + +// de_ListTagsForResourceResponse omitted. + +// de_Networking omitted. + +/** + * deserializeAws_json1_0Queue + */ +const de_Queue = (output: any, context: __SerdeContext): Queue => { + return take(output, { + arn: __expectString, + clusterId: __expectString, + computeNodeGroupConfigurations: _json, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + errorInfo: _json, + id: __expectString, + modifiedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + status: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0QueueList + */ +const de_QueueList = (output: any, context: __SerdeContext): QueueSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_QueueSummary(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_0QueueSummary + */ +const de_QueueSummary = (output: any, context: __SerdeContext): QueueSummary => { + return take(output, { + arn: __expectString, + clusterId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + modifiedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + status: __expectString, + }) as any; +}; + +// de_RegisterComputeNodeGroupInstanceResponse omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResponseTagMap omitted. + +// de_ScalingConfiguration omitted. + +// de_Scheduler omitted. + +// de_SecurityGroupIdList omitted. + +// de_ServiceQuotaExceededException omitted. + +// de_SlurmAuthKey omitted. + +// de_SlurmCustomSetting omitted. + +// de_SlurmCustomSettings omitted. + +// de_SpotOptions omitted. + +// de_SubnetIdList omitted. + +// de_ThrottlingException omitted. + +/** + * deserializeAws_json1_0UpdateComputeNodeGroupResponse + */ +const de_UpdateComputeNodeGroupResponse = (output: any, context: __SerdeContext): UpdateComputeNodeGroupResponse => { + return take(output, { + computeNodeGroup: (_: any) => de_ComputeNodeGroup(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_0UpdateQueueResponse + */ +const de_UpdateQueueResponse = (output: any, context: __SerdeContext): UpdateQueueResponse => { + return take(output, { + queue: (_: any) => de_Queue(_, context), + }) as any; +}; + +// de_ValidationException omitted. + +// de_ValidationExceptionField omitted. + +// de_ValidationExceptionFieldList omitted. + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const throwDefaultError = withBaseException(__BaseException); +const buildHttpRpcRequest = async ( + context: __SerdeContext, + headers: __HeaderBag, + path: string, + resolvedHostname: string | undefined, + body: any +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents: any = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new __HttpRequest(contents); +}; +function sharedHeaders(operation: string): __HeaderBag { + return { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": `AWSParallelComputingService.${operation}`, + }; +} diff --git a/clients/client-pcs/src/runtimeConfig.browser.ts b/clients/client-pcs/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..dafae2e25d56 --- /dev/null +++ b/clients/client-pcs/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { PCSClientConfig } from "./PCSClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: PCSClientConfig) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/clients/client-pcs/src/runtimeConfig.native.ts b/clients/client-pcs/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..a3deb6c84247 --- /dev/null +++ b/clients/client-pcs/src/runtimeConfig.native.ts @@ -0,0 +1,18 @@ +// smithy-typescript generated code +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { PCSClientConfig } from "./PCSClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: PCSClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-pcs/src/runtimeConfig.shared.ts b/clients/client-pcs/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..6dc7252bdffd --- /dev/null +++ b/clients/client-pcs/src/runtimeConfig.shared.ts @@ -0,0 +1,38 @@ +// smithy-typescript generated code +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoOpLogger } from "@smithy/smithy-client"; +import { IdentityProviderConfig } from "@smithy/types"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; + +import { defaultPCSHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider"; +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; +import { PCSClientConfig } from "./PCSClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: PCSClientConfig) => { + return { + apiVersion: "2023-02-10", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultPCSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc: IdentityProviderConfig) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer(), + }, + ], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "PCS", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-pcs/src/runtimeConfig.ts b/clients/client-pcs/src/runtimeConfig.ts new file mode 100644 index 000000000000..c7f74c0c7cd7 --- /dev/null +++ b/clients/client-pcs/src/runtimeConfig.ts @@ -0,0 +1,59 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { PCSClientConfig } from "./PCSClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: PCSClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider, + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: + config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; diff --git a/clients/client-pcs/src/runtimeExtensions.ts b/clients/client-pcs/src/runtimeExtensions.ts new file mode 100644 index 000000000000..a11fefc269df --- /dev/null +++ b/clients/client-pcs/src/runtimeExtensions.ts @@ -0,0 +1,48 @@ +// smithy-typescript generated code +import { + getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration, +} from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; + +import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration"; +import { PCSExtensionConfiguration } from "./extensionConfiguration"; + +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: PCSExtensionConfiguration): void; +} + +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} + +const asPartial = >(t: T) => t; + +/** + * @internal + */ +export const resolveRuntimeExtensions = (runtimeConfig: any, extensions: RuntimeExtension[]) => { + const extensionConfiguration: PCSExtensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)), + }; + + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/clients/client-pcs/tsconfig.cjs.json b/clients/client-pcs/tsconfig.cjs.json new file mode 100644 index 000000000000..3567d85ba846 --- /dev/null +++ b/clients/client-pcs/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "dist-cjs" + } +} diff --git a/clients/client-pcs/tsconfig.es.json b/clients/client-pcs/tsconfig.es.json new file mode 100644 index 000000000000..809f57bde65e --- /dev/null +++ b/clients/client-pcs/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "lib": ["dom"], + "module": "esnext", + "outDir": "dist-es" + } +} diff --git a/clients/client-pcs/tsconfig.json b/clients/client-pcs/tsconfig.json new file mode 100644 index 000000000000..e7f5ec56b742 --- /dev/null +++ b/clients/client-pcs/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@tsconfig/node16/tsconfig.json", + "compilerOptions": { + "downlevelIteration": true, + "importHelpers": true, + "incremental": true, + "removeComments": true, + "resolveJsonModule": true, + "rootDir": "src", + "useUnknownInCatchVariables": false + }, + "exclude": ["test/"] +} diff --git a/clients/client-pcs/tsconfig.types.json b/clients/client-pcs/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-pcs/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/codegen/sdk-codegen/aws-models/pcs.json b/codegen/sdk-codegen/aws-models/pcs.json new file mode 100644 index 000000000000..91a7034ff32e --- /dev/null +++ b/codegen/sdk-codegen/aws-models/pcs.json @@ -0,0 +1,3891 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.pcs#AWSParallelComputingService": { + "type": "service", + "version": "2023-02-10", + "operations": [ + { + "target": "com.amazonaws.pcs#ListTagsForResource" + }, + { + "target": "com.amazonaws.pcs#TagResource" + }, + { + "target": "com.amazonaws.pcs#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.pcs#ClusterResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "PCS", + "arnNamespace": "pcs" + }, + "aws.auth#sigv4": { + "name": "pcs" + }, + "aws.iam#defineConditionKeys": { + "aws:ResourceTag/${TagKey}": { + "type": "String", + "documentation": "Filters access by a tag key and value pair of a resource", + "externalDocumentation": "${DocHomeURL}IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag" + }, + "aws:RequestTag/${TagKey}": { + "type": "String", + "documentation": "Filters access by a tag key and value pair that is allowed in the request", + "externalDocumentation": "${DocHomeURL}IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag" + }, + "aws:TagKeys": { + "type": "ArrayOfString", + "documentation": "Filters access by a list of tag keys that are allowed in the request", + "externalDocumentation": "${DocHomeURL}IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys" + }, + "pcs:ResourceName": { + "type": "String", + "documentation": "Filters creation of resources with a certain name" + } + }, + "aws.iam#disableConditionKeyInference": {}, + "aws.protocols#awsJson1_0": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "*,authorization,date,x-amz-date,x-amz-security-token,x-amz-target,content-type,x-amz-content-sha256,x-amz-user-agent,x-amzn-platform-id,x-amzn-trace-id,amz-sdk-invocation-id,amz-sdk-request" + ] + }, + "smithy.api#documentation": "

Amazon Web Services Parallel Computing Service (Amazon Web Services PCS) is a managed service that makes it easier for\n you to run and scale your high performance computing (HPC) workloads,\n and build scientific and engineering models on Amazon Web Services using Slurm. \n For more information, see \n the Amazon Web Services Parallel Computing Service\n User Guide.

\n

This reference describes the actions and data types of the service management API. You can use the\n Amazon Web Services SDKs to call the API actions in software, or use the Command Line Interface (CLI) to call the API\n actions manually. These API actions manage the service through an Amazon Web Services account.

\n

The API actions operate on Amazon Web Services PCS resources. A resource is\n an entity in Amazon Web Services that you can work with. Amazon Web Services services create resources when you use\n the features of the service. Examples of Amazon Web Services PCS resources include clusters, compute\n node groups, and queues. For more information about resources in Amazon Web Services, see Resource in the Resource Explorer User Guide.

\n

An Amazon Web Services PCS compute node is an Amazon EC2 instance. You don't launch\n compute nodes directly. Amazon Web Services PCS uses configuration information that you provide to launch\n compute nodes in your Amazon Web Services account. You receive billing charges for your running compute nodes.\n Amazon Web Services PCS automatically terminates your compute nodes when you delete the Amazon Web Services PCS resources\n related to those compute nodes.

", + "smithy.api#title": "AWS Parallel Computing Service", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://pcs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://pcs-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://pcs.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://pcs.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.pcs#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You don't have permission to perform the action.

\n

\n Examples\n

\n
    \n
  • \n

    The launch template instance profile doesn't pass iam:PassRole\n verification.

    \n
  • \n
  • \n

    There is a mismatch between the account ID and cluster ID.

    \n
  • \n
  • \n

    The cluster ID doesn't exist.

    \n
  • \n
  • \n

    The EC2 instance isn't present.

    \n
  • \n
", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.pcs#AmiId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^ami-[a-z0-9]+$" + } + }, + "com.amazonaws.pcs#Arn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws*:pcs:.*:[0-9]{12}:.*/[a-z0-9_\\-]+$" + } + }, + "com.amazonaws.pcs#BootstrapId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[\\S]+$" + } + }, + "com.amazonaws.pcs#Cluster": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name that identifies the cluster.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The generated unique ID of the cluster.

", + "smithy.api#required": {} + } + }, + "arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique Amazon Resource Name (ARN) of the cluster.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.pcs#ClusterStatus", + "traits": { + "smithy.api#documentation": "

The provisioning status of the cluster.

\n \n

The provisioning status doesn't indicate the overall health of the cluster.

\n
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "scheduler": { + "target": "com.amazonaws.pcs#Scheduler", + "traits": { + "smithy.api#required": {} + } + }, + "size": { + "target": "com.amazonaws.pcs#Size", + "traits": { + "smithy.api#documentation": "

The size of the cluster.

\n
    \n
  • \n

    \n SMALL: 32 compute nodes and 256 jobs

    \n
  • \n
  • \n

    \n MEDIUM: 512 compute nodes and 8192 jobs

    \n
  • \n
  • \n

    \n LARGE: 2048 compute nodes and 16,384 jobs

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "slurmConfiguration": { + "target": "com.amazonaws.pcs#ClusterSlurmConfiguration", + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "networking": { + "target": "com.amazonaws.pcs#Networking", + "traits": { + "smithy.api#required": {} + } + }, + "endpoints": { + "target": "com.amazonaws.pcs#Endpoints", + "traits": { + "smithy.api#documentation": "

The list of endpoints available for interaction with the scheduler.

" + } + }, + "errorInfo": { + "target": "com.amazonaws.pcs#ErrorInfoList", + "traits": { + "smithy.api#documentation": "

The list of errors that occurred during cluster provisioning.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The cluster resource and configuration.

" + } + }, + "com.amazonaws.pcs#ClusterIdentifier": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(pcs_[a-zA-Z0-9]+|[A-Za-z][A-Za-z0-9-]{1,40})$" + } + }, + "com.amazonaws.pcs#ClusterList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#ClusterSummary" + } + }, + "com.amazonaws.pcs#ClusterName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 40 + }, + "smithy.api#pattern": "^(?!pcs_)^(?![A-Za-z0-9]{10}$)[A-Za-z][A-Za-z0-9-]+$" + } + }, + "com.amazonaws.pcs#ClusterResource": { + "type": "resource", + "identifiers": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier" + } + }, + "create": { + "target": "com.amazonaws.pcs#CreateCluster" + }, + "operations": [ + { + "target": "com.amazonaws.pcs#DeleteCluster" + }, + { + "target": "com.amazonaws.pcs#GetCluster" + }, + { + "target": "com.amazonaws.pcs#RegisterComputeNodeGroupInstance" + } + ], + "collectionOperations": [ + { + "target": "com.amazonaws.pcs#ListClusters" + } + ], + "resources": [ + { + "target": "com.amazonaws.pcs#ComputeNodeGroupResource" + }, + { + "target": "com.amazonaws.pcs#QueueResource" + } + ], + "traits": { + "aws.api#arn": { + "template": "cluster/{clusterIdentifier}" + }, + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}"], + "aws.iam#iamResource": { + "name": "cluster" + } + } + }, + "com.amazonaws.pcs#ClusterSlurmConfiguration": { + "type": "structure", + "members": { + "scaleDownIdleTimeInSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The time before an idle node is scaled down.

", + "smithy.api#range": { + "min": 1 + } + } + }, + "slurmCustomSettings": { + "target": "com.amazonaws.pcs#SlurmCustomSettings", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "authKey": { + "target": "com.amazonaws.pcs#SlurmAuthKey", + "traits": { + "smithy.api#documentation": "

The shared Slurm key for authentication, also known as the cluster secret.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "com.amazonaws.pcs#ClusterSlurmConfigurationRequest": { + "type": "structure", + "members": { + "scaleDownIdleTimeInSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The time before an idle node is scaled down.

", + "smithy.api#range": { + "min": 1 + } + } + }, + "slurmCustomSettings": { + "target": "com.amazonaws.pcs#SlurmCustomSettings", + "traits": { + "smithy.api#documentation": "

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

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "com.amazonaws.pcs#ClusterStatus": { + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "CREATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_FAILED" + } + }, + "DELETE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_FAILED" + } + }, + "UPDATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_FAILED" + } + } + } + }, + "com.amazonaws.pcs#ClusterSummary": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name that identifies the cluster.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The generated unique ID of the cluster.

", + "smithy.api#required": {} + } + }, + "arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique Amazon Resource Name (ARN) of the cluster.

", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "status": { + "target": "com.amazonaws.pcs#ClusterStatus", + "traits": { + "smithy.api#documentation": "

The provisioning status of the cluster.

\n \n

The provisioning status doesn't indicate the overall health of the cluster.

\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The object returned by the ListClusters API action.

" + } + }, + "com.amazonaws.pcs#ComputeNodeGroup": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.pcs#ComputeNodeGroupName", + "traits": { + "smithy.api#documentation": "

The name that identifies the compute node group.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The generated unique ID of the compute node group.

", + "smithy.api#required": {} + } + }, + "arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + }, + "clusterId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the cluster of the compute node group.

", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "status": { + "target": "com.amazonaws.pcs#ComputeNodeGroupStatus", + "traits": { + "smithy.api#documentation": "

The provisioning status of the compute node group.

\n \n

The provisioning status doesn't indicate the overall health of the compute node\n group.

\n
", + "smithy.api#required": {} + } + }, + "amiId": { + "target": "com.amazonaws.pcs#AmiId", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "subnetIds": { + "target": "com.amazonaws.pcs#SubnetIdList", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + }, + "purchaseOption": { + "target": "com.amazonaws.pcs#PurchaseOption", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "customLaunchTemplate": { + "target": "com.amazonaws.pcs#CustomLaunchTemplate", + "traits": { + "smithy.api#required": {} + } + }, + "iamInstanceProfileArn": { + "target": "com.amazonaws.pcs#InstanceProfileArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the \n IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have\n pcs:RegisterComputeNodeGroupInstance permissions attached to provision instances\n correctly.

", + "smithy.api#required": {} + } + }, + "scalingConfiguration": { + "target": "com.amazonaws.pcs#ScalingConfiguration", + "traits": { + "smithy.api#required": {} + } + }, + "instanceConfigs": { + "target": "com.amazonaws.pcs#InstanceList", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + }, + "spotOptions": { + "target": "com.amazonaws.pcs#SpotOptions" + }, + "slurmConfiguration": { + "target": "com.amazonaws.pcs#ComputeNodeGroupSlurmConfiguration" + }, + "errorInfo": { + "target": "com.amazonaws.pcs#ErrorInfoList", + "traits": { + "smithy.api#documentation": "

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

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A compute node group associated with a cluster.

" + } + }, + "com.amazonaws.pcs#ComputeNodeGroupConfiguration": { + "type": "structure", + "members": { + "computeNodeGroupId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The compute node group ID for the compute node group configuration.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The compute node group configuration for a queue.

" + } + }, + "com.amazonaws.pcs#ComputeNodeGroupConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#ComputeNodeGroupConfiguration" + } + }, + "com.amazonaws.pcs#ComputeNodeGroupIdentifier": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(pcs_[a-zA-Z0-9]+|[A-Za-z][A-Za-z0-9-]{1,25})$" + } + }, + "com.amazonaws.pcs#ComputeNodeGroupList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#ComputeNodeGroupSummary" + } + }, + "com.amazonaws.pcs#ComputeNodeGroupName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 25 + }, + "smithy.api#pattern": "^(?!pcs_)^(?![A-Za-z0-9]{10}$)[A-Za-z][A-Za-z0-9-]+$" + } + }, + "com.amazonaws.pcs#ComputeNodeGroupResource": { + "type": "resource", + "identifiers": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier" + }, + "computeNodeGroupIdentifier": { + "target": "com.amazonaws.pcs#ComputeNodeGroupIdentifier" + } + }, + "create": { + "target": "com.amazonaws.pcs#CreateComputeNodeGroup" + }, + "update": { + "target": "com.amazonaws.pcs#UpdateComputeNodeGroup" + }, + "operations": [ + { + "target": "com.amazonaws.pcs#DeleteComputeNodeGroup" + }, + { + "target": "com.amazonaws.pcs#GetComputeNodeGroup" + } + ], + "collectionOperations": [ + { + "target": "com.amazonaws.pcs#ListComputeNodeGroups" + } + ], + "traits": { + "aws.api#arn": { + "template": "cluster/{clusterIdentifier}/computenodegroup/{computeNodeGroupIdentifier}" + }, + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}"], + "aws.iam#iamResource": { + "name": "computenodegroup" + } + } + }, + "com.amazonaws.pcs#ComputeNodeGroupSlurmConfiguration": { + "type": "structure", + "members": { + "slurmCustomSettings": { + "target": "com.amazonaws.pcs#SlurmCustomSettings", + "traits": { + "smithy.api#documentation": "

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

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "com.amazonaws.pcs#ComputeNodeGroupSlurmConfigurationRequest": { + "type": "structure", + "members": { + "slurmCustomSettings": { + "target": "com.amazonaws.pcs#SlurmCustomSettings", + "traits": { + "smithy.api#documentation": "

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

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "com.amazonaws.pcs#ComputeNodeGroupStatus": { + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "CREATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_FAILED" + } + }, + "DELETE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_FAILED" + } + }, + "UPDATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_FAILED" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + } + } + }, + "com.amazonaws.pcs#ComputeNodeGroupSummary": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.pcs#ComputeNodeGroupName", + "traits": { + "smithy.api#documentation": "

The name that identifies the compute node group.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The generated unique ID of the compute node group.

", + "smithy.api#required": {} + } + }, + "arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + }, + "clusterId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the cluster of the compute node group.

", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "status": { + "target": "com.amazonaws.pcs#ComputeNodeGroupStatus", + "traits": { + "smithy.api#documentation": "

The provisioning status of the compute node group.

\n \n

The provisioning status doesn't indicate the overall health of the compute node\n group.

\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The object returned by the ListComputeNodeGroups API action.

" + } + }, + "com.amazonaws.pcs#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the resource that caused the conflict exception.\n

", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n The type or category of the resource that caused the conflict exception.\"\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Your request has conflicting operations. This can occur if you're trying to perform more\n than 1 operation on the same resource at the same time.

\n

\n Examples\n

\n
    \n
  • \n

    A cluster with the same name already exists.

    \n
  • \n
  • \n

    A cluster isn't in ACTIVE status.

    \n
  • \n
  • \n

    A cluster to delete is in an unstable state. For example, because it still has\n ACTIVE node groups or queues.

    \n
  • \n
  • \n

    A queue already exists in a cluster.

    \n
  • \n
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.pcs#CreateCluster": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#CreateClusterRequest" + }, + "output": { + "target": "com.amazonaws.pcs#CreateClusterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "aws.iam#conditionKeys": ["aws:RequestTag/${TagKey}", "aws:TagKeys"], + "smithy.api#documentation": "

Creates a cluster in your account. Amazon Web Services PCS creates the cluster controller in a\n service-owned account. The cluster controller communicates with the cluster resources in\n your account. The subnets and security groups for the cluster must already exist before you\n use this API action.

\n \n

It takes time for Amazon Web Services PCS to create the cluster. The cluster is in\n a Creating state until it is ready to use. There can only be 1\n cluster in a Creating state per Amazon Web Services Region per Amazon Web Services account.\n CreateCluster\n fails with a ServiceQuotaExceededException if there is already\n a cluster in a Creating state.

\n
", + "smithy.api#idempotent": {}, + "smithy.api#tags": ["Cluster"] + } + }, + "com.amazonaws.pcs#CreateClusterRequest": { + "type": "structure", + "members": { + "clusterName": { + "target": "com.amazonaws.pcs#ClusterName", + "traits": { + "aws.iam#conditionKeyValue": "pcs:ResourceName", + "smithy.api#documentation": "

A name to identify the cluster. Example: MyCluster\n

", + "smithy.api#required": {} + } + }, + "scheduler": { + "target": "com.amazonaws.pcs#SchedulerRequest", + "traits": { + "smithy.api#documentation": "

The cluster management and job scheduling software associated with the cluster.

", + "smithy.api#required": {} + } + }, + "size": { + "target": "com.amazonaws.pcs#Size", + "traits": { + "smithy.api#documentation": "

A value that determines the maximum number of compute nodes in the cluster and the\n maximum number of jobs (active and queued).

\n
    \n
  • \n

    \n SMALL: 32 compute nodes and 256 jobs

    \n
  • \n
  • \n

    \n MEDIUM: 512 compute nodes and 8192 jobs

    \n
  • \n
  • \n

    \n LARGE: 2048 compute nodes and 16,384 jobs

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "networking": { + "target": "com.amazonaws.pcs#NetworkingRequest", + "traits": { + "smithy.api#documentation": "

The networking configuration used to set up the cluster's control plane.

", + "smithy.api#required": {} + } + }, + "slurmConfiguration": { + "target": "com.amazonaws.pcs#ClusterSlurmConfigurationRequest", + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "clientToken": { + "target": "com.amazonaws.pcs#SBClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. Idempotency ensures that an API\n request completes only once. With an idempotent request, if the original \n request completes successfully, the subsequent retries with the same \n client token return the result from the original successful request and \n they have no additional effect. If you don't specify a client token, the \n CLI and SDK automatically generate 1 for you.

", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.pcs#RequestTagMap", + "traits": { + "smithy.api#documentation": "

1 or more tags added to the resource. Each tag consists of a\n tag key and tag value. The tag value is optional and can be an empty\n string.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#CreateClusterResponse": { + "type": "structure", + "members": { + "cluster": { + "target": "com.amazonaws.pcs#Cluster", + "traits": { + "smithy.api#documentation": "

The cluster resource.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#CreateComputeNodeGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#CreateComputeNodeGroupRequest" + }, + "output": { + "target": "com.amazonaws.pcs#CreateComputeNodeGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "aws.iam#conditionKeys": ["aws:RequestTag/${TagKey}", "aws:TagKeys"], + "smithy.api#documentation": "

Creates a managed set of compute nodes. You associate a compute node group with a\n cluster through 1 or more Amazon Web Services PCS queues or as part of the login fleet. A compute node\n group includes the definition of the compute properties and lifecycle management.\n Amazon Web Services PCS uses the information you provide to this API action to launch compute nodes in\n your account. You can only specify subnets in the same Amazon VPC as your cluster. You receive\n billing charges for the compute nodes that Amazon Web Services PCS launches in your account. You must\n already have a launch template before you call this API. For more information, see Launch an\n instance from a launch template in the Amazon Elastic Compute Cloud User Guide for Linux\n Instances.

", + "smithy.api#idempotent": {}, + "smithy.api#tags": ["ComputeNodeGroup"] + } + }, + "com.amazonaws.pcs#CreateComputeNodeGroupRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster to create a compute node group in.

", + "smithy.api#required": {} + } + }, + "computeNodeGroupName": { + "target": "com.amazonaws.pcs#ComputeNodeGroupName", + "traits": { + "aws.iam#conditionKeyValue": "pcs:ResourceName", + "smithy.api#documentation": "

A name to identify the cluster. Example: MyCluster\n

", + "smithy.api#required": {} + } + }, + "amiId": { + "target": "com.amazonaws.pcs#AmiId", + "traits": { + "smithy.api#documentation": "

The ID of the Amazon Machine Image (AMI) that Amazon Web Services PCS uses to launch compute nodes\n (Amazon EC2 instances). If you don't provide this value, Amazon Web Services PCS uses the AMI ID specified\n in the custom launch template.

" + } + }, + "subnetIds": { + "target": "com.amazonaws.pcs#StringList", + "traits": { + "smithy.api#documentation": "

The list of subnet IDs where the compute node group launches instances.\n Subnets must be in the same VPC as the cluster.

", + "smithy.api#required": {} + } + }, + "purchaseOption": { + "target": "com.amazonaws.pcs#PurchaseOption", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "customLaunchTemplate": { + "target": "com.amazonaws.pcs#CustomLaunchTemplate", + "traits": { + "smithy.api#required": {} + } + }, + "iamInstanceProfileArn": { + "target": "com.amazonaws.pcs#InstanceProfileArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the \n IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have\n pcs:RegisterComputeNodeGroupInstance permissions attached in order to\n provision instances correctly. The resource identifier of the ARN must start with \n AWSPCS. For example, arn:aws:iam:123456789012:instance-profile/AWSPCSMyComputeNodeInstanceProfile.\n

", + "smithy.api#required": {} + } + }, + "scalingConfiguration": { + "target": "com.amazonaws.pcs#ScalingConfigurationRequest", + "traits": { + "smithy.api#documentation": "

Specifies the boundaries of the compute node group auto scaling.

", + "smithy.api#required": {} + } + }, + "instanceConfigs": { + "target": "com.amazonaws.pcs#InstanceList", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + }, + "spotOptions": { + "target": "com.amazonaws.pcs#SpotOptions" + }, + "slurmConfiguration": { + "target": "com.amazonaws.pcs#ComputeNodeGroupSlurmConfigurationRequest", + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "clientToken": { + "target": "com.amazonaws.pcs#SBClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. Idempotency ensures that an API\n request completes only once. With an idempotent request, if the original \n request completes successfully, the subsequent retries with the same \n client token return the result from the original successful request and \n they have no additional effect. If you don't specify a client token, the \n CLI and SDK automatically generate 1 for you.

", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.pcs#RequestTagMap", + "traits": { + "smithy.api#documentation": "

1 or more tags added to the resource. Each tag consists of a\n tag key and tag value. The tag value is optional and can be an empty\n string.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#CreateComputeNodeGroupResponse": { + "type": "structure", + "members": { + "computeNodeGroup": { + "target": "com.amazonaws.pcs#ComputeNodeGroup" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#CreateQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#CreateQueueRequest" + }, + "output": { + "target": "com.amazonaws.pcs#CreateQueueResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "aws.iam#conditionKeys": ["aws:RequestTag/${TagKey}", "aws:TagKeys"], + "smithy.api#documentation": "

Creates a job queue. You must associate 1 or more compute node groups with the queue.\n You can associate 1 compute node group with multiple queues.

", + "smithy.api#idempotent": {}, + "smithy.api#tags": ["Queue"] + } + }, + "com.amazonaws.pcs#CreateQueueRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster for which to create a queue.

", + "smithy.api#required": {} + } + }, + "queueName": { + "target": "com.amazonaws.pcs#QueueName", + "traits": { + "aws.iam#conditionKeyValue": "pcs:ResourceName", + "smithy.api#documentation": "

A name to identify the queue.

", + "smithy.api#required": {} + } + }, + "computeNodeGroupConfigurations": { + "target": "com.amazonaws.pcs#ComputeNodeGroupConfigurationList", + "traits": { + "smithy.api#documentation": "

The list of compute node group configurations to associate with the queue. Queues\n assign jobs to associated compute node groups.

" + } + }, + "clientToken": { + "target": "com.amazonaws.pcs#SBClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. Idempotency ensures that an API\n request completes only once. With an idempotent request, if the original \n request completes successfully, the subsequent retries with the same \n client token return the result from the original successful request and \n they have no additional effect. If you don't specify a client token, the \n CLI and SDK automatically generate 1 for you.

", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.pcs#RequestTagMap", + "traits": { + "smithy.api#documentation": "

1 or more tags added to the resource. Each tag consists of a\n tag key and tag value. The tag value is optional and can be an empty\n string.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#CreateQueueResponse": { + "type": "structure", + "members": { + "queue": { + "target": "com.amazonaws.pcs#Queue" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#CustomLaunchTemplate": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

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

\n

Example: lt-xxxx\n

", + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.pcs#DeleteCluster": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#DeleteClusterRequest" + }, + "output": { + "target": "com.amazonaws.pcs#DeleteClusterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a cluster and all its linked resources. You must delete all queues and compute\n node groups associated with the cluster before you can delete the cluster.

", + "smithy.api#idempotent": {}, + "smithy.api#tags": ["Cluster"] + } + }, + "com.amazonaws.pcs#DeleteClusterRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster to delete.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.pcs#SBClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. Idempotency ensures that an API\n request completes only once. With an idempotent request, if the original \n request completes successfully, the subsequent retries with the same \n client token return the result from the original successful request and \n they have no additional effect. If you don't specify a client token, the \n CLI and SDK automatically generate 1 for you.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#DeleteClusterResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#DeleteComputeNodeGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#DeleteComputeNodeGroupRequest" + }, + "output": { + "target": "com.amazonaws.pcs#DeleteComputeNodeGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a compute node group. You must delete all queues associated with the compute\n node group first.

", + "smithy.api#idempotent": {}, + "smithy.api#tags": ["ComputeNodeGroup"] + } + }, + "com.amazonaws.pcs#DeleteComputeNodeGroupRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + }, + "computeNodeGroupIdentifier": { + "target": "com.amazonaws.pcs#ComputeNodeGroupIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the compute node group to delete.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.pcs#SBClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. Idempotency ensures that an API\n request completes only once. With an idempotent request, if the original \n request completes successfully, the subsequent retries with the same \n client token return the result from the original successful request and \n they have no additional effect. If you don't specify a client token, the \n CLI and SDK automatically generate 1 for you.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#DeleteComputeNodeGroupResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#DeleteQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#DeleteQueueRequest" + }, + "output": { + "target": "com.amazonaws.pcs#DeleteQueueResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a job queue. If the compute node group associated with this queue isn't\n associated with any other queues, Amazon Web Services PCS terminates all the compute nodes for this\n queue.

", + "smithy.api#idempotent": {}, + "smithy.api#tags": ["Queue"] + } + }, + "com.amazonaws.pcs#DeleteQueueRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster of the queue.

", + "smithy.api#required": {} + } + }, + "queueIdentifier": { + "target": "com.amazonaws.pcs#QueueIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the queue to delete.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.pcs#SBClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. Idempotency ensures that an API\n request completes only once. With an idempotent request, if the original \n request completes successfully, the subsequent retries with the same \n client token return the result from the original successful request and \n they have no additional effect. If you don't specify a client token, the \n CLI and SDK automatically generate 1 for you.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#DeleteQueueResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#Endpoint": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.pcs#EndpointType", + "traits": { + "smithy.api#documentation": "

Indicates the type of endpoint running at the specific IP address.

", + "smithy.api#required": {} + } + }, + "privateIpAddress": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The endpoint's private IP address.

\n

Example: 2.2.2.2\n

", + "smithy.api#required": {} + } + }, + "publicIpAddress": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The endpoint's public IP address.

\n

Example: 1.1.1.1\n

" + } + }, + "port": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The endpoint's connection port number.

\n

Example: 1234\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

An endpoint available for interaction with the scheduler.

" + } + }, + "com.amazonaws.pcs#EndpointType": { + "type": "enum", + "members": { + "SLURMCTLD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SLURMCTLD" + } + }, + "SLURMDBD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SLURMDBD" + } + } + } + }, + "com.amazonaws.pcs#Endpoints": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#Endpoint" + } + }, + "com.amazonaws.pcs#ErrorInfo": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The short-form error code.

" + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The detailed error information.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An error that occurred during resource creation.

" + } + }, + "com.amazonaws.pcs#ErrorInfoList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#ErrorInfo" + } + }, + "com.amazonaws.pcs#GetCluster": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#GetClusterRequest" + }, + "output": { + "target": "com.amazonaws.pcs#GetClusterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns detailed information about a running cluster in your account. This API action\n provides networking information, endpoint information for communication with the scheduler,\n and provisioning status.

", + "smithy.api#readonly": {}, + "smithy.api#tags": ["Cluster"] + } + }, + "com.amazonaws.pcs#GetClusterRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster of the queue.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#GetClusterResponse": { + "type": "structure", + "members": { + "cluster": { + "target": "com.amazonaws.pcs#Cluster", + "traits": { + "smithy.api#documentation": "

The cluster resource.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#GetComputeNodeGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#GetComputeNodeGroupRequest" + }, + "output": { + "target": "com.amazonaws.pcs#GetComputeNodeGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns detailed information about a compute node group. This API action provides\n networking information, EC2 instance type, compute node group status, and scheduler (such\n as Slurm) configuration.

", + "smithy.api#readonly": {}, + "smithy.api#tags": ["ComputeNodeGroup"] + } + }, + "com.amazonaws.pcs#GetComputeNodeGroupRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster.

", + "smithy.api#required": {} + } + }, + "computeNodeGroupIdentifier": { + "target": "com.amazonaws.pcs#ComputeNodeGroupIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the compute node group.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#GetComputeNodeGroupResponse": { + "type": "structure", + "members": { + "computeNodeGroup": { + "target": "com.amazonaws.pcs#ComputeNodeGroup" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#GetQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#GetQueueRequest" + }, + "output": { + "target": "com.amazonaws.pcs#GetQueueResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns detailed information about a queue. The information includes the compute node\n groups that the queue uses to schedule jobs.

", + "smithy.api#readonly": {}, + "smithy.api#tags": ["Queue"] + } + }, + "com.amazonaws.pcs#GetQueueRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster of the queue.

", + "smithy.api#required": {} + } + }, + "queueIdentifier": { + "target": "com.amazonaws.pcs#QueueIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the queue.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#GetQueueResponse": { + "type": "structure", + "members": { + "queue": { + "target": "com.amazonaws.pcs#Queue" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#InstanceConfig": { + "type": "structure", + "members": { + "instanceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

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

\n

Example: t2.xlarge\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.pcs#InstanceList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#InstanceConfig" + } + }, + "com.amazonaws.pcs#InstanceProfileArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws([a-zA-Z-]{0,10})?:iam::[0-9]{12}:instance-profile/.{1,128}$" + } + }, + "com.amazonaws.pcs#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Amazon Web Services PCS can't process your request right now. Try again later.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.pcs#ListClusters": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#ListClustersRequest" + }, + "output": { + "target": "com.amazonaws.pcs#ListClustersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of running clusters in your account.

", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "clusters" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": ["Cluster"] + } + }, + "com.amazonaws.pcs#ListClustersRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of nextToken is a unique pagination token\n for each page of results returned. If nextToken is returned, there are more\n results available. Make the call again using the returned token to retrieve the next page. \n Keep all other arguments unchanged. Each pagination token expires after 24 hours. \n Using an expired pagination token returns an HTTP 400 InvalidToken \n error.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.pcs#MaxResults", + "traits": { + "smithy.api#default": 10, + "smithy.api#documentation": "

The maximum number of results that are returned per call.\n You can use nextToken to obtain further pages of results. The default \n is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses \n the default.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#ListClustersResponse": { + "type": "structure", + "members": { + "clusters": { + "target": "com.amazonaws.pcs#ClusterList", + "traits": { + "smithy.api#documentation": "

The list of clusters.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of nextToken is a unique pagination token\n for each page of results returned. If nextToken is returned, there are more\n results available. Make the call again using the returned token to retrieve the next page. \n Keep all other arguments unchanged. Each pagination token expires after 24 hours. \n Using an expired pagination token returns an HTTP 400 InvalidToken \n error.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#ListComputeNodeGroups": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#ListComputeNodeGroupsRequest" + }, + "output": { + "target": "com.amazonaws.pcs#ListComputeNodeGroupsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of all compute node groups associated with a cluster.

", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "computeNodeGroups" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": ["ComputeNodeGroup"] + } + }, + "com.amazonaws.pcs#ListComputeNodeGroupsRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster to list compute node groups for.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of nextToken is a unique pagination token\n for each page of results returned. If nextToken is returned, there are more\n results available. Make the call again using the returned token to retrieve the next page. \n Keep all other arguments unchanged. Each pagination token expires after 24 hours. \n Using an expired pagination token returns an HTTP 400 InvalidToken \n error.

" + } + }, + "maxResults": { + "target": "com.amazonaws.pcs#MaxResults", + "traits": { + "smithy.api#default": 10, + "smithy.api#documentation": "

The maximum number of results that are returned per call.\n You can use nextToken to obtain further pages of results. The default \n is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses \n the default.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#ListComputeNodeGroupsResponse": { + "type": "structure", + "members": { + "computeNodeGroups": { + "target": "com.amazonaws.pcs#ComputeNodeGroupList", + "traits": { + "smithy.api#documentation": "

The list of compute node groups for the cluster.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of nextToken is a unique pagination token\n for each page of results returned. If nextToken is returned, there are more\n results available. Make the call again using the returned token to retrieve the next page. \n Keep all other arguments unchanged. Each pagination token expires after 24 hours. \n Using an expired pagination token returns an HTTP 400 InvalidToken \n error.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#ListQueues": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#ListQueuesRequest" + }, + "output": { + "target": "com.amazonaws.pcs#ListQueuesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of all queues associated with a cluster.

", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "queues" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": ["Queue"] + } + }, + "com.amazonaws.pcs#ListQueuesRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster to list queues for.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of nextToken is a unique pagination token\n for each page of results returned. If nextToken is returned, there are more\n results available. Make the call again using the returned token to retrieve the next page. \n Keep all other arguments unchanged. Each pagination token expires after 24 hours. \n Using an expired pagination token returns an HTTP 400 InvalidToken \n error.

" + } + }, + "maxResults": { + "target": "com.amazonaws.pcs#MaxResults", + "traits": { + "smithy.api#default": 10, + "smithy.api#documentation": "

The maximum number of results that are returned per call.\n You can use nextToken to obtain further pages of results. The default \n is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses \n the default.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#ListQueuesResponse": { + "type": "structure", + "members": { + "queues": { + "target": "com.amazonaws.pcs#QueueList", + "traits": { + "smithy.api#documentation": "

The list of queues associated with the cluster.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of nextToken is a unique pagination token\n for each page of results returned. If nextToken is returned, there are more\n results available. Make the call again using the returned token to retrieve the next page. \n Keep all other arguments unchanged. Each pagination token expires after 24 hours. \n Using an expired pagination token returns an HTTP 400 InvalidToken \n error.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.pcs#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + } + ], + "traits": { + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}"], + "smithy.api#documentation": "

Returns a list of all tags on an Amazon Web Services PCS resource.

", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.pcs#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.pcs#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource for which to list tags.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {}, + "smithy.api#references": [ + { + "resource": "com.amazonaws.pcs#ClusterResource", + "ids": { + "clusterIdentifier": "resourceArn" + } + }, + { + "resource": "com.amazonaws.pcs#QueueResource", + "ids": { + "clusterIdentifier": "resourceArn", + "queueIdentifier": "resourceArn" + } + }, + { + "resource": "com.amazonaws.pcs#ComputeNodeGroupResource", + "ids": { + "clusterIdentifier": "resourceArn", + "computeNodeGroupIdentifier": "resourceArn" + } + } + ] + } + }, + "com.amazonaws.pcs#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.pcs#ResponseTagMap", + "traits": { + "smithy.api#documentation": "

1 or more tags added to the resource. Each tag consists of a\n tag key and tag value. The tag value is optional and can be an empty\n string.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#default": 10, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.pcs#Networking": { + "type": "structure", + "members": { + "subnetIds": { + "target": "com.amazonaws.pcs#SubnetIdList", + "traits": { + "smithy.api#documentation": "

The ID of the subnet where Amazon Web Services PCS creates an Elastic Network Interface (ENI) to\n enable communication between managed controllers and Amazon Web Services PCS resources. The subnet must\n have an available IP address, cannot reside in AWS Outposts, AWS Wavelength, or an AWS\n Local Zone.

\n

Example: subnet-abcd1234\n

" + } + }, + "securityGroupIds": { + "target": "com.amazonaws.pcs#SecurityGroupIdList", + "traits": { + "smithy.api#documentation": "

The list of security group IDs associated \n with the Elastic Network Interface (ENI) created in subnets.

\n

The following rules are required:

\n
    \n
  • \n

    Inbound rule 1

    \n
      \n
    • \n

      Protocol: All

      \n
    • \n
    • \n

      Ports: All

      \n
    • \n
    • \n

      Source: Self

      \n
    • \n
    \n
  • \n
  • \n

    Outbound rule 1

    \n
      \n
    • \n

      Protocol: All

      \n
    • \n
    • \n

      Ports: All

      \n
    • \n
    • \n

      Destination: 0.0.0.0/0 (IPv4)

      \n
    • \n
    \n
  • \n
  • \n

    Outbound rule 2

    \n
      \n
    • \n

      Protocol: All

      \n
    • \n
    • \n

      Ports: All

      \n
    • \n
    • \n

      Destination: Self

      \n
    • \n
    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

The networking configuration for the cluster's control plane.

" + } + }, + "com.amazonaws.pcs#NetworkingRequest": { + "type": "structure", + "members": { + "subnetIds": { + "target": "com.amazonaws.pcs#SubnetIdList", + "traits": { + "smithy.api#documentation": "

The list of subnet IDs where Amazon Web Services PCS creates an \n Elastic Network Interface (ENI) to enable communication between managed controllers \n and Amazon Web Services PCS resources. Subnet IDs have the form subnet-0123456789abcdef0.

\n

Subnets can't be in Outposts, Wavelength or an Amazon Web Services Local Zone.

\n \n

Amazon Web Services PCS currently supports only 1 subnet in this list.

\n
" + } + }, + "securityGroupIds": { + "target": "com.amazonaws.pcs#SecurityGroupIdList", + "traits": { + "smithy.api#documentation": "

A list of security group IDs associated with the Elastic Network Interface (ENI) created in subnets.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The networking configuration for the cluster's control plane.

" + } + }, + "com.amazonaws.pcs#PurchaseOption": { + "type": "enum", + "members": { + "ONDEMAND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONDEMAND" + } + }, + "SPOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SPOT" + } + } + } + }, + "com.amazonaws.pcs#Queue": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.pcs#QueueName", + "traits": { + "smithy.api#documentation": "

The name that identifies the queue.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The generated unique ID of the queue.

", + "smithy.api#required": {} + } + }, + "arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique Amazon Resource Name (ARN) of the queue.

", + "smithy.api#required": {} + } + }, + "clusterId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the cluster of the queue.

", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "status": { + "target": "com.amazonaws.pcs#QueueStatus", + "traits": { + "smithy.api#documentation": "

The provisioning status of the queue.

\n \n

The provisioning status doesn't indicate the overall health of the queue.

\n
", + "smithy.api#required": {} + } + }, + "computeNodeGroupConfigurations": { + "target": "com.amazonaws.pcs#ComputeNodeGroupConfigurationList", + "traits": { + "smithy.api#documentation": "

The list of compute node group configurations associated with the queue. Queues \n assign jobs to associated compute node groups.

", + "smithy.api#required": {} + } + }, + "errorInfo": { + "target": "com.amazonaws.pcs#ErrorInfoList", + "traits": { + "smithy.api#documentation": "

The list of errors that occurred during queue provisioning.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A queue resource.

" + } + }, + "com.amazonaws.pcs#QueueIdentifier": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(pcs_[a-zA-Z0-9]+|[A-Za-z][A-Za-z0-9-]{1,25})$" + } + }, + "com.amazonaws.pcs#QueueList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#QueueSummary" + } + }, + "com.amazonaws.pcs#QueueName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 25 + }, + "smithy.api#pattern": "^(?!pcs_)^(?![A-Za-z0-9]{10}$)[A-Za-z][A-Za-z0-9-]+$" + } + }, + "com.amazonaws.pcs#QueueResource": { + "type": "resource", + "identifiers": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier" + }, + "queueIdentifier": { + "target": "com.amazonaws.pcs#QueueIdentifier" + } + }, + "create": { + "target": "com.amazonaws.pcs#CreateQueue" + }, + "update": { + "target": "com.amazonaws.pcs#UpdateQueue" + }, + "operations": [ + { + "target": "com.amazonaws.pcs#DeleteQueue" + }, + { + "target": "com.amazonaws.pcs#GetQueue" + } + ], + "collectionOperations": [ + { + "target": "com.amazonaws.pcs#ListQueues" + } + ], + "traits": { + "aws.api#arn": { + "template": "cluster/{clusterIdentifier}/queue/{queueIdentifier}" + }, + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}"], + "aws.iam#iamResource": { + "name": "queue" + } + } + }, + "com.amazonaws.pcs#QueueStatus": { + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "CREATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_FAILED" + } + }, + "DELETE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_FAILED" + } + }, + "UPDATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_FAILED" + } + } + } + }, + "com.amazonaws.pcs#QueueSummary": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.pcs#QueueName", + "traits": { + "smithy.api#documentation": "

The name that identifies the queue.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The generated unique ID of the queue.

", + "smithy.api#required": {} + } + }, + "arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique Amazon Resource Name (ARN) of the queue.

", + "smithy.api#required": {} + } + }, + "clusterId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the cluster of the queue.

", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was modified.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "status": { + "target": "com.amazonaws.pcs#QueueStatus", + "traits": { + "smithy.api#documentation": "

The provisioning status of the queue.

\n \n

The provisioning status doesn't indicate the overall health of the queue.

\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The object returned by the ListQueues API action.

" + } + }, + "com.amazonaws.pcs#RegisterComputeNodeGroupInstance": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#RegisterComputeNodeGroupInstanceRequest" + }, + "output": { + "target": "com.amazonaws.pcs#RegisterComputeNodeGroupInstanceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + } + ], + "traits": { + "smithy.api#documentation": "\n

This API action isn't intended for you to use.

\n
\n

Amazon Web Services PCS uses this API action to register the compute nodes it launches in your account.

" + } + }, + "com.amazonaws.pcs#RegisterComputeNodeGroupInstanceRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster to register the compute node group instance in.

", + "smithy.api#required": {} + } + }, + "bootstrapId": { + "target": "com.amazonaws.pcs#BootstrapId", + "traits": { + "smithy.api#documentation": "

The client-generated token to allow for retries.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#RegisterComputeNodeGroupInstanceResponse": { + "type": "structure", + "members": { + "nodeID": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The scheduler node ID for this instance.

", + "smithy.api#required": {} + } + }, + "sharedSecret": { + "target": "com.amazonaws.pcs#SharedSecret", + "traits": { + "smithy.api#documentation": "

For the Slurm scheduler, this is the shared Munge key the scheduler uses to\n authenticate compute node group instances.

", + "smithy.api#required": {} + } + }, + "endpoints": { + "target": "com.amazonaws.pcs#Endpoints", + "traits": { + "smithy.api#documentation": "

The list of endpoints available for interaction with the scheduler.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#RequestTagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.pcs#TagKey" + }, + "value": { + "target": "com.amazonaws.pcs#TagValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.pcs#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the resource that was not found.\n

", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n The type or category of the resource that was not found.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The requested resource can't be found. The cluster, node group, or queue you're\n attempting to get, update, list, or delete doesn't exist.

\n

\n Examples\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.pcs#ResponseTagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.pcs#TagKey" + }, + "value": { + "target": "com.amazonaws.pcs#TagValue" + } + }, + "com.amazonaws.pcs#SBClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 8, + "max": 100 + } + } + }, + "com.amazonaws.pcs#ScalingConfiguration": { + "type": "structure", + "members": { + "minInstanceCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

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

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + }, + "maxInstanceCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

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

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the boundaries of the compute node group auto scaling.

" + } + }, + "com.amazonaws.pcs#ScalingConfigurationRequest": { + "type": "structure", + "members": { + "minInstanceCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

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

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + }, + "maxInstanceCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

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

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the boundaries of the compute node group auto scaling.

" + } + }, + "com.amazonaws.pcs#Scheduler": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.pcs#SchedulerType", + "traits": { + "smithy.api#documentation": "

The software Amazon Web Services PCS uses to manage cluster scaling and job scheduling.

", + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The version of the specified scheduling software that Amazon Web Services PCS uses to manage cluster scaling and job scheduling.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The cluster management and job scheduling software associated with the cluster.

" + } + }, + "com.amazonaws.pcs#SchedulerRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.pcs#SchedulerType", + "traits": { + "smithy.api#documentation": "

The software Amazon Web Services PCS uses to manage cluster scaling and job scheduling.

", + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The version of the specified scheduling software that Amazon Web Services PCS uses to manage cluster scaling and job scheduling.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The cluster management and job scheduling software associated with the cluster.

" + } + }, + "com.amazonaws.pcs#SchedulerType": { + "type": "enum", + "members": { + "SLURM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SLURM" + } + } + } + }, + "com.amazonaws.pcs#SecurityGroupId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^sg-\\w{8,17}$" + } + }, + "com.amazonaws.pcs#SecurityGroupIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#SecurityGroupId" + } + }, + "com.amazonaws.pcs#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "serviceCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n The service code associated with the quota that was exceeded.\n

", + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the resource that caused the quota to be exceeded.\n

" + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n The type or category of the resource that caused the quota to be exceeded.\n

" + } + }, + "quotaCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n The quota code of the service quota that was exceeded.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

You exceeded your service quota. Service quotas, also referred to as limits, are the\n maximum number of service resources or operations for your Amazon Web Services account. To learn how to\n increase your service quota, see Requesting a quota\n increase in the Service Quotas User Guide\n

\n

\n Examples\n

\n
    \n
  • \n

    The max number of clusters or queues has been reached for the account.

    \n
  • \n
  • \n

    The max number of compute node groups has been reached for the associated\n cluster.

    \n
  • \n
  • \n

    The total of maxInstances across all compute node groups has been\n reached for associated cluster.

    \n
  • \n
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.pcs#SharedSecret": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.pcs#Size": { + "type": "enum", + "members": { + "SMALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SMALL" + } + }, + "MEDIUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MEDIUM" + } + }, + "LARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LARGE" + } + } + } + }, + "com.amazonaws.pcs#SlurmAuthKey": { + "type": "structure", + "members": { + "secretArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the the shared Slurm key.

", + "smithy.api#required": {} + } + }, + "secretVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The version of the shared Slurm key.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The shared Slurm key for authentication, also known as the cluster secret.

" + } + }, + "com.amazonaws.pcs#SlurmCustomSetting": { + "type": "structure", + "members": { + "parameterName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + }, + "parameterValue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The values for the configured Slurm settings.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional settings that directly map to Slurm settings.

" + } + }, + "com.amazonaws.pcs#SlurmCustomSettings": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#SlurmCustomSetting" + } + }, + "com.amazonaws.pcs#SpotAllocationStrategy": { + "type": "enum", + "members": { + "LOWEST_PRICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lowest-price" + } + }, + "CAPACITY_OPTIMIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "capacity-optimized" + } + }, + "PRICE_CAPACITY_OPTIMIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "price-capacity-optimized" + } + } + } + }, + "com.amazonaws.pcs#SpotOptions": { + "type": "structure", + "members": { + "allocationStrategy": { + "target": "com.amazonaws.pcs#SpotAllocationStrategy", + "traits": { + "smithy.api#documentation": "

The Amazon EC2 allocation strategy Amazon Web Services PCS uses to provision EC2 instances. \n Amazon Web Services PCS supports lowest price, \n capacity optimized, and \n price capacity optimized. \n For more information, see Use \n allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand\n capacity in the Amazon Elastic Compute Cloud User Guide. If you don't provide this option,\n it defaults to price capacity optimized.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.pcs#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.pcs#SubnetId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^subnet-\\w{8,17}$" + } + }, + "com.amazonaws.pcs#SubnetIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#SubnetId" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.pcs#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.pcs#TagKeys": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.pcs#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#TagResourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + } + ], + "traits": { + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}", "aws:RequestTag/${TagKey}", "aws:TagKeys"], + "smithy.api#documentation": "

Adds or edits tags on an Amazon Web Services PCS resource. Each tag consists of a tag key and a tag\n value. The tag key and tag value are case-sensitive strings. The tag value can be an empty\n (null) string. To add a tag, specify a new tag key and a tag value. To edit a tag, specify\n an existing tag key and a new tag value.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.pcs#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.pcs#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.pcs#RequestTagMap", + "traits": { + "smithy.api#documentation": "

1 or more tags added to the resource. Each tag consists of a\n tag key and tag value. The tag value is optional and can be an empty\n string.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {}, + "smithy.api#references": [ + { + "resource": "com.amazonaws.pcs#ClusterResource", + "ids": { + "clusterIdentifier": "resourceArn" + } + }, + { + "resource": "com.amazonaws.pcs#QueueResource", + "ids": { + "clusterIdentifier": "resourceArn", + "queueIdentifier": "resourceArn" + } + }, + { + "resource": "com.amazonaws.pcs#ComputeNodeGroupResource", + "ids": { + "clusterIdentifier": "resourceArn", + "computeNodeGroupIdentifier": "resourceArn" + } + } + ] + } + }, + "com.amazonaws.pcs#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.pcs#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "retryAfterSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

\n The number of seconds to wait before retrying the request.\n

", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "

Your request exceeded a request rate quota. Check the resource's request rate quota and try again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.pcs#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#UntagResourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + } + ], + "traits": { + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}", "aws:TagKeys"], + "smithy.api#documentation": "

Deletes tags from an Amazon Web Services PCS resource. To delete a tag, specify the tag key and the\n Amazon Resource Name (ARN) of the Amazon Web Services PCS resource.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.pcs#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.pcs#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.pcs#TagKeys", + "traits": { + "aws.iam#conditionKeyValue": "aws:TagKeys", + "smithy.api#documentation": "

1 or more tag keys to remove from the resource. Specify only tag keys and not tag\n values.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {}, + "smithy.api#references": [ + { + "resource": "com.amazonaws.pcs#ClusterResource", + "ids": { + "clusterIdentifier": "resourceArn" + } + }, + { + "resource": "com.amazonaws.pcs#QueueResource", + "ids": { + "clusterIdentifier": "resourceArn", + "queueIdentifier": "resourceArn" + } + }, + { + "resource": "com.amazonaws.pcs#ComputeNodeGroupResource", + "ids": { + "clusterIdentifier": "resourceArn", + "computeNodeGroupIdentifier": "resourceArn" + } + } + ] + } + }, + "com.amazonaws.pcs#UpdateComputeNodeGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#UpdateComputeNodeGroupRequest" + }, + "output": { + "target": "com.amazonaws.pcs#UpdateComputeNodeGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#idempotent": {}, + "smithy.api#tags": ["ComputeNodeGroup"] + } + }, + "com.amazonaws.pcs#UpdateComputeNodeGroupRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + }, + "computeNodeGroupIdentifier": { + "target": "com.amazonaws.pcs#ComputeNodeGroupIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the compute node group.

", + "smithy.api#required": {} + } + }, + "amiId": { + "target": "com.amazonaws.pcs#AmiId", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "subnetIds": { + "target": "com.amazonaws.pcs#StringList", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "customLaunchTemplate": { + "target": "com.amazonaws.pcs#CustomLaunchTemplate" + }, + "purchaseOption": { + "target": "com.amazonaws.pcs#PurchaseOption", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "spotOptions": { + "target": "com.amazonaws.pcs#SpotOptions" + }, + "scalingConfiguration": { + "target": "com.amazonaws.pcs#ScalingConfigurationRequest", + "traits": { + "smithy.api#documentation": "

Specifies the boundaries of the compute node group auto scaling.

" + } + }, + "iamInstanceProfileArn": { + "target": "com.amazonaws.pcs#InstanceProfileArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the \n IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have\n pcs:RegisterComputeNodeGroupInstance permissions attached to provision instances\n correctly.

" + } + }, + "slurmConfiguration": { + "target": "com.amazonaws.pcs#UpdateComputeNodeGroupSlurmConfigurationRequest", + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "clientToken": { + "target": "com.amazonaws.pcs#SBClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. Idempotency ensures that an API\n request completes only once. With an idempotent request, if the original \n request completes successfully, the subsequent retries with the same \n client token return the result from the original successful request and \n they have no additional effect. If you don't specify a client token, the \n CLI and SDK automatically generate 1 for you.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#UpdateComputeNodeGroupResponse": { + "type": "structure", + "members": { + "computeNodeGroup": { + "target": "com.amazonaws.pcs#ComputeNodeGroup" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#UpdateComputeNodeGroupSlurmConfigurationRequest": { + "type": "structure", + "members": { + "slurmCustomSettings": { + "target": "com.amazonaws.pcs#SlurmCustomSettings", + "traits": { + "smithy.api#documentation": "

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

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional options related to the Slurm scheduler.

" + } + }, + "com.amazonaws.pcs#UpdateQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.pcs#UpdateQueueRequest" + }, + "output": { + "target": "com.amazonaws.pcs#UpdateQueueResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pcs#AccessDeniedException" + }, + { + "target": "com.amazonaws.pcs#ConflictException" + }, + { + "target": "com.amazonaws.pcs#InternalServerException" + }, + { + "target": "com.amazonaws.pcs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pcs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.pcs#ThrottlingException" + }, + { + "target": "com.amazonaws.pcs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the compute node group configuration of a queue. Use this API to change the\n compute node groups that the queue can send jobs to.

", + "smithy.api#idempotent": {}, + "smithy.api#tags": ["Queue"] + } + }, + "com.amazonaws.pcs#UpdateQueueRequest": { + "type": "structure", + "members": { + "clusterIdentifier": { + "target": "com.amazonaws.pcs#ClusterIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the cluster of the queue.

", + "smithy.api#required": {} + } + }, + "queueIdentifier": { + "target": "com.amazonaws.pcs#QueueIdentifier", + "traits": { + "smithy.api#documentation": "

The name or ID of the queue.

", + "smithy.api#required": {} + } + }, + "computeNodeGroupConfigurations": { + "target": "com.amazonaws.pcs#ComputeNodeGroupConfigurationList", + "traits": { + "smithy.api#documentation": "

The list of compute node group configurations to associate with the queue. Queues\n assign jobs to associated compute node groups.

" + } + }, + "clientToken": { + "target": "com.amazonaws.pcs#SBClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. Idempotency ensures that an API\n request completes only once. With an idempotent request, if the original \n request completes successfully, the subsequent retries with the same \n client token return the result from the original successful request and \n they have no additional effect. If you don't specify a client token, the \n CLI and SDK automatically generate 1 for you.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pcs#UpdateQueueResponse": { + "type": "structure", + "members": { + "queue": { + "target": "com.amazonaws.pcs#Queue" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pcs#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "reason": { + "target": "com.amazonaws.pcs#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

\n The specific reason or cause of the validation error.\n

", + "smithy.api#required": {} + } + }, + "fieldList": { + "target": "com.amazonaws.pcs#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "

\n A list of fields or properties that failed validation.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request isn't valid.

\n

\n Examples\n

\n
    \n
  • \n

    Your request contains malformed JSON or unsupported characters.

    \n
  • \n
  • \n

    The scheduler version isn't supported.

    \n
  • \n
  • \n

    There are networking related errors, such as network validation failure.

    \n
  • \n
  • \n

    AMI type is CUSTOM and the launch template doesn't define the AMI ID,\n or the AMI type is AL2 and the launch template defines the AMI.

    \n
  • \n
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.pcs#ValidationExceptionField": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the exception.

", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The message body of the exception.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Stores information about a field in a request that caused an exception.

" + } + }, + "com.amazonaws.pcs#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.pcs#ValidationExceptionField" + } + }, + "com.amazonaws.pcs#ValidationExceptionReason": { + "type": "enum", + "members": { + "UNKNOWN_OPERATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unknownOperation" + } + }, + "CANNOT_PARSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cannotParse" + } + }, + "FIELD_VALIDATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fieldValidationFailed" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + } + } + } + } +}