Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ml

import { ml } from "https://googleapis.deno.dev/v1/ml:v1.ts";

An API to enable creating and using machine learning models.

class ml {
constructor(client?: CredentialsClient, baseUrl?: string);
async projectsExplain(name: string, req: GoogleCloudMlV1__ExplainRequest): Promise<GoogleApi__HttpBody>;
async projectsGetConfig(name: string): Promise<GoogleCloudMlV1__GetConfigResponse>;
async projectsJobsCancel(name: string, req: GoogleCloudMlV1__CancelJobRequest): Promise<GoogleProtobuf__Empty>;
async projectsJobsCreate(parent: string, req: GoogleCloudMlV1__Job): Promise<GoogleCloudMlV1__Job>;
async projectsJobsGet(name: string): Promise<GoogleCloudMlV1__Job>;
async projectsJobsGetIamPolicy(resource: string, opts?: ProjectsJobsGetIamPolicyOptions): Promise<GoogleIamV1__Policy>;
async projectsJobsList(parent: string, opts?: ProjectsJobsListOptions): Promise<GoogleCloudMlV1__ListJobsResponse>;
async projectsJobsPatch(
name: string,
): Promise<GoogleCloudMlV1__Job>;
async projectsJobsSetIamPolicy(resource: string, req: GoogleIamV1__SetIamPolicyRequest): Promise<GoogleIamV1__Policy>;
async projectsJobsTestIamPermissions(resource: string, req: GoogleIamV1__TestIamPermissionsRequest): Promise<GoogleIamV1__TestIamPermissionsResponse>;
async projectsLocationsGet(name: string): Promise<GoogleCloudMlV1__Location>;
async projectsLocationsList(parent: string, opts?: ProjectsLocationsListOptions): Promise<GoogleCloudMlV1__ListLocationsResponse>;
async projectsLocationsOperationsCancel(name: string): Promise<GoogleProtobuf__Empty>;
async projectsLocationsOperationsGet(name: string): Promise<GoogleLongrunning__Operation>;
async projectsLocationsStudiesCreate(
parent: string,
): Promise<GoogleCloudMlV1__Study>;
async projectsLocationsStudiesDelete(name: string): Promise<GoogleProtobuf__Empty>;
async projectsLocationsStudiesGet(name: string): Promise<GoogleCloudMlV1__Study>;
async projectsLocationsStudiesList(parent: string): Promise<GoogleCloudMlV1__ListStudiesResponse>;
async projectsLocationsStudiesTrialsAddMeasurement(name: string, req: GoogleCloudMlV1__AddTrialMeasurementRequest): Promise<GoogleCloudMlV1__Trial>;
async projectsLocationsStudiesTrialsCheckEarlyStoppingState(name: string, req: GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest): Promise<GoogleLongrunning__Operation>;
async projectsLocationsStudiesTrialsComplete(name: string, req: GoogleCloudMlV1__CompleteTrialRequest): Promise<GoogleCloudMlV1__Trial>;
async projectsLocationsStudiesTrialsCreate(parent: string, req: GoogleCloudMlV1__Trial): Promise<GoogleCloudMlV1__Trial>;
async projectsLocationsStudiesTrialsDelete(name: string): Promise<GoogleProtobuf__Empty>;
async projectsLocationsStudiesTrialsGet(name: string): Promise<GoogleCloudMlV1__Trial>;
async projectsLocationsStudiesTrialsList(parent: string): Promise<GoogleCloudMlV1__ListTrialsResponse>;
async projectsLocationsStudiesTrialsListOptimalTrials(parent: string, req: GoogleCloudMlV1__ListOptimalTrialsRequest): Promise<GoogleCloudMlV1__ListOptimalTrialsResponse>;
async projectsLocationsStudiesTrialsStop(name: string, req: GoogleCloudMlV1__StopTrialRequest): Promise<GoogleCloudMlV1__Trial>;
async projectsLocationsStudiesTrialsSuggest(parent: string, req: GoogleCloudMlV1__SuggestTrialsRequest): Promise<GoogleLongrunning__Operation>;
async projectsModelsCreate(parent: string, req: GoogleCloudMlV1__Model): Promise<GoogleCloudMlV1__Model>;
async projectsModelsDelete(name: string): Promise<GoogleLongrunning__Operation>;
async projectsModelsGet(name: string): Promise<GoogleCloudMlV1__Model>;
async projectsModelsGetIamPolicy(resource: string, opts?: ProjectsModelsGetIamPolicyOptions): Promise<GoogleIamV1__Policy>;
async projectsModelsList(parent: string, opts?: ProjectsModelsListOptions): Promise<GoogleCloudMlV1__ListModelsResponse>;
async projectsModelsPatch(
name: string,
): Promise<GoogleLongrunning__Operation>;
async projectsModelsSetIamPolicy(resource: string, req: GoogleIamV1__SetIamPolicyRequest): Promise<GoogleIamV1__Policy>;
async projectsModelsTestIamPermissions(resource: string, req: GoogleIamV1__TestIamPermissionsRequest): Promise<GoogleIamV1__TestIamPermissionsResponse>;
async projectsModelsVersionsCreate(parent: string, req: GoogleCloudMlV1__Version): Promise<GoogleLongrunning__Operation>;
async projectsModelsVersionsDelete(name: string): Promise<GoogleLongrunning__Operation>;
async projectsModelsVersionsGet(name: string): Promise<GoogleCloudMlV1__Version>;
async projectsModelsVersionsList(parent: string, opts?: ProjectsModelsVersionsListOptions): Promise<GoogleCloudMlV1__ListVersionsResponse>;
async projectsModelsVersionsPatch(
name: string,
): Promise<GoogleLongrunning__Operation>;
async projectsModelsVersionsSetDefault(name: string, req: GoogleCloudMlV1__SetDefaultVersionRequest): Promise<GoogleCloudMlV1__Version>;
async projectsOperationsCancel(name: string): Promise<GoogleProtobuf__Empty>;
async projectsOperationsGet(name: string): Promise<GoogleLongrunning__Operation>;
async projectsOperationsList(name: string, opts?: ProjectsOperationsListOptions): Promise<GoogleLongrunning__ListOperationsResponse>;
async projectsPredict(name: string, req: GoogleCloudMlV1__PredictRequest): Promise<GoogleApi__HttpBody>;
}

§Constructors

§
new ml(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
projectsExplain(name: string, req: GoogleCloudMlV1__ExplainRequest): Promise<GoogleApi__HttpBody>
[src]

Performs explanation on the data in the request. {% dynamic include "/ai-platform/includes/___explain-request" %}

@param name

Required. The resource name of a model or a version. Authorization: requires the predict permission on the specified resource.

§
projectsGetConfig(name: string): Promise<GoogleCloudMlV1__GetConfigResponse>
[src]

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.

@param name

Required. The project name.

§
projectsJobsCancel(name: string, req: GoogleCloudMlV1__CancelJobRequest): Promise<GoogleProtobuf__Empty>
[src]

Cancels a running job.

@param name

Required. The name of the job to cancel.

§
projectsJobsCreate(parent: string, req: GoogleCloudMlV1__Job): Promise<GoogleCloudMlV1__Job>
[src]

Creates a training or a batch prediction job.

@param parent

Required. The project name.

§
projectsJobsGet(name: string): Promise<GoogleCloudMlV1__Job>
[src]

Describes a job.

@param name

Required. The name of the job to get the description of.

§
projectsJobsGetIamPolicy(resource: string, opts?: ProjectsJobsGetIamPolicyOptions): Promise<GoogleIamV1__Policy>
[src]

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

@param resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

§
projectsJobsList(parent: string, opts?: ProjectsJobsListOptions): Promise<GoogleCloudMlV1__ListJobsResponse>
[src]

Lists the jobs in the project. If there are no jobs that match the request parameters, the list request returns an empty response body: {}.

@param parent

Required. The name of the project for which to list jobs.

§
projectsJobsPatch(name: string, req: GoogleCloudMlV1__Job, opts?: ProjectsJobsPatchOptions): Promise<GoogleCloudMlV1__Job>
[src]

Updates a specific job resource. Currently the only supported fields to update are labels.

@param name

Required. The job name.

§
projectsJobsSetIamPolicy(resource: string, req: GoogleIamV1__SetIamPolicyRequest): Promise<GoogleIamV1__Policy>
[src]

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

@param resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

§
projectsJobsTestIamPermissions(resource: string, req: GoogleIamV1__TestIamPermissionsRequest): Promise<GoogleIamV1__TestIamPermissionsResponse>
[src]

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.

@param resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

§
projectsLocationsGet(name: string): Promise<GoogleCloudMlV1__Location>
[src]

Get the complete list of CMLE capabilities in a location, along with their location-specific properties.

@param name

Required. The name of the location.

§
projectsLocationsList(parent: string, opts?: ProjectsLocationsListOptions): Promise<GoogleCloudMlV1__ListLocationsResponse>
[src]

List all locations that provides at least one type of CMLE capability.

@param parent

Required. The name of the project for which available locations are to be listed (since some locations might be whitelisted for specific projects).

§
projectsLocationsOperationsCancel(name: string): Promise<GoogleProtobuf__Empty>
[src]

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.

@param name

The name of the operation resource to be cancelled.

§
projectsLocationsOperationsGet(name: string): Promise<GoogleLongrunning__Operation>
[src]

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.

@param name

The name of the operation resource.

§
projectsLocationsStudiesCreate(parent: string, req: GoogleCloudMlV1__Study, opts?: ProjectsLocationsStudiesCreateOptions): Promise<GoogleCloudMlV1__Study>
[src]

Creates a study.

@param parent

Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location}

§
projectsLocationsStudiesDelete(name: string): Promise<GoogleProtobuf__Empty>
[src]

Deletes a study.

@param name

Required. The study name.

§
projectsLocationsStudiesGet(name: string): Promise<GoogleCloudMlV1__Study>
[src]

Gets a study.

@param name

Required. The study name.

§
projectsLocationsStudiesList(parent: string): Promise<GoogleCloudMlV1__ListStudiesResponse>
[src]

Lists all the studies in a region for an associated project.

@param parent

Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location}

§
projectsLocationsStudiesTrialsAddMeasurement(name: string, req: GoogleCloudMlV1__AddTrialMeasurementRequest): Promise<GoogleCloudMlV1__Trial>
[src]

Adds a measurement of the objective metrics to a trial. This measurement is assumed to have been taken before the trial is complete.

@param name

Required. The trial name.

§
projectsLocationsStudiesTrialsCheckEarlyStoppingState(name: string, req: GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest): Promise<GoogleLongrunning__Operation>
[src]

Checks whether a trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse.

@param name

Required. The trial name.

§
projectsLocationsStudiesTrialsComplete(name: string, req: GoogleCloudMlV1__CompleteTrialRequest): Promise<GoogleCloudMlV1__Trial>
[src]

Marks a trial as complete.

@param name

Required. The trial name.metat

§
projectsLocationsStudiesTrialsCreate(parent: string, req: GoogleCloudMlV1__Trial): Promise<GoogleCloudMlV1__Trial>
[src]

Adds a user provided trial to a study.

@param parent

Required. The name of the study that the trial belongs to.

§
projectsLocationsStudiesTrialsDelete(name: string): Promise<GoogleProtobuf__Empty>
[src]

Deletes a trial.

@param name

Required. The trial name.

§
projectsLocationsStudiesTrialsGet(name: string): Promise<GoogleCloudMlV1__Trial>
[src]

Gets a trial.

@param name

Required. The trial name.

§
projectsLocationsStudiesTrialsList(parent: string): Promise<GoogleCloudMlV1__ListTrialsResponse>
[src]

Lists the trials associated with a study.

@param parent

Required. The name of the study that the trial belongs to.

§
projectsLocationsStudiesTrialsListOptimalTrials(parent: string, req: GoogleCloudMlV1__ListOptimalTrialsRequest): Promise<GoogleCloudMlV1__ListOptimalTrialsResponse>
[src]

Lists the pareto-optimal trials for multi-objective study or the optimal trials for single-objective study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency

@param parent

Required. The name of the study that the pareto-optimal trial belongs to.

§
projectsLocationsStudiesTrialsStop(name: string, req: GoogleCloudMlV1__StopTrialRequest): Promise<GoogleCloudMlV1__Trial>
[src]

Stops a trial.

@param name

Required. The trial name.

§
projectsLocationsStudiesTrialsSuggest(parent: string, req: GoogleCloudMlV1__SuggestTrialsRequest): Promise<GoogleLongrunning__Operation>
[src]

Adds one or more trials to a study, with parameter values suggested by AI Platform Vizier. Returns a long-running operation associated with the generation of trial suggestions. When this long-running operation succeeds, it will contain a SuggestTrialsResponse.

@param parent

Required. The name of the study that the trial belongs to.

§
projectsModelsCreate(parent: string, req: GoogleCloudMlV1__Model): Promise<GoogleCloudMlV1__Model>
[src]

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.

@param parent

Required. The project name.

§
projectsModelsDelete(name: string): Promise<GoogleLongrunning__Operation>
[src]

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.

@param name

Required. The name of the model.

§
projectsModelsGet(name: string): Promise<GoogleCloudMlV1__Model>
[src]

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).

@param name

Required. The name of the model.

§
projectsModelsGetIamPolicy(resource: string, opts?: ProjectsModelsGetIamPolicyOptions): Promise<GoogleIamV1__Policy>
[src]

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

@param resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

§
projectsModelsList(parent: string, opts?: ProjectsModelsListOptions): Promise<GoogleCloudMlV1__ListModelsResponse>
[src]

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: {}.

@param parent

Required. The name of the project whose models are to be listed.

§
projectsModelsPatch(name: string, req: GoogleCloudMlV1__Model, opts?: ProjectsModelsPatchOptions): Promise<GoogleLongrunning__Operation>
[src]

Updates a specific model resource. Currently the only supported fields to update are description and default_version.name.

@param name

Required. The project name.

§
projectsModelsSetIamPolicy(resource: string, req: GoogleIamV1__SetIamPolicyRequest): Promise<GoogleIamV1__Policy>
[src]

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

@param resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

§
projectsModelsTestIamPermissions(resource: string, req: GoogleIamV1__TestIamPermissionsRequest): Promise<GoogleIamV1__TestIamPermissionsResponse>
[src]

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.

@param resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

§
projectsModelsVersionsCreate(parent: string, req: GoogleCloudMlV1__Version): Promise<GoogleLongrunning__Operation>
[src]

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.

@param parent

Required. The name of the model.

§
projectsModelsVersionsDelete(name: string): Promise<GoogleLongrunning__Operation>
[src]

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.

@param name

Required. The name of the version. You can get the names of all the versions of a model by calling projects.models.versions.list.

§
projectsModelsVersionsGet(name: string): Promise<GoogleCloudMlV1__Version>
[src]

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.

@param name

Required. The name of the version.

§
projectsModelsVersionsList(parent: string, opts?: ProjectsModelsVersionsListOptions): Promise<GoogleCloudMlV1__ListVersionsResponse>
[src]

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: {}.

@param parent

Required. The name of the model for which to list the version.

§
projectsModelsVersionsPatch(name: string, req: GoogleCloudMlV1__Version, opts?: ProjectsModelsVersionsPatchOptions): Promise<GoogleLongrunning__Operation>
[src]

Updates the specified Version resource. Currently the only update-able fields are description, requestLoggingConfig, autoScaling.minNodes, and manualScaling.nodes.

@param name

Required. The name of the model.

§
projectsModelsVersionsSetDefault(name: string, req: GoogleCloudMlV1__SetDefaultVersionRequest): Promise<GoogleCloudMlV1__Version>
[src]

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.

@param name

Required. The name of the version to make the default for the model. You can get the names of all the versions of a model by calling projects.models.versions.list.

§
projectsOperationsCancel(name: string): Promise<GoogleProtobuf__Empty>
[src]

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.

@param name

The name of the operation resource to be cancelled.

§
projectsOperationsGet(name: string): Promise<GoogleLongrunning__Operation>
[src]

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.

@param name

The name of the operation resource.

§
projectsOperationsList(name: string, opts?: ProjectsOperationsListOptions): Promise<GoogleLongrunning__ListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.

§
projectsPredict(name: string, req: GoogleCloudMlV1__PredictRequest): Promise<GoogleApi__HttpBody>
[src]

Performs online prediction on the data in the request. {% dynamic include "/ai-platform/includes/___predict-request" %}

@param name

Required. The resource name of a model or a version. Authorization: requires the predict permission on the specified resource.