Class: AWSCDK::EC2::CfnVPCBlockPublicAccessExclusionProps

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

Overview

Properties for defining a CfnVPCBlockPublicAccessExclusion.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(internet_gateway_exclusion_mode:, subnet_id: nil, tags: nil, vpc_id: nil) ⇒ CfnVPCBlockPublicAccessExclusionProps

Returns a new instance of CfnVPCBlockPublicAccessExclusionProps.

Parameters:

  • internet_gateway_exclusion_mode (String)

    The desired VPC Block Public Access mode for a specific VPC or subnet exclusion.

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

    The ID of the subnet you want to exclude.

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

    An array of key-value pairs to apply to this resource.

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

    The ID of the VPC you want to exclude.



13
14
15
16
17
18
19
20
21
22
# File 'ec2/cfn_vpc_block_public_access_exclusion_props.rb', line 13

def initialize(internet_gateway_exclusion_mode:, subnet_id: nil, tags: nil, vpc_id: nil)
  @internet_gateway_exclusion_mode = internet_gateway_exclusion_mode
  Jsii::Type.check_type(@internet_gateway_exclusion_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "internetGatewayExclusionMode")
  @subnet_id = subnet_id
  Jsii::Type.check_type(@subnet_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetId") unless @subnet_id.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?
  @vpc_id = vpc_id
  Jsii::Type.check_type(@vpc_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcId") unless @vpc_id.nil?
end

Instance Attribute Details

#internet_gateway_exclusion_modeString (readonly)

The desired VPC Block Public Access mode for a specific VPC or subnet exclusion.

  • allow-bidirectional : Allow all internet traffic to and from the excluded VPCs and subnets.
  • allow-egress : Allow outbound internet traffic from the excluded VPCs and subnets. Block inbound internet traffic to the excluded VPCs and subnets. Only applies when VPC Block Public Access is set to block-bidirectional .


31
32
33
# File 'ec2/cfn_vpc_block_public_access_exclusion_props.rb', line 31

def internet_gateway_exclusion_mode
  @internet_gateway_exclusion_mode
end

#subnet_idString? (readonly)

The ID of the subnet you want to exclude.

Required only if you don't specify VpcId.



38
39
40
# File 'ec2/cfn_vpc_block_public_access_exclusion_props.rb', line 38

def subnet_id
  @subnet_id
end

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

An array of key-value pairs to apply to this resource.



43
44
45
# File 'ec2/cfn_vpc_block_public_access_exclusion_props.rb', line 43

def tags
  @tags
end

#vpc_idString? (readonly)

The ID of the VPC you want to exclude.

Required only if you don't specify SubnetId.



50
51
52
# File 'ec2/cfn_vpc_block_public_access_exclusion_props.rb', line 50

def vpc_id
  @vpc_id
end

Class Method Details

.jsii_propertiesObject



52
53
54
55
56
57
58
59
# File 'ec2/cfn_vpc_block_public_access_exclusion_props.rb', line 52

def self.jsii_properties
  {
    :internet_gateway_exclusion_mode => "internetGatewayExclusionMode",
    :subnet_id => "subnetId",
    :tags => "tags",
    :vpc_id => "vpcId",
  }
end

Instance Method Details

#to_jsiiObject



61
62
63
64
65
66
67
68
69
70
# File 'ec2/cfn_vpc_block_public_access_exclusion_props.rb', line 61

def to_jsii
  result = {}
  result.merge!({
    "internetGatewayExclusionMode" => @internet_gateway_exclusion_mode,
    "subnetId" => @subnet_id,
    "tags" => @tags,
    "vpcId" => @vpc_id,
  })
  result.compact
end