Class: AWSCDK::EC2::CfnSubnet::BlockPublicAccessStatesProperty

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

Overview

Specifies the state of VPC Block Public Access (BPA).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(internet_gateway_block_mode: nil) ⇒ BlockPublicAccessStatesProperty

Returns a new instance of BlockPublicAccessStatesProperty.

Parameters:

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

    The mode of VPC BPA.



812
813
814
815
# File 'ec2/cfn_subnet.rb', line 812

def initialize(internet_gateway_block_mode: nil)
  @internet_gateway_block_mode = internet_gateway_block_mode
  Jsii::Type.check_type(@internet_gateway_block_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "internetGatewayBlockMode") unless @internet_gateway_block_mode.nil?
end

Instance Attribute Details

#internet_gateway_block_modeString? (readonly)

The mode of VPC BPA.

  • off : VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region.
  • block-bidirectional : Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets).
  • block-ingress : Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.


825
826
827
# File 'ec2/cfn_subnet.rb', line 825

def internet_gateway_block_mode
  @internet_gateway_block_mode
end

Class Method Details

.jsii_propertiesObject



827
828
829
830
831
# File 'ec2/cfn_subnet.rb', line 827

def self.jsii_properties
  {
    :internet_gateway_block_mode => "internetGatewayBlockMode",
  }
end

Instance Method Details

#to_jsiiObject



833
834
835
836
837
838
839
# File 'ec2/cfn_subnet.rb', line 833

def to_jsii
  result = {}
  result.merge!({
    "internetGatewayBlockMode" => @internet_gateway_block_mode,
  })
  result.compact
end