clients/client-resiliencehubv2/README.md
AWS SDK for JavaScript Resiliencehubv2 Client for Node.js, Browser and React Native.
<p>The next generation of AWS Resilience Hub is the single location in AWS where you assess and improve the resilience of your critical applications. It helps Site Reliability Engineers (SREs) and development teams proactively reason about resilience at scale — identifying failure modes, discovering hidden dependencies, and report on progress across the enterprise. </p>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-resiliencehubv2yarn add @aws-sdk/client-resiliencehubv2pnpm add @aws-sdk/client-resiliencehubv2The AWS SDK is modulized by clients and commands.
To send a request, you only need to import the Resiliencehubv2Client and
the commands you need, for example ListReportsCommand:
// ES5 example
const { Resiliencehubv2Client, ListReportsCommand } = require("@aws-sdk/client-resiliencehubv2");
// ES6+ example
import { Resiliencehubv2Client, ListReportsCommand } from "@aws-sdk/client-resiliencehubv2";
To send a request:
send operation on the client, providing the command object as input.const client = new Resiliencehubv2Client({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListReportsCommand(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.
Resiliencehubv2 extends Resiliencehubv2Client 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 (Resiliencehubv2Client).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { Resiliencehubv2 } from "@aws-sdk/client-resiliencehubv2";
const client = new Resiliencehubv2({ region: "REGION" });
// async/await.
try {
const data = await client.listReports(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listReports(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listReports(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-resiliencehubv2 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> CreateInputSource </summary>Command API Reference / Input / Output
</details> <details> <summary> CreatePolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateReport </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateService </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateServiceFunction </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateServiceFunctionResources </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateSystem </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateUserJourney </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteAssertion </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteInputSource </summary>Command API Reference / Input / Output
</details> <details> <summary> DeletePolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteService </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteServiceFunction </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteServiceFunctionResources </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSystem </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteUserJourney </summary>Command API Reference / Input / Output
</details> <details> <summary> GetFailureModeFinding </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> GetService </summary>Command API Reference / Input / Output
</details> <details> <summary> GetSystem </summary>Command API Reference / Input / Output
</details> <details> <summary> GetUserJourney </summary>Command API Reference / Input / Output
</details> <details> <summary> ImportApp </summary>Command API Reference / Input / Output
</details> <details> <summary> ImportPolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAssertions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListDependencies </summary>Command API Reference / Input / Output
</details> <details> <summary> ListFailureModeAssessments </summary>Command API Reference / Input / Output
</details> <details> <summary> ListFailureModeFindings </summary>Command API Reference / Input / Output
</details> <details> <summary> ListInputSources </summary>Command API Reference / Input / Output
</details> <details> <summary> ListPolicies </summary>Command API Reference / Input / Output
</details> <details> <summary> ListReports </summary>Command API Reference / Input / Output
</details> <details> <summary> ListResources </summary>Command API Reference / Input / Output
</details> <details> <summary> ListServiceEvents </summary>Command API Reference / Input / Output
</details> <details> <summary> ListServiceFunctions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListServices </summary>Command API Reference / Input / Output
</details> <details> <summary> ListServiceTopologyEdges </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSystemEvents </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSystems </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ListUserJourneys </summary>Command API Reference / Input / Output
</details> <details> <summary> StartFailureModeAssessment </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> UpdateAssertion </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateDependency </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateFailureModeFinding </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdatePolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateService </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateServiceFunction </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateSystem </summary> </details> <details> <summary> UpdateUserJourney </summary> </details>