2024/11/22 - AWS Chatbot - 8 new api methods
Changes Adds support for programmatic management of custom actions and aliases which can be associated with channel configurations.
Lists custom actions defined in this account.
See also: AWS API Documentation
Request Syntax
client.list_custom_actions( MaxResults=123, NextToken='string' )
integer
The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
string
An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
dict
Response Syntax
{ 'CustomActions': [ 'string', ], 'NextToken': 'string' }
Response Structure
(dict) --
CustomActions (list) --
A list of custom actions.
(string) --
NextToken (string) --
An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
Updates a custom action.
See also: AWS API Documentation
Request Syntax
client.update_custom_action( CustomActionArn='string', Definition={ 'CommandText': 'string' }, AliasName='string', Attachments=[ { 'NotificationType': 'string', 'ButtonText': 'string', 'Criteria': [ { 'Operator': 'HAS_VALUE'|'EQUALS', 'VariableName': 'string', 'Value': 'string' }, ], 'Variables': { 'string': 'string' } }, ] )
string
[REQUIRED]
The fully defined Amazon Resource Name (ARN) of the custom action.
dict
[REQUIRED]
The definition of the command to run when invoked as an alias or as an action button.
CommandText (string) -- [REQUIRED]
The command string to run which may include variables by prefixing with a dollar sign ($).
string
The name used to invoke this action in the chat channel. For example, @aws run my-alias.
list
Defines when this custom action button should be attached to a notification.
(dict) --
Defines when a custom action button should be attached to a notification.
NotificationType (string) --
The type of notification that the custom action should be attached to.
ButtonText (string) --
The text of the button that appears on the notification.
Criteria (list) --
The criteria for when a button should be shown based on values in the notification.
(dict) --
A criteria for when a button should be shown based on values in the notification
Operator (string) -- [REQUIRED]
The operation to perform on the named variable.
VariableName (string) -- [REQUIRED]
The name of the variable to operate on.
Value (string) --
A value that is compared with the actual value of the variable based on the behavior of the operator.
Variables (dict) --
The variables to extract from the notification.
(string) --
(string) --
dict
Response Syntax
{ 'CustomActionArn': 'string' }
Response Structure
(dict) --
CustomActionArn (string) --
The fully defined ARN of the custom action.
Returns a custom action.
See also: AWS API Documentation
Request Syntax
client.get_custom_action( CustomActionArn='string' )
string
[REQUIRED]
Returns the fully defined Amazon Resource Name (ARN) of the custom action.
dict
Response Syntax
{ 'CustomAction': { 'CustomActionArn': 'string', 'Definition': { 'CommandText': 'string' }, 'AliasName': 'string', 'Attachments': [ { 'NotificationType': 'string', 'ButtonText': 'string', 'Criteria': [ { 'Operator': 'HAS_VALUE'|'EQUALS', 'VariableName': 'string', 'Value': 'string' }, ], 'Variables': { 'string': 'string' } }, ], 'ActionName': 'string' } }
Response Structure
(dict) --
CustomAction (dict) --
Returns the custom action.
CustomActionArn (string) --
The fully defined Amazon Resource Name (ARN) of the custom action.
Definition (dict) --
The definition of the command to run when invoked an alias or as an action button.
CommandText (string) --
The command string to run which may include variables by prefixing with a dollar sign ($).
AliasName (string) --
The name used to invoke this action in the chat channel. For example, @aws run my-alias.
Attachments (list) --
Defines when this custom action button should be attached to a notification.
(dict) --
Defines when a custom action button should be attached to a notification.
NotificationType (string) --
The type of notification that the custom action should be attached to.
ButtonText (string) --
The text of the button that appears on the notification.
Criteria (list) --
The criteria for when a button should be shown based on values in the notification.
(dict) --
A criteria for when a button should be shown based on values in the notification
Operator (string) --
The operation to perform on the named variable.
VariableName (string) --
The name of the variable to operate on.
Value (string) --
A value that is compared with the actual value of the variable based on the behavior of the operator.
Variables (dict) --
The variables to extract from the notification.
(string) --
(string) --
ActionName (string) --
The name of the custom action that is included in the ARN.
Deletes a custom action.
See also: AWS API Documentation
Request Syntax
client.delete_custom_action( CustomActionArn='string' )
string
[REQUIRED]
The fully defined ARN of the custom action.
dict
Response Syntax
{}
Response Structure
(dict) --
Unlink a resource, for example a custom action, from a channel configuration.
See also: AWS API Documentation
Request Syntax
client.disassociate_from_configuration( Resource='string', ChatConfiguration='string' )
string
[REQUIRED]
The resource (for example, a custom action) Amazon Resource Name (ARN) to unlink.
string
[REQUIRED]
The channel configuration the resource is being disassociated from.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a custom action that can be invoked as an alias or as a button on a notification.
See also: AWS API Documentation
Request Syntax
client.create_custom_action( Definition={ 'CommandText': 'string' }, AliasName='string', Attachments=[ { 'NotificationType': 'string', 'ButtonText': 'string', 'Criteria': [ { 'Operator': 'HAS_VALUE'|'EQUALS', 'VariableName': 'string', 'Value': 'string' }, ], 'Variables': { 'string': 'string' } }, ], Tags=[ { 'TagKey': 'string', 'TagValue': 'string' }, ], ClientToken='string', ActionName='string' )
dict
[REQUIRED]
The definition of the command to run when invoked as an alias or as an action button.
CommandText (string) -- [REQUIRED]
The command string to run which may include variables by prefixing with a dollar sign ($).
string
The name used to invoke this action in a chat channel. For example, @aws run my-alias.
list
Defines when this custom action button should be attached to a notification.
(dict) --
Defines when a custom action button should be attached to a notification.
NotificationType (string) --
The type of notification that the custom action should be attached to.
ButtonText (string) --
The text of the button that appears on the notification.
Criteria (list) --
The criteria for when a button should be shown based on values in the notification.
(dict) --
A criteria for when a button should be shown based on values in the notification
Operator (string) -- [REQUIRED]
The operation to perform on the named variable.
VariableName (string) -- [REQUIRED]
The name of the variable to operate on.
Value (string) --
A value that is compared with the actual value of the variable based on the behavior of the operator.
Variables (dict) --
The variables to extract from the notification.
(string) --
(string) --
list
A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
(dict) --
A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.
For more information, see User-Defined Tag Restrictions in the AWS Billing and Cost Management User Guide.
TagKey (string) -- [REQUIRED]
The key of the tag.
TagValue (string) -- [REQUIRED]
The value of the tag.
string
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.
This field is autopopulated if not provided.
string
[REQUIRED]
The name of the custom action. This name is included in the Amazon Resource Name (ARN).
dict
Response Syntax
{ 'CustomActionArn': 'string' }
Response Structure
(dict) --
CustomActionArn (string) --
The fully defined ARN of the custom action.
Links a resource (for example, a custom action) to a channel configuration.
See also: AWS API Documentation
Request Syntax
client.associate_to_configuration( Resource='string', ChatConfiguration='string' )
string
[REQUIRED]
The resource Amazon Resource Name (ARN) to link.
string
[REQUIRED]
The channel configuration to associate with the resource.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists resources associated with a channel configuration.
See also: AWS API Documentation
Request Syntax
client.list_associations( ChatConfiguration='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The channel configuration to list associations for.
integer
The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
string
An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
dict
Response Syntax
{ 'Associations': [ { 'Resource': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Associations (list) --
The resources associated with this channel configuration.
(dict) --
A listing of an association with a channel configuration.
Resource (string) --
The Amazon Resource Name (ARN) of the resource (for example, a custom action).
NextToken (string) --
An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.