Class: AWSCDK::ComputeOptimizer::CfnAutomationRule::ScheduleProperty

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

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution_window_in_minutes: nil, schedule_expression: nil, schedule_expression_timezone: nil) ⇒ ScheduleProperty

Returns a new instance of ScheduleProperty.

Parameters:

  • execution_window_in_minutes (Numeric, nil) (defaults to: nil)

    Execution window duration in minutes.

  • schedule_expression (String, nil) (defaults to: nil)

    Schedule expression (e.g., cron or rate expression).

  • schedule_expression_timezone (String, nil) (defaults to: nil)

    IANA timezone identifier.



911
912
913
914
915
916
917
918
# File 'compute_optimizer/cfn_automation_rule.rb', line 911

def initialize(execution_window_in_minutes: nil, schedule_expression: nil, schedule_expression_timezone: nil)
  @execution_window_in_minutes = execution_window_in_minutes
  Jsii::Type.check_type(@execution_window_in_minutes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "executionWindowInMinutes") unless @execution_window_in_minutes.nil?
  @schedule_expression = schedule_expression
  Jsii::Type.check_type(@schedule_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpression") unless @schedule_expression.nil?
  @schedule_expression_timezone = schedule_expression_timezone
  Jsii::Type.check_type(@schedule_expression_timezone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpressionTimezone") unless @schedule_expression_timezone.nil?
end

Instance Attribute Details

#execution_window_in_minutesNumeric? (readonly)

Execution window duration in minutes.



924
925
926
# File 'compute_optimizer/cfn_automation_rule.rb', line 924

def execution_window_in_minutes
  @execution_window_in_minutes
end

#schedule_expressionString? (readonly)

Schedule expression (e.g., cron or rate expression).



929
930
931
# File 'compute_optimizer/cfn_automation_rule.rb', line 929

def schedule_expression
  @schedule_expression
end

#schedule_expression_timezoneString? (readonly)

IANA timezone identifier.



934
935
936
# File 'compute_optimizer/cfn_automation_rule.rb', line 934

def schedule_expression_timezone
  @schedule_expression_timezone
end

Class Method Details

.jsii_propertiesObject



936
937
938
939
940
941
942
# File 'compute_optimizer/cfn_automation_rule.rb', line 936

def self.jsii_properties
  {
    :execution_window_in_minutes => "executionWindowInMinutes",
    :schedule_expression => "scheduleExpression",
    :schedule_expression_timezone => "scheduleExpressionTimezone",
  }
end

Instance Method Details

#to_jsiiObject



944
945
946
947
948
949
950
951
952
# File 'compute_optimizer/cfn_automation_rule.rb', line 944

def to_jsii
  result = {}
  result.merge!({
    "executionWindowInMinutes" => @execution_window_in_minutes,
    "scheduleExpression" => @schedule_expression,
    "scheduleExpressionTimezone" => @schedule_expression_timezone,
  })
  result.compact
end