Skip to main content

lenses

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

Overview

Namelenses
TypeResource
Idaws.wellarchitected.lenses

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
lens_summariesarrayList of lens summaries of available lenses.
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_lensesselectregionNextToken, MaxResults, LensType, LensStatus, LensNameList the available lenses.
associate_lensesupdateworkload_id, region, LensAliasesAssociate 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_lensesexecworkload_id, region, LensAliasesDisassociate 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
workload_idstring
LensNamestring
LensStatusstringThe status of lenses to be returned.
LensTypestringThe type of lenses to be returned.
MaxResultsinteger
NextTokenstring

SELECT examples

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 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 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 }}"
}'
;