Managed Spark API, gRPC: ClusterService.Update
Updates configuration of the specified Spark cluster.
gRPC request
rpc Update (UpdateClusterRequest) returns (operation.Operation)
UpdateClusterRequest
{
"cluster_id": "string",
"update_mask": "google.protobuf.FieldMask",
"name": "string",
"description": "string",
"labels": "map<string, string>",
"config_spec": {
"resource_pools": {
"driver": {
"resource_preset_id": "string",
"scale_policy": {
// Includes only one of the fields `fixed_scale`, `auto_scale`
"fixed_scale": {
"size": "int64"
},
"auto_scale": {
"min_size": "int64",
"max_size": "int64"
}
// end of the list of possible fields
}
},
"executor": {
"resource_preset_id": "string",
"scale_policy": {
// Includes only one of the fields `fixed_scale`, `auto_scale`
"fixed_scale": {
"size": "int64"
},
"auto_scale": {
"min_size": "int64",
"max_size": "int64"
}
// end of the list of possible fields
}
}
},
"history_server": {
"enabled": "bool"
},
"dependencies": {
"pip_packages": [
"string"
],
"deb_packages": [
"string"
]
},
"metastore": {
"cluster_id": "string"
},
"spark_version": "string",
"environment_id": "string"
},
"network_spec": {
"security_group_ids": [
"string"
]
},
"deletion_protection": "bool",
"service_account_id": "string",
"logging": {
"enabled": "bool",
// Includes only one of the fields `folder_id`, `log_group_id`
"folder_id": "string",
"log_group_id": "string"
// end of the list of possible fields
},
"maintenance_window": {
// Includes only one of the fields `anytime`, `weekly_maintenance_window`
"anytime": "AnytimeMaintenanceWindow",
"weekly_maintenance_window": {
"day": "WeekDay",
"hour": "int64"
}
// end of the list of possible fields
}
}
Update Cluster Request.
|
Field |
Description |
|
cluster_id |
string Required field. ID of the Spark cluster. The maximum string length in characters is 50. |
|
update_mask |
Cluster Update Field Mask. |
|
name |
string Value must match the regular expression |
|
description |
string Description of the Spark cluster. 0-256 characters long. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Cluster Labels. The maximum string length in characters for each value is 63. The string length in characters for each key must be 1-63. Each key must match the regular expression |
|
config_spec |
Cluster Update Configuration. |
|
network_spec |
Network Update Configuration. |
|
deletion_protection |
bool Deletion Protection inhibits deletion of the cluster. |
|
service_account_id |
string Service account used to access Cloud resources. The maximum string length in characters is 50. |
|
logging |
Cloud logging configuration. |
|
maintenance_window |
Window of maintenance operations. |
UpdateClusterConfigSpec
Cluster Update Configuration.
|
Field |
Description |
|
resource_pools |
Resource Pools. |
|
history_server |
Configuration for HistoryServer. |
|
dependencies |
Container custom environment dependencies. |
|
metastore |
Metastore Cluster. |
|
spark_version |
string Spark version. Format: "Major.Minor". |
|
environment_id |
string Job Environment ID. The maximum string length in characters is 50. |
ResourcePools
Resource Pools.
|
Field |
Description |
|
driver |
Required field. Driver Resource Pool. |
|
executor |
Required field. Executor Resource Pool. |
ResourcePool
Resource Pool.
|
Field |
Description |
|
resource_preset_id |
string Required field. ID of the preset for computational resources allocated to a instance (e.g., CPU, memory, etc.). The maximum string length in characters is 50. |
|
scale_policy |
Required field. Scale Policy. |
ScalePolicy
Scale Policy.
|
Field |
Description |
|
fixed_scale |
Fixed Scale Policy. Includes only one of the fields Scale Type. |
|
auto_scale |
Auto Scale Policy. Includes only one of the fields Scale Type. |
FixedScale
Fixed Scale Policy.
|
Field |
Description |
|
size |
int64 Fixed Size. Acceptable values are 1 to 100, inclusive. |
AutoScale
Auto Scale Policy.
|
Field |
Description |
|
min_size |
int64 Min Size. Acceptable values are 0 to 100, inclusive. |
|
max_size |
int64 Max Size. Acceptable values are 1 to 100, inclusive. |
HistoryServerConfig
Configuration for HistoryServer.
|
Field |
Description |
|
enabled |
bool History Server is enabled. |
Dependencies
Cluster Dependencies.
|
Field |
Description |
|
pip_packages[] |
string Pip Packages. |
|
deb_packages[] |
string Deb Packages. |
Metastore
Metastore Cluster.
|
Field |
Description |
|
cluster_id |
string Cluster ID. The maximum string length in characters is 50. |
UpdateNetworkConfigSpec
Network Update Configuration.
|
Field |
Description |
|
security_group_ids[] |
string User security groups. |
LoggingConfig
Logging Config.
|
Field |
Description |
|
enabled |
bool Logging is enabled. |
|
folder_id |
string Folder ID. Value must match the regular expression Includes only one of the fields Destination. |
|
log_group_id |
string Logging Group ID. Value must match the regular expression Includes only one of the fields Destination. |
MaintenanceWindow
|
Field |
Description |
|
anytime |
Includes only one of the fields |
|
weekly_maintenance_window |
Includes only one of the fields |
AnytimeMaintenanceWindow
|
Field |
Description |
|
Empty |
|
WeeklyMaintenanceWindow
|
Field |
Description |
|
day |
enum WeekDay
|
|
hour |
int64 Hour of the day in UTC. Acceptable values are 1 to 24, inclusive. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Any"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
created_at |
Creation timestamp. |
|
created_by |
string ID of the user or service account who initiated the operation. |
|
modified_at |
The time when the Operation resource was last modified. |
|
done |
bool If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |