lens_shares
Creates, updates, deletes, gets or lists a lens_shares resource.
Overview
| Name | lens_shares |
| Type | Resource |
| Id | aws.wellarchitected.lens_shares |
Fields
The following fields are returned by SELECT queries:
- list_lens_shares
| Name | Datatype | Description |
|---|---|---|
lens_share_summaries | array | A list of lens share summaries. |
next_token | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_lens_shares | select | lens_alias, region | SharedWithPrefix, NextToken, MaxResults, Status | List the lens shares associated with the lens. |
create_lens_share | insert | lens_alias, region, SharedWith, ClientRequestToken | 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. | |
delete_lens_share | delete | share_id, lens_alias, ClientRequestToken, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
ClientRequestToken | string | |
lens_alias | string | |
region | string | AWS region (default: us-east-1) |
share_id | string | |
MaxResults | integer | The maximum number of results to return for this request. |
NextToken | string | |
SharedWithPrefix | string | The Amazon Web Services account ID, organization ID, or organizational unit (OU) ID with which the lens is shared. |
Status | string |
SELECT examples
- list_lens_shares
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_lens_share
- Manifest
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
;
# Description fields are for documentation purposes
- name: lens_shares
props:
- name: lens_alias
value: "{{ lens_alias }}"
description: Required parameter for the lens_shares resource.
- name: region
value: "{{ region }}"
description: Required parameter for the lens_shares resource.
- name: SharedWith
value: "{{ SharedWith }}"
description: |
The Amazon Web Services account ID, organization ID, or organizational unit (OU) ID with which the workload, lens, profile, or review template is shared.
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
description: |
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.
DELETE examples
- delete_lens_share
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
;