workloads
Creates, updates, deletes, gets or lists a workloads resource.
Overview
| Name | workloads |
| Type | Resource |
| Id | aws.wellarchitected.workloads |
Fields
The following fields are returned by SELECT queries:
- get_workload
- list_workloads
| Name | Datatype | Description |
|---|---|---|
account_ids | array | The list of Amazon Web Services account IDs associated with the workload. |
applications | array | List of AppRegistry application ARNs associated to the workload. |
architectural_design | string | The URL of the architectural design for the workload. (pattern: <code>(|(https?|ftp)://[^\s/$.?#].[^\s]*)</code>) |
aws_regions | array | The list of Amazon Web Services Regions associated with the workload, for example, us-east-2, or ca-central-1. |
description | string | The description for the workload. |
discovery_config | object | Discovery configuration associated to the workload. |
environment | string | The environment for the workload. (PRODUCTION, PREPRODUCTION) |
improvement_status | string | The improvement status for a workload. (NOT_APPLICABLE, NOT_STARTED, IN_PROGRESS, COMPLETE, RISK_ACKNOWLEDGED) |
industry | string | The industry for the workload. |
industry_type | string | The 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_acknowledged | boolean | Flag 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_configuration | object | Jira configuration for a specific workload. |
lenses | array | The 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_regions | array | The list of non-Amazon Web Services Regions associated with the workload. |
notes | string | The 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. |
owner | string | An Amazon Web Services account ID. (pattern: <code>[0-9]{12}</code>) |
pillar_priorities | array | The priorities of the pillars, which are used to order items in the improvement plan. Each pillar is represented by its PillarReviewSummary$PillarId. |
prioritized_risk_counts | object | |
profiles | array | Profile associated with a workload. |
review_owner | string | The 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_date | string (date-time) | The review restriction date for the workload. |
risk_counts | object | |
share_invitation_id | string | The ID assigned to the share invitation. (pattern: <code>[0-9a-f]{32}</code>) |
tags | object | The tags associated with the workload. |
updated_at | string (date-time) | The date and time when the workload was last updated. |
workload_arn | string | The ARN for the workload. |
workload_id | string | The ID assigned to the workload. This ID is unique within an Amazon Web Services Region. (pattern: <code>[0-9a-f]{32}</code>) |
workload_name | string | The 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. |
| Name | Datatype | Description |
|---|---|---|
next_token | string | The token to use to retrieve the next set of results. (pattern: <code>[A-Za-z0-9+/=_-]+</code>) |
workload_summaries | array | A list of workload summaries. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workload | select | workload_id, region | Get an existing workload. | |
list_workloads | select | region | Paginated list of workloads. | |
create_workload | insert | region, WorkloadName, Description, Environment, Lenses, ClientRequestToken | 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 | |
update_integration | update | workload_id, region, ClientRequestToken, IntegratingService | Update integration features. | |
update_workload | update | workload_id, region | Update an existing workload. | |
delete_workload | delete | workload_id, ClientRequestToken, region | Delete an existing workload. | |
upgrade_profile_version | exec | workload_id, profile_arn, region | Upgrade 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.
| Name | Datatype | Description |
|---|---|---|
ClientRequestToken | string | |
profile_arn | string | The profile ARN. |
region | string | AWS region (default: us-east-1) |
workload_id | string |
SELECT examples
- get_workload
- list_workloads
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
;
Paginated list of workloads.
SELECT
next_token,
workload_summaries
FROM aws.wellarchitected.workloads
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_workload
- Manifest
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
;
# Description fields are for documentation purposes
- name: workloads
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workloads resource.
- name: WorkloadName
value: "{{ WorkloadName }}"
description: |
The 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.
- name: Description
value: "{{ Description }}"
description: |
The description for the workload.
- name: Environment
value: "{{ Environment }}"
description: |
The environment for the workload.
valid_values: ['PRODUCTION', 'PREPRODUCTION']
- name: AccountIds
value:
- "{{ AccountIds }}"
description: |
The list of Amazon Web Services account IDs associated with the workload.
- name: AwsRegions
value:
- "{{ AwsRegions }}"
description: |
The list of Amazon Web Services Regions associated with the workload, for example, us-east-2, or ca-central-1.
- name: NonAwsRegions
value:
- "{{ NonAwsRegions }}"
description: |
The list of non-Amazon Web Services Regions associated with the workload.
- name: PillarPriorities
value:
- "{{ PillarPriorities }}"
description: |
The priorities of the pillars, which are used to order items in the improvement plan. Each pillar is represented by its PillarReviewSummary$PillarId.
- name: ArchitecturalDesign
value: "{{ ArchitecturalDesign }}"
description: |
The URL of the architectural design for the workload.
- name: ReviewOwner
value: "{{ ReviewOwner }}"
description: |
The review owner of the workload. The name, email address, or identifier for the primary group or individual that owns the workload review process.
- name: IndustryType
value: "{{ IndustryType }}"
description: |
The 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
- name: Industry
value: "{{ Industry }}"
description: |
The industry for the workload.
- name: Lenses
value:
- "{{ Lenses }}"
description: |
The 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.
- name: Notes
value: "{{ Notes }}"
description: |
The 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.
- 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.
- name: Tags
value: "{{ Tags }}"
- name: DiscoveryConfig
description: |
Discovery configuration associated to the workload.
value:
TrustedAdvisorIntegrationStatus: "{{ TrustedAdvisorIntegrationStatus }}"
WorkloadResourceDefinition:
- "{{ WorkloadResourceDefinition }}"
- name: Applications
value:
- "{{ Applications }}"
- name: ProfileArns
value:
- "{{ ProfileArns }}"
- name: ReviewTemplateArns
value:
- "{{ ReviewTemplateArns }}"
- name: JiraConfiguration
description: |
Workload-level: Input for the Jira configuration.
value:
IssueManagementStatus: "{{ IssueManagementStatus }}"
IssueManagementType: "{{ IssueManagementType }}"
JiraProjectKey: "{{ JiraProjectKey }}"
UPDATE examples
- update_integration
- update_workload
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;
Update an existing workload.
UPDATE aws.wellarchitected.workloads
SET
WorkloadName = '{{ WorkloadName }}',
Description = '{{ Description }}',
Environment = '{{ Environment }}',
AccountIds = '{{ AccountIds }}',
AwsRegions = '{{ AwsRegions }}',
NonAwsRegions = '{{ NonAwsRegions }}',
PillarPriorities = '{{ PillarPriorities }}',
ArchitecturalDesign = '{{ ArchitecturalDesign }}',
ReviewOwner = '{{ ReviewOwner }}',
IsReviewOwnerUpdateAcknowledged = {{ IsReviewOwnerUpdateAcknowledged }},
IndustryType = '{{ IndustryType }}',
Industry = '{{ Industry }}',
Notes = '{{ Notes }}',
ImprovementStatus = '{{ ImprovementStatus }}',
DiscoveryConfig = '{{ DiscoveryConfig }}',
Applications = '{{ Applications }}',
JiraConfiguration = '{{ JiraConfiguration }}'
WHERE
workload_id = '{{ workload_id }}' --required
AND region = '{{ region }}' --required
RETURNING
workload;
DELETE examples
- delete_workload
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_profile_version
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 }}"
}'
;