Back to Aws Sdk Js V3

@aws-sdk/client-eks

clients/client-eks/README.md

3.1043.035.3 KB
Original Source
<!-- generated file, do not edit directly -->

@aws-sdk/client-eks

Description

AWS SDK for JavaScript EKS Client for Node.js, Browser and React Native.

<p>Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it easy for you to run Kubernetes on Amazon Web Services without needing to setup or maintain your own Kubernetes control plane. Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications.</p> <p>Amazon EKS runs up-to-date versions of the open-source Kubernetes software, so you can use all the existing plugins and tooling from the Kubernetes community. Applications running on Amazon EKS are fully compatible with applications running on any standard Kubernetes environment, whether running in on-premises data centers or public clouds. This means that you can easily migrate any standard Kubernetes application to Amazon EKS without any code modification required.</p>

Installing

To install this package, use the CLI of your favorite package manager:

  • npm install @aws-sdk/client-eks
  • yarn add @aws-sdk/client-eks
  • pnpm add @aws-sdk/client-eks

Getting Started

Import

The AWS SDK is modulized by clients and commands. To send a request, you only need to import the EKSClient and the commands you need, for example ListAddonsCommand:

js
// ES5 example
const { EKSClient, ListAddonsCommand } = require("@aws-sdk/client-eks");
ts
// ES6+ example
import { EKSClient, ListAddonsCommand } from "@aws-sdk/client-eks";

Usage

To send a request:

  • Instantiate a client with configuration (e.g. credentials, region).
  • Instantiate a command with input parameters.
  • Call the send operation on the client, providing the command object as input.
js
const client = new EKSClient({ region: "REGION" });

const params = { /** input parameters */ };
const command = new ListAddonsCommand(params);

Async/await

We recommend using the 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.
}

Promises

You can also use Promise chaining.

js
client
  .send(command)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  })
  .finally(() => {
    // finally.
  });

Aggregated client

The aggregated client class is exported from the same package, but without the "Client" suffix.

EKS extends EKSClient and additionally supports all operations, waiters, and paginators as methods. This style may be familiar to you from the AWS SDK for JavaScript v2.

If you are bundling the AWS SDK, we recommend using only the bare-bones client (EKSClient). More details are in the blog post on modular packages in AWS SDK for JavaScript.

ts
import { EKS } from "@aws-sdk/client-eks";

const client = new EKS({ region: "REGION" });

// async/await.
try {
  const data = await client.listAddons(params);
  // process data.
} catch (error) {
  // error handling.
}

// Promises.
client
  .listAddons(params)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  });

// callbacks (not recommended).
client.listAddons(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;
   * }
   */
}

See also docs/ERROR_HANDLING.

Getting Help

Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.

To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.

Contributing

This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-eks package is updated. To contribute to client you can check our generate clients scripts.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Client Commands (Operations List)

<details> <summary> AssociateAccessPolicy </summary>

Command API Reference / Input / Output

</details> <details> <summary> AssociateEncryptionConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> AssociateIdentityProviderConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateAccessEntry </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateAddon </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateCapability </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateCluster </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateEksAnywhereSubscription </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateFargateProfile </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateNodegroup </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreatePodIdentityAssociation </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteAccessEntry </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteAddon </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteCapability </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteCluster </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteEksAnywhereSubscription </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteFargateProfile </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteNodegroup </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeletePodIdentityAssociation </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeregisterCluster </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeAccessEntry </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeAddon </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeAddonConfiguration </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeAddonVersions </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeCapability </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeCluster </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeClusterVersions </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeEksAnywhereSubscription </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeFargateProfile </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeIdentityProviderConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeInsight </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeInsightsRefresh </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeNodegroup </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribePodIdentityAssociation </summary>

Command API Reference / Input / Output

</details> <details> <summary> DescribeUpdate </summary>

Command API Reference / Input / Output

</details> <details> <summary> DisassociateAccessPolicy </summary>

Command API Reference / Input / Output

</details> <details> <summary> DisassociateIdentityProviderConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListAccessEntries </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListAccessPolicies </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListAddons </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListAssociatedAccessPolicies </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListCapabilities </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListClusters </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListEksAnywhereSubscriptions </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListFargateProfiles </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListIdentityProviderConfigs </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListInsights </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListNodegroups </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListPodIdentityAssociations </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTagsForResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListUpdates </summary>

Command API Reference / Input / Output

</details> <details> <summary> RegisterCluster </summary>

Command API Reference / Input / Output

</details> <details> <summary> StartInsightsRefresh </summary>

Command API Reference / Input / Output

</details> <details> <summary> TagResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> UntagResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateAccessEntry </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateAddon </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateCapability </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateClusterConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateClusterVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateEksAnywhereSubscription </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateNodegroupConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateNodegroupVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdatePodIdentityAssociation </summary>

Command API Reference / Input / Output

</details>