swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector SparkBatch API schemes: - https tags: - name: SparkBatch paths: /batches: get: tags: - SparkBatch description: List all spark batch jobs which are running under a particular spark pool. operationId: microsoftAzureSparkbatchGetsparkbatchjobs x-ms-examples: List all spark batch jobs: $ref: ./examples/SparkFrontend_SparkBatch_List.json consumes: - application/json produces: - application/json parameters: - name: from in: query description: Optional param specifying which index the list should begin from. required: false type: integer format: int32 - name: size in: query description: "Optional param specifying the size of the returned list.\r\n By default it is 20 and that is the maximum." required: false type: integer format: int32 - name: detailed in: query description: Optional query param specifying whether detailed response is returned beyond plain livy. required: false type: boolean responses: '200': description: Success schema: $ref: '#/definitions/SparkBatchJobCollection' summary: Microsoft Azure Get Batches post: tags: - SparkBatch description: Create new spark batch job. operationId: microsoftAzureSparkbatchCreatesparkbatchjob x-ms-examples: Create new spark batch job.: $ref: ./examples/SparkFrontend_SparkBatch_Create.json consumes: - application/json produces: - application/json parameters: - name: detailed in: query description: Optional query param specifying whether detailed response is returned beyond plain livy. required: false type: boolean - name: sparkBatchJobOptions in: body description: Livy compatible batch job request payload. required: true schema: $ref: '#/definitions/SparkBatchJobOptions' responses: '200': description: Success schema: $ref: '#/definitions/SparkBatchJob' summary: Microsoft Azure Post Batches /batches/{batchId}: get: tags: - SparkBatch description: Gets a single spark batch job. operationId: microsoftAzureSparkbatchGetsparkbatchjob x-ms-examples: Gets a single spark batch job.: $ref: ./examples/SparkFrontend_SparkBatch_Get.json consumes: - application/json produces: - application/json parameters: - name: batchId in: path description: Identifier for the batch job. required: true type: integer format: int32 - name: detailed in: query description: Optional query param specifying whether detailed response is returned beyond plain livy. required: false type: boolean responses: '200': description: Success schema: $ref: '#/definitions/SparkBatchJob' summary: Microsoft Azure Get Batches Batchid delete: tags: - SparkBatch description: Cancels a running spark batch job. operationId: microsoftAzureSparkbatchCancelsparkbatchjob x-ms-examples: Cancels a running spark batch job.: $ref: ./examples/SparkFrontend_SparkBatch_Delete.json consumes: - application/json produces: - application/json parameters: - name: batchId in: path description: Identifier for the batch job. required: true type: integer format: int32 responses: '200': description: Success summary: Microsoft Azure Delete Batches Batchid definitions: SparkBatchJobState: type: object properties: notStartedAt: format: date-time type: string description: the time that at which "not_started" livy state was first seen. x-nullable: true startingAt: format: date-time type: string description: the time that at which "starting" livy state was first seen. x-nullable: true runningAt: format: date-time type: string description: the time that at which "running" livy state was first seen. x-nullable: true deadAt: format: date-time type: string description: time that at which "dead" livy state was first seen. x-nullable: true successAt: format: date-time type: string description: the time that at which "success" livy state was first seen. x-nullable: true killedAt: x-ms-client-name: terminatedAt format: date-time type: string description: the time that at which "killed" livy state was first seen. x-nullable: true recoveringAt: format: date-time type: string description: the time that at which "recovering" livy state was first seen. x-nullable: true currentState: type: string description: the Spark job state. jobCreationRequest: $ref: '#/definitions/SparkRequest' SparkServiceError: type: object properties: message: type: string errorCode: type: string source: enum: - System - User - Unknown - Dependency x-ms-enum: name: SparkErrorSource modelAsString: true type: string SparkRequest: type: object properties: name: type: string file: type: string className: type: string args: x-ms-client-name: arguments uniqueItems: false type: array items: type: string jars: uniqueItems: false type: array items: type: string pyFiles: x-ms-client-name: pythonFiles uniqueItems: false type: array items: type: string files: uniqueItems: false type: array items: type: string archives: uniqueItems: false type: array items: type: string conf: x-ms-client-name: configuration type: object additionalProperties: type: string driverMemory: type: string driverCores: format: int32 type: integer executorMemory: type: string executorCores: format: int32 type: integer numExecutors: x-ms-client-name: executorCount format: int32 type: integer SparkBatchJob: type: object properties: livyInfo: $ref: '#/definitions/SparkBatchJobState' name: type: string description: The batch name. workspaceName: type: string description: The workspace name. sparkPoolName: type: string description: The Spark pool name. submitterName: type: string description: The submitter name. submitterId: type: string description: The submitter identifier. artifactId: type: string description: The artifact identifier. jobType: enum: - SparkBatch - SparkSession x-ms-enum: name: SparkJobType modelAsString: true type: string description: The job type. result: enum: - Uncertain - Succeeded - Failed - Cancelled x-ms-enum: name: SparkBatchJobResultType modelAsString: true type: string description: The Spark batch job result. schedulerInfo: x-ms-client-name: scheduler $ref: '#/definitions/SparkScheduler' description: The scheduler information. pluginInfo: x-ms-client-name: plugin $ref: '#/definitions/SparkServicePlugin' description: The plugin information. errorInfo: x-ms-client-name: errors uniqueItems: false type: array items: $ref: '#/definitions/SparkServiceError' description: The error information. tags: type: object additionalProperties: type: string description: The tags. id: format: int32 type: integer description: The session Id. appId: type: string description: The application id of this session x-nullable: true appInfo: type: object additionalProperties: type: string description: The detailed application info. x-nullable: true state: type: string description: The batch state log: x-ms-client-name: logLines uniqueItems: false type: array items: type: string description: The log lines. x-nullable: true required: - id SparkBatchJobOptions: type: object properties: tags: type: object additionalProperties: type: string artifactId: type: string name: type: string file: type: string className: type: string args: x-ms-client-name: arguments uniqueItems: false type: array items: type: string jars: uniqueItems: false type: array items: type: string pyFiles: x-ms-client-name: pythonFiles uniqueItems: false type: array items: type: string files: uniqueItems: false type: array items: type: string archives: uniqueItems: false type: array items: type: string conf: x-ms-client-name: configuration type: object additionalProperties: type: string driverMemory: type: string driverCores: format: int32 type: integer executorMemory: type: string executorCores: format: int32 type: integer numExecutors: x-ms-client-name: executorCount format: int32 type: integer required: - name - file SparkScheduler: type: object properties: submittedAt: format: date-time type: string x-nullable: true scheduledAt: format: date-time type: string x-nullable: true endedAt: format: date-time type: string x-nullable: true cancellationRequestedAt: format: date-time type: string x-nullable: true currentState: enum: - Queued - Scheduled - Ended x-ms-enum: name: SchedulerCurrentState modelAsString: true type: string SparkBatchJobCollection: type: object properties: from: format: int32 type: integer description: The start index of fetched sessions. total: format: int32 type: integer description: Number of sessions fetched. sessions: uniqueItems: false type: array description: Batch list items: $ref: '#/definitions/SparkBatchJob' required: - from - total description: Response for batch list operation. SparkServicePlugin: type: object properties: preparationStartedAt: format: date-time type: string x-nullable: true resourceAcquisitionStartedAt: format: date-time type: string x-nullable: true submissionStartedAt: format: date-time type: string x-nullable: true monitoringStartedAt: format: date-time type: string x-nullable: true cleanupStartedAt: format: date-time type: string x-nullable: true currentState: enum: - Preparation - ResourceAcquisition - Queued - Submission - Monitoring - Cleanup - Ended x-ms-enum: name: PluginCurrentState modelAsString: true type: string x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'