class AWS::EC2::NetworkACL::Association
Represents the association between a {NetworkACL} and a {Subnet}.
Attributes
association_id[R]
@return [String] An identifier representing the association
between the network ACL and subnet.
network_acl[R]
@return [NetworkACL]
subnet[R]
@return [Subnet]
Public Class Methods
new(association_id, network_acl, subnet)
click to toggle source
# 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
Public Instance Methods
replace_network_acl(network_acl)
click to toggle source
Replaces the network acl in the current association with a different one (a new network acl is assigned to the subnet).
@param [NetworkACL,String] network_acl
A {NetworkACL} object or
a network acl id (string).
@return [nil]
# 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