profiles
Creates, updates, deletes or gets a profile resource or lists profiles in a region
Overview
| Name | profiles |
| Type | Resource |
| Description | Definition of AWS::B2BI::Profile Resource Type |
| Id | awscc.b2bi.profiles |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
business_name | string | |
created_at | string | |
email | string | |
log_group_name | string | |
logging | string | |
modified_at | string | |
name | string | |
phone | string | |
profile_arn | string | |
profile_id | string | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
profile_id | string | |
region | string | AWS region. |
For more information, see AWS::B2BI::Profile.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | profiles | INSERT | BusinessName, Logging, Name, Phone, region |
delete_resource | profiles | DELETE | Identifier, region |
update_resource | profiles | UPDATE | Identifier, PatchDocument, region |
list_resources | profiles_list_only | SELECT | region |
get_resource | profiles | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual profile.
SELECT
region,
business_name,
created_at,
email,
log_group_name,
logging,
modified_at,
name,
phone,
profile_arn,
profile_id,
tags
FROM awscc.b2bi.profiles
WHERE
region = 'us-east-1' AND
Identifier = '{{ profile_id }}';
Lists all profiles in a region.
SELECT
region,
profile_id
FROM awscc.b2bi.profiles_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new profile resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.b2bi.profiles (
BusinessName,
Logging,
Name,
Phone,
region
)
SELECT
'{{ business_name }}',
'{{ logging }}',
'{{ name }}',
'{{ phone }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.b2bi.profiles (
BusinessName,
Email,
Logging,
Name,
Phone,
Tags,
region
)
SELECT
'{{ business_name }}',
'{{ email }}',
'{{ logging }}',
'{{ name }}',
'{{ phone }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: profile
props:
- name: business_name
value: '{{ business_name }}'
- name: email
value: '{{ email }}'
- name: logging
value: '{{ logging }}'
- name: name
value: '{{ name }}'
- name: phone
value: '{{ phone }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a profile resource, using stack-deploy.
/*+ update */
UPDATE awscc.b2bi.profiles
SET PatchDocument = string('{{ {
"BusinessName": business_name,
"Email": email,
"Name": name,
"Phone": phone,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ profile_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.b2bi.profiles
WHERE
Identifier = '{{ profile_id }}' AND
region = 'us-east-1';
Permissions
To operate on the profiles resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
b2bi:CreateProfile,
b2bi:TagResource,
logs:CreateLogDelivery,
logs:CreateLogGroup,
logs:CreateLogStream,
logs:DescribeLogGroups,
logs:DescribeLogStreams,
logs:DescribeResourcePolicies,
logs:ListLogDeliveries,
logs:PutLogEvents,
logs:PutResourcePolicy
b2bi:GetProfile,
b2bi:ListTagsForResource
b2bi:TagResource,
b2bi:UntagResource,
b2bi:UpdateProfile
b2bi:DeleteProfile,
logs:DeleteLogDelivery,
logs:ListLogDeliveries
b2bi:ListProfiles