profiles
Creates, updates, deletes, gets or lists a profiles resource.
Overview
| Name | profiles |
| Type | Resource |
| Id | aws.wellarchitected.profiles |
Fields
The following fields are returned by SELECT queries:
- get_profile
- list_profiles
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time when the profile was created. |
owner | string | An Amazon Web Services account ID. (pattern: <code>[0-9]{12}</code>) |
profile_arn | string | The profile ARN. (pattern: <code>arn:aws[-a-z]*:wellarchitected:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:profile/[a-z0-9]+</code>) |
profile_description | string | The profile description. |
profile_name | string | The profile name. |
profile_questions | array | Profile questions. |
profile_version | string | The profile version. (pattern: <code>[A-Za-z0-9-]+</code>) |
share_invitation_id | string | The ID assigned to the share invitation. (pattern: <code>[0-9a-f]{32}</code>) |
tags | object | The tags assigned to the profile. |
updated_at | string (date-time) | The date and time when the profile was last updated. |
| Name | Datatype | Description |
|---|---|---|
next_token | string | The token to use to retrieve the next set of results. (pattern: <code>[A-Za-z0-9+/=_-]+</code>) |
profile_summaries | array | Profile summaries. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_profile | select | profile_arn, region | ProfileVersion | Get profile information. |
list_profiles | select | region | ProfileNamePrefix, ProfileOwnerType, NextToken, MaxResults | List profiles. |
create_profile | insert | region, ProfileName, ProfileDescription, ProfileQuestions, ClientRequestToken | Create a profile. | |
associate_profiles | update | workload_id, region, ProfileArns | Associate a profile with a workload. | |
update_profile | update | profile_arn, region | Update a profile. | |
delete_profile | delete | profile_arn, ClientRequestToken, region | Delete a profile. Disclaimer By sharing your profile with other Amazon Web Services accounts, you acknowledge that Amazon Web Services will make your profile available to those other accounts. Those other accounts may continue to access and use your shared profile even if you delete the profile from your own Amazon Web Services account or terminate your Amazon Web Services account. | |
disassociate_profiles | exec | workload_id, region, ProfileArns | Disassociate a profile 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 |
|---|---|---|
ClientRequestToken | string | |
profile_arn | string | The profile ARN. |
region | string | AWS region (default: us-east-1) |
workload_id | string | |
MaxResults | integer | |
NextToken | string | |
ProfileNamePrefix | string | An optional string added to the beginning of each profile name returned in the results. |
ProfileOwnerType | string | Profile owner type. |
ProfileVersion | string | The profile version. |
SELECT examples
- get_profile
- list_profiles
Get profile information.
SELECT
created_at,
owner,
profile_arn,
profile_description,
profile_name,
profile_questions,
profile_version,
share_invitation_id,
tags,
updated_at
FROM aws.wellarchitected.profiles
WHERE profile_arn = '{{ profile_arn }}' -- required
AND region = '{{ region }}' -- required
AND ProfileVersion = '{{ ProfileVersion }}'
;
List profiles.
SELECT
next_token,
profile_summaries
FROM aws.wellarchitected.profiles
WHERE region = '{{ region }}' -- required
AND ProfileNamePrefix = '{{ ProfileNamePrefix }}'
AND ProfileOwnerType = '{{ ProfileOwnerType }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;
INSERT examples
- create_profile
- Manifest
Create a profile.
INSERT INTO aws.wellarchitected.profiles (
ProfileName,
ProfileDescription,
ProfileQuestions,
ClientRequestToken,
Tags,
region
)
SELECT
'{{ ProfileName }}' /* required */,
'{{ ProfileDescription }}' /* required */,
'{{ ProfileQuestions }}' /* required */,
'{{ ClientRequestToken }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
profile_arn,
profile_version
;
# Description fields are for documentation purposes
- name: profiles
props:
- name: region
value: "{{ region }}"
description: Required parameter for the profiles resource.
- name: ProfileName
value: "{{ ProfileName }}"
- name: ProfileDescription
value: "{{ ProfileDescription }}"
- name: ProfileQuestions
value:
- QuestionId: "{{ QuestionId }}"
SelectedChoiceIds: "{{ SelectedChoiceIds }}"
- 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 }}"
UPDATE examples
- associate_profiles
- update_profile
Associate a profile with a workload.
UPDATE aws.wellarchitected.profiles
SET
ProfileArns = '{{ ProfileArns }}'
WHERE
workload_id = '{{ workload_id }}' --required
AND region = '{{ region }}' --required
AND ProfileArns = '{{ ProfileArns }}' --required;
Update a profile.
UPDATE aws.wellarchitected.profiles
SET
ProfileDescription = '{{ ProfileDescription }}',
ProfileQuestions = '{{ ProfileQuestions }}'
WHERE
profile_arn = '{{ profile_arn }}' --required
AND region = '{{ region }}' --required
RETURNING
profile;
DELETE examples
- delete_profile
Delete a profile. Disclaimer By sharing your profile with other Amazon Web Services accounts, you acknowledge that Amazon Web Services will make your profile available to those other accounts. Those other accounts may continue to access and use your shared profile even if you delete the profile from your own Amazon Web Services account or terminate your Amazon Web Services account.
DELETE FROM aws.wellarchitected.profiles
WHERE profile_arn = '{{ profile_arn }}' --required
AND ClientRequestToken = '{{ ClientRequestToken }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- disassociate_profiles
Disassociate a profile from a workload.
EXEC aws.wellarchitected.profiles.disassociate_profiles
@workload_id='{{ workload_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"ProfileArns": "{{ ProfileArns }}"
}'
;