Skip to main content

custom_actions

Creates, updates, deletes or gets a custom_action resource or lists custom_actions in a region

Overview

Namecustom_actions
TypeResource
DescriptionDefinition of AWS::Chatbot::CustomAction Resource Type
Idawscc.chatbot.custom_actions

Fields

NameDatatypeDescription
action_namestring
alias_namestring
attachmentsarray
custom_action_arnstring
definitionobject
tagsarray
regionstringAWS region.

For more information, see AWS::Chatbot::CustomAction.

Methods

NameResourceAccessible byRequired Params
create_resourcecustom_actionsINSERTActionName, Definition, region
delete_resourcecustom_actionsDELETEIdentifier, region
update_resourcecustom_actionsUPDATEIdentifier, PatchDocument, region
list_resourcescustom_actions_list_onlySELECTregion
get_resourcecustom_actionsSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new custom_action resource, using stack-deploy.

/*+ 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
;

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:

ParameterDescription
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:

chatbot:CreateCustomAction,
chatbot:GetCustomAction,
chatbot:TagResource,
chatbot:ListTagsForResource