- 1.35.0 (latest)
- 1.34.0
- 1.33.0
- 1.32.1
- 1.31.0
- 1.30.0
- 1.26.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.1
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.39.0
- 0.38.0
- 0.37.1
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.2
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.13.0
- 0.12.0
- 0.11.1
- 0.10.0
Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class JobServiceClient.
Service Description: A service for creating and managing Vertex AI's jobs.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->batchPredictionJobName('[PROJECT]', '[LOCATION]', '[BATCH_PREDICTION_JOB]');
$jobServiceClient->cancelBatchPredictionJob($formattedName);
} finally {
$jobServiceClient->close();
}
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.
Methods
batchPredictionJobName
Formats a string containing the fully-qualified path to represent a batch_prediction_job resource.
project
string
location
string
batchPredictionJob
string
string
customJobName
Formats a string containing the fully-qualified path to represent a custom_job resource.
project
string
location
string
customJob
string
string
dataLabelingJobName
Formats a string containing the fully-qualified path to represent a data_labeling_job resource.
project
string
location
string
dataLabelingJob
string
string
datasetName
Formats a string containing the fully-qualified path to represent a dataset resource.
project
string
location
string
dataset
string
string
endpointName
Formats a string containing the fully-qualified path to represent a endpoint resource.
project
string
location
string
endpoint
string
string
hyperparameterTuningJobName
Formats a string containing the fully-qualified path to represent a hyperparameter_tuning_job resource.
project
string
location
string
hyperparameterTuningJob
string
string
locationName
Formats a string containing the fully-qualified path to represent a location resource.
project
string
location
string
string
modelName
Formats a string containing the fully-qualified path to represent a model resource.
project
string
location
string
model
string
string
modelDeploymentMonitoringJobName
Formats a string containing the fully-qualified path to represent a model_deployment_monitoring_job resource.
project
string
location
string
modelDeploymentMonitoringJob
string
string
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
- batchPredictionJob: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}
- customJob: projects/{project}/locations/{location}/customJobs/{custom_job}
- dataLabelingJob: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}
- dataset: projects/{project}/locations/{location}/datasets/{dataset}
- endpoint: projects/{project}/locations/{location}/endpoints/{endpoint}
- hyperparameterTuningJob: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}
- location: projects/{project}/locations/{location}
- model: projects/{project}/locations/{location}/models/{model}
- modelDeploymentMonitoringJob: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
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.
formattedName
string
The formatted name string
template
string
Optional name of template to match
array
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
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.
operationName
string
The name of the long running operation
methodName
string
The name of the method used to start the operation
__construct
Constructor.
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 {@see} object or {@see} 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 {@see} .
↳ disableRetries
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to false
.
↳ 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 rest
or grpc
. Defaults to grpc
if gRPC support is detected on the system. Advanced usage
: Additionally, it is possible to pass in an already instantiated {@see} object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored.
↳ 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 {@see} and {@see} 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.
cancelBatchPredictionJob
Cancels a BatchPredictionJob.
Starts asynchronous cancellation on the BatchPredictionJob. The server
makes the best effort to cancel the job, but success is not
guaranteed. Clients can use JobService.GetBatchPredictionJob
or
other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On a successful cancellation,
the BatchPredictionJob is not deleted;instead its BatchPredictionJob.state
is set to CANCELLED
. Any files already
outputted by the job are not deleted.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->batchPredictionJobName('[PROJECT]', '[LOCATION]', '[BATCH_PREDICTION_JOB]');
$jobServiceClient->cancelBatchPredictionJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
cancelCustomJob
Cancels a CustomJob.
Starts asynchronous cancellation on the CustomJob. The server
makes a best effort to cancel the job, but success is not
guaranteed. Clients can use JobService.GetCustomJob
or
other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation,
the CustomJob is not deleted; instead it becomes a job with
a CustomJob.error
value with a google.rpc.Status.code
of 1,
corresponding to Code.CANCELLED
, and CustomJob.state
is set to CANCELLED
.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->customJobName('[PROJECT]', '[LOCATION]', '[CUSTOM_JOB]');
$jobServiceClient->cancelCustomJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
cancelDataLabelingJob
Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->dataLabelingJobName('[PROJECT]', '[LOCATION]', '[DATA_LABELING_JOB]');
$jobServiceClient->cancelDataLabelingJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
cancelHyperparameterTuningJob
Cancels a HyperparameterTuningJob.
Starts asynchronous cancellation on the HyperparameterTuningJob. The server
makes a best effort to cancel the job, but success is not
guaranteed. Clients can use JobService.GetHyperparameterTuningJob
or
other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation,
the HyperparameterTuningJob is not deleted; instead it becomes a job with
a HyperparameterTuningJob.error
value with a google.rpc.Status.code
of 1, corresponding to Code.CANCELLED
, and HyperparameterTuningJob.state
is set to CANCELLED
.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->hyperparameterTuningJobName('[PROJECT]', '[LOCATION]', '[HYPERPARAMETER_TUNING_JOB]');
$jobServiceClient->cancelHyperparameterTuningJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the HyperparameterTuningJob to cancel. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createBatchPredictionJob
Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
$batchPredictionJob = new BatchPredictionJob();
$response = $jobServiceClient->createBatchPredictionJob($formattedParent, $batchPredictionJob);
} finally {
$jobServiceClient->close();
}
parent
string
Required. The resource name of the Location to create the BatchPredictionJob in. Format: projects/{project}/locations/{location}
batchPredictionJob
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createCustomJob
Creates a CustomJob. A created CustomJob right away will be attempted to be run.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
$customJob = new CustomJob();
$response = $jobServiceClient->createCustomJob($formattedParent, $customJob);
} finally {
$jobServiceClient->close();
}
parent
string
Required. The resource name of the Location to create the CustomJob in. Format: projects/{project}/locations/{location}
customJob
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createDataLabelingJob
Creates a DataLabelingJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
$dataLabelingJob = new DataLabelingJob();
$response = $jobServiceClient->createDataLabelingJob($formattedParent, $dataLabelingJob);
} finally {
$jobServiceClient->close();
}
parent
string
Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}
dataLabelingJob
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createHyperparameterTuningJob
Creates a HyperparameterTuningJob
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
$hyperparameterTuningJob = new HyperparameterTuningJob();
$response = $jobServiceClient->createHyperparameterTuningJob($formattedParent, $hyperparameterTuningJob);
} finally {
$jobServiceClient->close();
}
parent
string
Required. The resource name of the Location to create the HyperparameterTuningJob in. Format: projects/{project}/locations/{location}
hyperparameterTuningJob
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createModelDeploymentMonitoringJob
Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
$modelDeploymentMonitoringJob = new ModelDeploymentMonitoringJob();
$response = $jobServiceClient->createModelDeploymentMonitoringJob($formattedParent, $modelDeploymentMonitoringJob);
} finally {
$jobServiceClient->close();
}
parent
string
Required. The parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}
modelDeploymentMonitoringJob
Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringJob
Required. The ModelDeploymentMonitoringJob to create
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteBatchPredictionJob
Deletes a BatchPredictionJob. Can only be called on jobs that already finished.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->batchPredictionJobName('[PROJECT]', '[LOCATION]', '[BATCH_PREDICTION_JOB]');
$operationResponse = $jobServiceClient->deleteBatchPredictionJob($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $jobServiceClient->deleteBatchPredictionJob($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $jobServiceClient->resumeOperation($operationName, 'deleteBatchPredictionJob');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the BatchPredictionJob resource to be deleted. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteCustomJob
Deletes a CustomJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->customJobName('[PROJECT]', '[LOCATION]', '[CUSTOM_JOB]');
$operationResponse = $jobServiceClient->deleteCustomJob($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $jobServiceClient->deleteCustomJob($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $jobServiceClient->resumeOperation($operationName, 'deleteCustomJob');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the CustomJob resource to be deleted. Format: projects/{project}/locations/{location}/customJobs/{custom_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteDataLabelingJob
Deletes a DataLabelingJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->dataLabelingJobName('[PROJECT]', '[LOCATION]', '[DATA_LABELING_JOB]');
$operationResponse = $jobServiceClient->deleteDataLabelingJob($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $jobServiceClient->deleteDataLabelingJob($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $jobServiceClient->resumeOperation($operationName, 'deleteDataLabelingJob');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the DataLabelingJob to be deleted. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteHyperparameterTuningJob
Deletes a HyperparameterTuningJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->hyperparameterTuningJobName('[PROJECT]', '[LOCATION]', '[HYPERPARAMETER_TUNING_JOB]');
$operationResponse = $jobServiceClient->deleteHyperparameterTuningJob($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $jobServiceClient->deleteHyperparameterTuningJob($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $jobServiceClient->resumeOperation($operationName, 'deleteHyperparameterTuningJob');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the HyperparameterTuningJob resource to be deleted. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteModelDeploymentMonitoringJob
Deletes a ModelDeploymentMonitoringJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->modelDeploymentMonitoringJobName('[PROJECT]', '[LOCATION]', '[MODEL_DEPLOYMENT_MONITORING_JOB]');
$operationResponse = $jobServiceClient->deleteModelDeploymentMonitoringJob($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $jobServiceClient->deleteModelDeploymentMonitoringJob($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $jobServiceClient->resumeOperation($operationName, 'deleteModelDeploymentMonitoringJob');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$jobServiceClient->close();
}
name
string
Required. The resource name of the model monitoring job to delete. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getBatchPredictionJob
Gets a BatchPredictionJob
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->batchPredictionJobName('[PROJECT]', '[LOCATION]', '[BATCH_PREDICTION_JOB]');
$response = $jobServiceClient->getBatchPredictionJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the BatchPredictionJob resource. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getCustomJob
Gets a CustomJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->customJobName('[PROJECT]', '[LOCATION]', '[CUSTOM_JOB]');
$response = $jobServiceClient->getCustomJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the CustomJob resource. Format: projects/{project}/locations/{location}/customJobs/{custom_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getDataLabelingJob
Gets a DataLabelingJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->dataLabelingJobName('[PROJECT]', '[LOCATION]', '[DATA_LABELING_JOB]');
$response = $jobServiceClient->getDataLabelingJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getHyperparameterTuningJob
Gets a HyperparameterTuningJob
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->hyperparameterTuningJobName('[PROJECT]', '[LOCATION]', '[HYPERPARAMETER_TUNING_JOB]');
$response = $jobServiceClient->getHyperparameterTuningJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The name of the HyperparameterTuningJob resource. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getModelDeploymentMonitoringJob
Gets a ModelDeploymentMonitoringJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->modelDeploymentMonitoringJobName('[PROJECT]', '[LOCATION]', '[MODEL_DEPLOYMENT_MONITORING_JOB]');
$response = $jobServiceClient->getModelDeploymentMonitoringJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The resource name of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listBatchPredictionJobs
Lists BatchPredictionJobs in a Location.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
// Iterate over pages of elements
$pagedResponse = $jobServiceClient->listBatchPredictionJobs($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $jobServiceClient->listBatchPredictionJobs($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$jobServiceClient->close();
}
parent
string
Required. The resource name of the Location to list the BatchPredictionJobs from. Format: projects/{project}/locations/{location}
optionalArgs
array
Optional.
↳ filter
string
The standard list filter. Supported fields: * display_name
supports =
, !=
comparisons, and :
wildcard. * model_display_name
supports =
, !=
comparisons. * state
supports =
, !=
comparisons. * create_time
supports =
, !=
, <
, <=
, >
, >=
comparisons. create_time
must be in RFC 3339 format. * labels
supports general map functions that is: labels.key=value
- key:value equality labels.key:* - key existence Some examples of using the filter are: *
state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_ " *
state!="JOB_STATE_FAILED" OR display_name="my_job" *
NOT display_name="my_job" *
create_time>"2021-05-18T00:00:00Z" *
labels.keyA=valueA *
labels.keyB:
`
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ readMask
FieldMask
Mask specifying which fields to read.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listCustomJobs
Lists CustomJobs in a Location.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
// Iterate over pages of elements
$pagedResponse = $jobServiceClient->listCustomJobs($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $jobServiceClient->listCustomJobs($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$jobServiceClient->close();
}
parent
string
Required. The resource name of the Location to list the CustomJobs from. Format: projects/{project}/locations/{location}
optionalArgs
array
Optional.
↳ filter
string
The standard list filter. Supported fields: * display_name
supports =
, !=
comparisons, and :
wildcard. * state
supports =
, !=
comparisons. * create_time
supports =
, !=
, <
, <=
, >
, >=
comparisons. create_time
must be in RFC 3339 format. * labels
supports general map functions that is: labels.key=value
- key:value equality labels.key:* - key existence Some examples of using the filter are: *
state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_ " *
state!="JOB_STATE_FAILED" OR display_name="my_job" *
NOT display_name="my_job" *
create_time>"2021-05-18T00:00:00Z" *
labels.keyA=valueA *
labels.keyB:
`
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ readMask
FieldMask
Mask specifying which fields to read.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listDataLabelingJobs
Lists DataLabelingJobs in a Location.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
// Iterate over pages of elements
$pagedResponse = $jobServiceClient->listDataLabelingJobs($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $jobServiceClient->listDataLabelingJobs($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$jobServiceClient->close();
}
parent
string
Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}
optionalArgs
array
Optional.
↳ filter
string
The standard list filter. Supported fields: * display_name
supports =
, !=
comparisons, and :
wildcard. * state
supports =
, !=
comparisons. * create_time
supports =
, !=
, <
, <=
, >
, >=
comparisons. create_time
must be in RFC 3339 format. * labels
supports general map functions that is: labels.key=value
- key:value equality labels.key:* - key existence Some examples of using the filter are: *
state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_ " *
state!="JOB_STATE_FAILED" OR display_name="my_job" *
NOT display_name="my_job" *
create_time>"2021-05-18T00:00:00Z" *
labels.keyA=valueA *
labels.keyB:
`
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ readMask
FieldMask
Mask specifying which fields to read. FieldMask represents a set of symbolic field paths. For example, the mask can be paths: "name"
. The "name" here is a field in DataLabelingJob. If this field is not set, all fields of the DataLabelingJob are returned.
↳ orderBy
string
A comma-separated list of fields to order by, sorted in ascending order by default. Use desc
after a field name for descending.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listHyperparameterTuningJobs
Lists HyperparameterTuningJobs in a Location.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
// Iterate over pages of elements
$pagedResponse = $jobServiceClient->listHyperparameterTuningJobs($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $jobServiceClient->listHyperparameterTuningJobs($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$jobServiceClient->close();
}
parent
string
Required. The resource name of the Location to list the HyperparameterTuningJobs from. Format: projects/{project}/locations/{location}
optionalArgs
array
Optional.
↳ filter
string
The standard list filter. Supported fields: * display_name
supports =
, !=
comparisons, and :
wildcard. * state
supports =
, !=
comparisons. * create_time
supports =
, !=
, <
, <=
, >
, >=
comparisons. create_time
must be in RFC 3339 format. * labels
supports general map functions that is: labels.key=value
- key:value equality labels.key:* - key existence Some examples of using the filter are: *
state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_ " *
state!="JOB_STATE_FAILED" OR display_name="my_job" *
NOT display_name="my_job" *
create_time>"2021-05-18T00:00:00Z" *
labels.keyA=valueA *
labels.keyB:
`
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ readMask
FieldMask
Mask specifying which fields to read.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listModelDeploymentMonitoringJobs
Lists ModelDeploymentMonitoringJobs in a Location.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedParent = $jobServiceClient->locationName('[PROJECT]', '[LOCATION]');
// Iterate over pages of elements
$pagedResponse = $jobServiceClient->listModelDeploymentMonitoringJobs($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $jobServiceClient->listModelDeploymentMonitoringJobs($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$jobServiceClient->close();
}
parent
string
Required. The parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}
optionalArgs
array
Optional.
↳ filter
string
The standard list filter. Supported fields: * display_name
supports =
, !=
comparisons, and :
wildcard. * state
supports =
, !=
comparisons. * create_time
supports =
, !=
, <
, <=
, >
, >=
comparisons. create_time
must be in RFC 3339 format. * labels
supports general map functions that is: labels.key=value
- key:value equality labels.key:* - key existence Some examples of using the filter are: *
state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_ " *
state!="JOB_STATE_FAILED" OR display_name="my_job" *
NOT display_name="my_job" *
create_time>"2021-05-18T00:00:00Z" *
labels.keyA=valueA *
labels.keyB:
`
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ readMask
FieldMask
Mask specifying which fields to read
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
pauseModelDeploymentMonitoringJob
Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark ModelDeploymentMonitoringJob.state to 'PAUSED'.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->modelDeploymentMonitoringJobName('[PROJECT]', '[LOCATION]', '[MODEL_DEPLOYMENT_MONITORING_JOB]');
$jobServiceClient->pauseModelDeploymentMonitoringJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
resumeModelDeploymentMonitoringJob
Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedName = $jobServiceClient->modelDeploymentMonitoringJobName('[PROJECT]', '[LOCATION]', '[MODEL_DEPLOYMENT_MONITORING_JOB]');
$jobServiceClient->resumeModelDeploymentMonitoringJob($formattedName);
} finally {
$jobServiceClient->close();
}
name
string
Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
searchModelDeploymentMonitoringStatsAnomalies
Searches Model Monitoring Statistics generated within a given time window.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$formattedModelDeploymentMonitoringJob = $jobServiceClient->modelDeploymentMonitoringJobName('[PROJECT]', '[LOCATION]', '[MODEL_DEPLOYMENT_MONITORING_JOB]');
$deployedModelId = 'deployed_model_id';
$objectives = [];
// Iterate over pages of elements
$pagedResponse = $jobServiceClient->searchModelDeploymentMonitoringStatsAnomalies($formattedModelDeploymentMonitoringJob, $deployedModelId, $objectives);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $jobServiceClient->searchModelDeploymentMonitoringStatsAnomalies($formattedModelDeploymentMonitoringJob, $deployedModelId, $objectives);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$jobServiceClient->close();
}
modelDeploymentMonitoringJob
string
Required. ModelDeploymentMonitoring Job resource name. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
deployedModelId
string
Required. The DeployedModel ID of the [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].
objectives
array< Google\Cloud\AIPlatform\V1\SearchModelDeploymentMonitoringStatsAnomaliesRequest\StatsAnomaliesObjective
>
Required. Objectives of the stats to retrieve.
optionalArgs
array
Optional.
↳ featureDisplayName
string
The feature display name. If specified, only return the stats belonging to this feature. Format: ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name , example: "user_destination".
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ startTime
Timestamp
The earliest timestamp of stats being generated. If not set, indicates fetching stats till the earliest possible one.
↳ endTime
Timestamp
The latest timestamp of stats being generated. If not set, indicates feching stats till the latest possible one.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
updateModelDeploymentMonitoringJob
Updates a ModelDeploymentMonitoringJob.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$modelDeploymentMonitoringJob = new ModelDeploymentMonitoringJob();
$updateMask = new FieldMask();
$operationResponse = $jobServiceClient->updateModelDeploymentMonitoringJob($modelDeploymentMonitoringJob, $updateMask);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $jobServiceClient->updateModelDeploymentMonitoringJob($modelDeploymentMonitoringJob, $updateMask);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $jobServiceClient->resumeOperation($operationName, 'updateModelDeploymentMonitoringJob');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$jobServiceClient->close();
}
modelDeploymentMonitoringJob
Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringJob
Required. The model monitoring configuration which replaces the resource on the server.
updateMask
Google\Protobuf\FieldMask
Required. The update mask is used to specify the fields to be overwritten in the ModelDeploymentMonitoringJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to *
to override all fields. For the objective config, the user can either provide the update mask for model_deployment_monitoring_objective_configs or any combination of its nested fields, such as: model_deployment_monitoring_objective_configs.objective_config.training_dataset. Updatable fields: * display_name
* model_deployment_monitoring_schedule_config
* model_monitoring_alert_config
* logging_sampling_strategy
* labels
* log_ttl
* enable_monitoring_pipeline_logs
. and * model_deployment_monitoring_objective_configs
. or * model_deployment_monitoring_objective_configs.objective_config.training_dataset
* model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config
* model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getLocation
Gets information about a location.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$response = $jobServiceClient->getLocation();
} finally {
$jobServiceClient->close();
}
optionalArgs
array
Optional.
↳ name
string
Resource name for the location.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listLocations
Lists information about the supported locations for this service.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
// Iterate over pages of elements
$pagedResponse = $jobServiceClient->listLocations();
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $jobServiceClient->listLocations();
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$jobServiceClient->close();
}
optionalArgs
array
Optional.
↳ name
string
The resource that owns the locations collection, if applicable.
↳ filter
string
The standard list filter.
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$resource = 'resource';
$response = $jobServiceClient->getIamPolicy($resource);
} finally {
$jobServiceClient->close();
}
resource
string
REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
optionalArgs
array
Optional.
↳ options
GetPolicyOptions
OPTIONAL: A GetPolicyOptions
object for specifying options to GetIamPolicy
.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
setIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$resource = 'resource';
$policy = new Policy();
$response = $jobServiceClient->setIamPolicy($resource, $policy);
} finally {
$jobServiceClient->close();
}
resource
string
REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
policy
Google\Cloud\Iam\V1\Policy
REQUIRED: The complete policy to be applied to the resource
. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
optionalArgs
array
Optional.
↳ updateMask
FieldMask
OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
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.
Sample code:
$jobServiceClient = new JobServiceClient();
try {
$resource = 'resource';
$permissions = [];
$response = $jobServiceClient->testIamPermissions($resource, $permissions);
} finally {
$jobServiceClient->close();
}
resource
string
REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
permissions
string[]
The set of permissions to check for the resource
. Permissions with wildcards (such as ' ' or 'storage.
') are not allowed. For more information see IAM Overview
.
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
Constants
SERVICE_NAME
Value: 'google.cloud.aiplatform.v1.JobService'
The name of the service.
SERVICE_ADDRESS
Value: 'aiplatform.googleapis.com'
The default address of the service.
DEFAULT_SERVICE_PORT
Value: 443
The default port of the service.
CODEGEN_NAME
Value: 'gapic'
The name of the code generator, to be included in the agent header.