Reference documentation and code samples for the Cloud AutoML V1 Client class AutoMlClient.
Service Description: AutoML Server API.
The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.
An ID of a resource is the last element of the item's resource name. For
projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
, then
the id for the item is {dataset_id}
.
Currently the only supported location_id
is "us-central1".
On any input that is documented to expect a string parameter in snake_case or dash-case, either of those cases is accepted.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.
This class is currently experimental and may be subject to changes. See Google\Cloud\AutoMl\V1\AutoMlClient for the stable implementation
Namespace
Google \ Cloud \ AutoMl \ V1 \ ClientMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
options |
array
Optional. Options for configuring the service API wrapper. |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
string|array|FetchAuthTokenInterface|CredentialsWrapper
The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. |
↳ credentialsConfig |
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() . |
↳ disableRetries |
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to |
↳ clientConfig |
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
↳ transport |
string|TransportInterface
The transport used for executing network requests. May be either the string |
↳ transportConfig |
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options. |
↳ clientCertSource |
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
createDataset
Creates a dataset.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::createDatasetAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\CreateDatasetRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
createModel
Creates a model.
Returns a Model in the response field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::createModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\CreateModelRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
deleteDataset
Deletes a dataset and all of its contents.
Returns empty response in the
response field when it completes,
and delete_details
in the
metadata field.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::deleteDatasetAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\DeleteDatasetRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
deleteModel
Deletes a model.
Returns google.protobuf.Empty
in the
response field when it completes,
and delete_details
in the
metadata field.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::deleteModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\DeleteModelRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
deployModel
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing node_number) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the response field when it completes.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::deployModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\DeployModelRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
exportData
Exports dataset's data to the provided output location.
Returns an empty response in the response field when it completes.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::exportDataAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ExportDataRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
exportModel
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in ModelExportOutputConfig.
Returns an empty response in the response field when it completes.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::exportModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ExportModelRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
getAnnotationSpec
Gets an annotation spec.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::getAnnotationSpecAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\GetAnnotationSpecRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\AutoMl\V1\AnnotationSpec |
getDataset
Gets a dataset.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::getDatasetAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\GetDatasetRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\AutoMl\V1\Dataset |
getModel
Gets a model.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::getModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\GetModelRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\AutoMl\V1\Model |
getModelEvaluation
Gets a model evaluation.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::getModelEvaluationAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\GetModelEvaluationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\AutoMl\V1\ModelEvaluation |
importData
Imports data into a dataset.
For Tables this method can only be called on an empty Dataset.
For Tables:
- A schema_inference_version parameter must be explicitly set. Returns an empty response in the response field when it completes.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::importDataAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ImportDataRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
listDatasets
Lists datasets in a project.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::listDatasetsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ListDatasetsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listModelEvaluations
Lists model evaluations.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::listModelEvaluationsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ListModelEvaluationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listModels
Lists models.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::listModelsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ListModelsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
undeployModel
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the response field when it completes.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::undeployModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\UndeployModelRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
updateDataset
Updates a dataset.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::updateDatasetAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\UpdateDatasetRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\AutoMl\V1\Dataset |
updateModel
Updates a model.
The async variant is Google\Cloud\AutoMl\V1\Client\AutoMlClient::updateModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\UpdateModelRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\AutoMl\V1\Model |
createDatasetAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\CreateDatasetRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
createModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\CreateModelRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
deleteDatasetAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\DeleteDatasetRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
deleteModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\DeleteModelRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
deployModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\DeployModelRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
exportDataAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ExportDataRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
exportModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ExportModelRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getAnnotationSpecAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\GetAnnotationSpecRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getDatasetAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\GetDatasetRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\GetModelRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getModelEvaluationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\GetModelEvaluationRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
importDataAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ImportDataRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
listDatasetsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ListDatasetsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
listModelEvaluationsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ListModelEvaluationsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
listModelsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\ListModelsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
undeployModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\UndeployModelRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
updateDatasetAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\UpdateDatasetRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
updateModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\AutoMl\V1\UpdateModelRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
Returns | |
---|---|
Type | Description |
Google\ApiCore\LongRunning\OperationsClient |
resumeOperation
Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.
Parameters | |
---|---|
Name | Description |
operationName |
string
The name of the long running operation |
methodName |
string
The name of the method used to start the operation |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
static::annotationSpecName
Formats a string containing the fully-qualified path to represent a annotation_spec resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
dataset |
string
|
annotationSpec |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted annotation_spec resource. |
static::datasetName
Formats a string containing the fully-qualified path to represent a dataset resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
dataset |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted dataset resource. |
static::locationName
Formats a string containing the fully-qualified path to represent a location resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted location resource. |
static::modelName
Formats a string containing the fully-qualified path to represent a model resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
model |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted model resource. |
static::modelEvaluationName
Formats a string containing the fully-qualified path to represent a model_evaluation resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
model |
string
|
modelEvaluation |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted model_evaluation resource. |
static::parseName
Parses a formatted name string and returns an associative array of the components in the name.
The following name formats are supported: Template: Pattern
- annotationSpec: projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
- dataset: projects/{project}/locations/{location}/datasets/{dataset}
- location: projects/{project}/locations/{location}
- model: projects/{project}/locations/{location}/models/{model}
- modelEvaluation: projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}
The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.
Parameters | |
---|---|
Name | Description |
formattedName |
string
The formatted name string |
template |
string
Optional name of template to match |
Returns | |
---|---|
Type | Description |
array | An associative array from name component IDs to component values. |