terminate_job_flows ( $job_flow_ids, $opt )

TerminateJobFlows shuts a list of job flows down. When a job flow is shut down, any step not yet completed is canceled and the EC2 instances on which the job flow is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the job flow was created.

The call to TerminateJobFlows is asynchronous. Depending on the configuration of the job flow, it may take up to 5-20 minutes for the job flow to completely terminate and release allocated resources, such as Amazon EC2 instances.

Access

public

Parameters

Parameter

Type

Required

Description

$job_flow_ids

string
array

Required

A list of job flows to be shutdown. Pass a string for a single value, or an indexed array for multiple values.

$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

Terminate job flows.

$emr = new AmazonEMR();

$response = $emr->terminate_job_flows(array('j-147KUX35ZRCTI', 'j-853ITCRZ65XUK'));

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

Related Methods

Source

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

public function terminate_job_flows($job_flow_ids, $opt = null)
{
    if (!$opt) $opt = array();
            
    // Required list (non-map)
    $opt = array_merge($opt, CFComplexType::map(array(
        'JobFlowIds' => (is_array($job_flow_ids) ? $job_flow_ids : array($job_flow_ids))
    ), 'member'));

    return $this->authenticate('TerminateJobFlows', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback