Class: AWSCDK::Redshift::CfnScheduledActionProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
redshift/cfn_scheduled_action_props.rb

Overview

Properties for defining a CfnScheduledAction.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scheduled_action_name:, enable: nil, end_time: nil, iam_role: nil, schedule: nil, scheduled_action_description: nil, start_time: nil, target_action: nil) ⇒ CfnScheduledActionProps

Returns a new instance of CfnScheduledActionProps.

Parameters:

  • scheduled_action_name (String)

    The name of the scheduled action.

  • enable (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    If true, the schedule is enabled.

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

    The end time in UTC when the schedule is no longer active.

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

    The IAM role to assume to run the scheduled action.

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

    The schedule for a one-time (at format) or recurring (cron format) scheduled action.

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

    The description of the scheduled action.

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

    The start time in UTC when the schedule is active.

  • target_action (AWSCDK::IResolvable, AWSCDK::Redshift::CfnScheduledAction::ScheduledActionTypeProperty, nil) (defaults to: nil)

    A JSON format string of the Amazon Redshift API operation with input parameters.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'redshift/cfn_scheduled_action_props.rb', line 17

def initialize(scheduled_action_name:, enable: nil, end_time: nil, iam_role: nil, schedule: nil, scheduled_action_description: nil, start_time: nil, target_action: nil)
  @scheduled_action_name = scheduled_action_name
  Jsii::Type.check_type(@scheduled_action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduledActionName")
  @enable = enable
  Jsii::Type.check_type(@enable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enable") unless @enable.nil?
  @end_time = end_time
  Jsii::Type.check_type(@end_time, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endTime") unless @end_time.nil?
  @iam_role = iam_role
  Jsii::Type.check_type(@iam_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "iamRole") unless @iam_role.nil?
  @schedule = schedule
  Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schedule") unless @schedule.nil?
  @scheduled_action_description = scheduled_action_description
  Jsii::Type.check_type(@scheduled_action_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduledActionDescription") unless @scheduled_action_description.nil?
  @start_time = start_time
  Jsii::Type.check_type(@start_time, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startTime") unless @start_time.nil?
  @target_action = target_action.is_a?(Hash) ? ::AWSCDK::Redshift::CfnScheduledAction::ScheduledActionTypeProperty.new(**target_action.transform_keys(&:to_sym)) : target_action
  Jsii::Type.check_type(@target_action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19yZWRzaGlmdC5DZm5TY2hlZHVsZWRBY3Rpb24uU2NoZWR1bGVkQWN0aW9uVHlwZVByb3BlcnR5In1dfX0=")), "targetAction") unless @target_action.nil?
end

Instance Attribute Details

#enableBoolean, ... (readonly)

If true, the schedule is enabled.

If false, the scheduled action does not trigger. For more information about state of the scheduled action, see ScheduledAction .



47
48
49
# File 'redshift/cfn_scheduled_action_props.rb', line 47

def enable
  @enable
end

#end_timeString? (readonly)

The end time in UTC when the schedule is no longer active.

After this time, the scheduled action does not trigger.



54
55
56
# File 'redshift/cfn_scheduled_action_props.rb', line 54

def end_time
  @end_time
end

#iam_roleString? (readonly)

The IAM role to assume to run the scheduled action.

This IAM role must have permission to run the Amazon Redshift API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide .



61
62
63
# File 'redshift/cfn_scheduled_action_props.rb', line 61

def iam_role
  @iam_role
end

#scheduleString? (readonly)

The schedule for a one-time (at format) or recurring (cron format) scheduled action.

Schedule invocations must be separated by at least one hour.

Format of at expressions is " at(yyyy-mm-ddThh:mm:ss) ". For example, " at(2016-03-04T17:27:00) ".

Format of cron expressions is " cron(Minutes Hours Day-of-month Month Day-of-week Year) ". For example, " cron(0 10 ? * MON *) ". For more information, see Cron Expressions in the Amazon CloudWatch Events User Guide .



72
73
74
# File 'redshift/cfn_scheduled_action_props.rb', line 72

def schedule
  @schedule
end

#scheduled_action_descriptionString? (readonly)

The description of the scheduled action.



77
78
79
# File 'redshift/cfn_scheduled_action_props.rb', line 77

def scheduled_action_description
  @scheduled_action_description
end

#scheduled_action_nameString (readonly)

The name of the scheduled action.



40
41
42
# File 'redshift/cfn_scheduled_action_props.rb', line 40

def scheduled_action_name
  @scheduled_action_name
end

#start_timeString? (readonly)

The start time in UTC when the schedule is active.

Before this time, the scheduled action does not trigger.



84
85
86
# File 'redshift/cfn_scheduled_action_props.rb', line 84

def start_time
  @start_time
end

#target_actionAWSCDK::IResolvable, ... (readonly)

A JSON format string of the Amazon Redshift API operation with input parameters.

" {\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}} ".



91
92
93
# File 'redshift/cfn_scheduled_action_props.rb', line 91

def target_action
  @target_action
end

Class Method Details

.jsii_propertiesObject



93
94
95
96
97
98
99
100
101
102
103
104
# File 'redshift/cfn_scheduled_action_props.rb', line 93

def self.jsii_properties
  {
    :scheduled_action_name => "scheduledActionName",
    :enable => "enable",
    :end_time => "endTime",
    :iam_role => "iamRole",
    :schedule => "schedule",
    :scheduled_action_description => "scheduledActionDescription",
    :start_time => "startTime",
    :target_action => "targetAction",
  }
end

Instance Method Details

#to_jsiiObject



106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'redshift/cfn_scheduled_action_props.rb', line 106

def to_jsii
  result = {}
  result.merge!({
    "scheduledActionName" => @scheduled_action_name,
    "enable" => @enable,
    "endTime" => @end_time,
    "iamRole" => @iam_role,
    "schedule" => @schedule,
    "scheduledActionDescription" => @scheduled_action_description,
    "startTime" => @start_time,
    "targetAction" => @target_action,
  })
  result.compact
end