GetSessionEndpoint
Returns the Spark Connect endpoint URL and a time-limited authentication token for the specified session. Use the endpoint and token to connect a PySpark client to the session. Call this operation again when the token expires to obtain a new one.
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
{
"AuthToken": "string",
"AuthTokenExpirationTime": number,
"Credentials": { ... },
"Endpoint": "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.
- AuthToken
-
A time-limited authentication token used to connect to the Spark Connect endpoint.
Type: String
- AuthTokenExpirationTime
-
The time at which the authentication token expires. After this time, call
GetSessionEndpointagain to obtain a new token.Type: Timestamp
- Credentials
-
Username and password used to authenticate with the Spark Connect server when connecting directly over VPC peering.
Type: Credentials object
Note: This object is a Union. Only one member of this object can be specified or returned.
- Endpoint
-
The Spark Connect endpoint URL to use in the PySpark client.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 10280.
Pattern:
[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
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: