google-cloud-aiplatform overview (3.2.0)

com.google.cloud.aiplatform.util

com.google.cloud.aiplatform.v1

A client to Vertex AI API

The interfaces provided are listed below, along with usage samples.

DatasetServiceClient

Service Description: The service that handles the CRUD of Vertex AI Dataset and its child resources.

Sample for DatasetServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(DatasetServiceClientdatasetServiceClient=DatasetServiceClient.create()){DatasetNamename=DatasetName.of("[PROJECT]","[LOCATION]","[DATASET]");Datasetresponse=datasetServiceClient.getDataset(name);}

EndpointServiceClient

Service Description: A service for managing Vertex AI's Endpoints.

Sample for EndpointServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(EndpointServiceClientendpointServiceClient=EndpointServiceClient.create()){EndpointNamename=EndpointName.of("[PROJECT]","[LOCATION]","[ENDPOINT]");Endpointresponse=endpointServiceClient.getEndpoint(name);}

FeaturestoreOnlineServingServiceClient

Service Description: A service for serving online feature values.

Sample for FeaturestoreOnlineServingServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(FeaturestoreOnlineServingServiceClientfeaturestoreOnlineServingServiceClient=FeaturestoreOnlineServingServiceClient.create()){EntityTypeNameentityType=EntityTypeName.of("[PROJECT]","[LOCATION]","[FEATURESTORE]","[ENTITY_TYPE]");ReadFeatureValuesResponseresponse=featurestoreOnlineServingServiceClient.readFeatureValues(entityType);}

FeaturestoreServiceClient

Service Description: The service that handles CRUD and List for resources for Featurestore.

Sample for FeaturestoreServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(FeaturestoreServiceClientfeaturestoreServiceClient=FeaturestoreServiceClient.create()){FeaturestoreNamename=FeaturestoreName.of("[PROJECT]","[LOCATION]","[FEATURESTORE]");Featurestoreresponse=featurestoreServiceClient.getFeaturestore(name);}

IndexEndpointServiceClient

Service Description: A service for managing Vertex AI's IndexEndpoints.

Sample for IndexEndpointServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(IndexEndpointServiceClientindexEndpointServiceClient=IndexEndpointServiceClient.create()){IndexEndpointNamename=IndexEndpointName.of("[PROJECT]","[LOCATION]","[INDEX_ENDPOINT]");IndexEndpointresponse=indexEndpointServiceClient.getIndexEndpoint(name);}

IndexServiceClient

Service Description: A service for creating and managing Vertex AI's Index resources.

Sample for IndexServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(IndexServiceClientindexServiceClient=IndexServiceClient.create()){IndexNamename=IndexName.of("[PROJECT]","[LOCATION]","[INDEX]");Indexresponse=indexServiceClient.getIndex(name);}

JobServiceClient

Service Description: A service for creating and managing Vertex AI's jobs.

Sample for JobServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(JobServiceClientjobServiceClient=JobServiceClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");CustomJobcustomJob=CustomJob.newBuilder().build();CustomJobresponse=jobServiceClient.createCustomJob(parent,customJob);}

MetadataServiceClient

Service Description: Service for reading and writing metadata entries.

Sample for MetadataServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(MetadataServiceClientmetadataServiceClient=MetadataServiceClient.create()){MetadataStoreNamename=MetadataStoreName.of("[PROJECT]","[LOCATION]","[METADATA_STORE]");MetadataStoreresponse=metadataServiceClient.getMetadataStore(name);}

MigrationServiceClient

Service Description: A service that migrates resources from automl.googleapis.com, datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.

Sample for MigrationServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(MigrationServiceClientmigrationServiceClient=MigrationServiceClient.create()){GetLocationRequestrequest=GetLocationRequest.newBuilder().setName("name3373707").build();Locationresponse=migrationServiceClient.getLocation(request);}

ModelServiceClient

Service Description: A service for managing Vertex AI's machine learning Models.

Sample for ModelServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(ModelServiceClientmodelServiceClient=ModelServiceClient.create()){ModelNamename=ModelName.of("[PROJECT]","[LOCATION]","[MODEL]");Modelresponse=modelServiceClient.getModel(name);}

PipelineServiceClient

Service Description: A service for creating and managing Vertex AI's pipelines. This includes bothTrainingPipeline resources (used for AutoML and custom training) andPipelineJob resources (used for Vertex AI Pipelines).

Sample for PipelineServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(PipelineServiceClientpipelineServiceClient=PipelineServiceClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");TrainingPipelinetrainingPipeline=TrainingPipeline.newBuilder().build();TrainingPipelineresponse=pipelineServiceClient.createTrainingPipeline(parent,trainingPipeline);}

PredictionServiceClient

Service Description: A service for online predictions and explanations.

Sample for PredictionServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(PredictionServiceClientpredictionServiceClient=PredictionServiceClient.create()){EndpointNameendpoint=EndpointName.of("[PROJECT]","[LOCATION]","[ENDPOINT]");List<Value>instances=newArrayList<>();Valueparameters=Value.newBuilder().setBoolValue(true).build();PredictResponseresponse=predictionServiceClient.predict(endpoint,instances,parameters);}

SpecialistPoolServiceClient

Service Description: A service for creating and managing Customer SpecialistPools. When customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, then Managers will get email notifications to manage Specialists and tasks on CrowdCompute console.

Sample for SpecialistPoolServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(SpecialistPoolServiceClientspecialistPoolServiceClient=SpecialistPoolServiceClient.create()){SpecialistPoolNamename=SpecialistPoolName.of("[PROJECT]","[LOCATION]","[SPECIALIST_POOL]");SpecialistPoolresponse=specialistPoolServiceClient.getSpecialistPool(name);}

TensorboardServiceClient

Service Description: TensorboardService

Sample for TensorboardServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(TensorboardServiceClienttensorboardServiceClient=TensorboardServiceClient.create()){TensorboardNamename=TensorboardName.of("[PROJECT]","[LOCATION]","[TENSORBOARD]");Tensorboardresponse=tensorboardServiceClient.getTensorboard(name);}

VizierServiceClient

Service Description: Vertex AI Vizier API.

Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.

Sample for VizierServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(VizierServiceClientvizierServiceClient=VizierServiceClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");Studystudy=Study.newBuilder().build();Studyresponse=vizierServiceClient.createStudy(parent,study);}

com.google.cloud.aiplatform.v1.schema.predict.instance

com.google.cloud.aiplatform.v1.schema.predict.params

com.google.cloud.aiplatform.v1.schema.predict.prediction

com.google.cloud.aiplatform.v1.schema.trainingjob.definition

com.google.cloud.aiplatform.v1.stub

com.google.cloud.aiplatform.v1beta1

A client to Vertex AI API

The interfaces provided are listed below, along with usage samples.

DatasetServiceClient

Service Description: The service that handles the CRUD of Vertex AI Dataset and its child resources.

Sample for DatasetServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(DatasetServiceClientdatasetServiceClient=DatasetServiceClient.create()){DatasetNamename=DatasetName.of("[PROJECT]","[LOCATION]","[DATASET]");Datasetresponse=datasetServiceClient.getDataset(name);}

DeploymentResourcePoolServiceClient

Service Description: A service that manages the DeploymentResourcePool resource.

Sample for DeploymentResourcePoolServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(DeploymentResourcePoolServiceClientdeploymentResourcePoolServiceClient=DeploymentResourcePoolServiceClient.create()){DeploymentResourcePoolNamename=DeploymentResourcePoolName.of("[PROJECT]","[LOCATION]","[DEPLOYMENT_RESOURCE_POOL]");DeploymentResourcePoolresponse=deploymentResourcePoolServiceClient.getDeploymentResourcePool(name);}

EndpointServiceClient

Service Description: A service for managing Vertex AI's Endpoints.

Sample for EndpointServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(EndpointServiceClientendpointServiceClient=EndpointServiceClient.create()){EndpointNamename=EndpointName.of("[PROJECT]","[LOCATION]","[ENDPOINT]");Endpointresponse=endpointServiceClient.getEndpoint(name);}

FeaturestoreOnlineServingServiceClient

Service Description: A service for serving online feature values.

Sample for FeaturestoreOnlineServingServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(FeaturestoreOnlineServingServiceClientfeaturestoreOnlineServingServiceClient=FeaturestoreOnlineServingServiceClient.create()){EntityTypeNameentityType=EntityTypeName.of("[PROJECT]","[LOCATION]","[FEATURESTORE]","[ENTITY_TYPE]");ReadFeatureValuesResponseresponse=featurestoreOnlineServingServiceClient.readFeatureValues(entityType);}

FeaturestoreServiceClient

Service Description: The service that handles CRUD and List for resources for Featurestore.

Sample for FeaturestoreServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(FeaturestoreServiceClientfeaturestoreServiceClient=FeaturestoreServiceClient.create()){FeaturestoreNamename=FeaturestoreName.of("[PROJECT]","[LOCATION]","[FEATURESTORE]");Featurestoreresponse=featurestoreServiceClient.getFeaturestore(name);}

IndexEndpointServiceClient

Service Description: A service for managing Vertex AI's IndexEndpoints.

Sample for IndexEndpointServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(IndexEndpointServiceClientindexEndpointServiceClient=IndexEndpointServiceClient.create()){IndexEndpointNamename=IndexEndpointName.of("[PROJECT]","[LOCATION]","[INDEX_ENDPOINT]");IndexEndpointresponse=indexEndpointServiceClient.getIndexEndpoint(name);}

IndexServiceClient

Service Description: A service for creating and managing Vertex AI's Index resources.

Sample for IndexServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(IndexServiceClientindexServiceClient=IndexServiceClient.create()){IndexNamename=IndexName.of("[PROJECT]","[LOCATION]","[INDEX]");Indexresponse=indexServiceClient.getIndex(name);}

JobServiceClient

Service Description: A service for creating and managing Vertex AI's jobs.

Sample for JobServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(JobServiceClientjobServiceClient=JobServiceClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");CustomJobcustomJob=CustomJob.newBuilder().build();CustomJobresponse=jobServiceClient.createCustomJob(parent,customJob);}

MetadataServiceClient

Service Description: Service for reading and writing metadata entries.

Sample for MetadataServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(MetadataServiceClientmetadataServiceClient=MetadataServiceClient.create()){MetadataStoreNamename=MetadataStoreName.of("[PROJECT]","[LOCATION]","[METADATA_STORE]");MetadataStoreresponse=metadataServiceClient.getMetadataStore(name);}

MigrationServiceClient

Service Description: A service that migrates resources from automl.googleapis.com, datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.

Sample for MigrationServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(MigrationServiceClientmigrationServiceClient=MigrationServiceClient.create()){GetLocationRequestrequest=GetLocationRequest.newBuilder().setName("name3373707").build();Locationresponse=migrationServiceClient.getLocation(request);}

ModelServiceClient

Service Description: A service for managing Vertex AI's machine learning Models.

Sample for ModelServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(ModelServiceClientmodelServiceClient=ModelServiceClient.create()){ModelNamename=ModelName.of("[PROJECT]","[LOCATION]","[MODEL]");Modelresponse=modelServiceClient.getModel(name);}

PipelineServiceClient

Service Description: A service for creating and managing Vertex AI's pipelines. This includes bothTrainingPipeline resources (used for AutoML and custom training) andPipelineJob resources (used for Vertex AI Pipelines).

Sample for PipelineServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(PipelineServiceClientpipelineServiceClient=PipelineServiceClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");TrainingPipelinetrainingPipeline=TrainingPipeline.newBuilder().build();TrainingPipelineresponse=pipelineServiceClient.createTrainingPipeline(parent,trainingPipeline);}

PredictionServiceClient

Service Description: A service for online predictions and explanations.

Sample for PredictionServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(PredictionServiceClientpredictionServiceClient=PredictionServiceClient.create()){EndpointNameendpoint=EndpointName.of("[PROJECT]","[LOCATION]","[ENDPOINT]");List<Value>instances=newArrayList<>();Valueparameters=Value.newBuilder().setBoolValue(true).build();PredictResponseresponse=predictionServiceClient.predict(endpoint,instances,parameters);}

SpecialistPoolServiceClient

Service Description: A service for creating and managing Customer SpecialistPools. When customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, then Managers will get email notifications to manage Specialists and tasks on CrowdCompute console.

Sample for SpecialistPoolServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(SpecialistPoolServiceClientspecialistPoolServiceClient=SpecialistPoolServiceClient.create()){SpecialistPoolNamename=SpecialistPoolName.of("[PROJECT]","[LOCATION]","[SPECIALIST_POOL]");SpecialistPoolresponse=specialistPoolServiceClient.getSpecialistPool(name);}

TensorboardServiceClient

Service Description: TensorboardService

Sample for TensorboardServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(TensorboardServiceClienttensorboardServiceClient=TensorboardServiceClient.create()){TensorboardNamename=TensorboardName.of("[PROJECT]","[LOCATION]","[TENSORBOARD]");Tensorboardresponse=tensorboardServiceClient.getTensorboard(name);}

VizierServiceClient

Service Description: Vertex AI Vizier API.

Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.

Sample for VizierServiceClient:

// This snippet has been automatically generated for illustrative purposes only.// It may require modifications to work in your environment.try(VizierServiceClientvizierServiceClient=VizierServiceClient.create()){LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");Studystudy=Study.newBuilder().build();Studyresponse=vizierServiceClient.createStudy(parent,study);}

com.google.cloud.aiplatform.v1beta1.schema.predict.instance

com.google.cloud.aiplatform.v1beta1.schema.predict.params

com.google.cloud.aiplatform.v1beta1.schema.predict.prediction

com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition

com.google.cloud.aiplatform.v1beta1.stub

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-31 UTC.