Retrieves session details.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
emr-serverless-spark:GetSessionCluster |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/workspaces/{workspaceId}/sessionClusters/{sessionClusterId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspaceId |
string |
No |
The workspace ID. |
w-1234abcd |
| sessionClusterId |
string |
No |
The name of the job. |
emr-spark-demo-job |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| regionId |
string |
No |
The region ID. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| sessionCluster |
object |
The session object. |
|
| workspaceId |
string |
The workspace ID. |
w-1234abcd |
| sessionClusterId |
string |
The session cluster ID. |
1234abcd-12ab-34cd-56ef-1234567890ab |
| userId |
string |
The user ID. |
123xxxxxxxx |
| queueName |
string |
The queue name. |
dev_queue |
| state |
string |
The state of the job.
|
Running |
| stateChangeReason |
object |
The reason for the state change. |
|
| code |
string |
The state change code. |
1000000 |
| message |
string |
The state change message. |
ok |
| autoStartConfiguration |
object |
The auto-start configuration. |
|
| enable |
boolean |
Specifies whether to enable auto-start.
|
false |
| autoStopConfiguration |
object |
The auto-stop configuration. |
|
| enable |
boolean |
Specifies whether to enable auto-stop.
|
false |
| idleTimeoutMinutes |
integer |
The number of minutes a session can be idle before it is automatically stopped. |
60 |
| applicationConfigs |
array<object> |
The list of Spark application configurations. |
|
|
object |
The Spark application configuration. |
||
| configFileName |
string |
The name of the configuration file. |
spark-defaults.conf |
| configItemKey |
string |
The configuration key. |
spark.app.name |
| configItemValue |
string |
The configuration value. |
test |
| releaseVersion |
string |
The Serverless Spark version. |
esr-4.0.0 (Spark 3.5.2, Scala 2.12) |
| name |
string |
The session name. |
test |
| userName |
string |
The name of the user who created the session. |
user1 |
| kind |
string |
The job type. This parameter is required and cannot be modified after the job is created.
|
SQL |
| webUI |
string |
The URL of the Spark UI for the session. |
https://spark-ui/link |
| draftId |
string |
The ID of the developer job that is attached to the session. |
TSK-xxxxxxxx |
| domain |
string |
The domain name of the Spark UI for the session. |
your.domain.com |
| displayReleaseVersion |
string |
The version that is displayed in the console. |
esr-4.0.0 (Spark 3.5.2, Scala 2.12) |
| fusion |
boolean |
Specifies whether to enable acceleration using the Fusion engine. |
false |
| envId |
string |
The environment ID. |
env-cpv569tlhtgndjl8**** |
| gmtCreate |
integer |
The time when the session was created. |
2024-09-01 06:23:01 |
| startTime |
integer |
The time when the session started. |
2024-09-01 06:23:01 |
| domainInner |
string |
The internal same-region endpoint. |
emr-spark-gateway-cn-hangzhou-internal.data.aliyuncs.com |
| extra |
string |
The extra metadata of the session. |
{"extraInfoKey":"extraInfoValue"} |
| publicEndpointEnabled |
boolean |
||
| connectionToken |
string |
||
| requestId |
string |
The request ID. |
DD6B1B2A-5837-5237-ABE4-FF0C8944**** |
Examples
Success response
JSON format
{
"sessionCluster": {
"workspaceId": "w-1234abcd",
"sessionClusterId": "1234abcd-12ab-34cd-56ef-1234567890ab",
"userId": "123xxxxxxxx",
"queueName": "dev_queue",
"state": "Running",
"stateChangeReason": {
"code": "1000000",
"message": "ok"
},
"autoStartConfiguration": {
"enable": false
},
"autoStopConfiguration": {
"enable": false,
"idleTimeoutMinutes": 60
},
"applicationConfigs": [
{
"configFileName": "spark-defaults.conf",
"configItemKey": "spark.app.name",
"configItemValue": "test"
}
],
"releaseVersion": "esr-4.0.0 (Spark 3.5.2, Scala 2.12)",
"name": "test",
"userName": "user1",
"kind": "SQL",
"webUI": "https://spark-ui/link",
"draftId": "TSK-xxxxxxxx",
"domain": "your.domain.com",
"displayReleaseVersion": "esr-4.0.0 (Spark 3.5.2, Scala 2.12)",
"fusion": false,
"envId": "env-cpv569tlhtgndjl8****",
"gmtCreate": 0,
"startTime": 0,
"domainInner": "emr-spark-gateway-cn-hangzhou-internal.data.aliyuncs.com",
"extra": "{\"extraInfoKey\":\"extraInfoValue\"}",
"publicEndpointEnabled": false,
"connectionToken": ""
},
"requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.