EMR / Client / get_session_endpoint
get_session_endpoint¶
- EMR.Client.get_session_endpoint(**kwargs)¶
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.
See also: AWS API Documentation
Request Syntax
response = client.get_session_endpoint( ClusterId='string', SessionId='string' )
- Parameters:
ClusterId (string) –
[REQUIRED]
The ID of the cluster that the session belongs to.
SessionId (string) –
[REQUIRED]
The ID of the session.
- Return type:
dict
- Returns:
Response Syntax
{ 'Endpoint': 'string', 'AuthToken': 'string', 'AuthTokenExpirationTime': datetime(2015, 1, 1), 'Credentials': { 'UsernamePassword': { 'Username': 'string', 'Password': 'string' } } }
Response Structure
(dict) –
Output of the
GetSessionEndpointoperation.Endpoint (string) –
The Spark Connect endpoint URL to use in the PySpark client.
AuthToken (string) –
A time-limited authentication token used to connect to the Spark Connect endpoint.
AuthTokenExpirationTime (datetime) –
The time at which the authentication token expires. After this time, call
GetSessionEndpointagain to obtain a new token.Credentials (dict) –
Username and password used to authenticate with the Spark Connect server when connecting directly over VPC peering.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
UsernamePassword. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
UsernamePassword (dict) –
The username and password that you use to connect to cluster endpoints.
Username (string) –
The username associated with the temporary credentials that you use to connect to cluster endpoints.
Password (string) –
The password associated with the temporary credentials that you use to connect to cluster endpoints.
Exceptions