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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.chatbot.custom_actions (
ActionName,
AliasName,
Attachments,
Definition,
Tags,
region
)
SELECT
'{{ action_name }}',
'{{ alias_name }}',
'{{ attachments }}',
'{{ definition }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.chatbot.custom_actions
WHERE
Identifier = '{{ custom_action_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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