{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-dataproc/json-schema/google-cloud-dataproc-service-schema.json",
  "title": "Service",
  "description": "A managed metastore service that serves metadata queries.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-dataproc-metastore-projects-api-openapi.yml#/components/schemas/Service",
  "type": "object",
  "properties": {
    "port": {
      "format": "int32",
      "description": "Optional. The TCP port at which the metastore service is reached. Default: 9083.",
      "type": "integer"
    },
    "maintenanceWindow": {
      "$ref": "#/$defs/MaintenanceWindow",
      "description": "Optional. The one hour maintenance window of the metastore service. This specifies when the service can be restarted for maintenance purposes in UTC time. Maintenance window is not needed for services with the SPANNER database type."
    },
    "databaseType": {
      "type": "string",
      "enum": [
        "DATABASE_TYPE_UNSPECIFIED",
        "MYSQL",
        "SPANNER"
      ],
      "description": "Immutable. The database type that the Metastore service stores its data."
    },
    "artifactGcsUri": {
      "readOnly": true,
      "description": "Output only. A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored.",
      "type": "string"
    },
    "updateTime": {
      "format": "google-datetime",
      "description": "Output only. The time when the metastore service was last updated.",
      "type": "string",
      "readOnly": true
    },
    "tier": {
      "description": "Optional. The tier of the service.",
      "type": "string",
      "enum": [
        "TIER_UNSPECIFIED",
        "DEVELOPER",
        "ENTERPRISE"
      ]
    },
    "metadataIntegration": {
      "$ref": "#/$defs/MetadataIntegration",
      "description": "Optional. The setting that defines how metastore metadata should be integrated with external services and systems."
    },
    "stateMessage": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. Additional information about the current state of the metastore service, if available."
    },
    "networkConfig": {
      "$ref": "#/$defs/NetworkConfig",
      "description": "Optional. The configuration specifying the network settings for the Dataproc Metastore service."
    },
    "endpointUri": {
      "readOnly": true,
      "description": "Output only. The URI of the endpoint used to access the metastore service.",
      "type": "string"
    },
    "releaseChannel": {
      "type": "string",
      "enum": [
        "RELEASE_CHANNEL_UNSPECIFIED",
        "CANARY",
        "STABLE"
      ],
      "description": "Immutable. The release channel of the service. If unspecified, defaults to STABLE."
    },
    "encryptionConfig": {
      "$ref": "#/$defs/EncryptionConfig",
      "description": "Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated."
    },
    "scheduledBackup": {
      "$ref": "#/$defs/ScheduledBackup",
      "description": "Optional. The configuration of scheduled backup for the metastore service."
    },
    "createTime": {
      "format": "google-datetime",
      "description": "Output only. The time when the metastore service was created.",
      "readOnly": true,
      "type": "string"
    },
    "scalingConfig": {
      "$ref": "#/$defs/ScalingConfig",
      "description": "Optional. Scaling configuration of the metastore service."
    },
    "metadataManagementActivity": {
      "$ref": "#/$defs/MetadataManagementActivity",
      "description": "Output only. The metadata management activities of the metastore service."
    },
    "state": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "STATE_UNSPECIFIED",
        "CREATING",
        "ACTIVE",
        "SUSPENDING",
        "SUSPENDED",
        "UPDATING",
        "DELETING",
        "ERROR",
        "AUTOSCALING",
        "MIGRATING",
        "PROXY"
      ],
      "description": "Output only. The current state of the metastore service."
    },
    "name": {
      "type": "string",
      "description": "Immutable. Identifier. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}."
    },
    "hiveMetastoreConfig": {
      "$ref": "#/$defs/HiveMetastoreConfig",
      "description": "Configuration information specific to running Hive metastore software as the metastore service."
    },
    "labels": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "User-defined labels for the metastore service."
    },
    "lakehouseProxyConfig": {
      "$ref": "#/$defs/LakehouseProxyConfig",
      "description": "Output only. The Lakehouse proxy routing configuration for the metastore service."
    },
    "telemetryConfig": {
      "$ref": "#/$defs/TelemetryConfig",
      "description": "Optional. The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON."
    },
    "deletionProtection": {
      "type": "boolean",
      "description": "Optional. Indicates if the dataproc metastore should be protected against accidental deletions."
    },
    "network": {
      "type": "string",
      "description": "Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}."
    },
    "uid": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. The globally unique resource identifier of the metastore service."
    },
    "tags": {
      "description": "Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "AutoscalingConfig": {
      "type": "object",
      "properties": {
        "autoscalingFactor": {
          "readOnly": true,
          "format": "float",
          "description": "Output only. The scaling factor of a service with autoscaling enabled.",
          "type": "number"
        },
        "autoscalingEnabled": {
          "description": "Optional. Whether or not autoscaling is enabled for this service.",
          "type": "boolean"
        },
        "limitConfig": {
          "$ref": "#/$defs/LimitConfig",
          "description": "Optional. The LimitConfig of the service."
        }
      },
      "description": "Represents the autoscaling configuration of a metastore service."
    },
    "AuxiliaryVersionConfig": {
      "properties": {
        "networkConfig": {
          "$ref": "#/$defs/NetworkConfig",
          "description": "Output only. The network configuration contains the endpoint URI(s) of the auxiliary Hive metastore service."
        },
        "version": {
          "description": "Optional. The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.",
          "type": "string"
        },
        "configOverrides": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Optional. A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.",
          "type": "object"
        }
      },
      "description": "Configuration information for the auxiliary service versions.",
      "type": "object"
    },
    "Consumer": {
      "description": "Contains information of the customer's network configurations.",
      "properties": {
        "endpointLocation": {
          "description": "Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}.",
          "type": "string",
          "readOnly": true
        },
        "endpointUri": {
          "type": "string",
          "description": "Output only. The URI of the endpoint used to access the metastore service.",
          "readOnly": true
        },
        "subnetwork": {
          "type": "string",
          "description": "Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}"
        }
      },
      "type": "object"
    },
    "DataCatalogConfig": {
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog."
        }
      },
      "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.",
      "type": "object"
    },
    "EncryptionConfig": {
      "type": "object",
      "description": "Encryption settings for the service.",
      "properties": {
        "kmsKey": {
          "type": "string",
          "description": "Optional. The fully qualified customer provided Cloud KMS key name to use for customer data encryption, in the following format:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}."
        }
      }
    },
    "HiveMetastoreConfig": {
      "description": "Specifies configuration information specific to running Hive metastore software as the metastore service.",
      "properties": {
        "kerberosConfig": {
          "$ref": "#/$defs/KerberosConfig",
          "description": "Optional. Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (hive_metastore_config.kerberos_config) in the request's update_mask while omitting this field from the request's service."
        },
        "endpointProtocol": {
          "description": "Optional. The protocol to use for the metastore service endpoint. If unspecified, defaults to THRIFT.",
          "type": "string",
          "enum": [
            "ENDPOINT_PROTOCOL_UNSPECIFIED",
            "THRIFT",
            "GRPC"
          ]
        },
        "auxiliaryVersions": {
          "type": "object",
          "description": "Optional. A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.",
          "additionalProperties": {
            "$ref": "#/$defs/AuxiliaryVersionConfig"
          }
        },
        "version": {
          "description": "Immutable. The Hive metastore schema version.",
          "type": "string"
        },
        "configOverrides": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "description": "Optional. A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig."
        }
      },
      "type": "object"
    },
    "KerberosConfig": {
      "type": "object",
      "properties": {
        "keytab": {
          "$ref": "#/$defs/Secret",
          "description": "Optional. A Kerberos keytab file that can be used to authenticate a service principal with a Kerberos Key Distribution Center (KDC)."
        },
        "principal": {
          "description": "Optional. A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format.",
          "type": "string"
        },
        "krb5ConfigGcsUri": {
          "type": "string",
          "description": "Optional. A Cloud Storage URI that specifies the path to a krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf, although the file does not need to be named krb5.conf explicitly."
        }
      },
      "description": "Configuration information for a Kerberos principal."
    },
    "LakehouseProxyConfig": {
      "description": "Configuration for Dataproc Metastore to Lakehouse proxy routing.In a phased migration, namespaces are migrated from Dataproc Metastore to a Lakehouse Iceberg REST Catalog in batches. Between and after migration phases, the metastore service operates in PROXY state where requests for migrated namespaces are forwarded to the Lakehouse catalog while unmigrated namespaces continue to be served locally by DPMS.",
      "type": "object",
      "properties": {
        "namespaces": {
          "readOnly": true,
          "description": "Output only. The list of namespaces currently proxied to the Lakehouse catalog. As each migration batch completes, newly migrated namespaces are added to this list.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "catalog": {
          "readOnly": true,
          "description": "Output only. The Lakehouse Iceberg REST Catalog where requests are being proxied to. Format: projects/{project_id_or_number}/catalogs/{catalog_id}.",
          "type": "string"
        }
      }
    },
    "LatestBackup": {
      "properties": {
        "backupId": {
          "description": "Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress.",
          "type": "string",
          "readOnly": true
        },
        "state": {
          "enum": [
            "STATE_UNSPECIFIED",
            "IN_PROGRESS",
            "SUCCEEDED",
            "FAILED"
          ],
          "readOnly": true,
          "description": "Output only. The current state of the backup.",
          "type": "string"
        },
        "duration": {
          "format": "google-duration",
          "readOnly": true,
          "type": "string",
          "description": "Output only. The duration of the backup completion."
        },
        "startTime": {
          "format": "google-datetime",
          "type": "string",
          "description": "Output only. The time when the backup was started.",
          "readOnly": true
        }
      },
      "type": "object",
      "description": "The details of the latest scheduled backup."
    },
    "LimitConfig": {
      "properties": {
        "maxScalingFactor": {
          "description": "Optional. The highest scaling factor that the service should be autoscaled to.",
          "type": "number",
          "format": "float"
        },
        "minScalingFactor": {
          "format": "float",
          "type": "number",
          "description": "Optional. The lowest scaling factor that the service should be autoscaled to."
        }
      },
      "description": "Represents the autoscaling limit configuration of a metastore service.",
      "type": "object"
    },
    "MaintenanceWindow": {
      "type": "object",
      "properties": {
        "hourOfDay": {
          "format": "int32",
          "description": "Optional. The hour of day (0-23) when the window starts.",
          "type": "integer"
        },
        "dayOfWeek": {
          "description": "Optional. The day of week, when the window starts.",
          "type": "string",
          "enum": [
            "DAY_OF_WEEK_UNSPECIFIED",
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
          ]
        }
      },
      "description": "Maintenance window. This specifies when Dataproc Metastore may perform system maintenance operation to the service."
    },
    "MetadataExport": {
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "STATE_UNSPECIFIED",
            "RUNNING",
            "SUCCEEDED",
            "FAILED",
            "CANCELLED"
          ],
          "description": "Output only. The current state of the export.",
          "readOnly": true
        },
        "endTime": {
          "format": "google-datetime",
          "type": "string",
          "description": "Output only. The time when the export ended.",
          "readOnly": true
        },
        "startTime": {
          "readOnly": true,
          "description": "Output only. The time when the export started.",
          "format": "google-datetime",
          "type": "string"
        },
        "databaseDumpType": {
          "type": "string",
          "description": "Output only. The type of the database dump.",
          "readOnly": true,
          "enum": [
            "TYPE_UNSPECIFIED",
            "MYSQL",
            "AVRO"
          ]
        },
        "destinationGcsUri": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated."
        }
      },
      "description": "The details of a metadata export operation.",
      "type": "object"
    },
    "MetadataIntegration": {
      "properties": {
        "dataCatalogConfig": {
          "$ref": "#/$defs/DataCatalogConfig",
          "description": "Optional. The integration config for the Data Catalog service."
        }
      },
      "type": "object",
      "description": "Specifies how metastore metadata should be integrated with external services."
    },
    "MetadataManagementActivity": {
      "type": "object",
      "properties": {
        "metadataExports": {
          "readOnly": true,
          "description": "Output only. The latest metadata exports of the metastore service.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/MetadataExport"
          }
        },
        "restores": {
          "description": "Output only. The latest restores of the metastore service.",
          "items": {
            "$ref": "#/$defs/Restore"
          },
          "type": "array",
          "readOnly": true
        }
      },
      "description": "The metadata management activities of the metastore service."
    },
    "NetworkConfig": {
      "description": "Network configuration for the Dataproc Metastore service.",
      "type": "object",
      "properties": {
        "consumers": {
          "items": {
            "$ref": "#/$defs/Consumer"
          },
          "type": "array",
          "description": "Immutable. The consumer-side network configuration for the Dataproc Metastore instance."
        }
      }
    },
    "Restore": {
      "type": "object",
      "description": "The details of a metadata restore operation.",
      "properties": {
        "backupLocation": {
          "description": "Optional. A Cloud Storage URI specifying where the backup artifacts are stored, in the format gs:///.",
          "type": "string"
        },
        "details": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The restore details containing the revision of the service to be restored to, in format of JSON."
        },
        "type": {
          "description": "Output only. The type of restore.",
          "readOnly": true,
          "enum": [
            "RESTORE_TYPE_UNSPECIFIED",
            "FULL",
            "METADATA_ONLY"
          ],
          "type": "string"
        },
        "endTime": {
          "format": "google-datetime",
          "description": "Output only. The time when the restore ended.",
          "readOnly": true,
          "type": "string"
        },
        "backup": {
          "readOnly": true,
          "description": "Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.",
          "type": "string"
        },
        "state": {
          "enum": [
            "STATE_UNSPECIFIED",
            "RUNNING",
            "SUCCEEDED",
            "FAILED",
            "CANCELLED"
          ],
          "type": "string",
          "readOnly": true,
          "description": "Output only. The current state of the restore."
        },
        "startTime": {
          "description": "Output only. The time when the restore started.",
          "type": "string",
          "format": "google-datetime",
          "readOnly": true
        }
      }
    },
    "ScalingConfig": {
      "properties": {
        "instanceSize": {
          "type": "string",
          "enum": [
            "INSTANCE_SIZE_UNSPECIFIED",
            "EXTRA_SMALL",
            "SMALL",
            "MEDIUM",
            "LARGE",
            "EXTRA_LARGE"
          ],
          "description": "An enum of readable instance sizes, with each instance size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))"
        },
        "autoscalingConfig": {
          "$ref": "#/$defs/AutoscalingConfig",
          "description": "Optional. The autoscaling configuration."
        },
        "scalingFactor": {
          "type": "number",
          "format": "float",
          "description": "Scaling factor, increments of 0.1 for values less than 1.0, and increments of 1.0 for values greater than 1.0."
        }
      },
      "type": "object",
      "description": "Represents the scaling configuration of a metastore service."
    },
    "ScheduledBackup": {
      "properties": {
        "latestBackup": {
          "$ref": "#/$defs/LatestBackup",
          "description": "Output only. The details of the latest scheduled backup."
        },
        "enabled": {
          "description": "Optional. Defines whether the scheduled backup is enabled. The default value is false.",
          "type": "boolean"
        },
        "cronSchedule": {
          "type": "string",
          "description": "Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups."
        },
        "timeZone": {
          "description": "Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC.",
          "type": "string"
        },
        "backupLocation": {
          "description": "Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it.",
          "type": "string"
        },
        "nextScheduledTime": {
          "description": "Output only. The time when the next backups execution is scheduled to start.",
          "format": "google-datetime",
          "type": "string",
          "readOnly": true
        }
      },
      "type": "object",
      "description": "This specifies the configuration of scheduled backup."
    },
    "Secret": {
      "properties": {
        "cloudSecret": {
          "type": "string",
          "description": "Optional. The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}."
        }
      },
      "description": "A securely stored value.",
      "type": "object"
    },
    "TelemetryConfig": {
      "properties": {
        "logFormat": {
          "description": "Optional. The output format of the Dataproc Metastore service's logs.",
          "type": "string",
          "enum": [
            "LOG_FORMAT_UNSPECIFIED",
            "LEGACY",
            "JSON"
          ]
        }
      },
      "description": "Telemetry Configuration for the Dataproc Metastore service.",
      "type": "object"
    }
  }
}