Class: AWSCDK::EC2::NetworkAclProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::NetworkAclProps
- Defined in:
- ec2/network_acl_props.rb
Overview
Properties to create NetworkAcl.
Instance Attribute Summary collapse
-
#network_acl_name ⇒ String?
readonly
The name of the NetworkAcl.
-
#subnet_selection ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Subnets in the given VPC to associate the ACL with.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
The VPC in which to create the NetworkACL.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(vpc:, network_acl_name: nil, subnet_selection: nil) ⇒ NetworkAclProps
constructor
A new instance of NetworkAclProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(vpc:, network_acl_name: nil, subnet_selection: nil) ⇒ NetworkAclProps
Returns a new instance of NetworkAclProps.
10 11 12 13 14 15 16 17 |
# File 'ec2/network_acl_props.rb', line 10 def initialize(vpc:, network_acl_name: nil, subnet_selection: nil) @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") @network_acl_name = network_acl_name Jsii::Type.check_type(@network_acl_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkAclName") unless @network_acl_name.nil? @subnet_selection = subnet_selection.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**subnet_selection.transform_keys(&:to_sym)) : subnet_selection Jsii::Type.check_type(@subnet_selection, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "subnetSelection") unless @subnet_selection.nil? end |
Instance Attribute Details
#network_acl_name ⇒ String? (readonly)
Note:
Default: CDK generated name
The name of the NetworkAcl.
Since the NetworkAcl resource doesn't support providing a physical name, the value provided here will be recorded in the Name tag.
29 30 31 |
# File 'ec2/network_acl_props.rb', line 29 def network_acl_name @network_acl_name end |
#subnet_selection ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Note:
Default: - No subnets associated
Subnets in the given VPC to associate the ACL with.
More subnets can always be added later by calling
associate_with_subnets().
37 38 39 |
# File 'ec2/network_acl_props.rb', line 37 def subnet_selection @subnet_selection end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
The VPC in which to create the NetworkACL.
22 23 24 |
# File 'ec2/network_acl_props.rb', line 22 def vpc @vpc end |
Class Method Details
.jsii_properties ⇒ Object
39 40 41 42 43 44 45 |
# File 'ec2/network_acl_props.rb', line 39 def self.jsii_properties { :vpc => "vpc", :network_acl_name => "networkAclName", :subnet_selection => "subnetSelection", } end |
Instance Method Details
#to_jsii ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'ec2/network_acl_props.rb', line 47 def to_jsii result = {} result.merge!({ "vpc" => @vpc, "networkAclName" => @network_acl_name, "subnetSelection" => @subnet_selection, }) result.compact end |