# RuntimeConfig

- [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#SCHEMA_REPRESENTATION)
- [RepositoryConfig](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#RepositoryConfig)
  - [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#RepositoryConfig.SCHEMA_REPRESENTATION)
- [PyPiRepositoryConfig](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#PyPiRepositoryConfig)
  - [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#PyPiRepositoryConfig.SCHEMA_REPRESENTATION)
- [AutotuningConfig](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#AutotuningConfig)
  - [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#AutotuningConfig.SCHEMA_REPRESENTATION)
- [Scenario](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#Scenario)

Runtime configuration for a workload.

| JSON representation |
|---|
| ``` { "version": string, "containerImage": string, "properties": { string: string, ... }, "repositoryConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#RepositoryConfig`) }, "autotuningConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#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/rest/v1/RuntimeConfig#RepositoryConfig`)`` Optional. Dependency repository configuration. |
| `autotuningConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#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. |

## RepositoryConfig

Configuration for dependency repositories

| JSON representation |
|---|
| ``` { "pypiRepositoryConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#PyPiRepositoryConfig`) } } ``` |

| Fields ||
|---|---|
| `pypiRepositoryConfig` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#PyPiRepositoryConfig`)`` Optional. Configuration for PyPi repository. |

## PyPiRepositoryConfig

Configuration for PyPi repository

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

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

## AutotuningConfig

Autotuning configuration of the workload.

| JSON representation |
|---|
| ``` { "scenarios": [ enum (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#Scenario`) ] } ``` |

| Fields ||
|---|---|
| `scenarios[]` | ``enum (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/RuntimeConfig#Scenario`)`` Optional. Scenarios for which tunings are applied. |

## Scenario

Scenario represents a specific goal that autotuning will attempt to achieve by modifying workloads.

| Enums ||
|---|---|
| `SCENARIO_UNSPECIFIED` | Default value. |
| `SCALING` | Scaling recommendations such as initialExecutors. |
| `BROADCAST_HASH_JOIN` | Adding hints for potential relation broadcasts. |
| `MEMORY` | Memory management for workloads. |
| `NONE` | No autotuning. |
| `AUTO` | Automatic selection of scenarios. |