update_gateway_software_now ( $opt )

This operation updates the gateway virtual machine (VM) software. The request immediately triggers the software update.

When you make this request, you get a 200 OK success response immediately. However, it might take some time for the update to complete. You can call DescribeGatewayInformation to verify the gateway is in the STATE_RUNNING state.

A software update forces a system restart of your gateway. You can minimize the chance of any disruption to your applications by increasing your iSCSI Initiators’ timeouts. For more information about increasing iSCSI Initiator timeouts for Windows and Linux, see Customizing Your Windows iSCSI Settings and Customizing Your Linux iSCSI Settings, respectively.

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

Update gateway software now

$sg = new AmazonStorageGateway();

// Update gateway software
$response = $sg->update_gateway_software_now(array('GatewayARN' => $gateway_arn));
var_dump($response->isOK());

// Wait until complete
do
{
	sleep(20); echo '.';
	$response = $sg->describe_gateway_information(array('GatewayARN' => $gateway_arn));
	$status = (string) $response->body->GatewayState;
} while ($status !== 'RUNNING');

Source

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

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback