activate_gateway ( $opt )

This operation activates the gateway you previously deployed on your VMware host. For more information, see Downloading and Deploying AWS Storage Gateway VM. In the activation process you specify information such as the region you want to use for storing snapshots, the time zone for scheduled snapshots and the gateway schedule window, an activation key, and a name for your gateway. The activation process also associates your gateway with your account (see UpdateGatewayInformation).

You must power on the gateway VM before you can activate your gateway.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

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

  • ActivationKey - string - Required - Your gateway activation key. You can obtain the activation key by sending an HTTP GET request with redirects enabled to the gateway IP address (port 80). The redirect URL returned in the response provides you the activation key for your gateway in the query string parameter activationKey. It may also include other activation-related parameters, however, these are merely defaults — the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.
  • GatewayName - string - Required - 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 - Required - One of the values that indicates the time zone you want to set for the gateway. The time zone is used, for example, for scheduling snapshots and your gateway’s maintenance schedule. [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]
  • GatewayRegion - string - Required - One of the values that indicates the region where you want to store the snapshot backups. The gateway region specified must be the same region as the region in your Host header in the request. For more information about available regions and endpoints for AWS Storage Gateway, see Regions and Endpoints in the Amazon Web Services Glossary. Valid Values: “us-east-1”, “us-west-1”, “us-west-2”, “eu-west-1”, “ap-northeast-1”, “ap-southest-1”, “sa-east-1”
  • GatewayType - string - Optional - One of the values that defines the type of gateway to activate. The type specified is critical to all later functions of the gateway and cannot be changed after activation. The default value is STORED. [Allowed values: STORED, CACHED]
  • 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 activate_gateway($opt = null)
{
    if (!$opt) $opt = array();
    
    return $this->authenticate('ActivateGateway', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback