Skip to main content

workloads

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

Overview​

Nameworkloads
TypeResource
Idaws.wellarchitected.workloads

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idsarrayThe list of Amazon Web Services account IDs associated with the workload.
applicationsarrayList of AppRegistry application ARNs associated to the workload.
architectural_designstringThe URL of the architectural design for the workload. (pattern: <code>(|(https?|ftp)://[^\s/$.?#].[^\s]*)</code>)
aws_regionsarrayThe list of Amazon Web Services Regions associated with the workload, for example, us-east-2, or ca-central-1.
descriptionstringThe description for the workload.
discovery_configobjectDiscovery configuration associated to the workload.
environmentstringThe environment for the workload. (PRODUCTION, PREPRODUCTION)
improvement_statusstringThe improvement status for a workload. (NOT_APPLICABLE, NOT_STARTED, IN_PROGRESS, COMPLETE, RISK_ACKNOWLEDGED)
industrystringThe industry for the workload.
industry_typestringThe industry type for the workload. If specified, must be one of the following: Agriculture Automobile Defense Design and Engineering Digital Advertising Education Environmental Protection Financial Services Gaming General Public Services Healthcare Hospitality InfoTech Justice and Public Safety Life Sciences Manufacturing Media & Entertainment Mining & Resources Oil & Gas Power & Utilities Professional Services Real Estate & Construction Retail & Wholesale Social Protection Telecommunications Travel, Transportation & Logistics Other
is_review_owner_update_acknowledgedbooleanFlag indicating whether the workload owner has acknowledged that the Review owner field is required. If a Review owner is not added to the workload within 60 days of acknowledgement, access to the workload is restricted until an owner is added.
jira_configurationobjectJira configuration for a specific workload.
lensesarrayThe list of lenses associated with the workload. Each lens is identified by its LensSummary$LensAlias. If a review template that specifies lenses is applied to the workload, those lenses are applied to the workload in addition to these lenses.
non_aws_regionsarrayThe list of non-Amazon Web Services Regions associated with the workload.
notesstringThe notes associated with the workload. For a review template, these are the notes that will be associated with the workload when the template is applied.
ownerstringAn Amazon Web Services account ID. (pattern: <code>[0-9]{12}</code>)
pillar_prioritiesarrayThe priorities of the pillars, which are used to order items in the improvement plan. Each pillar is represented by its PillarReviewSummary$PillarId.
prioritized_risk_countsobject
profilesarrayProfile associated with a workload.
review_ownerstringThe review owner of the workload. The name, email address, or identifier for the primary group or individual that owns the workload review process.
review_restriction_datestring (date-time)The review restriction date for the workload.
risk_countsobject
share_invitation_idstringThe ID assigned to the share invitation. (pattern: <code>[0-9a-f]{32}</code>)
tagsobjectThe tags associated with the workload.
updated_atstring (date-time)The date and time when the workload was last updated.
workload_arnstringThe ARN for the workload.
workload_idstringThe ID assigned to the workload. This ID is unique within an Amazon Web Services Region. (pattern: <code>[0-9a-f]{32}</code>)
workload_namestringThe name of the workload. The name must be unique within an account within an Amazon Web Services Region. Spaces and capitalization are ignored when checking for uniqueness.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_workloadselectworkload_id, regionGet an existing workload.
list_workloadsselectregionPaginated list of workloads.
create_workloadinsertregion, WorkloadName, Description, Environment, Lenses, ClientRequestTokenCreate a new workload. The owner of a workload can share the workload with other Amazon Web Services accounts, users, an organization, and organizational units (OUs) in the same Amazon Web Services Region. Only the owner of a workload can delete it. For more information, see Defining a Workload in the Well-Architected Tool User Guide. Either AwsRegions, NonAwsRegions, or both must be specified when creating a workload. You also must specify ReviewOwner, even though the parameter is listed as not being required in the following section. When creating a workload using a review template, you must have the following IAM permissions: wellarchitected:GetReviewTemplate wellarchitected:GetReviewTemplateAnswer wellarchitected:ListReviewTemplateAnswers wellarchitected:GetReviewTemplateLensReview
update_integrationupdateworkload_id, region, ClientRequestToken, IntegratingServiceUpdate integration features.
update_workloadupdateworkload_id, regionUpdate an existing workload.
delete_workloaddeleteworkload_id, ClientRequestToken, regionDelete an existing workload.
upgrade_profile_versionexecworkload_id, profile_arn, regionUpgrade a profile.

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
profile_arnstringThe profile ARN.
regionstringAWS region (default: us-east-1)
workload_idstring

SELECT examples​

Get an existing workload.

SELECT
account_ids,
applications,
architectural_design,
aws_regions,
description,
discovery_config,
environment,
improvement_status,
industry,
industry_type,
is_review_owner_update_acknowledged,
jira_configuration,
lenses,
non_aws_regions,
notes,
owner,
pillar_priorities,
prioritized_risk_counts,
profiles,
review_owner,
review_restriction_date,
risk_counts,
share_invitation_id,
tags,
updated_at,
workload_arn,
workload_id,
workload_name
FROM aws.wellarchitected.workloads
WHERE workload_id = '{{ workload_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Create a new workload. The owner of a workload can share the workload with other Amazon Web Services accounts, users, an organization, and organizational units (OUs) in the same Amazon Web Services Region. Only the owner of a workload can delete it. For more information, see Defining a Workload in the Well-Architected Tool User Guide. Either AwsRegions, NonAwsRegions, or both must be specified when creating a workload. You also must specify ReviewOwner, even though the parameter is listed as not being required in the following section. When creating a workload using a review template, you must have the following IAM permissions: wellarchitected:GetReviewTemplate wellarchitected:GetReviewTemplateAnswer wellarchitected:ListReviewTemplateAnswers wellarchitected:GetReviewTemplateLensReview

INSERT INTO aws.wellarchitected.workloads (
WorkloadName,
Description,
Environment,
AccountIds,
AwsRegions,
NonAwsRegions,
PillarPriorities,
ArchitecturalDesign,
ReviewOwner,
IndustryType,
Industry,
Lenses,
Notes,
ClientRequestToken,
Tags,
DiscoveryConfig,
Applications,
ProfileArns,
ReviewTemplateArns,
JiraConfiguration,
region
)
SELECT
'{{ WorkloadName }}' /* required */,
'{{ Description }}' /* required */,
'{{ Environment }}' /* required */,
'{{ AccountIds }}',
'{{ AwsRegions }}',
'{{ NonAwsRegions }}',
'{{ PillarPriorities }}',
'{{ ArchitecturalDesign }}',
'{{ ReviewOwner }}',
'{{ IndustryType }}',
'{{ Industry }}',
'{{ Lenses }}' /* required */,
'{{ Notes }}',
'{{ ClientRequestToken }}' /* required */,
'{{ Tags }}',
'{{ DiscoveryConfig }}',
'{{ Applications }}',
'{{ ProfileArns }}',
'{{ ReviewTemplateArns }}',
'{{ JiraConfiguration }}',
'{{ region }}'
RETURNING
workload_arn,
workload_id
;

UPDATE examples​

Update integration features.

UPDATE aws.wellarchitected.workloads
SET
ClientRequestToken = '{{ ClientRequestToken }}',
IntegratingService = '{{ IntegratingService }}'
WHERE
workload_id = '{{ workload_id }}' --required
AND region = '{{ region }}' --required
AND ClientRequestToken = '{{ ClientRequestToken }}' --required
AND IntegratingService = '{{ IntegratingService }}' --required;

DELETE examples​

Delete an existing workload.

DELETE FROM aws.wellarchitected.workloads
WHERE workload_id = '{{ workload_id }}' --required
AND ClientRequestToken = '{{ ClientRequestToken }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods​

Upgrade a profile.

EXEC aws.wellarchitected.workloads.upgrade_profile_version
@workload_id='{{ workload_id }}' --required,
@profile_arn='{{ profile_arn }}' --required,
@region='{{ region }}' --required
@@json=
'{
"MilestoneName": "{{ MilestoneName }}",
"ClientRequestToken": "{{ ClientRequestToken }}"
}'
;