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 | aws.chatbot.custom_actions |
Fields
Name | Datatype | Description |
---|---|---|
action_name | string | |
alias_name | string | |
attachments | array | |
custom_action_arn | string | |
definition | object | |
tags | array | |
region | string | AWS region. |
For more information, see AWS::Chatbot::CustomAction
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ActionName, Definition, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all custom_actions
in a region.
SELECT
region,
action_name,
alias_name,
attachments,
custom_action_arn,
definition,
tags
FROM aws.chatbot.custom_actions
WHERE region = 'us-east-1';
Gets all properties from an individual custom_action
.
SELECT
region,
action_name,
alias_name,
attachments,
custom_action_arn,
definition,
tags
FROM aws.chatbot.custom_actions
WHERE region = 'us-east-1' AND data__Identifier = '<CustomActionArn>';
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 aws.chatbot.custom_actions (
ActionName,
Definition,
region
)
SELECT
'{{ ActionName }}',
'{{ Definition }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.chatbot.custom_actions (
ActionName,
AliasName,
Attachments,
Definition,
Tags,
region
)
SELECT
'{{ ActionName }}',
'{{ AliasName }}',
'{{ 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: ActionName
value: '{{ ActionName }}'
- name: AliasName
value: '{{ AliasName }}'
- name: Attachments
value:
- NotificationType: '{{ NotificationType }}'
ButtonText: '{{ ButtonText }}'
Criteria:
- Operator: '{{ Operator }}'
VariableName: '{{ VariableName }}'
Value: '{{ Value }}'
Variables: {}
- name: Definition
value:
CommandText: '{{ CommandText }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
DELETE
example
/*+ delete */
DELETE FROM aws.chatbot.custom_actions
WHERE data__Identifier = '<CustomActionArn>'
AND region = 'us-east-1';
Permissions
To operate on the custom_actions
resource, the following permissions are required:
Create
chatbot:CreateCustomAction,
chatbot:GetCustomAction,
chatbot:TagResource,
chatbot:ListTagsForResource
Read
chatbot:GetCustomAction,
chatbot:ListTagsForResource
Update
chatbot:UpdateCustomAction,
chatbot:GetCustomAction,
chatbot:TagResource,
chatbot:UntagResource,
chatbot:ListTagsForResource
Delete
chatbot:DeleteCustomAction
List
chatbot:ListCustomActions