Class: AWSCDK::Chatbot::CfnCustomActionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Chatbot::CfnCustomActionProps
- Defined in:
- chatbot/cfn_custom_action_props.rb
Overview
Properties for defining a CfnCustomAction.
Instance Attribute Summary collapse
-
#action_name ⇒ String
readonly
The name of the custom action.
-
#alias_name ⇒ String?
readonly
The name used to invoke this action in a chat channel.
-
#attachments ⇒ AWSCDK::IResolvable, ...
readonly
Defines when this custom action button should be attached to a notification.
-
#definition ⇒ AWSCDK::IResolvable, AWSCDK::Chatbot::CfnCustomAction::CustomActionDefinitionProperty
readonly
The definition of the command to run when invoked as an alias or as an action button.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags to add to the configuration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action_name:, definition:, alias_name: nil, attachments: nil, tags: nil) ⇒ CfnCustomActionProps
constructor
A new instance of CfnCustomActionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action_name:, definition:, alias_name: nil, attachments: nil, tags: nil) ⇒ CfnCustomActionProps
Returns a new instance of CfnCustomActionProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'chatbot/cfn_custom_action_props.rb', line 14 def initialize(action_name:, definition:, alias_name: nil, attachments: nil, tags: nil) @action_name = action_name Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName") @definition = definition.is_a?(Hash) ? ::AWSCDK::Chatbot::CfnCustomAction::CustomActionDefinitionProperty.new(**definition.transform_keys(&:to_sym)) : definition Jsii::Type.check_type(@definition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jaGF0Ym90LkNmbkN1c3RvbUFjdGlvbi5DdXN0b21BY3Rpb25EZWZpbml0aW9uUHJvcGVydHkifV19fQ==")), "definition") @alias_name = alias_name Jsii::Type.check_type(@alias_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "aliasName") unless @alias_name.nil? @attachments = Jsii::Type.check_type(@attachments, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2hhdGJvdC5DZm5DdXN0b21BY3Rpb24uQ3VzdG9tQWN0aW9uQXR0YWNobWVudFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "attachments") unless @attachments.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#action_name ⇒ String (readonly)
The name of the custom action.
This name is included in the Amazon Resource Name (ARN).
33 34 35 |
# File 'chatbot/cfn_custom_action_props.rb', line 33 def action_name @action_name end |
#alias_name ⇒ String? (readonly)
The name used to invoke this action in a chat channel.
For example, @Amazon Q run my-alias .
45 46 47 |
# File 'chatbot/cfn_custom_action_props.rb', line 45 def alias_name @alias_name end |
#attachments ⇒ AWSCDK::IResolvable, ... (readonly)
Defines when this custom action button should be attached to a notification.
50 51 52 |
# File 'chatbot/cfn_custom_action_props.rb', line 50 def @attachments end |
#definition ⇒ AWSCDK::IResolvable, AWSCDK::Chatbot::CfnCustomAction::CustomActionDefinitionProperty (readonly)
The definition of the command to run when invoked as an alias or as an action button.
38 39 40 |
# File 'chatbot/cfn_custom_action_props.rb', line 38 def definition @definition end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags to add to the configuration.
55 56 57 |
# File 'chatbot/cfn_custom_action_props.rb', line 55 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'chatbot/cfn_custom_action_props.rb', line 57 def self.jsii_properties { :action_name => "actionName", :definition => "definition", :alias_name => "aliasName", :attachments => "attachments", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 |
# File 'chatbot/cfn_custom_action_props.rb', line 67 def to_jsii result = {} result.merge!({ "actionName" => @action_name, "definition" => @definition, "aliasName" => @alias_name, "attachments" => @attachments, "tags" => @tags, }) result.compact end |