list_local_disks ( $opt )

This operation returns a list of the local disks of a gateway. To specify which gateway to describe you use the Amazon Resource Name (ARN) of the gateway in the body of the request.

The request returns all disks, specifying which are configured as working storage, stored volume or not configured at all.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

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

  • GatewayARN - string - Required - The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.
  • 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

Working Storage.

$sg = new AmazonStorageGateway();

// Get local disk
$response = $sg->list_local_disks(array('GatewayARN' => $gateway_arn));
$disks = $response->body->DiskId()->map_string();
$disk_id = $disks[0];
var_dump($response->isOK());

// Describe working storage
$response = $sg->describe_working_storage(array('GatewayARN' => $gateway_arn));
var_dump($response->isOK());

// Add working storage
$response = $sg->add_working_storage(array(
	'GatewayARN' => $gateway_arn,
	'DiskIds'    => array($disk_id),
));
var_dump($response->isOK());

sleep(10);

// Describe working storage
$response = $sg->describe_working_storage(array('GatewayARN' => $gateway_arn));
var_dump($response->isOK());

Source

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

public function list_local_disks($opt = null)
{
    if (!$opt) $opt = array();
    
    return $this->authenticate('ListLocalDisks', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback