Class: AWSCDK::SSM::CfnMaintenanceWindowProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ssm/cfn_maintenance_window_props.rb

Overview

Properties for defining a CfnMaintenanceWindow.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_unassociated_targets:, cutoff:, duration:, name:, schedule:, description: nil, end_date: nil, schedule_offset: nil, schedule_timezone: nil, start_date: nil, tags: nil) ⇒ CfnMaintenanceWindowProps

Returns a new instance of CfnMaintenanceWindowProps.

Parameters:

  • allow_unassociated_targets (Boolean, AWSCDK::IResolvable)

    Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.

  • cutoff (Numeric)

    The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.

  • duration (Numeric)

    The duration of the maintenance window in hours.

  • name (String)

    The name of the maintenance window.

  • schedule (String)

    The schedule of the maintenance window in the form of a cron or rate expression.

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

    A description of the maintenance window.

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

    The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.

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

    The number of days to wait to run a maintenance window after the scheduled cron expression date and time.

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

    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.

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

    The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'ssm/cfn_maintenance_window_props.rb', line 20

def initialize(allow_unassociated_targets:, cutoff:, duration:, name:, schedule:, description: nil, end_date: nil, schedule_offset: nil, schedule_timezone: nil, start_date: nil, tags: nil)
  @allow_unassociated_targets = allow_unassociated_targets
  Jsii::Type.check_type(@allow_unassociated_targets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allowUnassociatedTargets")
  @cutoff = cutoff
  Jsii::Type.check_type(@cutoff, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cutoff")
  @duration = duration
  Jsii::Type.check_type(@duration, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "duration")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @schedule = schedule
  Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schedule")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @end_date = end_date
  Jsii::Type.check_type(@end_date, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endDate") unless @end_date.nil?
  @schedule_offset = schedule_offset
  Jsii::Type.check_type(@schedule_offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scheduleOffset") unless @schedule_offset.nil?
  @schedule_timezone = schedule_timezone
  Jsii::Type.check_type(@schedule_timezone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleTimezone") unless @schedule_timezone.nil?
  @start_date = start_date
  Jsii::Type.check_type(@start_date, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startDate") unless @start_date.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

#allow_unassociated_targetsBoolean, AWSCDK::IResolvable (readonly)

Enables a maintenance window task to run on managed instances, even if you have not registered those instances as targets.

If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the maintenance window.



51
52
53
# File 'ssm/cfn_maintenance_window_props.rb', line 51

def allow_unassociated_targets
  @allow_unassociated_targets
end

#cutoffNumeric (readonly)

The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.



56
57
58
# File 'ssm/cfn_maintenance_window_props.rb', line 56

def cutoff
  @cutoff
end

#descriptionString? (readonly)

A description of the maintenance window.



76
77
78
# File 'ssm/cfn_maintenance_window_props.rb', line 76

def description
  @description
end

#durationNumeric (readonly)

The duration of the maintenance window in hours.



61
62
63
# File 'ssm/cfn_maintenance_window_props.rb', line 61

def duration
  @duration
end

#end_dateString? (readonly)

The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.



81
82
83
# File 'ssm/cfn_maintenance_window_props.rb', line 81

def end_date
  @end_date
end

#nameString (readonly)

The name of the maintenance window.



66
67
68
# File 'ssm/cfn_maintenance_window_props.rb', line 66

def name
  @name
end

#scheduleString (readonly)

The schedule of the maintenance window in the form of a cron or rate expression.



71
72
73
# File 'ssm/cfn_maintenance_window_props.rb', line 71

def schedule
  @schedule
end

#schedule_offsetNumeric? (readonly)

The number of days to wait to run a maintenance window after the scheduled cron expression date and time.



86
87
88
# File 'ssm/cfn_maintenance_window_props.rb', line 86

def schedule_offset
  @schedule_offset
end

#schedule_timezoneString? (readonly)

The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.



91
92
93
# File 'ssm/cfn_maintenance_window_props.rb', line 91

def schedule_timezone
  @schedule_timezone
end

#start_dateString? (readonly)

The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.

StartDate allows you to delay activation of the maintenance window until the specified future date.



98
99
100
# File 'ssm/cfn_maintenance_window_props.rb', line 98

def start_date
  @start_date
end

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

Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).

Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in.



105
106
107
# File 'ssm/cfn_maintenance_window_props.rb', line 105

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'ssm/cfn_maintenance_window_props.rb', line 107

def self.jsii_properties
  {
    :allow_unassociated_targets => "allowUnassociatedTargets",
    :cutoff => "cutoff",
    :duration => "duration",
    :name => "name",
    :schedule => "schedule",
    :description => "description",
    :end_date => "endDate",
    :schedule_offset => "scheduleOffset",
    :schedule_timezone => "scheduleTimezone",
    :start_date => "startDate",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'ssm/cfn_maintenance_window_props.rb', line 123

def to_jsii
  result = {}
  result.merge!({
    "allowUnassociatedTargets" => @allow_unassociated_targets,
    "cutoff" => @cutoff,
    "duration" => @duration,
    "name" => @name,
    "schedule" => @schedule,
    "description" => @description,
    "endDate" => @end_date,
    "scheduleOffset" => @schedule_offset,
    "scheduleTimezone" => @schedule_timezone,
    "startDate" => @start_date,
    "tags" => @tags,
  })
  result.compact
end