class ProjectsLocationsModels extends Resource (View source)

The "models" collection of methods.

Typical usage is:

 $aiplatformService = new Google\Service\Aiplatform(...);
 $models = $aiplatformService->projects_locations_models;

Methods

copy(string $parent, GoogleCloudAiplatformV1CopyModelRequest $postBody, array $optParams = [])

Copies an already existing Vertex AI Model into the specified Location. The source Model must exist in the same Project. When copying custom Models, the users themselves are responsible for Model.metadata content to be region- agnostic, as well as making sure that any resources (e.g. files) it depends on remain accessible. (models.copy)

delete(string $name, array $optParams = [])

Deletes a Model. A model cannot be deleted if any Endpoint resource has a DeployedModel based on the model in its deployed_models field.

deleteVersion(string $name, array $optParams = [])

Deletes a Model version. Model version can only be deleted if there are no DeployedModels created from it. Deleting the only version in the Model is not allowed. Use DeleteModel for deleting the Model instead.

export(string $name, GoogleCloudAiplatformV1ExportModelRequest $postBody, array $optParams = [])

Exports a trained, exportable Model to a location specified by the user. A Model is considered to be exportable if it has at least one supported export format. (models.export)

get(string $name, array $optParams = [])

Gets a Model. (models.get)

getIamPolicy(string $resource, array $optParams = [])

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

listProjectsLocationsModels(string $parent, array $optParams = [])

Lists Models in a Location. (models.listProjectsLocationsModels)

listVersions(string $name, array $optParams = [])

Lists versions of the specified model. (models.listVersions)

mergeVersionAliases(string $name, GoogleCloudAiplatformV1MergeVersionAliasesRequest $postBody, array $optParams = [])

Merges a set of aliases for a Model version. (models.mergeVersionAliases)

patch(string $name, GoogleCloudAiplatformV1Model $postBody, array $optParams = [])

Updates a Model. (models.patch)

setIamPolicy(string $resource, GoogleIamV1SetIamPolicyRequest $postBody, array $optParams = [])

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

testIamPermissions(string $resource, array $optParams = [])

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.

updateExplanationDataset(string $model, GoogleCloudAiplatformV1UpdateExplanationDatasetRequest $postBody, array $optParams = [])

Incrementally update the dataset used for an examples model.

upload(string $parent, GoogleCloudAiplatformV1UploadModelRequest $postBody, array $optParams = [])

Uploads a Model artifact into Vertex AI. (models.upload)

Details

GoogleLongrunningOperation copy(string $parent, GoogleCloudAiplatformV1CopyModelRequest $postBody, array $optParams = [])

Copies an already existing Vertex AI Model into the specified Location. The source Model must exist in the same Project. When copying custom Models, the users themselves are responsible for Model.metadata content to be region- agnostic, as well as making sure that any resources (e.g. files) it depends on remain accessible. (models.copy)

Parameters

string $parent

Required. The resource name of the Location into which to copy the Model. Format: projects/{project}/locations/{location}

GoogleCloudAiplatformV1CopyModelRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation delete(string $name, array $optParams = [])

Deletes a Model. A model cannot be deleted if any Endpoint resource has a DeployedModel based on the model in its deployed_models field.

(models.delete)

Parameters

string $name

Required. The name of the Model resource to be deleted. Format: projects/{project}/locations/{location}/models/{model}

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation deleteVersion(string $name, array $optParams = [])

Deletes a Model version. Model version can only be deleted if there are no DeployedModels created from it. Deleting the only version in the Model is not allowed. Use DeleteModel for deleting the Model instead.

(models.deleteVersion)

Parameters

string $name

Required. The name of the model version to be deleted, with a version ID explicitly included. Example: projects/{project}/locations/{location}/models/{model}@1234

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation export(string $name, GoogleCloudAiplatformV1ExportModelRequest $postBody, array $optParams = [])

Exports a trained, exportable Model to a location specified by the user. A Model is considered to be exportable if it has at least one supported export format. (models.export)

Parameters

string $name

Required. The resource name of the Model to export. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.

GoogleCloudAiplatformV1ExportModelRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudAiplatformV1Model get(string $name, array $optParams = [])

Gets a Model. (models.get)

Parameters

string $name

Required. The name of the Model resource. Format: projects/{project}/locations/{location}/models/{model} In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: projects/{project}/locations/{location}/models/{model}@2 or projects/{project}/locations/{location}/models/{model}@golden If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.

array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1Model

Exceptions

Exception

GoogleIamV1Policy getIamPolicy(string $resource, array $optParams = [])

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

Parameters

string $resource

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

array $optParams

Optional parameters.

Return Value

GoogleIamV1Policy

Exceptions

Exception

GoogleCloudAiplatformV1ListModelsResponse listProjectsLocationsModels(string $parent, array $optParams = [])

Lists Models in a Location. (models.listProjectsLocationsModels)

Parameters

string $parent

Required. The resource name of the Location to list the Models from. Format: projects/{project}/locations/{location}

array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1ListModelsResponse

Exceptions

Exception

GoogleCloudAiplatformV1ListModelVersionsResponse listVersions(string $name, array $optParams = [])

Lists versions of the specified model. (models.listVersions)

Parameters

string $name

Required. The name of the model to list versions for.

array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1ListModelVersionsResponse

Exceptions

Exception

GoogleCloudAiplatformV1Model mergeVersionAliases(string $name, GoogleCloudAiplatformV1MergeVersionAliasesRequest $postBody, array $optParams = [])

Merges a set of aliases for a Model version. (models.mergeVersionAliases)

Parameters

string $name

Required. The name of the model version to merge aliases, with a version ID explicitly included. Example: projects/{project}/locations/{location}/models/{model}@1234

GoogleCloudAiplatformV1MergeVersionAliasesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1Model

Exceptions

Exception

GoogleCloudAiplatformV1Model patch(string $name, GoogleCloudAiplatformV1Model $postBody, array $optParams = [])

Updates a Model. (models.patch)

Parameters

string $name

The resource name of the Model.

GoogleCloudAiplatformV1Model $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1Model

Exceptions

Exception

GoogleIamV1Policy setIamPolicy(string $resource, GoogleIamV1SetIamPolicyRequest $postBody, array $optParams = [])

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

Parameters

string $resource

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

GoogleIamV1SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleIamV1Policy

Exceptions

Exception

GoogleIamV1TestIamPermissionsResponse testIamPermissions(string $resource, array $optParams = [])

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. (models.testIamPermissions)

Parameters

string $resource

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

array $optParams

Optional parameters.

Return Value

GoogleIamV1TestIamPermissionsResponse

Exceptions

Exception

GoogleLongrunningOperation updateExplanationDataset(string $model, GoogleCloudAiplatformV1UpdateExplanationDatasetRequest $postBody, array $optParams = [])

Incrementally update the dataset used for an examples model.

(models.updateExplanationDataset)

Parameters

string $model

Required. The resource name of the Model to update. Format: projects/{project}/locations/{location}/models/{model}

GoogleCloudAiplatformV1UpdateExplanationDatasetRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation upload(string $parent, GoogleCloudAiplatformV1UploadModelRequest $postBody, array $optParams = [])

Uploads a Model artifact into Vertex AI. (models.upload)

Parameters

string $parent

Required. The resource name of the Location into which to upload the Model. Format: projects/{project}/locations/{location}

GoogleCloudAiplatformV1UploadModelRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception