@aws-sdk/client-wellarchitected
TypeScript icon, indicating that this package has built-in type declarations

3.556.0 • Public • Published

@aws-sdk/client-wellarchitected

Description

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

Well-Architected Tool

This is the Well-Architected Tool API Reference. The WA Tool API provides programmatic access to the Well-Architected Tool in the Amazon Web Services Management Console. For information about the Well-Architected Tool, see the Well-Architected Tool User Guide.

Installing

To install the this package, simply type add or install @aws-sdk/client-wellarchitected using your favorite package manager:

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

Getting Started

Import

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

// ES5 example
const { WellArchitectedClient, ListLensesCommand } = require("@aws-sdk/client-wellarchitected");
// ES6+ example
import { WellArchitectedClient, ListLensesCommand } from "@aws-sdk/client-wellarchitected";

Usage

To send a request, you:

  • Initiate client with configuration (e.g. credentials, region).
  • Initiate command with input parameters.
  • Call send operation on client with command object as input.
  • If you are using a custom http handler, you may call destroy() to close open connections.
// a client can be shared by different commands.
const client = new WellArchitectedClient({ region: "REGION" });

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

Async/await

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

Async-await is clean, concise, intuitive, easy to debug and has better error handling as compared to using Promise chains or callbacks.

Promises

You can also use Promise chaining to execute send operation.

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

Promises can also be called using .catch() and .finally() as follows:

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

Callbacks

We do not recommend using callbacks because of callback hell, but they are supported by the send operation.

// callbacks.
client.send(command, (err, data) => {
  // process err and data.
});

v2 compatible style

The client can also send requests using v2 compatible style. However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post on modular packages in AWS SDK for JavaScript

import * as AWS from "@aws-sdk/client-wellarchitected";
const client = new AWS.WellArchitected({ region: "REGION" });

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

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

// callbacks.
client.listLenses(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).

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;
   * }
   */
}

Getting Help

Please use these community resources for getting help. We use the 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-wellarchitected 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)

AssociateLenses

Command API Reference / Input / Output

AssociateProfiles

Command API Reference / Input / Output

CreateLensShare

Command API Reference / Input / Output

CreateLensVersion

Command API Reference / Input / Output

CreateMilestone

Command API Reference / Input / Output

CreateProfile

Command API Reference / Input / Output

CreateProfileShare

Command API Reference / Input / Output

CreateReviewTemplate

Command API Reference / Input / Output

CreateTemplateShare

Command API Reference / Input / Output

CreateWorkload

Command API Reference / Input / Output

CreateWorkloadShare

Command API Reference / Input / Output

DeleteLens

Command API Reference / Input / Output

DeleteLensShare

Command API Reference / Input / Output

DeleteProfile

Command API Reference / Input / Output

DeleteProfileShare

Command API Reference / Input / Output

DeleteReviewTemplate

Command API Reference / Input / Output

DeleteTemplateShare

Command API Reference / Input / Output

DeleteWorkload

Command API Reference / Input / Output

DeleteWorkloadShare

Command API Reference / Input / Output

DisassociateLenses

Command API Reference / Input / Output

DisassociateProfiles

Command API Reference / Input / Output

ExportLens

Command API Reference / Input / Output

GetAnswer

Command API Reference / Input / Output

GetConsolidatedReport

Command API Reference / Input / Output

GetGlobalSettings

Command API Reference / Input / Output

GetLens

Command API Reference / Input / Output

GetLensReview

Command API Reference / Input / Output

GetLensReviewReport

Command API Reference / Input / Output

GetLensVersionDifference

Command API Reference / Input / Output

GetMilestone

Command API Reference / Input / Output

GetProfile

Command API Reference / Input / Output

GetProfileTemplate

Command API Reference / Input / Output

GetReviewTemplate

Command API Reference / Input / Output

GetReviewTemplateAnswer

Command API Reference / Input / Output

GetReviewTemplateLensReview

Command API Reference / Input / Output

GetWorkload

Command API Reference / Input / Output

ImportLens

Command API Reference / Input / Output

ListAnswers

Command API Reference / Input / Output

ListCheckDetails

Command API Reference / Input / Output

ListCheckSummaries

Command API Reference / Input / Output

ListLenses

Command API Reference / Input / Output

ListLensReviewImprovements

Command API Reference / Input / Output

ListLensReviews

Command API Reference / Input / Output

ListLensShares

Command API Reference / Input / Output

ListMilestones

Command API Reference / Input / Output

ListNotifications

Command API Reference / Input / Output

ListProfileNotifications

Command API Reference / Input / Output

ListProfiles

Command API Reference / Input / Output

ListProfileShares

Command API Reference / Input / Output

ListReviewTemplateAnswers

Command API Reference / Input / Output

ListReviewTemplates

Command API Reference / Input / Output

ListShareInvitations

Command API Reference / Input / Output

ListTagsForResource

Command API Reference / Input / Output

ListTemplateShares

Command API Reference / Input / Output

ListWorkloads

Command API Reference / Input / Output

ListWorkloadShares

Command API Reference / Input / Output

TagResource

Command API Reference / Input / Output

UntagResource

Command API Reference / Input / Output

UpdateAnswer

Command API Reference / Input / Output

UpdateGlobalSettings

Command API Reference / Input / Output

UpdateIntegration

Command API Reference / Input / Output

UpdateLensReview

Command API Reference / Input / Output

UpdateProfile

Command API Reference / Input / Output

UpdateReviewTemplate

Command API Reference / Input / Output

UpdateReviewTemplateAnswer

Command API Reference / Input / Output

UpdateReviewTemplateLensReview

Command API Reference / Input / Output

UpdateShareInvitation

Command API Reference / Input / Output

UpdateWorkload

Command API Reference / Input / Output

UpdateWorkloadShare

Command API Reference / Input / Output

UpgradeLensReview

Command API Reference / Input / Output

UpgradeProfileVersion

Command API Reference / Input / Output

UpgradeReviewTemplateLensReview

Command API Reference / Input / Output

Readme

Keywords

none

Package Sidebar

Install

npm i @aws-sdk/client-wellarchitected

Weekly Downloads

98,723

Version

3.556.0

License

Apache-2.0

Unpacked Size

1.39 MB

Total Files

347

Last publish

Collaborators

  • mattsb42-aws
  • kuhe
  • amzn-oss
  • aws-sdk-bot
  • trivikr-aws