Class: AWSCDK::IoT::CfnMitigationActionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoT::CfnMitigationActionProps
- Defined in:
- io_t/cfn_mitigation_action_props.rb
Overview
Properties for defining a CfnMitigationAction.
Instance Attribute Summary collapse
-
#action_name ⇒ String?
readonly
The friendly name of the mitigation action.
-
#action_params ⇒ AWSCDK::IResolvable, AWSCDK::IoT::CfnMitigationAction::ActionParamsProperty
readonly
The set of parameters for this mitigation action.
-
#role_arn ⇒ String
readonly
The IAM role ARN used to apply this mitigation action.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Metadata that can be used to manage the mitigation action.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action_params:, role_arn:, action_name: nil, tags: nil) ⇒ CfnMitigationActionProps
constructor
A new instance of CfnMitigationActionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action_params:, role_arn:, action_name: nil, tags: nil) ⇒ CfnMitigationActionProps
Returns a new instance of CfnMitigationActionProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'io_t/cfn_mitigation_action_props.rb', line 13 def initialize(action_params:, role_arn:, action_name: nil, tags: nil) @action_params = action_params.is_a?(Hash) ? ::AWSCDK::IoT::CfnMitigationAction::ActionParamsProperty.new(**action_params.transform_keys(&:to_sym)) : action_params Jsii::Type.check_type(@action_params, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuTWl0aWdhdGlvbkFjdGlvbi5BY3Rpb25QYXJhbXNQcm9wZXJ0eSJ9XX19")), "actionParams") @role_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") @action_name = action_name Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName") unless @action_name.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 friendly name of the mitigation action.
40 41 42 |
# File 'io_t/cfn_mitigation_action_props.rb', line 40 def action_name @action_name end |
#action_params ⇒ AWSCDK::IResolvable, AWSCDK::IoT::CfnMitigationAction::ActionParamsProperty (readonly)
The set of parameters for this mitigation action.
The parameters vary, depending on the kind of action you apply.
30 31 32 |
# File 'io_t/cfn_mitigation_action_props.rb', line 30 def action_params @action_params end |
#role_arn ⇒ String (readonly)
The IAM role ARN used to apply this mitigation action.
35 36 37 |
# File 'io_t/cfn_mitigation_action_props.rb', line 35 def role_arn @role_arn end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Metadata that can be used to manage the mitigation action.
45 46 47 |
# File 'io_t/cfn_mitigation_action_props.rb', line 45 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'io_t/cfn_mitigation_action_props.rb', line 47 def self.jsii_properties { :action_params => "actionParams", :role_arn => "roleArn", :action_name => "actionName", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
56 57 58 59 60 61 62 63 64 65 |
# File 'io_t/cfn_mitigation_action_props.rb', line 56 def to_jsii result = {} result.merge!({ "actionParams" => @action_params, "roleArn" => @role_arn, "actionName" => @action_name, "tags" => @tags, }) result.compact end |