- [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#SCHEMA_REPRESENTATION)
- [ExecutionConfig](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#ExecutionConfig)
  - [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#ExecutionConfig.SCHEMA_REPRESENTATION)
- [AuthenticationConfig](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#AuthenticationConfig)
  - [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#AuthenticationConfig.SCHEMA_REPRESENTATION)
- [AuthenticationType](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#AuthenticationType)
- [PeripheralsConfig](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#PeripheralsConfig)
  - [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#PeripheralsConfig.SCHEMA_REPRESENTATION)

Environment configuration for a workload.

| JSON representation |
|---|
| ``` { "executionConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#ExecutionConfig`) }, "peripheralsConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#PeripheralsConfig`) } } ``` |

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

## ExecutionConfig

Execution configuration for a workload.

| 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/rest/v1/EnvironmentConfig#AuthenticationConfig`) }, "resourceManagerTags": { string: string, ... }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "networkUri": string, "subnetworkUri": string // End of mutually exclusive fields. } ``` |

| 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 `idleTtl` are specified for an interactive session, the conditions are treated as `OR` conditions: the workload will be terminated when it has been idle for `idleTtl` 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 `idleTtl` are specified (for an interactive session), the conditions are treated as `OR` conditions: the workload will be terminated when it has been idle for `idleTtl` 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/rest/v1/EnvironmentConfig#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). |
| `resourceManagerTags` | `map (key: string, value: string)` Optional. Associates Resource Manager tags with the workload nodes. There is a max limit of 30 tags. Keys and values can be either in numeric format, such as `tagKeys/{tag_key_id}` and `tagValues/{tag_value_id}`, or in namespaced format, such as `{org_id|projectId}/{tag_key_short_name}` and `{tag_value_short_name}`. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| Network configuration for workload execution. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `networkUri` | `string` Optional. Network URI to connect workload to. |
| `subnetworkUri` | `string` Optional. Subnetwork URI to connect workload to. |
| End of mutually exclusive fields. ||

## AuthenticationConfig

Authentication configuration for a workload is 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).

| JSON representation |
|---|
| ``` { "userWorkloadAuthenticationType": enum (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#AuthenticationType`) } ``` |

| Fields ||
|---|---|
| `userWorkloadAuthenticationType` | ``enum (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/EnvironmentConfig#AuthenticationType`)`` Optional. Authentication type for the user workload running in containers. |

## AuthenticationType

Authentication types for workload execution.

| Enums ||
|---|---|
| `AUTHENTICATION_TYPE_UNSPECIFIED` | If AuthenticationType is unspecified then END_USER_CREDENTIALS is used for 3.0 and newer runtimes, and SERVICE_ACCOUNT is used for older runtimes. |
| `SERVICE_ACCOUNT` | Use service account credentials for authenticating to other services. |
| `END_USER_CREDENTIALS` | Use OAuth credentials associated with the workload creator/user for authenticating to other services. |

## PeripheralsConfig

Auxiliary services configuration for a workload.

| JSON representation |
|---|
| ``` { "metastoreService": string, "sparkHistoryServerConfig": { object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/SparkHistoryServerConfig`) } } ``` |

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