TerminateSession
Terminates an active session. After you call this operation, the session enters the TERMINATING state and then transitions to TERMINATED.
Request Syntax
{
"ClusterId": "string",
"SessionId": "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.
Response Syntax
{
"ClusterId": "string",
"SessionId": "string",
"State": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- ClusterId
-
The ID of the cluster that the session belonged to.
Type: String
Length Constraints: Maximum length of 256.
- SessionId
-
The ID of the terminated session.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 256.
- State
-
The state of the session after the terminate request has been accepted.
Type: String
Valid Values:
SUBMITTED | STARTING | STARTED | IDLE | BUSY | TERMINATING | TERMINATED | FAILED
Errors
For information about the errors that are common to all actions, see Common Error Types.
- InternalServerException
-
This exception occurs when there is an internal failure in the Amazon EMR service.
- Message
-
The message associated with the exception.
HTTP Status Code: 500
- InvalidRequestException
-
This exception occurs when there is something wrong with user input.
- ErrorCode
-
The error code associated with the exception.
- Message
-
The message associated with the exception.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: