- 3.10.0 (latest)
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.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
Google.Cloud.AIPlatform.V1
Google.Cloud.AIPlatform.V1
is a.NET client library for the Cloud AI Platform API.
Note:
This documentation is for version 2.28.0
of the library.
Some samples may not work with other versions.
Installation
Install the Google.Cloud.AIPlatform.V1
package from NuGet. Add it to
your project in the normal way (for example by right-clicking on the
project in Visual Studio and choosing "Manage NuGet Packages...").
Authentication
When running on Google Cloud, no action needs to be taken to authenticate.
Otherwise, the simplest way of authenticating your API calls is to set up Application Default Credentials. The credentials will automatically be used to authenticate. See Set up Application Default Credentials for more details.
Getting started
All operations are performed through the following client classes:
- DatasetServiceClient
- DeploymentResourcePoolServiceClient
- EndpointServiceClient
- FeatureOnlineStoreAdminServiceClient
- FeatureOnlineStoreServiceClient
- FeatureRegistryServiceClient
- FeaturestoreOnlineServingServiceClient
- FeaturestoreServiceClient
- GenAiTuningServiceClient
- IndexEndpointServiceClient
- IndexServiceClient
- JobServiceClient
- LlmUtilityServiceClient
- MatchServiceClient
- MetadataServiceClient
- MigrationServiceClient
- ModelGardenServiceClient
- ModelServiceClient
- NotebookServiceClient
- PersistentResourceServiceClient
- PipelineServiceClient
- PredictionServiceClient
- ScheduleServiceClient
- SpecialistPoolServiceClient
- TensorboardServiceClient
- VizierServiceClient
Clients in this API must be constructed with a regional endpoint.
This can be done easily using the builder for a specific client
(DatasetServiceClientBuilder
for DatasetServiceClient
for
example). The following example shows how to list the datasets for a
given project in the us-central1
region.
string region = "us-central1";
DatasetServiceClient client = new DatasetServiceClientBuilder
{
Endpoint = $"{region}-aiplatform.googleapis.com"
}.Build();
LocationName location = new LocationName(projectId, region);
PagedEnumerable<ListDatasetsResponse, Dataset> datasets = client.ListDatasets(location);
foreach (Dataset dataset in datasets)
{
Console.WriteLine(dataset.Name);
}
Constructing schema values
Various aspects of the API use schemas which are represented using
Google.Protobuf.WellKnownTypes.Value
, which is a generic
representation of a JSON value in Protocol Buffers.
Protocol Buffer messages are available for these schemas, and they
can be converted to and from Value
objects using the
ValueConverter
class, as shown below.
AutoMlImageClassificationInputs inputs = new AutoMlImageClassificationInputs
{
ModelType = AutoMlImageClassificationInputs.Types.ModelType.Cloud,
BaseModelId = "model-id",
// Other properties
};
TrainingPipeline pipeline = new TrainingPipeline
{
TrainingTaskInputs = ValueConverter.ToValue(inputs)
};
// Use pipeline in API calls such as PipelineServiceClient.CreateTrainingPipeline.