Class: AWSCDK::EC2::SecurityGroupImportOptions

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

Overview

Additional options for imported security groups.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_all_ipv6_outbound: nil, allow_all_outbound: nil, mutable: nil) ⇒ SecurityGroupImportOptions

Returns a new instance of SecurityGroupImportOptions.

Parameters:

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

    Mark the SecurityGroup as having been created allowing all outbound ipv6 traffic.

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

    Mark the SecurityGroup as having been created allowing all outbound traffic.

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

    If a SecurityGroup is mutable CDK can add rules to existing groups.



10
11
12
13
14
15
16
17
# File 'ec2/security_group_import_options.rb', line 10

def initialize(allow_all_ipv6_outbound: nil, allow_all_outbound: nil, mutable: nil)
  @allow_all_ipv6_outbound = allow_all_ipv6_outbound
  Jsii::Type.check_type(@allow_all_ipv6_outbound, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowAllIpv6Outbound") unless @allow_all_ipv6_outbound.nil?
  @allow_all_outbound = allow_all_outbound
  Jsii::Type.check_type(@allow_all_outbound, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowAllOutbound") unless @allow_all_outbound.nil?
  @mutable = mutable
  Jsii::Type.check_type(@mutable, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "mutable") unless @mutable.nil?
end

Instance Attribute Details

#allow_all_ipv6_outboundBoolean? (readonly)

Note:

Default: false

Mark the SecurityGroup as having been created allowing all outbound ipv6 traffic.

Only if this is set to false will egress rules for ipv6 be added to this security group. Be aware, this would undo any potential "all outbound traffic" default.

Returns:

  • (Boolean, nil)


27
28
29
# File 'ec2/security_group_import_options.rb', line 27

def allow_all_ipv6_outbound
  @allow_all_ipv6_outbound
end

#allow_all_outboundBoolean? (readonly)

Note:

Default: true

Mark the SecurityGroup as having been created allowing all outbound traffic.

Only if this is set to false will egress rules be added to this security group. Be aware, this would undo any potential "all outbound traffic" default.

Returns:

  • (Boolean, nil)


36
37
38
# File 'ec2/security_group_import_options.rb', line 36

def allow_all_outbound
  @allow_all_outbound
end

#mutableBoolean? (readonly)

Note:

Default: true

If a SecurityGroup is mutable CDK can add rules to existing groups.

Beware that making a SecurityGroup immutable might lead to issue due to missing ingress/egress rules for new resources.

Returns:

  • (Boolean, nil)


44
45
46
# File 'ec2/security_group_import_options.rb', line 44

def mutable
  @mutable
end

Class Method Details

.jsii_propertiesObject



46
47
48
49
50
51
52
# File 'ec2/security_group_import_options.rb', line 46

def self.jsii_properties
  {
    :allow_all_ipv6_outbound => "allowAllIpv6Outbound",
    :allow_all_outbound => "allowAllOutbound",
    :mutable => "mutable",
  }
end

Instance Method Details

#to_jsiiObject



54
55
56
57
58
59
60
61
62
# File 'ec2/security_group_import_options.rb', line 54

def to_jsii
  result = {}
  result.merge!({
    "allowAllIpv6Outbound" => @allow_all_ipv6_outbound,
    "allowAllOutbound" => @allow_all_outbound,
    "mutable" => @mutable,
  })
  result.compact
end