The Workflows connector defines the built-in
functions that can be used to access other Google Cloud products within a
workflow.

This page provides an overview of the individual connector.
There is no need to import or load connector libraries in a workflow---connectors
work out of the box when used in a call step.

## Batch API

An API to manage the running of batch jobs on Google Cloud Platform.
To learn more, see the [Batch API documentation](https://cloud.google.com/batch/).

## Batch connector sample

### YAML

    # This workflow demonstrates how to use the Batch connector.
    # This workflow sends a List request to Batch connector.
    main:
      steps:
        - init:
            assign:
              - project: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}
              - location: ${sys.get_env("GOOGLE_CLOUD_LOCATION")}
              - jobId: "example-job"
        - create_job:
            call: googleapis.batch.v1.projects.locations.jobs.create
            args:
              parent: ${"projects/" + project + "/locations/" + location}
              jobId: ${jobId}
              body:
                priority: 99
                taskGroups:
                  taskSpec:
                    runnables:
                      script:
                        text: "echo Hello World!"
                    computeResource:
                      cpuMilli: 2000
                      memoryMib: 16
                  taskCount: 1
        - delete_job:
            call: googleapis.batch.v1.projects.locations.jobs.delete
            args:
              name: ${"projects/" + project + "/locations/" + location + "/jobs/" + jobId}

### JSON

    {
      "main": {
        "steps": [
          {
            "init": {
              "assign": [
                {
                  "project": "${sys.get_env(\"GOOGLE_CLOUD_PROJECT_ID\")}"
                },
                {
                  "location": "${sys.get_env(\"GOOGLE_CLOUD_LOCATION\")}"
                },
                {
                  "jobId": "example-job"
                }
              ]
            }
          },
          {
            "create_job": {
              "call": "googleapis.batch.v1.projects.locations.jobs.create",
              "args": {
                "parent": "${\"projects/\" + project + \"/locations/\" + location}",
                "jobId": "${jobId}",
                "body": {
                  "priority": 99,
                  "taskGroups": {
                    "taskSpec": {
                      "runnables": {
                        "script": {
                          "text": "echo Hello World!"
                        }
                      },
                      "computeResource": {
                        "cpuMilli": 2000,
                        "memoryMib": 16
                      }
                    },
                    "taskCount": 1
                  }
                }
              }
            }
          },
          {
            "delete_job": {
              "call": "googleapis.batch.v1.projects.locations.jobs.delete",
              "args": {
                "name": "${\"projects/\" + project + \"/locations/\" + location + \"/jobs/\" + jobId}"
              }
            }
          }
        ]
      }
    }

## Module: googleapis.batch.v1.projects.locations

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations/get` | Gets information about a location. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations/list` | Lists information about the supported locations for this service. |

## Module: googleapis.batch.v1.projects.locations.jobs

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations.jobs/create` | Create a Job. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations.jobs/delete` | Delete a Job. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations.jobs/get` | Get a Job specified by its resource name. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations.jobs/list` | List all Jobs for a project within a region. |

## Module: googleapis.batch.v1.projects.locations.jobs.taskGroups.tasks

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations.jobs.taskGroups.tasks/get` | Return a single Task. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations.jobs.taskGroups.tasks/list` | List Tasks associated with a job. |

## Module: googleapis.batch.v1.projects.locations.operations

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations.operations/get` | Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/batch/v1/projects.locations.operations/list` | Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. |