custom_actions
Creates, updates, deletes or gets a custom_action resource or lists custom_actions in a region
Overview
| Name | custom_actions |
| Type | Resource |
| Description | Definition of AWS::Chatbot::CustomAction Resource Type |
| Id | awscc.chatbot.custom_actions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
action_name | string | |
alias_name | string | |
attachments | array | |
custom_action_arn | string | |
definition | object | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
custom_action_arn | string | |
region | string | AWS region. |
For more information, see AWS::Chatbot::CustomAction.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | custom_actions | INSERT | ActionName, Definition, region |
delete_resource | custom_actions | DELETE | Identifier, region |
update_resource | custom_actions | UPDATE | Identifier, PatchDocument, region |
list_resources | custom_actions_list_only | SELECT | region |
get_resource | custom_actions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual custom_action.
SELECT
region,
action_name,
alias_name,
attachments,
custom_action_arn,
definition,
tags
FROM awscc.chatbot.custom_actions
WHERE
region = 'us-east-1' AND
Identifier = '{{ custom_action_arn }}';
Lists all custom_actions in a region.
SELECT
region,
custom_action_arn
FROM awscc.chatbot.custom_actions_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new custom_action resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.chatbot.custom_actions (
ActionName,
Definition,
region
)
SELECT
'{{ action_name }}',
'{{ definition }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.chatbot.custom_actions (
ActionName,
AliasName,
Attachments,
Definition,
Tags,
region
)
SELECT
'{{ action_name }}',
'{{ alias_name }}',
'{{ attachments }}',
'{{ definition }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: custom_action
props:
- name: action_name
value: '{{ action_name }}'
- name: alias_name
value: '{{ alias_name }}'
- name: attachments
value:
- notification_type: '{{ notification_type }}'
button_text: '{{ button_text }}'
criteria:
- operator: '{{ operator }}'
variable_name: '{{ variable_name }}'
value: '{{ value }}'
variables: {}
- name: definition
value:
command_text: '{{ command_text }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
UPDATE example
Use the following StackQL query and manifest file to update a custom_action resource, using stack-deploy.
/*+ update */
UPDATE awscc.chatbot.custom_actions
SET PatchDocument = string('{{ {
"AliasName": alias_name,
"Attachments": attachments,
"Definition": definition,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ custom_action_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.chatbot.custom_actions
WHERE
Identifier = '{{ custom_action_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the custom_actions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
chatbot:CreateCustomAction,
chatbot:GetCustomAction,
chatbot:TagResource,
chatbot:ListTagsForResource
chatbot:GetCustomAction,
chatbot:ListTagsForResource
chatbot:UpdateCustomAction,
chatbot:GetCustomAction,
chatbot:TagResource,
chatbot:UntagResource,
chatbot:ListTagsForResource
chatbot:DeleteCustomAction
chatbot:ListCustomActions