Google Cloud Dataproc WorkflowTemplates API

Operations on workflow templates

OpenAPI Specification

google-cloud-dataproc-workflowtemplates-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Dataproc Clusters WorkflowTemplates 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: WorkflowTemplates
  description: Operations on workflow templates
paths:
  /projects/{project}/regions/{region}/workflowTemplates:
    get:
      tags:
      - WorkflowTemplates
      summary: Google Cloud Dataproc List workflow templates
      description: Lists workflows that match the specified filter in the request.
      operationId: listWorkflowTemplates
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: region
        in: path
        required: true
        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/ListWorkflowTemplatesResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
    post:
      tags:
      - WorkflowTemplates
      summary: Google Cloud Dataproc Create a workflow template
      description: Creates new workflow template.
      operationId: createWorkflowTemplate
      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/WorkflowTemplate'
      responses:
        '200':
          description: Workflow template created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowTemplate'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
components:
  schemas:
    WorkflowTemplate:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        version:
          type: integer
        createTime:
          type: string
          format: date-time
        updateTime:
          type: string
          format: date-time
        labels:
          type: object
          additionalProperties:
            type: string
        placement:
          type: object
          properties:
            managedCluster:
              type: object
              properties:
                clusterName:
                  type: string
                config:
                  $ref: '#/components/schemas/ClusterConfig'
            clusterSelector:
              type: object
              properties:
                zone:
                  type: string
                clusterLabels:
                  type: object
                  additionalProperties:
                    type: string
        jobs:
          type: array
          items:
            type: object
            properties:
              stepId:
                type: string
              hadoopJob:
                type: object
              sparkJob:
                type: object
              pysparkJob:
                type: object
              hiveJob:
                type: object
              pigJob:
                type: object
              prerequisiteStepIds:
                type: array
                items:
                  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
    ListWorkflowTemplatesResponse:
      type: object
      properties:
        templates:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowTemplate'
        nextPageToken:
          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