ListVirtualClustersCommand

Lists information about the specified virtual cluster. Virtual cluster is a managed entity on Amazon EMR on EKS. You can create, describe, list and delete virtual clusters. They do not consume any additional resource in your system. A single virtual cluster maps to a single Kubernetes namespace. Given this relationship, you can model virtual clusters the same way you model Kubernetes namespaces to meet your requirements.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EMRContainersClient, ListVirtualClustersCommand } from "@aws-sdk/client-emr-containers"; // ES Modules import
// const { EMRContainersClient, ListVirtualClustersCommand } = require("@aws-sdk/client-emr-containers"); // CommonJS import
const client = new EMRContainersClient(config);
const input = { // ListVirtualClustersRequest
  containerProviderId: "STRING_VALUE",
  containerProviderType: "EKS",
  createdAfter: new Date("TIMESTAMP"),
  createdBefore: new Date("TIMESTAMP"),
  states: [ // VirtualClusterStates
    "RUNNING" || "TERMINATING" || "TERMINATED" || "ARRESTED",
  ],
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
  eksAccessEntryIntegrated: true || false,
};
const command = new ListVirtualClustersCommand(input);
const response = await client.send(command);
// { // ListVirtualClustersResponse
//   virtualClusters: [ // VirtualClusters
//     { // VirtualCluster
//       id: "STRING_VALUE",
//       name: "STRING_VALUE",
//       arn: "STRING_VALUE",
//       state: "RUNNING" || "TERMINATING" || "TERMINATED" || "ARRESTED",
//       containerProvider: { // ContainerProvider
//         type: "EKS", // required
//         id: "STRING_VALUE", // required
//         info: { // ContainerInfo Union: only one key present
//           eksInfo: { // EksInfo
//             namespace: "STRING_VALUE",
//           },
//         },
//       },
//       createdAt: new Date("TIMESTAMP"),
//       tags: { // TagMap
//         "<keys>": "STRING_VALUE",
//       },
//       securityConfigurationId: "STRING_VALUE",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListVirtualClustersCommand Input

See ListVirtualClustersCommandInput for more details

Parameter
Type
Description
containerProviderId
string | undefined

The container provider ID of the virtual cluster.

containerProviderType
ContainerProviderType | undefined

The container provider type of the virtual cluster. Amazon EKS is the only supported type as of now.

createdAfter
Date | undefined

The date and time after which the virtual clusters are created.

createdBefore
Date | undefined

The date and time before which the virtual clusters are created.

eksAccessEntryIntegrated
boolean | undefined

Optional Boolean that specifies whether the operation should return the virtual clusters that have the access entry integration enabled or disabled. If not specified, the operation returns all applicable virtual clusters.

maxResults
number | undefined

The maximum number of virtual clusters that can be listed.

nextToken
string | undefined

The token for the next set of virtual clusters to return.

states
VirtualClusterState[] | undefined

The states of the requested virtual clusters.

ListVirtualClustersCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
nextToken
string | undefined

This output displays the token for the next set of virtual clusters.

virtualClusters
VirtualCluster[] | undefined

This output lists the specified virtual clusters.

Throws

Name
Fault
Details
InternalServerException
server

This is an internal server exception.

ValidationException
client

There are invalid parameters in the client request.

EMRContainersServiceException
Base exception class for all service exceptions from EMRContainers service.