clients/client-emr-containers/README.md
AWS SDK for JavaScript EMRContainers Client for Node.js, Browser and React Native.
<p>Amazon EMR on EKS provides a deployment option for Amazon EMR that allows you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS). With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications. For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is Amazon EMR on EKS</a>.</p> <p> <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following scenarios: </p> <ul> <li> <p>It is the prefix in the CLI commands for Amazon EMR on EKS. For example, <code>aws emr-containers start-job-run</code>.</p> </li> <li> <p>It is the prefix before IAM policy actions for Amazon EMR on EKS. For example, <code>"Action": [ "emr-containers:StartJobRun"]</code>. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-actions">Policy actions for Amazon EMR on EKS</a>.</p> </li> <li> <p>It is the prefix used in Amazon EMR on EKS service endpoints. For example, <code>emr-containers.us-east-2.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/service-quotas.html#service-endpoints">Amazon EMR on EKSService Endpoints</a>.</p> </li> </ul>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-emr-containersyarn add @aws-sdk/client-emr-containerspnpm add @aws-sdk/client-emr-containersThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the EMRContainersClient and
the commands you need, for example ListJobRunsCommand:
// ES5 example
const { EMRContainersClient, ListJobRunsCommand } = require("@aws-sdk/client-emr-containers");
// ES6+ example
import { EMRContainersClient, ListJobRunsCommand } from "@aws-sdk/client-emr-containers";
To send a request:
send operation on the client, providing the command object as input.const client = new EMRContainersClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListJobRunsCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
EMRContainers extends EMRContainersClient 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 (EMRContainersClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { EMRContainers } from "@aws-sdk/client-emr-containers";
const client = new EMRContainers({ region: "REGION" });
// async/await.
try {
const data = await client.listJobRuns(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listJobRuns(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listJobRuns(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
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.
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.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-emr-containers package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> CreateJobTemplate </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateManagedEndpoint </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateSecurityConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateVirtualCluster </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteJobTemplate </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteManagedEndpoint </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVirtualCluster </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeJobRun </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeJobTemplate </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeManagedEndpoint </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeSecurityConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeVirtualCluster </summary>Command API Reference / Input / Output
</details> <details> <summary> GetManagedEndpointSessionCredentials </summary>Command API Reference / Input / Output
</details> <details> <summary> ListJobRuns </summary>Command API Reference / Input / Output
</details> <details> <summary> ListJobTemplates </summary>Command API Reference / Input / Output
</details> <details> <summary> ListManagedEndpoints </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSecurityConfigurations </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ListVirtualClusters </summary>Command API Reference / Input / Output
</details> <details> <summary> StartJobRun </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary> </details> <details> <summary> UntagResource </summary> </details>