{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/cloudera/main/json-schema/cloudera-create-gcpcluster-request-schema.json",
  "title": "CreateGCPClusterRequest",
  "description": "Request object for create GCP cluster request.",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudera-data-hub-api-openapi.yml#/components/schemas/CreateGCPClusterRequest",
  "type": "object",
  "properties": {
    "clusterName": {
      "type": "string",
      "description": "The name of the cluster. This name must be unique, must have between 5 and 40 characters, and must contain only lowercase letters, numbers and hyphens. Names are case-sensitive.",
      "minLength": 5,
      "maxLength": 40
    },
    "clusterDefinitionName": {
      "type": "string",
      "description": "The name or CRN of the cluster definition to use for cluster creation."
    },
    "environmentName": {
      "type": "string",
      "description": "Name or CRN of the environment to use when creating the cluster. The environment must be a GCP environment."
    },
    "clusterTemplateName": {
      "type": "string",
      "description": "Name or CRN of the cluster template to use for cluster creation."
    },
    "customConfigurationsName": {
      "type": "string",
      "description": "The name of the custom configurations to use for cluster creation."
    },
    "instanceGroups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GCPInstanceGroupRequest"
      },
      "description": "Instance group details."
    },
    "subnetName": {
      "type": "string",
      "description": "The subnet name."
    },
    "image": {
      "$ref": "#/$defs/ImageRequest",
      "description": "The image to be used for cluster creation."
    },
    "tags": {
      "type": "array",
      "description": "Tags that can be attached to GCP Data Hub resources. Please refer to Google documentation for the rules https://cloud.google.com/compute/docs/labeling-resources#label_format.",
      "items": {
        "$ref": "#/$defs/GCPDatahubResourceTagRequest"
      }
    },
    "requestTemplate": {
      "type": "string",
      "description": "JSON template to use for cluster creation. This is different from cluster template and would be removed in the future."
    },
    "datahubDatabase": {
      "$ref": "#/$defs/DatahubDatabaseType",
      "description": "Database type for datahub. Currently supported values: NONE, NON_HA, HA"
    },
    "clusterExtension": {
      "$ref": "#/$defs/ClusterExtension",
      "description": "Cluster extensions for the given Data Hub cluster.",
      "x-no-compatibility-guarantee": true
    },
    "javaVersion": {
      "type": "integer",
      "format": "int32",
      "description": "Configure the major version of Java on the cluster."
    },
    "multiAz": {
      "default": false,
      "type": "boolean",
      "description": "Creates CDP Data Hub distributed across multiple availability zones in GCP region"
    }
  },
  "$defs": {
    "AttachedVolumeRequest": {
      "type": "object",
      "description": "Configurations for additional attached volumes.",
      "required": [
        "volumeSize",
        "volumeCount",
        "volumeType"
      ],
      "properties": {
        "volumeSize": {
          "type": "integer",
          "format": "int32",
          "description": "The attached volume size."
        },
        "volumeCount": {
          "type": "integer",
          "format": "int32",
          "description": "The attached volume count."
        },
        "volumeType": {
          "type": "string",
          "description": "The attached volume type."
        }
      }
    },
    "ClusterExtension": {
      "type": "object",
      "description": "Cluster extensions for Data Hub cluster.",
      "x-no-compatibility-guarantee": true,
      "properties": {
        "customProperties": {
          "type": "string",
          "description": "The custom properties JSON, encoded in base64."
        }
      }
    },
    "DatahubDatabaseType": {
      "type": "string",
      "description": "Database type for datahub. Currently supported values: NONE, NON_HA, HA",
      "enum": [
        "HA",
        "NON_HA",
        "NONE"
      ]
    },
    "GCPDatahubResourceTagRequest": {
      "type": "object",
      "description": "A label that can be attached to GCP Data Hub resources. Please refer to Google documentation for the rules https://cloud.google.com/compute/docs/labeling-resources#label_format.",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of tag."
        },
        "value": {
          "type": "string",
          "description": "The value of the tag."
        }
      }
    },
    "GCPInstanceGroupRequest": {
      "type": "object",
      "description": "Configurations for instance group",
      "required": [
        "nodeCount",
        "instanceGroupName",
        "instanceGroupType",
        "instanceType",
        "rootVolumeSize",
        "attachedVolumeConfiguration"
      ],
      "properties": {
        "nodeCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of instances in the instance group"
        },
        "instanceGroupName": {
          "type": "string",
          "description": "The instance group name."
        },
        "instanceGroupType": {
          "type": "string",
          "description": "The instance group type."
        },
        "instanceType": {
          "type": "string",
          "description": "The cloud provider specific instance type to be used."
        },
        "rootVolumeSize": {
          "type": "integer",
          "format": "int32",
          "description": "The root volume size."
        },
        "attachedVolumeConfiguration": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttachedVolumeRequest"
          },
          "description": "The attached volume configuration. This does not include root volume."
        },
        "recipeNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The names or CRNs of the recipes that would be applied to the instance group."
        },
        "recoveryMode": {
          "type": "string",
          "description": "Recovery mode for the instance group."
        },
        "availabilityZones": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of availability zones that this instance group is associated with."
        }
      }
    },
    "ImageRequest": {
      "type": "object",
      "description": "The details of the image used for cluster instances.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the image used for cluster instances. This is generated by the cloud provider to uniquely identify the image."
        },
        "catalogName": {
          "type": "string",
          "description": "The image catalog name."
        },
        "os": {
          "type": "string",
          "description": "The OS of the image used for cluster instances."
        }
      }
    }
  }
}