# MCP Tools Reference: dataproc.googleapis.com

## Tool: `create_batch`

Create a Dataproc Batch in a Google Cloud project

The following sample demonstrate how to use `curl` to invoke the `create_batch` MCP tool.

| Curl Request |
|---|
| ```bash curl --location 'https://dataproc.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "create_batch", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' ``` |

## Input Schema

A request to create a batch workload.

### CreateBatchRequest

| JSON representation |
|---|
| ``` { "parent": string, "batch": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.Batch`) }, "batchId": string, "requestId": string } ``` |

| Fields ||
|---|---|
| `parent` | `string` Required. The parent resource where this batch will be created. |
| `batch` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.Batch`)`` Required. The batch to create. |
| `batchId` | `string` Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. |
| `requestId` | `string` Optional. A unique ID used to identify the request. If the service receives two `CreateBatchRequests` with the same `request_id`, the second request is ignored and the operation that corresponds to the first Batch created and stored in the backend is returned. 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. |

### Batch

| JSON representation |
|---|
| ``` { "name": string, "uuid": string, "createTime": string, "runtimeInfo": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.RuntimeInfo`) }, "state": enum (`State`), "stateMessage": string, "stateTime": string, "creator": string, "labels": { string: string, ... }, "runtimeConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.RuntimeConfig`) }, "environmentConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.EnvironmentConfig`) }, "operation": string, "stateHistory": [ { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.StateHistory`) } ], // Union field `batch_config` can be only one of the following: "pysparkBatch": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.PySparkBatch`) }, "sparkBatch": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.SparkBatch`) }, "sparkRBatch": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.SparkRBatch`) }, "sparkSqlBatch": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.SparkSqlBatch`) } // End of list of possible types for union field `batch_config`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource name of the batch. |
| `uuid` | `string` Output only. A batch UUID (Unique Universal Identifier). The service generates this value when it creates the batch. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the batch was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `runtimeInfo` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.RuntimeInfo`)`` Output only. Runtime information about batch execution. |
| `state` | ``enum (`State`)`` Output only. The state of the batch. |
| `stateMessage` | `string` Output only. Batch state details, such as a failure description if the state is `FAILED`. |
| `stateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the batch entered a current state. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `creator` | `string` Output only. The email address of the user who created the batch. |
| `labels` | `map (key: string, value: string)` Optional. The labels to associate with this batch. 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 batch. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `runtimeConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.RuntimeConfig`)`` Optional. Runtime configuration for the batch execution. |
| `environmentConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.EnvironmentConfig`)`` Optional. Environment configuration for the batch execution. |
| `operation` | `string` Output only. The resource name of the operation associated with this batch. |
| `stateHistory[]` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.StateHistory`)`` Output only. Historical state information for the batch. |
| Union field `batch_config`. The application/framework-specific portion of the batch configuration. `batch_config` can be only one of the following: ||
| `pysparkBatch` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.PySparkBatch`)`` Optional. PySpark batch config. |
| `sparkBatch` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.SparkBatch`)`` Optional. Spark batch config. |
| `sparkRBatch` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.SparkRBatch`)`` Optional. SparkR batch config. |
| `sparkSqlBatch` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.SparkSqlBatch`)`` Optional. SparkSql batch config. |

### Timestamp

| JSON representation |
|---|
| ``` { "seconds": string, "nanos": integer } ``` |

| Fields ||
|---|---|
| `seconds` | `string (https://developers.google.com/discovery/v1/type-format format)` Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
| `nanos` | `integer` Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |

### PySparkBatch

| JSON representation |
|---|
| ``` { "mainPythonFileUri": string, "args": [ string ], "pythonFileUris": [ string ], "jarFileUris": [ string ], "fileUris": [ string ], "archiveUris": [ string ] } ``` |

| Fields ||
|---|---|
| `mainPythonFileUri` | `string` Required. The HCFS URI of the main Python file to use as the Spark driver. Must be a .py file. |
| `args[]` | `string` Optional. The arguments to pass to the driver. Do not include arguments that can be set as batch properties, such as `--conf`, since a collision can occur that causes an incorrect batch submission. |
| `pythonFileUris[]` | `string` Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: `.py`, `.egg`, and `.zip`. |
| `jarFileUris[]` | `string` Optional. HCFS URIs of jar files to add to the classpath of the Spark driver and tasks. |
| `fileUris[]` | `string` Optional. HCFS URIs of files to be placed in the working directory of each executor. |
| `archiveUris[]` | `string` Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. |

### SparkBatch

| JSON representation |
|---|
| ``` { "args": [ string ], "jarFileUris": [ string ], "fileUris": [ string ], "archiveUris": [ string ], // Union field `driver` can be only one of the following: "mainJarFileUri": string, "mainClass": string // End of list of possible types for union field `driver`. } ``` |

| Fields ||
|---|---|
| `args[]` | `string` Optional. The arguments to pass to the driver. Do not include arguments that can be set as batch properties, such as `--conf`, since a collision can occur that causes an incorrect batch submission. |
| `jarFileUris[]` | `string` Optional. HCFS URIs of jar files to add to the classpath of the Spark driver and tasks. |
| `fileUris[]` | `string` Optional. HCFS URIs of files to be placed in the working directory of each executor. |
| `archiveUris[]` | `string` Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. |
| Union field `driver`. The specification of the main method to call to drive the Spark workload. Specify either the jar file that contains the main class or the main class name. To pass both a main jar and a main class in that jar, add the jar to `jar_file_uris`, and then specify the main class name in `main_class`. `driver` can be only one of the following: ||
| `mainJarFileUri` | `string` Optional. The HCFS URI of the jar file that contains the main class. |
| `mainClass` | `string` Optional. The name of the driver main class. The jar file that contains the class must be in the classpath or specified in `jar_file_uris`. |

### SparkRBatch

| JSON representation |
|---|
| ``` { "mainRFileUri": string, "args": [ string ], "fileUris": [ string ], "archiveUris": [ string ] } ``` |

| Fields ||
|---|---|
| `mainRFileUri` | `string` Required. The HCFS URI of the main R file to use as the driver. Must be a `.R` or `.r` file. |
| `args[]` | `string` Optional. The arguments to pass to the Spark driver. Do not include arguments that can be set as batch properties, such as `--conf`, since a collision can occur that causes an incorrect batch submission. |
| `fileUris[]` | `string` Optional. HCFS URIs of files to be placed in the working directory of each executor. |
| `archiveUris[]` | `string` Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. |

### SparkSqlBatch

| JSON representation |
|---|
| ``` { "queryFileUri": string, "queryVariables": { string: string, ... }, "jarFileUris": [ string ] } ``` |

| Fields ||
|---|---|
| `queryFileUri` | `string` Required. The HCFS URI of the script that contains Spark SQL queries to execute. |
| `queryVariables` | `map (key: string, value: string)` Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: `SET name="value";`). An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `jarFileUris[]` | `string` Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. |

### QueryVariablesEntry

| JSON representation |
|---|
| ``` { "key": string, "value": string } ``` |

| Fields ||
|---|---|
| `key` | `string` |
| `value` | `string` |

### RuntimeInfo

| JSON representation |
|---|
| ``` { "endpoints": { string: string, ... }, "outputUri": string, "diagnosticOutputUri": string, "approximateUsage": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.UsageMetrics`) }, "currentUsage": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.UsageSnapshot`) }, "propertiesInfo": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.PropertiesInfo`) }, "cohortInfo": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.CohortInfo`) } } ``` |

| Fields ||
|---|---|
| `endpoints` | `map (key: string, value: string)` Output only. Map of remote access endpoints (such as web interfaces and APIs) to their URIs. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `outputUri` | `string` Output only. A URI pointing to the location of the stdout and stderr of the workload. |
| `diagnosticOutputUri` | `string` Output only. A URI pointing to the location of the diagnostics tarball. |
| `approximateUsage` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.UsageMetrics`)`` Output only. Approximate workload resource usage, calculated when the workload completes (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)). **Note:** This metric calculation may change in the future, for example, to capture cumulative workload resource consumption during workload execution (see the [Dataproc Serverless release notes](https://cloud.google.com/dataproc-serverless/docs/release-notes) for announcements, changes, fixes and other Dataproc developments). |
| `currentUsage` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.UsageSnapshot`)`` Output only. Snapshot of current workload resource usage. |
| `propertiesInfo` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.PropertiesInfo`)`` Optional. Properties of the workload organized by origin. |
| `cohortInfo` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.CohortInfo`)`` Output only. Information about the cohort that the workload belongs to. |

### EndpointsEntry

| JSON representation |
|---|
| ``` { "key": string, "value": string } ``` |

| Fields ||
|---|---|
| `key` | `string` |
| `value` | `string` |

### UsageMetrics

| JSON representation |
|---|
| ``` { "milliDcuSeconds": string, "shuffleStorageGbSeconds": string, "milliAcceleratorSeconds": string, "acceleratorType": string, "updateTime": string } ``` |

| Fields ||
|---|---|
| `milliDcuSeconds` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. DCU (Dataproc Compute Units) usage in (`milliDCU` x `seconds`) (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)). |
| `shuffleStorageGbSeconds` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. Shuffle storage usage in (`GB` x `seconds`) (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)). |
| `milliAcceleratorSeconds` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. \[DEPRECATED\] Accelerator usage in (`milliAccelerator` x `seconds`) (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)). |
| `acceleratorType` | `string` Optional. \[DEPRECATED\] Accelerator type being used, if any |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. The timestamp of the usage metrics. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

### UsageSnapshot

| JSON representation |
|---|
| ``` { "milliDcu": string, "shuffleStorageGb": string, "milliDcuPremium": string, "shuffleStorageGbPremium": string, "milliAccelerator": string, "acceleratorType": string, "snapshotTime": string } ``` |

| Fields ||
|---|---|
| `milliDcu` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)). |
| `shuffleStorageGb` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. Shuffle Storage in gigabytes (GB). (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)) |
| `milliDcuPremium` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at premium tier (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)). |
| `shuffleStorageGbPremium` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)) |
| `milliAccelerator` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. Milli (one-thousandth) accelerator. (see [Dataproc Serverless pricing](https://cloud.google.com/dataproc-serverless/pricing)) |
| `acceleratorType` | `string` Optional. Accelerator type being used, if any |
| `snapshotTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. The timestamp of the usage snapshot. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

### PropertiesInfo

| JSON representation |
|---|
| ``` { "autotuningProperties": { string: { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.ValueInfo`) }, ... } } ``` |

| Fields ||
|---|---|
| `autotuningProperties` | ``map (key: string, value: object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.ValueInfo`))`` Output only. Properties set by autotuning engine. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

### AutotuningPropertiesEntry

| JSON representation |
|---|
| ``` { "key": string, "value": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.ValueInfo`) } } ``` |

| Fields ||
|---|---|
| `key` | `string` |
| `value` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.ValueInfo`)`` |

### ValueInfo

| JSON representation |
|---|
| ``` { "value": string, "annotation": string, "overriddenValue": string } ``` |

| Fields ||
|---|---|
| `value` | `string` Property value. |
| `annotation` | `string` Annotation, comment or explanation why the property was set. |
| `overriddenValue` | `string` Optional. Value which was replaced by the corresponding component. |

### CohortInfo

| JSON representation |
|---|
| ``` { "cohort": string, "cohortSource": enum (`CohortSource`) } ``` |

| Fields ||
|---|---|
| `cohort` | `string` Output only. Final cohort that was used to tune the workload. |
| `cohortSource` | ``enum (`CohortSource`)`` Output only. Source of the cohort. |

### LabelsEntry

| JSON representation |
|---|
| ``` { "key": string, "value": string } ``` |

| Fields ||
|---|---|
| `key` | `string` |
| `value` | `string` |

### RuntimeConfig

| JSON representation |
|---|
| ``` { "version": string, "containerImage": string, "properties": { string: string, ... }, "repositoryConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.RepositoryConfig`) }, "autotuningConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.AutotuningConfig`) }, "cohort": string } ``` |

| Fields ||
|---|---|
| `version` | `string` Optional. Version of the batch runtime. |
| `containerImage` | `string` Optional. Optional custom container image for the job runtime environment. If not specified, a default container image will be used. |
| `properties` | `map (key: string, value: string)` Optional. A mapping of property names to values, which are used to configure workload execution. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `repositoryConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.RepositoryConfig`)`` Optional. Dependency repository configuration. |
| `autotuningConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.AutotuningConfig`)`` Optional. Autotuning configuration of the workload. |
| `cohort` | `string` Optional. Cohort identifier. Identifies families of the workloads that have the same shape, for example, daily ETL jobs. |

### PropertiesEntry

| JSON representation |
|---|
| ``` { "key": string, "value": string } ``` |

| Fields ||
|---|---|
| `key` | `string` |
| `value` | `string` |

### RepositoryConfig

| JSON representation |
|---|
| ``` { "pypiRepositoryConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.PyPiRepositoryConfig`) } } ``` |

| Fields ||
|---|---|
| `pypiRepositoryConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.PyPiRepositoryConfig`)`` Optional. Configuration for PyPi repository. |

### PyPiRepositoryConfig

| JSON representation |
|---|
| ``` { "pypiRepository": string } ``` |

| Fields ||
|---|---|
| `pypiRepository` | `string` Optional. The PyPi repository address. **Note: This field is not available for batch workloads.** |

### AutotuningConfig

| JSON representation |
|---|
| ``` { "scenarios": [ enum (`Scenario`) ] } ``` |

| Fields ||
|---|---|
| `scenarios[]` | ``enum (`Scenario`)`` Optional. Scenarios for which tunings are applied. |

### EnvironmentConfig

| JSON representation |
|---|
| ``` { "executionConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.ExecutionConfig`) }, "peripheralsConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.PeripheralsConfig`) } } ``` |

| Fields ||
|---|---|
| `executionConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.ExecutionConfig`)`` Optional. Execution configuration for a workload. |
| `peripheralsConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.PeripheralsConfig`)`` Optional. Peripherals configuration that workload has access to. |

### ExecutionConfig

| JSON representation |
|---|
| ``` { "serviceAccount": string, "networkTags": [ string ], "kmsKey": string, "idleTtl": string, "ttl": string, "stagingBucket": string, "authenticationConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.AuthenticationConfig`) }, // Union field `network` can be only one of the following: "networkUri": string, "subnetworkUri": string // End of list of possible types for union field `network`. } ``` |

| Fields ||
|---|---|
| `serviceAccount` | `string` Optional. Service account that used to execute workload. |
| `networkTags[]` | `string` Optional. Tags used for network traffic control. |
| `kmsKey` | `string` Optional. The Cloud KMS key to use for encryption. |
| `idleTtl` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Optional. Applies to sessions only. The duration to keep the session alive while it's idling. Exceeding this threshold causes the session to terminate. This field cannot be set on a batch workload. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). Defaults to 1 hour if not set. If both `ttl` and `idle_ttl` are specified for an interactive session, the conditions are treated as `OR` conditions: the workload will be terminated when it has been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs first. |
| `ttl` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Optional. The duration after which the workload will be terminated, specified as the JSON representation for [Duration](https://protobuf.dev/programming-guides/proto3/#json). When the workload exceeds this duration, it will be unconditionally terminated without waiting for ongoing work to finish. If `ttl` is not specified for a batch workload, the workload will be allowed to run until it exits naturally (or run forever without exiting). If `ttl` is not specified for an interactive session, it defaults to 24 hours. If `ttl` is not specified for a batch that uses 2.1+ runtime version, it defaults to 4 hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` and `idle_ttl` are specified (for an interactive session), the conditions are treated as `OR` conditions: the workload will be terminated when it has been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs first. |
| `stagingBucket` | `string` Optional. A Cloud Storage bucket used to stage workload dependencies, config files, and store workload output and other ephemeral data, such as Spark history files. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location according to the region where your workload is running, and then create and manage project-level, per-location staging and temporary buckets. **This field requires a Cloud Storage bucket name, not a `gs://...` URI to a Cloud Storage bucket.** |
| `authenticationConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.AuthenticationConfig`)`` Optional. Authentication configuration used to set the default identity for the workload execution. The config specifies the type of identity (service account or user) that will be used by workloads to access resources on the project(s). |
| Union field `network`. Network configuration for workload execution. `network` can be only one of the following: ||
| `networkUri` | `string` Optional. Network URI to connect workload to. |
| `subnetworkUri` | `string` Optional. Subnetwork URI to connect workload to. |

### Duration

| JSON representation |
|---|
| ``` { "seconds": string, "nanos": integer } ``` |

| Fields ||
|---|---|
| `seconds` | `string (https://developers.google.com/discovery/v1/type-format format)` Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years |
| `nanos` | `integer` Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. |

### AuthenticationConfig

| JSON representation |
|---|
| ``` { "userWorkloadAuthenticationType": enum (`AuthenticationType`) } ``` |

| Fields ||
|---|---|
| `userWorkloadAuthenticationType` | ``enum (`AuthenticationType`)`` Optional. Authentication type for the user workload running in containers. |

### PeripheralsConfig

| JSON representation |
|---|
| ``` { "metastoreService": string, "sparkHistoryServerConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.SparkHistoryServerConfig`) } } ``` |

| Fields ||
|---|---|
| `metastoreService` | `string` Optional. Resource name of an existing Dataproc Metastore service. Example: - `projects/[project_id]/locations/[region]/services/[service_id]` |
| `sparkHistoryServerConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_batch#Input.Schema.SparkHistoryServerConfig`)`` Optional. The Spark History Server configuration for the workload. |

### SparkHistoryServerConfig

| JSON representation |
|---|
| ``` { "dataprocCluster": string } ``` |

| Fields ||
|---|---|
| `dataprocCluster` | `string` Optional. Resource name of an existing Dataproc Cluster to act as a Spark History Server for the workload. Example: - `projects/[project_id]/regions/[region]/clusters/[cluster_name]` |

### StateHistory

| JSON representation |
|---|
| ``` { "state": enum (`State`), "stateMessage": string, "stateStartTime": string } ``` |

| Fields ||
|---|---|
| `state` | ``enum (`State`)`` Output only. The state of the batch at this point in history. |
| `stateMessage` | `string` Output only. Details about the state at this point in history. |
| `stateStartTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the batch entered the historical state. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## Output Schema

This resource represents a long-running operation that is the result of a network API call.

### Operation

| JSON representation |
|---|
| ``` { "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field `result` can be only one of the following: "error": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_cluster#Output.Schema.Status`) }, "response": { "@type": string, field1: ..., ... } // End of list of possible types for union field `result`. } ``` |

| Fields ||
|---|---|
| `name` | `string` 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}`. |
| `metadata` | `object` 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. An object containing fields of an arbitrary type. An additional field `"@type"` contains a URI identifying the type. Example: `{ "id": 1234, "@type": "types.example.com/standard/id" }`. |
| `done` | `boolean` 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. |
| Union field `result`. The operation result, which can be either an `error` or a valid `response`. If `done` == `false`, neither `error` nor `response` is set. If `done` == `true`, exactly one of `error` or `response` can be set. Some services might not provide the result. `result` can be only one of the following: ||
| `error` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/mcp/tools_list/create_cluster#Output.Schema.Status`)`` The error result of the operation in case of failure or cancellation. |
| `response` | `object` 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`. An object containing fields of an arbitrary type. An additional field `"@type"` contains a URI identifying the type. Example: `{ "id": 1234, "@type": "types.example.com/standard/id" }`. |

### Any

| JSON representation |
|---|
| ``` { "typeUrl": string, "value": string } ``` |

| Fields ||
|---|---|
| `typeUrl` | `string` Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name. Example: type.googleapis.com/google.protobuf.StringValue This string must contain at least one `/` character, and the content after the last `/` must be the fully-qualified name of the type in canonical form, without a leading dot. Do not write a scheme on these URI references so that clients do not attempt to contact them. The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last `/` to identify the type. `type.googleapis.com/` is a common default prefix that some legacy implementations require. This prefix does not indicate the origin of the type, and URIs containing it are not expected to respond to any requests. All type URL strings must be legal URI references with the additional restriction (for the text format) that the content of the reference must consist only of alphanumeric characters, percent-encoded escapes, and characters in the following set (not including the outer backticks): `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations should not unescape them to prevent confusion with existing parsers. For example, `type.googleapis.com%2FFoo` should be rejected. In the original design of `Any`, the possibility of launching a type resolution service at these type URLs was considered but Protobuf never implemented one and considers contacting these URLs to be problematic and a potential security issue. Do not attempt to contact type URLs. |
| `value` | `string (https://developers.google.com/discovery/v1/type-format format)` Holds a Protobuf serialization of the type described by type_url. A base64-encoded string. |

### Status

| JSON representation |
|---|
| ``` { "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } ``` |

| Fields ||
|---|---|
| `code` | `integer` The status code, which should be an enum value of `google.rpc.Code`. |
| `message` | `string` A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the `google.rpc.Status.details` field, or localized by the client. |
| `details[]` | `object` A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field `"@type"` contains a URI identifying the type. Example: `{ "id": 1234, "@type": "types.example.com/standard/id" }`. |

### Tool Annotations

Destructive Hint: ❌ \| Idempotent Hint: ✅ \| Read Only Hint: ❌ \| Open World Hint: ❌