Skip to main content

custom_actions

Creates, updates, deletes, gets or lists a custom_actions resource.

Overview

Namecustom_actions
TypeResource
Idaws.chatbot.custom_actions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
action_namestringThe name of the custom action that is included in the ARN. (pattern: <code>[a-zA-Z0-9_-]{1,64}</code>)
alias_namestringThe name used to invoke this action in the chat channel. For example, @aws run my-alias. (pattern: <code>[A-Za-z0-9-_]+</code>)
attachmentsarrayDefines when this custom action button should be attached to a notification.
custom_action_arnstringThe fully defined Amazon Resource Name (ARN) of the custom action. (pattern: <code>arn:aws:chatbot:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:custom-action/[a-zA-Z0-9_-]{1,64}</code>)
definitionobjectThe definition of the command to run when invoked as an alias or as an action button.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_custom_actionselectregionReturns a custom action.
list_custom_actionsselectregionLists custom actions defined in this account.
create_custom_actioninsertregion, Definition, ActionNameCreates a custom action that can be invoked as an alias or as a button on a notification.
update_custom_actionupdateregion, CustomActionArn, DefinitionUpdates a custom action.
delete_custom_actiondeleteregionDeletes a custom action.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a custom action.

SELECT
action_name,
alias_name,
attachments,
custom_action_arn,
definition
FROM aws.chatbot.custom_actions
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a custom action that can be invoked as an alias or as a button on a notification.

INSERT INTO aws.chatbot.custom_actions (
Definition,
AliasName,
Attachments,
Tags,
ClientToken,
ActionName,
region
)
SELECT
'{{ Definition }}' /* required */,
'{{ AliasName }}',
'{{ Attachments }}',
'{{ Tags }}',
'{{ ClientToken }}',
'{{ ActionName }}' /* required */,
'{{ region }}'
RETURNING
custom_action_arn
;

UPDATE examples

Updates a custom action.

UPDATE aws.chatbot.custom_actions
SET
CustomActionArn = '{{ CustomActionArn }}',
Definition = '{{ Definition }}',
AliasName = '{{ AliasName }}',
Attachments = '{{ Attachments }}'
WHERE
region = '{{ region }}' --required
AND CustomActionArn = '{{ CustomActionArn }}' --required
AND Definition = '{{ Definition }}' --required
RETURNING
custom_action_arn;

DELETE examples

Deletes a custom action.

DELETE FROM aws.chatbot.custom_actions
WHERE region = '{{ region }}' --required
;