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.

## AI Platform Training \& Prediction API

An API to enable creating and using machine learning models.
To learn more, see the [AI Platform Training \& Prediction API documentation](https://docs.cloud.google.com/ai-platform/training/docs/reference/rest).

## AI Platform Training \& Prediction connector sample

### YAML

    # This workflow expects following items to be provided through input argument for execution:
    #   - projectID (string)
    #     - The user project ID.
    #
    # Expected successful output: "SUCCESS"

    main:
      params: [args]
      steps:
        - init:
            assign:
              - project_id: ${args.projectID}
        - list_jobs:
            call: googleapis.ml.v1.projects.jobs.list
            args:
              parent: ${"projects/" + project_id}
            result: jobs
        - list_locations:
            call: googleapis.ml.v1.projects.locations.list
            args:
              parent: ${"projects/" + project_id}
            result: locations
        - the_end:
            return: "SUCCESS"

### JSON

    {
      "main": {
        "params": [
          "args"
        ],
        "steps": [
          {
            "init": {
              "assign": [
                {
                  "project_id": "${args.projectID}"
                }
              ]
            }
          },
          {
            "list_jobs": {
              "call": "googleapis.ml.v1.projects.jobs.list",
              "args": {
                "parent": "${\"projects/\" + project_id}"
              },
              "result": "jobs"
            }
          },
          {
            "list_locations": {
              "call": "googleapis.ml.v1.projects.locations.list",
              "args": {
                "parent": "${\"projects/\" + project_id}"
              },
              "result": "locations"
            }
          },
          {
            "the_end": {
              "return": "SUCCESS"
            }
          }
        ]
      }
    }

## Module: googleapis.ml.v1.projects

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects/explain` | Performs explanation on the data in the request. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects/getConfig` | Get the service account information associated with your project. You need this information in order to grant the service account permissions for the Google Cloud Storage location where you put your model training code for training the model with Google Cloud Machine Learning. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects/predict` | Performs online prediction on the data in the request. |

## Module: googleapis.ml.v1.projects.jobs

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.jobs/cancel` | Cancels a running job. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.jobs/create` | Creates a training or a batch prediction job. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.jobs/get` | Describes a job. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.jobs/getIamPolicy` | Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.jobs/list` | Lists the jobs in the project. If there are no jobs that match the request parameters, the list request returns an empty response body: {}. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.jobs/patch` | Updates a specific job resource. Currently the only supported fields to update are `labels`. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.jobs/setIamPolicy` | Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.jobs/testIamPermissions` | Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. |

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

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.locations/get` | Get the complete list of CMLE capabilities in a location, along with their location-specific properties. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.locations/list` | List all locations that provides at least one type of CMLE capability. |

## Module: googleapis.ml.v1.projects.models

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models/create` | Creates a model which will later contain one or more versions. You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models/delete` | Deletes a model. You can only delete a model if there are no versions in it. You can delete versions by calling projects.models.versions.delete. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models/get` | Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed). |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models/getIamPolicy` | Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models/list` | Lists the models in a project. Each project can contain multiple models, and each model can have multiple versions. If there are no models that match the request parameters, the list request returns an empty response body: {}. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models/patch` | Updates a specific model resource. Currently the only supported fields to update are `description` and `default_version.name`. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models/setIamPolicy` | Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models/testIamPermissions` | Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. |

## Module: googleapis.ml.v1.projects.models.versions

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models.versions/create` | Creates a new version of a model from a trained TensorFlow model. If the version created in the cloud by this call is the first deployed version of the specified model, it will be made the default version of the model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version to be the default, you must call projects.models.versions.setDefault. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models.versions/delete` | Deletes a model version. Each model can have multiple versions deployed and in use at any given time. Use this method to remove a single version. Note: You cannot delete the version that is set as the default version of the model unless it is the only remaining version. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models.versions/get` | Gets information about a model version. Models can have multiple versions. You can call projects.models.versions.list to get the same information that this method returns for all of the versions of a model. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models.versions/list` | Gets basic information about all the versions of a model. If you expect that a model has many versions, or if you need to handle only a limited number of results at a time, you can request that the list be retrieved in batches (called pages). If there are no versions that match the request parameters, the list request returns an empty response body: {}. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models.versions/patch` | Updates the specified Version resource. Currently the only update-able fields are `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and `manualScaling.nodes`. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.models.versions/setDefault` | Designates a version to be the default for the model. The default version is used for prediction requests made against the model that don't specify a version. The first version to be created for a model is automatically set as the default. You must make any subsequent changes to the default version setting manually using this method. |

## Module: googleapis.ml.v1.projects.operations

| Functions ||
|---|---|
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.operations/cancel` | Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. |
| `https://docs.cloud.google.com/workflows/docs/reference/googleapis/ml/v1/projects.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/ml/v1/projects.operations/list` | Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. |