Class: AWS::EC2::NetworkACL::Association
- Inherits:
-
Object
- Object
- AWS::EC2::NetworkACL::Association
- Defined in:
- lib/aws/ec2/network_acl/association.rb
Overview
Represents the association between a AWS::EC2::NetworkACL and a Subnet.
Instance Attribute Summary collapse
-
#association_id ⇒ String
readonly
An identifier representing the association between the network ACL and subnet.
- #network_acl ⇒ NetworkACL readonly
- #subnet ⇒ Subnet readonly
Instance Method Summary collapse
-
#initialize(association_id, network_acl, subnet) ⇒ Association
constructor
A new instance of Association.
-
#replace_network_acl(network_acl) ⇒ nil
Replaces the network acl in the current association with a different one (a new network acl is assigned to the subnet).
Constructor Details
#initialize(association_id, network_acl, subnet) ⇒ Association
Returns a new instance of Association.
21 22 23 24 25 |
# File 'lib/aws/ec2/network_acl/association.rb', line 21 def initialize association_id, network_acl, subnet @association_id = association_id @network_acl = network_acl @subnet = subnet end |
Instance Attribute Details
#association_id ⇒ String (readonly)
Returns An identifier representing the association between the network ACL and subnet.
29 30 31 |
# File 'lib/aws/ec2/network_acl/association.rb', line 29 def association_id @association_id end |
#network_acl ⇒ NetworkACL (readonly)
32 33 34 |
# File 'lib/aws/ec2/network_acl/association.rb', line 32 def network_acl @network_acl end |
#subnet ⇒ Subnet (readonly)
35 36 37 |
# File 'lib/aws/ec2/network_acl/association.rb', line 35 def subnet @subnet end |
Instance Method Details
#replace_network_acl(network_acl) ⇒ nil
Replaces the network acl in the current association with a different one (a new network acl is assigned to the subnet).
45 46 47 48 49 50 51 |
# File 'lib/aws/ec2/network_acl/association.rb', line 45 def replace_network_acl network_acl acl_id = network_acl.is_a?(NetworkACL) ? network_acl.id : network_acl subnet.client.replace_network_acl_association( :association_id => association_id, :network_acl_id => acl_id) nil end |