update_job ( $job_id, $manifest, $job_type, $validate_only, $opt )

You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but before the data transfer starts and you can only use it on jobs you own.

Access

public

Parameters

Parameter

Type

Required

Description

$job_id

string

Required

A unique identifier which refers to a particular job.

$manifest

string

Required

The UTF-8 encoded text of the manifest file.

$job_type

string

Required

Specifies whether the job to initiate is an import or export job. [Allowed values: Import, Export]

$validate_only

boolean

Required

Validate the manifest and parameter values in the request but do not actually create a job.

$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

Update an import job.

See http://docs.amazonwebservices.com/AWSImportExport/latest/DG/index.html?ManifestFileParameters.html for information about creating manifests.

$ies = new AmazonImportExport();

// Create a new manifest
$manifest = CFManifest::map(array(
	'manifestVersion' => '2.0',
	'bucket' => 'my-bucket',
	'eraseDevice' => 'no',
	'deviceId' => 49382,
	'accessKeyId' => $ies->key,
	'returnAddress' => array(
		'name' => 'Amazon.com ATTN Joe Random',
		'street1' => '120 Nosuch Ave S.',
		'city' => 'Seattle',
		'stateOrProvince' => 'WA',
		'postalCode' => 91111,
		'phoneNumber' => '206-266-0000',
		'country' => 'USA'
	)
));

$response = $ies->update_job('C5Y68', $manifest, 'Import', 'true');

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

Related Methods

Source

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

public function update_job($job_id, $manifest, $job_type, $validate_only, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['JobId'] = $job_id;
    $opt['Manifest'] = $manifest;
    $opt['JobType'] = $job_type;
    $opt['ValidateOnly'] = $validate_only;
    
    return $this->authenticate('UpdateJob', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback