replace_network_acl_association ( $association_id, $network_acl_id, $opt )

Changes which network ACL a subnet is associated with. By default when you create a subnet, it’s automatically associated with the default network ACL. For more information about network ACLs, go to Network ACLs in the Amazon Virtual Private Cloud User Guide.

Access

public

Parameters

Parameter

Type

Required

Description

$association_id

string

Required

The ID representing the current association between the original network ACL and the subnet.

$network_acl_id

string

Required

The ID of the new ACL to associate with the subnet.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Replace an existing Network Access Control List (ACL) association.

$ec2 = new AmazonEC2();

$response = $ec2->replace_network_acl_association('rtbassoc-babe3ed3', 'acl-4abf3f23');

var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/ec2.class.php | Toggle source view (8 lines) | View on GitHub

public function replace_network_acl_association($association_id, $network_acl_id, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['AssociationId'] = $association_id;
    $opt['NetworkAclId'] = $network_acl_id;
    
    return $this->authenticate('ReplaceNetworkAclAssociation', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback