Cloud AI Platform v1 API - Class DatasetServiceClient (2.13.0)

public abstract class DatasetServiceClient

Reference documentation and code samples for the Cloud AI Platform v1 API class DatasetServiceClient.

DatasetService client wrapper, for convenient use.

Inheritance

object > DatasetServiceClient

Derived Types

Namespace

GoogleCloudGoogle.Cloud.AIPlatformV1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

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

Properties

CreateDatasetOperationsClient

public virtual OperationsClient CreateDatasetOperationsClient { get; }

The long-running operations client for CreateDataset.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the DatasetService service, which is a host of "aiplatform.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default DatasetService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default DatasetService scopes are:

DeleteDatasetOperationsClient

public virtual OperationsClient DeleteDatasetOperationsClient { get; }

The long-running operations client for DeleteDataset.

Property Value
TypeDescription
OperationsClient

ExportDataOperationsClient

public virtual OperationsClient ExportDataOperationsClient { get; }

The long-running operations client for ExportData.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual DatasetService.DatasetServiceClient GrpcClient { get; }

The underlying gRPC DatasetService client

Property Value
TypeDescription
DatasetServiceDatasetServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

ImportDataOperationsClient

public virtual OperationsClient ImportDataOperationsClient { get; }

The long-running operations client for ImportData.

Property Value
TypeDescription
OperationsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static DatasetServiceClient Create()

Synchronously creates a DatasetServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DatasetServiceClientBuilder.

Returns
TypeDescription
DatasetServiceClient

The created DatasetServiceClient.

CreateAsync(CancellationToken)

public static Task<DatasetServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a DatasetServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DatasetServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskDatasetServiceClient

The task representing the created DatasetServiceClient.

CreateDataset(LocationName, Dataset, CallSettings)

public virtual Operation<Dataset, CreateDatasetOperationMetadata> CreateDataset(LocationName parent, Dataset dataset, CallSettings callSettings = null)

Creates a Dataset.

Parameters
NameDescription
parentLocationName

Required. The resource name of the Location to create the Dataset in. Format: projects/{project}/locations/{location}

datasetDataset

Required. The Dataset to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDatasetCreateDatasetOperationMetadata

The RPC response.

Example
// Create client
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, CreateDatasetOperationMetadata> response = datasetServiceClient.CreateDataset(parent, dataset);

// Poll until the returned long-running operation is complete
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Dataset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceCreateDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Dataset retrievedResult = retrievedResponse.Result;
}

CreateDataset(CreateDatasetRequest, CallSettings)

public virtual Operation<Dataset, CreateDatasetOperationMetadata> CreateDataset(CreateDatasetRequest request, CallSettings callSettings = null)

Creates a Dataset.

Parameters
NameDescription
requestCreateDatasetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDatasetCreateDatasetOperationMetadata

The RPC response.

Example
// Create client
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
// Initialize request argument(s)
CreateDatasetRequest request = new CreateDatasetRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Dataset = new Dataset(),
};
// Make the request
Operation<Dataset, CreateDatasetOperationMetadata> response = datasetServiceClient.CreateDataset(request);

// Poll until the returned long-running operation is complete
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Dataset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceCreateDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Dataset retrievedResult = retrievedResponse.Result;
}

CreateDataset(string, Dataset, CallSettings)

public virtual Operation<Dataset, CreateDatasetOperationMetadata> CreateDataset(string parent, Dataset dataset, CallSettings callSettings = null)

Creates a Dataset.

Parameters
NameDescription
parentstring

Required. The resource name of the Location to create the Dataset in. Format: projects/{project}/locations/{location}

datasetDataset

Required. The Dataset to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDatasetCreateDatasetOperationMetadata

The RPC response.

Example
// Create client
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, CreateDatasetOperationMetadata> response = datasetServiceClient.CreateDataset(parent, dataset);

// Poll until the returned long-running operation is complete
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Dataset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceCreateDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Dataset retrievedResult = retrievedResponse.Result;
}

CreateDatasetAsync(LocationName, Dataset, CallSettings)

public virtual Task<Operation<Dataset, CreateDatasetOperationMetadata>> CreateDatasetAsync(LocationName parent, Dataset dataset, CallSettings callSettings = null)

Creates a Dataset.

Parameters
NameDescription
parentLocationName

Required. The resource name of the Location to create the Dataset in. Format: projects/{project}/locations/{location}

datasetDataset

Required. The Dataset to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDatasetCreateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, CreateDatasetOperationMetadata> response = await datasetServiceClient.CreateDatasetAsync(parent, dataset);

// Poll until the returned long-running operation is complete
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Dataset retrievedResult = retrievedResponse.Result;
}

CreateDatasetAsync(LocationName, Dataset, CancellationToken)

public virtual Task<Operation<Dataset, CreateDatasetOperationMetadata>> CreateDatasetAsync(LocationName parent, Dataset dataset, CancellationToken cancellationToken)

Creates a Dataset.

Parameters
NameDescription
parentLocationName

Required. The resource name of the Location to create the Dataset in. Format: projects/{project}/locations/{location}

datasetDataset

Required. The Dataset to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationDatasetCreateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, CreateDatasetOperationMetadata> response = await datasetServiceClient.CreateDatasetAsync(parent, dataset);

// Poll until the returned long-running operation is complete
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Dataset retrievedResult = retrievedResponse.Result;
}

CreateDatasetAsync(CreateDatasetRequest, CallSettings)

public virtual Task<Operation<Dataset, CreateDatasetOperationMetadata>> CreateDatasetAsync(CreateDatasetRequest request, CallSettings callSettings = null)

Creates a Dataset.

Parameters
NameDescription
requestCreateDatasetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDatasetCreateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDatasetRequest request = new CreateDatasetRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Dataset = new Dataset(),
};
// Make the request
Operation<Dataset, CreateDatasetOperationMetadata> response = await datasetServiceClient.CreateDatasetAsync(request);

// Poll until the returned long-running operation is complete
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Dataset retrievedResult = retrievedResponse.Result;
}

CreateDatasetAsync(CreateDatasetRequest, CancellationToken)

public virtual Task<Operation<Dataset, CreateDatasetOperationMetadata>> CreateDatasetAsync(CreateDatasetRequest request, CancellationToken cancellationToken)

Creates a Dataset.

Parameters
NameDescription
requestCreateDatasetRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationDatasetCreateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDatasetRequest request = new CreateDatasetRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Dataset = new Dataset(),
};
// Make the request
Operation<Dataset, CreateDatasetOperationMetadata> response = await datasetServiceClient.CreateDatasetAsync(request);

// Poll until the returned long-running operation is complete
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Dataset retrievedResult = retrievedResponse.Result;
}

CreateDatasetAsync(string, Dataset, CallSettings)

public virtual Task<Operation<Dataset, CreateDatasetOperationMetadata>> CreateDatasetAsync(string parent, Dataset dataset, CallSettings callSettings = null)

Creates a Dataset.

Parameters
NameDescription
parentstring

Required. The resource name of the Location to create the Dataset in. Format: projects/{project}/locations/{location}

datasetDataset

Required. The Dataset to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDatasetCreateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, CreateDatasetOperationMetadata> response = await datasetServiceClient.CreateDatasetAsync(parent, dataset);

// Poll until the returned long-running operation is complete
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Dataset retrievedResult = retrievedResponse.Result;
}

CreateDatasetAsync(string, Dataset, CancellationToken)

public virtual Task<Operation<Dataset, CreateDatasetOperationMetadata>> CreateDatasetAsync(string parent, Dataset dataset, CancellationToken cancellationToken)

Creates a Dataset.

Parameters
NameDescription
parentstring

Required. The resource name of the Location to create the Dataset in. Format: projects/{project}/locations/{location}

datasetDataset

Required. The Dataset to create.

cancellationTokenCancellationToken

A