Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class CreateLensShareCommandProtected

Create a lens share.

The owner of a lens can share it with other Amazon Web Services accounts, users, an organization, and organizational units (OUs) in the same Amazon Web Services Region. Lenses provided by Amazon Web Services (Amazon Web Services Official Content) cannot be shared.

Shared access to a lens is not removed until the lens invitation is deleted.

If you share a lens with an organization or OU, all accounts in the organization or OU are granted access to the lens.

For more information, see Sharing a custom lens in the Well-Architected Tool User Guide.

Disclaimer

By sharing your custom lenses with other Amazon Web Services accounts, you acknowledge that Amazon Web Services will make your custom lenses available to those other accounts. Those other accounts may continue to access and use your shared custom lenses even if you delete the custom lenses from your own Amazon Web Services account or terminate your Amazon Web Services account.

Example

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

import { WellArchitectedClient, CreateLensShareCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import
// const { WellArchitectedClient, CreateLensShareCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import
const client = new WellArchitectedClient(config);
const input = { // CreateLensShareInput
LensAlias: "STRING_VALUE", // required
SharedWith: "STRING_VALUE", // required
ClientRequestToken: "STRING_VALUE", // required
};
const command = new CreateLensShareCommand(input);
const response = await client.send(command);
// { // CreateLensShareOutput
// ShareId: "STRING_VALUE",
// };

Param

CreateLensShareCommandInput

Returns

CreateLensShareCommandOutput

See

Throws

AccessDeniedException (client fault)

User does not have sufficient access to perform this action.

Throws

ConflictException (client fault)

The resource has already been processed, was deleted, or is too large.

Throws

InternalServerException (server fault)

There is a problem with the Well-Architected Tool API service.

Throws

ResourceNotFoundException (client fault)

The requested resource was not found.

Throws

ServiceQuotaExceededException (client fault)

The user has reached their resource quota.

Throws

ThrottlingException (client fault)

Request was denied due to request throttling.

Throws

ValidationException (client fault)

The user input is not valid.

Throws

WellArchitectedServiceException

Base exception class for all service exceptions from WellArchitected service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods