AI Platform Training & Prediction API Connector Overview

The Workflows connector defines the built-infunctions that can be used to access other Google Cloud products within aworkflow.

This page provides an overview of the individual connector.There is no need to import or load connector libraries in a workflow—connectorswork 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 theAI Platform Training & Prediction API documentation.

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.listargs:parent:${"projects/" + project_id}result:jobs-list_locations:call:googleapis.ml.v1.projects.locations.listargs: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
explainPerforms explanation on the data in the request.
getConfigGet the service account information associated with your project. Youneed this information in order to grant the service account permissionsfor the Google Cloud Storage location where you put your model trainingcode for training the model with Google Cloud Machine Learning.
predictPerforms online prediction on the data in the request.

Module: googleapis.ml.v1.projects.jobs

Functions
cancelCancels a running job.
createCreates a training or a batch prediction job.
getDescribes a job.
getIamPolicyGets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
listLists the jobs in the project. If there are no jobs that match therequest parameters, the list request returns an empty response body: {}.
patchUpdates a specific job resource. Currently the only supported fields toupdate arelabels.
setIamPolicySets the access control policy on the specified resource. Replaces anyexisting policy. Can returnNOT_FOUND,INVALID_ARGUMENT, andPERMISSION_DENIED errors.
testIamPermissionsReturns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set of permissions,not aNOT_FOUND error. Note: This operation is designed to be used forbuilding permission-aware UIs and command-line tools, not forauthorization checking. This operation may "fail open" withoutwarning.

Module: googleapis.ml.v1.projects.locations

Functions
getGet the complete list of CMLE capabilities in a location, along withtheir location-specific properties.
listList all locations that provides at least one type of CMLE capability.

Module: googleapis.ml.v1.projects.models

Functions
createCreates a model which will later contain one or more versions. You mustadd at least one version before you can request predictions from themodel. Add versions by calling projects.models.versions.create.
deleteDeletes a model. You can only delete a model if there are no versions init. You can delete versions by calling projects.models.versions.delete.
getGets information about a model, including its name, the description (ifset), and the default version (if at least one version of the model hasbeen deployed).
getIamPolicyGets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
listLists the models in a project. Each project can contain multiple models,and each model can have multiple versions. If there are no models thatmatch the request parameters, the list request returns an empty responsebody: {}.
patchUpdates a specific model resource. Currently the only supported fieldsto update aredescription anddefault_version.name.
setIamPolicySets the access control policy on the specified resource. Replaces anyexisting policy. Can returnNOT_FOUND,INVALID_ARGUMENT, andPERMISSION_DENIED errors.
testIamPermissionsReturns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set of permissions,not aNOT_FOUND error. Note: This operation is designed to be used forbuilding permission-aware UIs and command-line tools, not forauthorization checking. This operation may "fail open" withoutwarning.

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

Functions
createCreates a new version of a model from a trained TensorFlow model. If theversion created in the cloud by this call is the first deployed versionof the specified model, it will be made the default version of themodel. When you add a version to a model that already has one or moreversions, the default version does not automatically change. If you wanta new version to be the default, you must callprojects.models.versions.setDefault.
deleteDeletes a model version. Each model can have multiple versions deployedand in use at any given time. Use this method to remove a singleversion. Note: You cannot delete the version that is set as the defaultversion of the model unless it is the only remaining version.
getGets information about a model version. Models can have multipleversions. You can call projects.models.versions.list to get the sameinformation that this method returns for all of the versions of a model.
listGets basic information about all the versions of a model. If you expectthat a model has many versions, or if you need to handle only a limitednumber of results at a time, you can request that the list be retrievedin batches (called pages). If there are no versions that match therequest parameters, the list request returns an empty response body: {}.
patchUpdates the specified Version resource. Currently the only update-ablefields aredescription,requestLoggingConfig,autoScaling.minNodes, andmanualScaling.nodes.
setDefaultDesignates a version to be the default for the model. The defaultversion is used for prediction requests made against the model thatdon't specify a version. The first version to be created for a model isautomatically set as the default. You must make any subsequent changesto the default version setting manually using this method.

Module: googleapis.ml.v1.projects.operations

Functions
cancelStarts asynchronous cancellation on a long-running operation. The servermakes a best effort to cancel the operation, but success is notguaranteed. If the server doesn't support this method, it returnsgoogle.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperationor other methods to check whether the cancellation succeeded or whetherthe operation completed despite cancellation. On successfulcancellation, the operation is not deleted; instead, it becomes anoperation with an Operation.error value with a google.rpc.Status.code of1, corresponding toCode.CANCELLED.
getGets the latest state of a long-running operation. Clients can use thismethod to poll the operation result at intervals as recommended by theAPI service.
listLists operations that match the specified filter in the request. If theserver doesn't support this method, it returnsUNIMPLEMENTED.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.