Class: AWSCDK::EC2::InstanceRequireImdsv2AspectProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/instance_require_imdsv2_aspect_props.rb

Overview

Properties for InstanceRequireImdsv2Aspect.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(suppress_launch_template_warning: nil, suppress_warnings: nil) ⇒ InstanceRequireImdsv2AspectProps

Returns a new instance of InstanceRequireImdsv2AspectProps.

Parameters:

  • suppress_launch_template_warning (Boolean, nil) (defaults to: nil)

    Whether warnings that would be raised when an Instance is associated with an existing Launch Template should be suppressed or not.

  • suppress_warnings (Boolean, nil) (defaults to: nil)

    Whether warning annotations from this Aspect should be suppressed or not.



9
10
11
12
13
14
# File 'ec2/instance_require_imdsv2_aspect_props.rb', line 9

def initialize(suppress_launch_template_warning: nil, suppress_warnings: nil)
  @suppress_launch_template_warning = suppress_launch_template_warning
  Jsii::Type.check_type(@suppress_launch_template_warning, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "suppressLaunchTemplateWarning") unless @suppress_launch_template_warning.nil?
  @suppress_warnings = suppress_warnings
  Jsii::Type.check_type(@suppress_warnings, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "suppressWarnings") unless @suppress_warnings.nil?
end

Instance Attribute Details

#suppress_launch_template_warningBoolean? (readonly)

Note:

Default: - false

Whether warnings that would be raised when an Instance is associated with an existing Launch Template should be suppressed or not.

You can set this to true if LaunchTemplateImdsAspect is being used alongside this Aspect to suppress false-positive warnings because any Launch Templates associated with Instances will still be covered.

Returns:

  • (Boolean, nil)


23
24
25
# File 'ec2/instance_require_imdsv2_aspect_props.rb', line 23

def suppress_launch_template_warning
  @suppress_launch_template_warning
end

#suppress_warningsBoolean? (readonly)

Note:

Default: - false

Whether warning annotations from this Aspect should be suppressed or not.

Returns:

  • (Boolean, nil)


28
29
30
# File 'ec2/instance_require_imdsv2_aspect_props.rb', line 28

def suppress_warnings
  @suppress_warnings
end

Class Method Details

.jsii_propertiesObject



30
31
32
33
34
35
# File 'ec2/instance_require_imdsv2_aspect_props.rb', line 30

def self.jsii_properties
  {
    :suppress_launch_template_warning => "suppressLaunchTemplateWarning",
    :suppress_warnings => "suppressWarnings",
  }
end

Instance Method Details

#to_jsiiObject



37
38
39
40
41
42
43
44
# File 'ec2/instance_require_imdsv2_aspect_props.rb', line 37

def to_jsii
  result = {}
  result.merge!({
    "suppressLaunchTemplateWarning" => @suppress_launch_template_warning,
    "suppressWarnings" => @suppress_warnings,
  })
  result.compact
end