Class: AWSCDK::ComputeOptimizer::CfnAutomationRuleProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ComputeOptimizer::CfnAutomationRuleProps
- Defined in:
- compute_optimizer/cfn_automation_rule_props.rb
Overview
Properties for defining a CfnAutomationRule.
Instance Attribute Summary collapse
- #criteria ⇒ AWSCDK::IResolvable, ... readonly
-
#description ⇒ String?
readonly
The description of the automation rule.
-
#name ⇒ String
readonly
The name of the automation rule.
- #organization_configuration ⇒ AWSCDK::IResolvable, ... readonly
-
#priority ⇒ String?
readonly
Rule priority within its group.
-
#recommended_action_types ⇒ Array<String>
readonly
The types of recommended actions this rule will implement.
-
#rule_type ⇒ String
readonly
The type of automation rule.
- #schedule ⇒ AWSCDK::IResolvable, AWSCDK::ComputeOptimizer::CfnAutomationRule::ScheduleProperty readonly
-
#status ⇒ String
readonly
The status of the automation rule.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Tags associated with the automation rule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, recommended_action_types:, rule_type:, schedule:, status:, criteria: nil, description: nil, organization_configuration: nil, priority: nil, tags: nil) ⇒ CfnAutomationRuleProps
constructor
A new instance of CfnAutomationRuleProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, recommended_action_types:, rule_type:, schedule:, status:, criteria: nil, description: nil, organization_configuration: nil, priority: nil, tags: nil) ⇒ CfnAutomationRuleProps
Returns a new instance of CfnAutomationRuleProps.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 19 def initialize(name:, recommended_action_types:, rule_type:, schedule:, status:, criteria: nil, description: nil, organization_configuration: nil, priority: nil, tags: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @recommended_action_types = recommended_action_types Jsii::Type.check_type(@recommended_action_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "recommendedActionTypes") @rule_type = rule_type Jsii::Type.check_type(@rule_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleType") @schedule = schedule.is_a?(Hash) ? ::AWSCDK::ComputeOptimizer::CfnAutomationRule::ScheduleProperty.new(**schedule.transform_keys(&:to_sym)) : schedule Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb21wdXRlb3B0aW1pemVyLkNmbkF1dG9tYXRpb25SdWxlLlNjaGVkdWxlUHJvcGVydHkifV19fQ==")), "schedule") @status = status Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") @criteria = criteria.is_a?(Hash) ? ::AWSCDK::ComputeOptimizer::CfnAutomationRule::CriteriaProperty.new(**criteria.transform_keys(&:to_sym)) : criteria Jsii::Type.check_type(@criteria, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb21wdXRlb3B0aW1pemVyLkNmbkF1dG9tYXRpb25SdWxlLkNyaXRlcmlhUHJvcGVydHkifV19fQ==")), "criteria") unless @criteria.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @organization_configuration = organization_configuration.is_a?(Hash) ? ::AWSCDK::ComputeOptimizer::CfnAutomationRule::OrganizationConfigurationProperty.new(**organization_configuration.transform_keys(&:to_sym)) : organization_configuration Jsii::Type.check_type(@organization_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb21wdXRlb3B0aW1pemVyLkNmbkF1dG9tYXRpb25SdWxlLk9yZ2FuaXphdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "organizationConfiguration") unless @organization_configuration.nil? @priority = priority Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "priority") unless @priority.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
#criteria ⇒ AWSCDK::IResolvable, ... (readonly)
67 68 69 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 67 def criteria @criteria end |
#description ⇒ String? (readonly)
The description of the automation rule.
72 73 74 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 72 def description @description end |
#name ⇒ String (readonly)
The name of the automation rule.
46 47 48 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 46 def name @name end |
#organization_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
75 76 77 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 75 def organization_configuration @organization_configuration end |
#priority ⇒ String? (readonly)
Rule priority within its group.
80 81 82 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 80 def priority @priority end |
#recommended_action_types ⇒ Array<String> (readonly)
The types of recommended actions this rule will implement.
51 52 53 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 51 def recommended_action_types @recommended_action_types end |
#rule_type ⇒ String (readonly)
The type of automation rule.
56 57 58 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 56 def rule_type @rule_type end |
#schedule ⇒ AWSCDK::IResolvable, AWSCDK::ComputeOptimizer::CfnAutomationRule::ScheduleProperty (readonly)
59 60 61 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 59 def schedule @schedule end |
#status ⇒ String (readonly)
The status of the automation rule.
64 65 66 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 64 def status @status end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Tags associated with the automation rule.
85 86 87 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 85 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 87 def self.jsii_properties { :name => "name", :recommended_action_types => "recommendedActionTypes", :rule_type => "ruleType", :schedule => "schedule", :status => "status", :criteria => "criteria", :description => "description", :organization_configuration => "organizationConfiguration", :priority => "priority", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 102 def to_jsii result = {} result.merge!({ "name" => @name, "recommendedActionTypes" => @recommended_action_types, "ruleType" => @rule_type, "schedule" => @schedule, "status" => @status, "criteria" => @criteria, "description" => @description, "organizationConfiguration" => @organization_configuration, "priority" => @priority, "tags" => @tags, }) result.compact end |