Skip to main content

lens_shares

Creates, updates, deletes, gets or lists a lens_shares resource.

Overview

Namelens_shares
TypeResource
Idaws.wellarchitected.lens_shares

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
lens_share_summariesarrayA list of lens share summaries.
next_tokenstringThe token to use to retrieve the next set of results. (pattern: <code>[A-Za-z0-9+/=_-]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_lens_sharesselectlens_alias, regionSharedWithPrefix, NextToken, MaxResults, StatusList the lens shares associated with the lens.
create_lens_shareinsertlens_alias, region, SharedWith, ClientRequestTokenCreate 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.
delete_lens_sharedeleteshare_id, lens_alias, ClientRequestToken, regionDelete 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ClientRequestTokenstring
lens_aliasstring
regionstringAWS region (default: us-east-1)
share_idstring
MaxResultsintegerThe maximum number of results to return for this request.
NextTokenstring
SharedWithPrefixstringThe Amazon Web Services account ID, organization ID, or organizational unit (OU) ID with which the lens is shared.
Statusstring

SELECT examples

List the lens shares associated with the lens.

SELECT
lens_share_summaries,
next_token
FROM aws.wellarchitected.lens_shares
WHERE lens_alias = '{{ lens_alias }}' -- required
AND region = '{{ region }}' -- required
AND SharedWithPrefix = '{{ SharedWithPrefix }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND Status = '{{ Status }}'
;

INSERT examples

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.

INSERT INTO aws.wellarchitected.lens_shares (
SharedWith,
ClientRequestToken,
lens_alias,
region
)
SELECT
'{{ SharedWith }}' /* required */,
'{{ ClientRequestToken }}' /* required */,
'{{ lens_alias }}',
'{{ region }}'
RETURNING
share_id
;

DELETE examples

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.

DELETE FROM aws.wellarchitected.lens_shares
WHERE share_id = '{{ share_id }}' --required
AND lens_alias = '{{ lens_alias }}' --required
AND ClientRequestToken = '{{ ClientRequestToken }}' --required
AND region = '{{ region }}' --required
;