assign_private_ip_addresses ( $network_interface_id, $opt )

Access

public

Parameters

Parameter

Type

Required

Description

$network_interface_id

string

Required

$opt

array

Optional

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

  • PrivateIpAddress - string|array - Optional - Pass a string for a single value, or an indexed array for multiple values.
  • SecondaryPrivateIpAddressCount - integer - Optional -
  • AllowReassignment - boolean - Optional -
  • 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.

Source

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

public function assign_private_ip_addresses($network_interface_id, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['NetworkInterfaceId'] = $network_interface_id;
    
    // Optional list (non-map)
    if (isset($opt['PrivateIpAddress']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'PrivateIpAddress' => (is_array($opt['PrivateIpAddress']) ? $opt['PrivateIpAddress'] : array($opt['PrivateIpAddress']))
        )));
        unset($opt['PrivateIpAddress']);
    }

    return $this->authenticate('AssignPrivateIpAddresses', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback