Google Cloud Dataproc Clusters API

Operations on Dataproc clusters

OpenAPI Specification

google-cloud-dataproc-clusters-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Dataproc Clusters API
  description: The Cloud Dataproc API manages Hadoop-based clusters and jobs on Google Cloud Platform. It provides programmatic access to create and manage clusters, submit and monitor Apache Spark, Apache Hadoop, Apache Hive, and Apache Pig jobs, and manage workflow templates for orchestrating multi-step data processing pipelines.
  version: v1
  contact:
    name: Google Cloud
    url: https://cloud.google.com/dataproc/docs/reference/rest
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://dataproc.googleapis.com/v1
  description: Cloud Dataproc API v1
tags:
- name: Clusters
  description: Operations on Dataproc clusters
paths:
  /projects/{project}/regions/{region}/clusters:
    get:
      tags:
      - Clusters
      summary: Google Cloud Dataproc List clusters
      description: Lists all regions/{region}/clusters in a project.
      operationId: listClusters
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: region
        in: path
        required: true
        schema:
          type: string
      - name: filter
        in: query
        schema:
          type: string
      - name: pageSize
        in: query
        schema:
          type: integer
      - name: pageToken
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListClustersResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
    post:
      tags:
      - Clusters
      summary: Google Cloud Dataproc Create a cluster
      description: Creates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata.
      operationId: createCluster
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: region
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Cluster'
      responses:
        '200':
          description: Cluster creation initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
  /projects/{project}/regions/{region}/clusters/{cluster}:
    get:
      tags:
      - Clusters
      summary: Google Cloud Dataproc Get a cluster
      description: Gets the resource representation for a cluster in a project.
      operationId: getCluster
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: region
        in: path
        required: true
        schema:
          type: string
      - name: cluster
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cluster'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
    patch:
      tags:
      - Clusters
      summary: Google Cloud Dataproc Update a cluster
      description: Updates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata.
      operationId: updateCluster
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: region
        in: path
        required: true
        schema:
          type: string
      - name: cluster
        in: path
        required: true
        schema:
          type: string
      - name: updateMask
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Cluster'
      responses:
        '200':
          description: Cluster update initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
    delete:
      tags:
      - Clusters
      summary: Google Cloud Dataproc Delete a cluster
      description: Deletes a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata.
      operationId: deleteCluster
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: region
        in: path
        required: true
        schema:
          type: string
      - name: cluster
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Cluster deletion initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
components:
  schemas:
    ListClustersResponse:
      type: object
      properties:
        clusters:
          type: array
          items:
            $ref: '#/components/schemas/Cluster'
        nextPageToken:
          type: string
    Cluster:
      type: object
      properties:
        projectId:
          type: string
        clusterName:
          type: string
          description: The cluster name, unique within a project.
        config:
          $ref: '#/components/schemas/ClusterConfig'
        labels:
          type: object
          additionalProperties:
            type: string
        status:
          $ref: '#/components/schemas/ClusterStatus'
        statusHistory:
          type: array
          items:
            $ref: '#/components/schemas/ClusterStatus'
        clusterUuid:
          type: string
    Operation:
      type: object
      properties:
        name:
          type: string
        done:
          type: boolean
        metadata:
          type: object
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
        response:
          type: object
    ClusterStatus:
      type: object
      properties:
        state:
          type: string
          enum:
          - UNKNOWN
          - CREATING
          - RUNNING
          - ERROR
          - ERROR_DUE_TO_UPDATE
          - DELETING
          - UPDATING
          - STOPPING
          - STOPPED
          - STARTING
          - REPAIRING
        stateStartTime:
          type: string
          format: date-time
        detail:
          type: string
    ClusterConfig:
      type: object
      properties:
        configBucket:
          type: string
        tempBucket:
          type: string
        gceClusterConfig:
          type: object
          properties:
            zoneUri:
              type: string
            networkUri:
              type: string
            subnetworkUri:
              type: string
            internalIpOnly:
              type: boolean
            serviceAccountScopes:
              type: array
              items:
                type: string
            tags:
              type: array
              items:
                type: string
            metadata:
              type: object
              additionalProperties:
                type: string
        masterConfig:
          $ref: '#/components/schemas/InstanceGroupConfig'
        workerConfig:
          $ref: '#/components/schemas/InstanceGroupConfig'
        secondaryWorkerConfig:
          $ref: '#/components/schemas/InstanceGroupConfig'
        softwareConfig:
          type: object
          properties:
            imageVersion:
              type: string
            properties:
              type: object
              additionalProperties:
                type: string
            optionalComponents:
              type: array
              items:
                type: string
        initializationActions:
          type: array
          items:
            type: object
            properties:
              executableFile:
                type: string
              executionTimeout:
                type: string
    InstanceGroupConfig:
      type: object
      properties:
        numInstances:
          type: integer
        machineTypeUri:
          type: string
        diskConfig:
          type: object
          properties:
            bootDiskType:
              type: string
            bootDiskSizeGb:
              type: integer
            numLocalSsds:
              type: integer
        imageUri:
          type: string
        preemptibility:
          type: string
          enum:
          - PREEMPTIBILITY_UNSPECIFIED
          - NON_PREEMPTIBLE
          - PREEMPTIBLE
          - SPOT
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/cloud-platform: Full access to Cloud Platform