import_volume ( $opt )

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

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

  • AvailabilityZone - string - Optional -
  • Image - array - Optional -
    • x - array - Optional - This represents a simple array index.
      • Format - string - Required -
      • Bytes - long - Required -
      • ImportManifestUrl - string - Required -
  • Description - string - Optional -
  • Volume - array - Optional -
    • x - array - Optional - This represents a simple array index.
      • Size - long - Required -
  • 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 (24 lines) | View on GitHub

public function import_volume($opt = null)
{
    if (!$opt) $opt = array();
            
    // Optional map (non-list)
    if (isset($opt['Image']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'Image' => $opt['Image']
        )));
        unset($opt['Image']);
    }
    
    // Optional map (non-list)
    if (isset($opt['Volume']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'Volume' => $opt['Volume']
        )));
        unset($opt['Volume']);
    }

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback