Creates a session.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
emr-serverless-spark:CreateSessionCluster | create | *All Resources * |
| none |
Request syntax
POST /api/v1/workspaces/{workspaceId}/sessionClusters HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
body | object | No | The request struct. | |
queueName | string | No | The queue name. | root_queue |
autoStartConfiguration | object | No | The automatic startup configuration. | |
enable | boolean | No | Specifies whether to enable automatic startup is enabled.
| false |
autoStopConfiguration | object | No | The automatic termination configurations. | |
enable | boolean | No | Specifies whether to enable automatic termination.
| false |
idleTimeoutMinutes | integer | No | The idle timeout period. The session is automatically terminated when the idle timeout period is exceeded. | 60 |
applicationConfigs | array<object> | No | The Spark configurations. | |
object | No | The Spark configuration. | ||
configFileName | string | No | The name of the configuration file. | spark-defaults.conf |
configItemKey | string | No | The key of SparkConf. | spark.app.name |
configItemValue | string | No | The value of SparkConf. | test |
releaseVersion | string | No | The version number of Spark. | esr-3.3.1 |
name | string | No | The name of the Spark job. | spark_job_name |
kind | string | No | The session type.
| SQL |
displayReleaseVersion | string | No | The version of the Spark engine. | esr-3.3.1 |
fusion | boolean | No | Specifies whether to enable Fusion engine for acceleration. | false |
envId | string | No | The ID of the Python environment. This parameter takes effect only for notebook sessions. | env-cpv569tlhtgndjl86t40 |
workspaceId | string | No | The workspace ID. | w-790b443d72394bfc |
regionId | string | No | The region ID. | cn-hangzhou |
Response parameters
Examples
Sample success responses
JSON
format
{
"sessionClusterId": "w-******",
"requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****"
}
Error codes
For a list of error codes, visit the Service error codes.