Class: AWSCDK::ComputeOptimizer::CfnAutomationRuleProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
compute_optimizer/cfn_automation_rule_props.rb

Overview

Properties for defining a CfnAutomationRule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:



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 = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the automation rule.



72
73
74
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 72

def description
  @description
end

#nameString (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_configurationAWSCDK::IResolvable, ... (readonly)



75
76
77
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 75

def organization_configuration
  @organization_configuration
end

#priorityString? (readonly)

Rule priority within its group.



80
81
82
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 80

def priority
  @priority
end

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_typeString (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

#statusString (readonly)

The status of the automation rule.



64
65
66
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 64

def status
  @status
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Tags associated with the automation rule.



85
86
87
# File 'compute_optimizer/cfn_automation_rule_props.rb', line 85

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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