update_gateway_information ( $opt )

This operation updates a gateway’s metadata, which includes the gateway’s name and time zone. To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in your request.

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.
  • GatewayName - string - Optional - A unique identifier for your gateway. This name becomes part of the gateway Amazon Resources Name (ARN) which is what you use as an input to other operations. [Constraints: The value must be between 2 and 255 characters, and must match the following regular expression pattern: ^[ -\.0-\[\]-~]*[!-\.0-\[\]-~][ -\.0-\[\]-~]*$]
  • GatewayTimezone - string - Optional - One of the GatewayTimezone values that represents the time zone for your gateway. The time zone is used, for example, when a time stamp is given to a snapshot. [Allowed values: GMT-12:00, GMT-11:00, GMT-10:00, GMT-9:00, GMT-8:00, GMT-7:00, GMT-6:00, GMT-5:00, GMT-4:00, GMT-3:30, GMT-3:00, GMT-2:00, GMT-1:00, GMT, GMT+1:00, GMT+2:00, GMT+3:00, GMT+3:30, GMT+4:00, GMT+4:30, GMT+5:00, GMT+5:30, GMT+5:45, GMT+6:00, GMT+7:00, GMT+8:00, GMT+9:00, GMT+9:30, GMT+10:00, GMT+11:00, GMT+12:00]
  • 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

Activate a Storage Gateway

$sg = new AmazonStorageGateway();

// Acquire activation key
$activation_key = $sg->acquire_activation_code($gateway_url);
var_dump($activation_key);
if (!$activation_key) die('Activation key could not be retrieved.');

// Activate the gateway
$response = $sg->activate_gateway(array(
	'ActivationKey'   => $activation_key,
	'GatewayName'     => 'example-gateway',
	'GatewayTimezone' => 'GMT-8:00',
	'GatewayRegion'   => 'us-east-1',
));
var_dump($response->isOK());

$gateway_arn = (string) $response->body->GatewayARN;

// Update gateway information
$response = $sg->update_gateway_information(array(
	'GatewayARN'      => $gateway_arn,
	'GatewayTimezone' => 'GMT-7:00',
));
var_dump($response->isOK());

Source

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

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback