cancel_bundle_task ( $bundle_id, $opt )

CancelBundleTask operation cancels a pending or in-progress bundling task. This is an asynchronous call and it make take a while for the task to be canceled. If a task is canceled while it is storing items, there may be parts of the incomplete AMI stored in S3. It is up to the caller to clean up these parts from S3.

Access

public

Parameters

Parameter

Type

Required

Description

$bundle_id

string

Required

The ID of the bundle task to cancel.

$opt

array

Optional

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

  • 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

Cancel the bundling of a Windows-based instance.

// Instantiate the class
$ec2 = new AmazonEC2();

// Cancel the bundle task
$response = $ec2->cancel_bundle_task($bundle_id); 

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

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

public function cancel_bundle_task($bundle_id, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['BundleId'] = $bundle_id;
    
    return $this->authenticate('CancelBundleTask', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback