TerminateJobFlows
TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut down, any step not yet completed is canceled and the Amazon EC2 instances on which the cluster is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the cluster was created.
The maximum number of clusters allowed is 10. The call to TerminateJobFlows
is asynchronous. Depending on the configuration of the cluster, it may take up to 1-5
minutes for the cluster to completely terminate and release allocated resources, such as
Amazon EC2 instances.
Request Syntax
{
"JobFlowIds": [ "string
" ]
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- JobFlowIds
-
A list of job flows to be shut down.
Type: Array of strings
Length Constraints: Minimum length of 0. Maximum length of 10280.
Pattern:
[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerError
-
Indicates that an error occurred while processing the request and that the request was not completed.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of TerminateJobFlows.
Sample Request
POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: ElasticMapReduce.TerminateJobFlows
Content-Length: 33
User-Agent: aws-sdk-ruby/1.9.2 ruby/1.9.3 i386-mingw32
Host: us-east-1.elasticmapreduce.amazonaws.com
X-Amz-Date: 20130716T211858Z
X-Amz-Content-Sha256: ab64713f61e066e80a6083844b9249b6c6362d34a7ae7393047aa46d38b9e315
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20130716/us-east-1/elasticmapreduce/aws4_request, SignedHeaders=content-length;content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=9791416eaf09f36aa753a324b0de27ff5cc7084b8548cc748487a2bcb3439d58
Accept: */*
{"JobFlowIds": ["j-3TS0OIYO4NFN"]}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: 5551a7c9-ee5d-11e2-9542-25296c300ff0
Content-Type: application/x-amz-json-1.1
Content-Length: 0
Date: Tue, 16 Jul 2013 21:18:59 GMT
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: