Skip to main content

answers

Creates, updates, deletes, gets or lists an answers resource.

Overview

Nameanswers
TypeResource
Idaws.wellarchitected.answers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
answerobjectAn answer of the question.
lens_aliasstringThe alias of the lens. For Amazon Web Services official lenses, this is either the lens alias, such as serverless, or the lens ARN, such as arn:aws:wellarchitected:us-east-1::lens/serverless. Note that some operations (such as ExportLens and CreateLensShare) are not permitted on Amazon Web Services official lenses. For custom lenses, this is the lens ARN, such as arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef. Each lens is identified by its LensSummary$LensAlias.
lens_arnstringThe ARN for the lens.
milestone_numberintegerThe milestone number. A workload can have a maximum of 100 milestones.
workload_idstringThe ID assigned to the workload. This ID is unique within an Amazon Web Services Region. (pattern: <code>[0-9a-f]{32}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_answerselectworkload_id, lens_alias, question_id, regionMilestoneNumberGet the answer to a specific question in a workload review.
list_answersselectworkload_id, lens_alias, regionPillarId, MilestoneNumber, NextToken, MaxResults, QuestionPriorityList of answers for a particular workload and lens.
update_answerupdateworkload_id, lens_alias, question_id, regionUpdate the answer to a specific question in a workload review.

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
lens_aliasstring
question_idstring
regionstringAWS region (default: us-east-1)
workload_idstring
MaxResultsintegerThe maximum number of results to return for this request.
MilestoneNumberinteger
NextTokenstring
PillarIdstring
QuestionPrioritystringThe priority of the question.

SELECT examples

Get the answer to a specific question in a workload review.

SELECT
answer,
lens_alias,
lens_arn,
milestone_number,
workload_id
FROM aws.wellarchitected.answers
WHERE workload_id = '{{ workload_id }}' -- required
AND lens_alias = '{{ lens_alias }}' -- required
AND question_id = '{{ question_id }}' -- required
AND region = '{{ region }}' -- required
AND MilestoneNumber = '{{ MilestoneNumber }}'
;

UPDATE examples

Update the answer to a specific question in a workload review.

UPDATE aws.wellarchitected.answers
SET
SelectedChoices = '{{ SelectedChoices }}',
ChoiceUpdates = '{{ ChoiceUpdates }}',
Notes = '{{ Notes }}',
IsApplicable = {{ IsApplicable }},
Reason = '{{ Reason }}'
WHERE
workload_id = '{{ workload_id }}' --required
AND lens_alias = '{{ lens_alias }}' --required
AND question_id = '{{ question_id }}' --required
AND region = '{{ region }}' --required
RETURNING
answer,
lens_alias,
lens_arn,
workload_id;