- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteLensShareCommand
Delete a lens share.
After the lens share is deleted, Amazon Web Services accounts, users, organizations, and organizational units (OUs) that you shared the lens with can continue to use it, but they will no longer be able to apply it to new workloads.
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 Syntax
Use a bare-bones client and the command you need to make an API call.
import { WellArchitectedClient, DeleteLensShareCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import
// const { WellArchitectedClient, DeleteLensShareCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import
const client = new WellArchitectedClient(config);
const input = { // DeleteLensShareInput
ShareId: "STRING_VALUE", // required
LensAlias: "STRING_VALUE", // required
ClientRequestToken: "STRING_VALUE", // required
};
const command = new DeleteLensShareCommand(input);
const response = await client.send(command);
// {};
DeleteLensShareCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
LensAlias Required | string | undefined | The alias of the lens. For Amazon Web Services official lenses, this is either the lens alias, such as For custom lenses, this is the lens ARN, such as Each lens is identified by its LensSummary$LensAlias. |
ShareId Required | string | undefined | The ID associated with the share. |
ClientRequestToken | string | undefined | A unique case-sensitive string used to ensure that this request is idempotent (executes only once). You should not reuse the same token for other requests. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned. This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, you must provide this token or the request will fail. |
DeleteLensShareCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | User does not have sufficient access to perform this action. |
ConflictException | client | The resource has already been processed, was deleted, or is too large. |
InternalServerException | server | There is a problem with the Well-Architected Tool API service. |
ResourceNotFoundException | client | The requested resource was not found. |
ThrottlingException | client | Request was denied due to request throttling. |
ValidationException | client | The user input is not valid. |
WellArchitectedServiceException | Base exception class for all service exceptions from WellArchitected service. |