lenses
Creates, updates, deletes, gets or lists a lenses resource.
Overview
| Name | lenses |
| Type | Resource |
| Id | aws.wellarchitected.lenses |
Fields
The following fields are returned by SELECT queries:
- list_lenses
| Name | Datatype | Description |
|---|---|---|
lens_summaries | array | List of lens summaries of available lenses. |
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_lenses | select | region | NextToken, MaxResults, LensType, LensStatus, LensName | List the available lenses. |
associate_lenses | update | workload_id, region, LensAliases | Associate a lens to a workload. Up to 10 lenses can be associated with a workload in a single API operation. A maximum of 20 lenses can be associated with a workload. Disclaimer By accessing and/or applying custom lenses created by another Amazon Web Services user or account, you acknowledge that custom lenses created by other users and shared with you are Third Party Content as defined in the Amazon Web Services Customer Agreement. | |
disassociate_lenses | exec | workload_id, region, LensAliases | Disassociate a lens from a workload. Up to 10 lenses can be disassociated from a workload in a single API operation. The Amazon Web Services Well-Architected Framework lens (wellarchitected) cannot be removed from a workload. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
workload_id | string | |
LensName | string | |
LensStatus | string | The status of lenses to be returned. |
LensType | string | The type of lenses to be returned. |
MaxResults | integer | |
NextToken | string |
SELECT examples
- list_lenses
List the available lenses.
SELECT
lens_summaries,
next_token
FROM aws.wellarchitected.lenses
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND LensType = '{{ LensType }}'
AND LensStatus = '{{ LensStatus }}'
AND LensName = '{{ LensName }}'
;
UPDATE examples
- associate_lenses
Associate a lens to a workload. Up to 10 lenses can be associated with a workload in a single API operation. A maximum of 20 lenses can be associated with a workload. Disclaimer By accessing and/or applying custom lenses created by another Amazon Web Services user or account, you acknowledge that custom lenses created by other users and shared with you are Third Party Content as defined in the Amazon Web Services Customer Agreement.
UPDATE aws.wellarchitected.lenses
SET
LensAliases = '{{ LensAliases }}'
WHERE
workload_id = '{{ workload_id }}' --required
AND region = '{{ region }}' --required
AND LensAliases = '{{ LensAliases }}' --required;
Lifecycle Methods
- disassociate_lenses
Disassociate a lens from a workload. Up to 10 lenses can be disassociated from a workload in a single API operation. The Amazon Web Services Well-Architected Framework lens (wellarchitected) cannot be removed from a workload.
EXEC aws.wellarchitected.lenses.disassociate_lenses
@workload_id='{{ workload_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"LensAliases": "{{ LensAliases }}"
}'
;