- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListComputeNodeGroupsCommand
Returns a list of all compute node groups associated with a cluster.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
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",
// };
ListComputeNodeGroupsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
clusterIdentifier Required | string | undefined | The name or ID of the cluster to list compute node groups for. |
maxResults | number | undefined | The maximum number of results that are returned per call. You can use |
nextToken | string | undefined | The value of |
ListComputeNodeGroupsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
computeNodeGroups Required | ComputeNodeGroupSummary[] | undefined | The list of compute node groups for the cluster. |
nextToken | string | undefined | The value of |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have permission to perform the action. Examples
|
ConflictException | client | 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
|
InternalServerException | server | Amazon Web Services PCS can't process your request right now. Try again later. |
ResourceNotFoundException | client | The requested resource can't be found. The cluster, node group, or queue you're attempting to get, update, list, or delete doesn't exist. Examples |
ThrottlingException | client | Your request exceeded a request rate quota. Check the resource's request rate quota and try again. |
ValidationException | client | The request isn't valid. Examples
|
PCSServiceException | Base exception class for all service exceptions from PCS service. |