CfnCustomActionProps Struct
Properties for defining a CfnCustomAction.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_chatbot as chatbot } from 'aws-cdk-lib';
const cfnCustomActionProps: chatbot.CfnCustomActionProps = {
actionName: 'actionName',
definition: {
commandText: 'commandText',
},
// the properties below are optional
aliasName: 'aliasName',
attachments: [{
buttonText: 'buttonText',
criteria: [{
operator: 'operator',
variableName: 'variableName',
// the properties below are optional
value: 'value',
}],
notificationType: 'notificationType',
variables: {
variablesKey: 'variables',
},
}],
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_chatbot as chatbot
cfn_custom_action_props = chatbot.CfnCustomActionProps(
action_name="actionName",
definition=chatbot.CfnCustomAction.CustomActionDefinitionProperty(
command_text="commandText"
),
# the properties below are optional
alias_name="aliasName",
attachments=[chatbot.CfnCustomAction.CustomActionAttachmentProperty(
button_text="buttonText",
criteria=[chatbot.CfnCustomAction.CustomActionAttachmentCriteriaProperty(
operator="operator",
variable_name="variableName",
# the properties below are optional
value="value"
)],
notification_type="notificationType",
variables={
"variables_key": "variables"
}
)],
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.chatbot.*;
CfnCustomActionProps cfnCustomActionProps = CfnCustomActionProps.builder()
.actionName("actionName")
.definition(CustomActionDefinitionProperty.builder()
.commandText("commandText")
.build())
// the properties below are optional
.aliasName("aliasName")
.attachments(List.of(CustomActionAttachmentProperty.builder()
.buttonText("buttonText")
.criteria(List.of(CustomActionAttachmentCriteriaProperty.builder()
.operator("operator")
.variableName("variableName")
// the properties below are optional
.value("value")
.build()))
.notificationType("notificationType")
.variables(Map.of(
"variablesKey", "variables"))
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Chatbot;
var cfnCustomActionProps = new CfnCustomActionProps {
ActionName = "actionName",
Definition = new CustomActionDefinitionProperty {
CommandText = "commandText"
},
// the properties below are optional
AliasName = "aliasName",
Attachments = new [] { new CustomActionAttachmentProperty {
ButtonText = "buttonText",
Criteria = new [] { new CustomActionAttachmentCriteriaProperty {
Operator = "operator",
VariableName = "variableName",
// the properties below are optional
Value = "value"
} },
NotificationType = "notificationType",
Variables = new Dictionary<string, string> {
{ "variablesKey", "variables" }
}
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnCustomActionProps := &CfnCustomActionProps{
ActionName: jsii.String("actionName"),
Definition: &CustomActionDefinitionProperty{
CommandText: jsii.String("commandText"),
},
// the properties below are optional
AliasName: jsii.String("aliasName"),
Attachments: []interface{}{
&CustomActionAttachmentProperty{
ButtonText: jsii.String("buttonText"),
Criteria: []interface{}{
&CustomActionAttachmentCriteriaProperty{
Operator: jsii.String("operator"),
VariableName: jsii.String("variableName"),
// the properties below are optional
Value: jsii.String("value"),
},
},
NotificationType: jsii.String("notificationType"),
Variables: map[string]*string{
"variablesKey": jsii.String("variables"),
},
},
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
The name of the custom action.
This name is included in the Amazon Resource Name (ARN).
aliasNameoptionalstringalias_nameoptionalstraliasNameoptionalStringAliasNameoptionalstringAliasNameoptional*string #The name used to invoke this action in a chat channel.
For example, @Amazon Q run my-alias .
attachmentsoptionalIResolvable | IResolvable | CfnCustomAction.attachmentsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CustomActionAttachmentProperty]]]attachmentsoptionalIResolvableAttachmentsoptionalIResolvableAttachmentsoptionalinterface{} #Defines when this custom action button should be attached to a notification.
definitionIResolvable | CfnCustomAction.definitiontyping.Union[IResolvable, CustomActionDefinitionProperty]definitionIResolvableDefinitionIResolvableDefinitioninterface{} required #The definition of the command to run when invoked as an alias or as an action button.