Class: AWSCDK::SSM::CfnMaintenanceWindowTargetProps

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

Overview

Properties for defining a CfnMaintenanceWindowTarget.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_type:, targets:, window_id:, description: nil, name: nil, owner_information: nil) ⇒ CfnMaintenanceWindowTargetProps

Returns a new instance of CfnMaintenanceWindowTargetProps.

Parameters:

  • resource_type (String)

    The type of target that is being registered with the maintenance window.

  • targets (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::SSM::CfnMaintenanceWindowTarget::TargetsProperty>)

    The targets to register with the maintenance window.

  • window_id (String)

    The ID of the maintenance window to register the target with.

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

    A description for the target.

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

    The name for the maintenance window target.

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

    A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running tasks for these targets in this maintenance window.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'ssm/cfn_maintenance_window_target_props.rb', line 15

def initialize(resource_type:, targets:, window_id:, description: nil, name: nil, owner_information: nil)
  @resource_type = resource_type
  Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType")
  @targets = targets
  Jsii::Type.check_type(@targets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3NtLkNmbk1haW50ZW5hbmNlV2luZG93VGFyZ2V0LlRhcmdldHNQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "targets")
  @window_id = window_id
  Jsii::Type.check_type(@window_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "windowId")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @owner_information = owner_information
  Jsii::Type.check_type(@owner_information, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ownerInformation") unless @owner_information.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

A description for the target.



53
54
55
# File 'ssm/cfn_maintenance_window_target_props.rb', line 53

def description
  @description
end

#nameString? (readonly)

The name for the maintenance window target.



58
59
60
# File 'ssm/cfn_maintenance_window_target_props.rb', line 58

def name
  @name
end

#owner_informationString? (readonly)

A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running tasks for these targets in this maintenance window.



63
64
65
# File 'ssm/cfn_maintenance_window_target_props.rb', line 63

def owner_information
  @owner_information
end

#resource_typeString (readonly)

The type of target that is being registered with the maintenance window.



34
35
36
# File 'ssm/cfn_maintenance_window_target_props.rb', line 34

def resource_type
  @resource_type
end

#targetsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::SSM::CfnMaintenanceWindowTarget::TargetsProperty> (readonly)

The targets to register with the maintenance window.

In other words, the instances to run commands on when the maintenance window runs.

You must specify targets by using the WindowTargetIds parameter.



43
44
45
# File 'ssm/cfn_maintenance_window_target_props.rb', line 43

def targets
  @targets
end

#window_idString (readonly)

The ID of the maintenance window to register the target with.



48
49
50
# File 'ssm/cfn_maintenance_window_target_props.rb', line 48

def window_id
  @window_id
end

Class Method Details

.jsii_propertiesObject



65
66
67
68
69
70
71
72
73
74
# File 'ssm/cfn_maintenance_window_target_props.rb', line 65

def self.jsii_properties
  {
    :resource_type => "resourceType",
    :targets => "targets",
    :window_id => "windowId",
    :description => "description",
    :name => "name",
    :owner_information => "ownerInformation",
  }
end

Instance Method Details

#to_jsiiObject



76
77
78
79
80
81
82
83
84
85
86
87
# File 'ssm/cfn_maintenance_window_target_props.rb', line 76

def to_jsii
  result = {}
  result.merge!({
    "resourceType" => @resource_type,
    "targets" => @targets,
    "windowId" => @window_id,
    "description" => @description,
    "name" => @name,
    "ownerInformation" => @owner_information,
  })
  result.compact
end