pub struct JobService { /* private fields */ }job-service only.Expand description
Implements a client for the Vertex AI API.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
let client = JobService::builder().build().await?;
let parent = "parent_value";
let mut list = client.list_custom_jobs()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}§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 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.
§Example
use google_cloud_aiplatform_v1::model::CustomJob;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let response = client.create_custom_job()
.set_parent(parent)
.set_custom_job(
CustomJob::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_custom_job(&self) -> GetCustomJob
pub fn get_custom_job(&self) -> GetCustomJob
Gets a CustomJob.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
let response = client.get_custom_job()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_custom_jobs(&self) -> ListCustomJobs
pub fn list_custom_jobs(&self) -> ListCustomJobs
Lists CustomJobs in a Location.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let mut list = client.list_custom_jobs()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
client.delete_custom_job()
.set_name(name)
.poller().until_done().await?;
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.cancel_custom_job()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn create_data_labeling_job(&self) -> CreateDataLabelingJob
pub fn create_data_labeling_job(&self) -> CreateDataLabelingJob
Creates a DataLabelingJob.
§Example
use google_cloud_aiplatform_v1::model::DataLabelingJob;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let response = client.create_data_labeling_job()
.set_parent(parent)
.set_data_labeling_job(
DataLabelingJob::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_data_labeling_job(&self) -> GetDataLabelingJob
pub fn get_data_labeling_job(&self) -> GetDataLabelingJob
Gets a DataLabelingJob.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
let response = client.get_data_labeling_job()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_data_labeling_jobs(&self) -> ListDataLabelingJobs
pub fn list_data_labeling_jobs(&self) -> ListDataLabelingJobs
Lists DataLabelingJobs in a Location.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let mut list = client.list_data_labeling_jobs()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
client.delete_data_labeling_job()
.set_name(name)
.poller().until_done().await?;
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.cancel_data_labeling_job()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn create_hyperparameter_tuning_job(&self) -> CreateHyperparameterTuningJob
pub fn create_hyperparameter_tuning_job(&self) -> CreateHyperparameterTuningJob
Creates a HyperparameterTuningJob
§Example
use google_cloud_aiplatform_v1::model::HyperparameterTuningJob;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let response = client.create_hyperparameter_tuning_job()
.set_parent(parent)
.set_hyperparameter_tuning_job(
HyperparameterTuningJob::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_hyperparameter_tuning_job(&self) -> GetHyperparameterTuningJob
pub fn get_hyperparameter_tuning_job(&self) -> GetHyperparameterTuningJob
Gets a HyperparameterTuningJob
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
let response = client.get_hyperparameter_tuning_job()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_hyperparameter_tuning_jobs(&self) -> ListHyperparameterTuningJobs
pub fn list_hyperparameter_tuning_jobs(&self) -> ListHyperparameterTuningJobs
Lists HyperparameterTuningJobs in a Location.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let mut list = client.list_hyperparameter_tuning_jobs()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
client.delete_hyperparameter_tuning_job()
.set_name(name)
.poller().until_done().await?;
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.cancel_hyperparameter_tuning_job()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn create_nas_job(&self) -> CreateNasJob
pub fn create_nas_job(&self) -> CreateNasJob
Creates a NasJob
§Example
use google_cloud_aiplatform_v1::model::NasJob;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let response = client.create_nas_job()
.set_parent(parent)
.set_nas_job(
NasJob::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_nas_job(&self) -> GetNasJob
pub fn get_nas_job(&self) -> GetNasJob
Gets a NasJob
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
let response = client.get_nas_job()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_nas_jobs(&self) -> ListNasJobs
pub fn list_nas_jobs(&self) -> ListNasJobs
Lists NasJobs in a Location.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let mut list = client.list_nas_jobs()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
client.delete_nas_job()
.set_name(name)
.poller().until_done().await?;
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.cancel_nas_job()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn get_nas_trial_detail(&self) -> GetNasTrialDetail
pub fn get_nas_trial_detail(&self) -> GetNasTrialDetail
Gets a NasTrialDetail.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
let response = client.get_nas_trial_detail()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_nas_trial_details(&self) -> ListNasTrialDetails
pub fn list_nas_trial_details(&self) -> ListNasTrialDetails
List top NasTrialDetails of a NasJob.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let mut list = client.list_nas_trial_details()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::model::BatchPredictionJob;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let response = client.create_batch_prediction_job()
.set_parent(parent)
.set_batch_prediction_job(
BatchPredictionJob::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_batch_prediction_job(&self) -> GetBatchPredictionJob
pub fn get_batch_prediction_job(&self) -> GetBatchPredictionJob
Gets a BatchPredictionJob
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
let response = client.get_batch_prediction_job()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_batch_prediction_jobs(&self) -> ListBatchPredictionJobs
pub fn list_batch_prediction_jobs(&self) -> ListBatchPredictionJobs
Lists BatchPredictionJobs in a Location.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let mut list = client.list_batch_prediction_jobs()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
client.delete_batch_prediction_job()
.set_name(name)
.poller().until_done().await?;
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.cancel_batch_prediction_job()
/* set fields */
.send().await?;
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::model::ModelDeploymentMonitoringJob;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let response = client.create_model_deployment_monitoring_job()
.set_parent(parent)
.set_model_deployment_monitoring_job(
ModelDeploymentMonitoringJob::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let mut list = client.search_model_deployment_monitoring_stats_anomalies()
/* set fields */
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_model_deployment_monitoring_job(
&self,
) -> GetModelDeploymentMonitoringJob
pub fn get_model_deployment_monitoring_job( &self, ) -> GetModelDeploymentMonitoringJob
Gets a ModelDeploymentMonitoringJob.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
let response = client.get_model_deployment_monitoring_job()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_model_deployment_monitoring_jobs(
&self,
) -> ListModelDeploymentMonitoringJobs
pub fn list_model_deployment_monitoring_jobs( &self, ) -> ListModelDeploymentMonitoringJobs
Lists ModelDeploymentMonitoringJobs in a Location.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, parent: &str
) -> Result<()> {
let mut list = client.list_model_deployment_monitoring_jobs()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_wkt::FieldMask;
use google_cloud_aiplatform_v1::model::ModelDeploymentMonitoringJob;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
let response = client.update_model_deployment_monitoring_job()
.set_model_deployment_monitoring_job(
ModelDeploymentMonitoringJob::new().set_name(name)/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService, name: &str
) -> Result<()> {
client.delete_model_deployment_monitoring_job()
.set_name(name)
.poller().until_done().await?;
Ok(())
}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’.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.pause_model_deployment_monitoring_job()
/* set fields */
.send().await?;
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.resume_model_deployment_monitoring_job()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let mut list = client.list_locations()
/* set fields */
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let response = client.get_location()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let response = client.set_iam_policy()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let response = client.get_iam_policy()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let response = client.test_iam_permissions()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let mut list = client.list_operations()
/* set fields */
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let response = client.get_operation()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.delete_operation()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
client.cancel_operation()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn wait_operation(&self) -> WaitOperation
pub fn wait_operation(&self) -> WaitOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_aiplatform_v1::Result;
async fn sample(
client: &JobService
) -> Result<()> {
let response = client.wait_operation()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}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