Skip to content

Create Custom Action

chatbot_create_custom_action R Documentation

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

Description

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

Usage

chatbot_create_custom_action(Definition, AliasName, Attachments, Tags,
  ClientToken, ActionName)

Arguments

Definition

[required] The definition of the command to run when invoked as an alias or as an action button.

AliasName

The name used to invoke this action in a chat channel. For example, ⁠@aws run my-alias⁠.

Attachments

Defines when this custom action button should be attached to a notification.

Tags

A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.

ClientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.

If you do not specify a client token, one is automatically generated by the SDK.

ActionName

[required] The name of the custom action. This name is included in the Amazon Resource Name (ARN).

Value

A list with the following syntax:

list(
  CustomActionArn = "string"
)

Request syntax

svc$create_custom_action(
  Definition = list(
    CommandText = "string"
  ),
  AliasName = "string",
  Attachments = list(
    list(
      NotificationType = "string",
      ButtonText = "string",
      Criteria = list(
        list(
          Operator = "HAS_VALUE"|"EQUALS",
          VariableName = "string",
          Value = "string"
        )
      ),
      Variables = list(
        "string"
      )
    )
  ),
  Tags = list(
    list(
      TagKey = "string",
      TagValue = "string"
    )
  ),
  ClientToken = "string",
  ActionName = "string"
)