pub struct JobService { /* private fields */ }job-service only.Expand description
Implements a client for the Vertex AI API.
§Example
let client = JobService::builder().build().await?;
// use `client` to make requests to the Vertex AI API.§Service Description
A service for creating and managing Vertex AI’s jobs.
§Configuration
To configure JobService use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://aiplatform.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
JobService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap JobService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl JobService
impl JobService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for JobService.
let client = JobService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: JobService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: JobService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn create_custom_job(&self) -> CreateCustomJob
pub fn create_custom_job(&self) -> CreateCustomJob
Creates a CustomJob. A created CustomJob right away will be attempted to be run.
Sourcepub fn get_custom_job(&self) -> GetCustomJob
pub fn get_custom_job(&self) -> GetCustomJob
Gets a CustomJob.
Sourcepub fn list_custom_jobs(&self) -> ListCustomJobs
pub fn list_custom_jobs(&self) -> ListCustomJobs
Lists CustomJobs in a Location.
Sourcepub fn delete_custom_job(&self) -> DeleteCustomJob
pub fn delete_custom_job(&self) -> DeleteCustomJob
Deletes a CustomJob.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn cancel_custom_job(&self) -> CancelCustomJob
pub fn cancel_custom_job(&self) -> 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.
Sourcepub fn create_data_labeling_job(&self) -> CreateDataLabelingJob
pub fn create_data_labeling_job(&self) -> CreateDataLabelingJob
Creates a DataLabelingJob.
Sourcepub fn get_data_labeling_job(&self) -> GetDataLabelingJob
pub fn get_data_labeling_job(&self) -> GetDataLabelingJob
Gets a DataLabelingJob.
Sourcepub fn list_data_labeling_jobs(&self) -> ListDataLabelingJobs
pub fn list_data_labeling_jobs(&self) -> ListDataLabelingJobs
Lists DataLabelingJobs in a Location.
Sourcepub fn delete_data_labeling_job(&self) -> DeleteDataLabelingJob
pub fn delete_data_labeling_job(&self) -> DeleteDataLabelingJob
Deletes a DataLabelingJob.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn cancel_data_labeling_job(&self) -> CancelDataLabelingJob
pub fn cancel_data_labeling_job(&self) -> CancelDataLabelingJob
Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
Sourcepub fn create_hyperparameter_tuning_job(&self) -> CreateHyperparameterTuningJob
pub fn create_hyperparameter_tuning_job(&self) -> CreateHyperparameterTuningJob
Creates a HyperparameterTuningJob
Sourcepub fn get_hyperparameter_tuning_job(&self) -> GetHyperparameterTuningJob
pub fn get_hyperparameter_tuning_job(&self) -> GetHyperparameterTuningJob
Gets a HyperparameterTuningJob
Sourcepub fn list_hyperparameter_tuning_jobs(&self) -> ListHyperparameterTuningJobs
pub fn list_hyperparameter_tuning_jobs(&self) -> ListHyperparameterTuningJobs
Lists HyperparameterTuningJobs in a Location.
Sourcepub fn delete_hyperparameter_tuning_job(&self) -> DeleteHyperparameterTuningJob
pub fn delete_hyperparameter_tuning_job(&self) -> DeleteHyperparameterTuningJob
Deletes a HyperparameterTuningJob.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn cancel_hyperparameter_tuning_job(&self) -> CancelHyperparameterTuningJob
pub fn cancel_hyperparameter_tuning_job(&self) -> 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.
Sourcepub fn create_nas_job(&self) -> CreateNasJob
pub fn create_nas_job(&self) -> CreateNasJob
Creates a NasJob
Sourcepub fn get_nas_job(&self) -> GetNasJob
pub fn get_nas_job(&self) -> GetNasJob
Gets a NasJob
Sourcepub fn list_nas_jobs(&self) -> ListNasJobs
pub fn list_nas_jobs(&self) -> ListNasJobs
Lists NasJobs in a Location.
Sourcepub fn delete_nas_job(&self) -> DeleteNasJob
pub fn delete_nas_job(&self) -> DeleteNasJob
Deletes a NasJob.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn cancel_nas_job(&self) -> CancelNasJob
pub fn cancel_nas_job(&self) -> CancelNasJob
Cancels a NasJob.
Starts asynchronous cancellation on the NasJob. The server
makes a best effort to cancel the job, but success is not
guaranteed. Clients can use
JobService.GetNasJob or
other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation,
the NasJob is not deleted; instead it becomes a job with
a NasJob.error value with a
google.rpc.Status.code of 1, corresponding to
Code.CANCELLED, and
NasJob.state is set to
CANCELLED.
Sourcepub fn get_nas_trial_detail(&self) -> GetNasTrialDetail
pub fn get_nas_trial_detail(&self) -> GetNasTrialDetail
Gets a NasTrialDetail.
Sourcepub fn list_nas_trial_details(&self) -> ListNasTrialDetails
pub fn list_nas_trial_details(&self) -> ListNasTrialDetails
List top NasTrialDetails of a NasJob.
Sourcepub fn create_batch_prediction_job(&self) -> CreateBatchPredictionJob
pub fn create_batch_prediction_job(&self) -> CreateBatchPredictionJob
Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.
Sourcepub fn get_batch_prediction_job(&self) -> GetBatchPredictionJob
pub fn get_batch_prediction_job(&self) -> GetBatchPredictionJob
Gets a BatchPredictionJob
Sourcepub fn list_batch_prediction_jobs(&self) -> ListBatchPredictionJobs
pub fn list_batch_prediction_jobs(&self) -> ListBatchPredictionJobs
Lists BatchPredictionJobs in a Location.
Sourcepub fn delete_batch_prediction_job(&self) -> DeleteBatchPredictionJob
pub fn delete_batch_prediction_job(&self) -> DeleteBatchPredictionJob
Deletes a BatchPredictionJob. Can only be called on jobs that already finished.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn cancel_batch_prediction_job(&self) -> CancelBatchPredictionJob
pub fn cancel_batch_prediction_job(&self) -> 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.
Sourcepub fn create_model_deployment_monitoring_job(
&self,
) -> CreateModelDeploymentMonitoringJob
pub fn create_model_deployment_monitoring_job( &self, ) -> CreateModelDeploymentMonitoringJob
Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
Sourcepub fn search_model_deployment_monitoring_stats_anomalies(
&self,
) -> SearchModelDeploymentMonitoringStatsAnomalies
pub fn search_model_deployment_monitoring_stats_anomalies( &self, ) -> SearchModelDeploymentMonitoringStatsAnomalies
Searches Model Monitoring Statistics generated within a given time window.
Sourcepub fn get_model_deployment_monitoring_job(
&self,
) -> GetModelDeploymentMonitoringJob
pub fn get_model_deployment_monitoring_job( &self, ) -> GetModelDeploymentMonitoringJob
Gets a ModelDeploymentMonitoringJob.
Sourcepub fn list_model_deployment_monitoring_jobs(
&self,
) -> ListModelDeploymentMonitoringJobs
pub fn list_model_deployment_monitoring_jobs( &self, ) -> ListModelDeploymentMonitoringJobs
Lists ModelDeploymentMonitoringJobs in a Location.
Sourcepub fn update_model_deployment_monitoring_job(
&self,
) -> UpdateModelDeploymentMonitoringJob
pub fn update_model_deployment_monitoring_job( &self, ) -> UpdateModelDeploymentMonitoringJob
Updates a ModelDeploymentMonitoringJob.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_model_deployment_monitoring_job(
&self,
) -> DeleteModelDeploymentMonitoringJob
pub fn delete_model_deployment_monitoring_job( &self, ) -> DeleteModelDeploymentMonitoringJob
Deletes a ModelDeploymentMonitoringJob.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn pause_model_deployment_monitoring_job(
&self,
) -> PauseModelDeploymentMonitoringJob
pub fn pause_model_deployment_monitoring_job( &self, ) -> 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’.
Sourcepub fn resume_model_deployment_monitoring_job(
&self,
) -> ResumeModelDeploymentMonitoringJob
pub fn resume_model_deployment_monitoring_job( &self, ) -> ResumeModelDeploymentMonitoringJob
Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can’t be resumed.
Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
Sourcepub fn set_iam_policy(&self) -> SetIamPolicy
pub fn set_iam_policy(&self) -> SetIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
errors.
Sourcepub fn get_iam_policy(&self) -> GetIamPolicy
pub fn get_iam_policy(&self) -> GetIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Sourcepub fn test_iam_permissions(&self) -> TestIamPermissions
pub fn test_iam_permissions(&self) -> 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.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
Sourcepub fn wait_operation(&self) -> WaitOperation
pub fn wait_operation(&self) -> WaitOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for JobService
impl Clone for JobService
Source§fn clone(&self) -> JobService
fn clone(&self) -> JobService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more