This operation configures one or more gateway local disks as cache for a cached-volume gateway.
This operation is supported only for the gateway-cached volume architecture (see
Storage Gateway Concepts).
In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to add
cache, and one or more disk IDs that you want to configure as cache.
Access
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.DiskIds - string|array - Required - An array of strings that identify disks that are to be configured as cache. Each string in the array must be minimum length of 1 and maximum length of 300. You can get the disk IDs from the ListLocalDisks API. Pass a string for a single value, or an indexed array for multiple values.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
Source
Method defined in services/storagegateway.class.php | Toggle source view (12 lines) | View on GitHub
public function add_cache($opt = null)
{
if (!$opt) $opt = array();
// List (non-map)
if (isset($opt['DiskIds']))
{
$opt['DiskIds'] = (is_array($opt['DiskIds']) ? $opt['DiskIds'] : array($opt['DiskIds']));
}
return $this->authenticate('AddCache', $opt);
}