projects

POST /v1/projects/{projectsId}/locations/{locationsId}/sessions

Changed on

Create an interactive session asynchronously.

Request

  • Base URL
    https://dataproc.googleapis.com
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/cloud-platform
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/cloud-platform
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/dataproc
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/dataproc
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Path parameters

projectsIdstring required
locationsIdstring required

Query parameters

requestIdstring

Optional. A unique ID used to identify the request. If the service receives two CreateSessionRequests (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s with the same ID, the second request is ignored, and the first Session is created and stored in the backend.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The value must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

sessionIdstring

Required. The ID to use for the session, which becomes the final component of the session's resource name.This value must be 4-63 characters. Valid characters are /a-z-/.

Request body

createTimestring google-datetime

Output only. The time when the session was created.

creatorstring

Output only. The email address of the user who created the session.

labelsobject

Optional. The labels to associate with the session. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a session.

namestring

Identifier. The resource name of the session.

sessionTemplatestring

Optional. The session template used by the session.Resource names and short template IDs are valid. Examples: * projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id] * [template_id]The template must be in the same project and Dataproc region as the session.

sparkConnectSessionSparkConnectConfig

Spark connect configuration for an interactive session.

state'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'TERMINATING' | 'TERMINATED' | 'FAILED'

Output only. A state of the session.

stateMessagestring

Output only. Session state details, such as the failure description if the state is FAILED.

stateTimestring google-datetime

Output only. The time when the session entered the current state.

userstring

Optional. The email address of the user who owns the session.

uuidstring

Output only. A session UUID (Unique Universal Identifier). The service generates this value when it creates the session.

Response

Successful response

doneboolean

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

metadataobject

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

namestring

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

responseobject

The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/dataproc was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/dataproc was removed from the endpoint's security scheme Oauth2c