Class v1.DatasetServiceClient (6.2.0)

The service that manages Vertex AI Dataset and its child resources. v1

Package

@google-cloud/aiplatform

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of DatasetServiceClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new DatasetServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

datasetServiceStub

datasetServiceStub?: Promise<{
        [name: string]: Function;
    }>;

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

annotationPath(project, location, dataset, dataItem, annotation)

annotationPath(project: string, location: string, dataset: string, dataItem: string, annotation: string): string;

Return a fully-qualified annotation resource name string.

Parameters
Name Description
project string
location string
dataset string
dataItem string
annotation string
Returns
Type Description
string

{string} Resource name string.

annotationSpecPath(project, location, dataset, annotationSpec)

annotationSpecPath(project: string, location: string, dataset: string, annotationSpec: string): string;

Return a fully-qualified annotationSpec resource name string.

Parameters
Name Description
project string
location string
dataset string
annotationSpec string
Returns
Type Description
string

{string} Resource name string.

artifactPath(project, location, metadataStore, artifact)

artifactPath(project: string, location: string, metadataStore: string, artifact: string): string;

Return a fully-qualified artifact resource name string.

Parameters
Name Description
project string
location string
metadataStore string
artifact string
Returns
Type Description
string

{string} Resource name string.

batchPredictionJobPath(project, location, batchPredictionJob)

batchPredictionJobPath(project: string, location: string, batchPredictionJob: string): string;

Return a fully-qualified batchPredictionJob resource name string.

Parameters
Name Description
project string
location string
batchPredictionJob string
Returns
Type Description
string

{string} Resource name string.

cachedContentPath(project, location, cachedContent)

cachedContentPath(project: string, location: string, cachedContent: string): string;

Return a fully-qualified cachedContent resource name string.

Parameters
Name Description
project string
location string
cachedContent string
Returns
Type Description
string

{string} Resource name string.

cancelOperation(request, optionsOrCallback, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
request CancelOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkCreateDatasetProgress(name)

checkCreateDatasetProgress(name: string): Promise<LROperation<protos.google.cloud.aiplatform.v1.Dataset, protos.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata>>;

Check the status of the long running operation returned by createDataset().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.aiplatform.v1.Dataset, protos.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Location to create the Dataset in.
   *  Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The Dataset to create.
   */
  // const dataset = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callCreateDataset() {
    // Construct request
    const request = {
      parent,
      dataset,
    };

    // Run request
    const [operation] = await aiplatformClient.createDataset(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateDataset();

checkCreateDatasetVersionProgress(name)

checkCreateDatasetVersionProgress(name: string): Promise<LROperation<protos.google.cloud.aiplatform.v1.DatasetVersion, protos.google.cloud.aiplatform.v1.CreateDatasetVersionOperationMetadata>>;

Check the status of the long running operation returned by createDatasetVersion().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.aiplatform.v1.DatasetVersion, protos.google.cloud.aiplatform.v1.CreateDatasetVersionOperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Dataset resource.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The version to be created. The same CMEK policies with the
   *  original Dataset will be applied the dataset version. So here we don't need
   *  to specify the EncryptionSpecType here.
   */
  // const datasetVersion = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callCreateDatasetVersion() {
    // Construct request
    const request = {
      parent,
      datasetVersion,
    };

    // Run request
    const [operation] = await aiplatformClient.createDatasetVersion(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateDatasetVersion();

checkDeleteDatasetProgress(name)

checkDeleteDatasetProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.aiplatform.v1.DeleteOperationMetadata>>;

Check the status of the long running operation returned by deleteDataset().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.aiplatform.v1.DeleteOperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Dataset to delete.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const name = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callDeleteDataset() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await aiplatformClient.deleteDataset(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteDataset();

checkDeleteDatasetVersionProgress(name)

checkDeleteDatasetVersionProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.aiplatform.v1.DeleteOperationMetadata>>;

Check the status of the long running operation returned by deleteDatasetVersion().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.aiplatform.v1.DeleteOperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Dataset version to delete.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
   */
  // const name = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callDeleteDatasetVersion() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await aiplatformClient.deleteDatasetVersion(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteDatasetVersion();

checkDeleteSavedQueryProgress(name)

checkDeleteSavedQueryProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.aiplatform.v1.DeleteOperationMetadata>>;

Check the status of the long running operation returned by deleteSavedQuery().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.aiplatform.v1.DeleteOperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the SavedQuery to delete.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
   */
  // const name = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callDeleteSavedQuery() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await aiplatformClient.deleteSavedQuery(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteSavedQuery();

checkExportDataProgress(name)

checkExportDataProgress(name: string): Promise<LROperation<protos.google.cloud.aiplatform.v1.ExportDataResponse, protos.google.cloud.aiplatform.v1.ExportDataOperationMetadata>>;

Check the status of the long running operation returned by exportData().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.aiplatform.v1.ExportDataResponse, protos.google.cloud.aiplatform.v1.ExportDataOperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Dataset resource.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const name = 'abc123'
  /**
   *  Required. The desired output location.
   */
  // const exportConfig = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callExportData() {
    // Construct request
    const request = {
      name,
      exportConfig,
    };

    // Run request
    const [operation] = await aiplatformClient.exportData(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callExportData();

checkImportDataProgress(name)

checkImportDataProgress(name: string): Promise<LROperation<protos.google.cloud.aiplatform.v1.ImportDataResponse, protos.google.cloud.aiplatform.v1.ImportDataOperationMetadata>>;

Check the status of the long running operation returned by importData().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.aiplatform.v1.ImportDataResponse, protos.google.cloud.aiplatform.v1.ImportDataOperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Dataset resource.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const name = 'abc123'
  /**
   *  Required. The desired input locations. The contents of all input locations
   *  will be imported in one batch.
   */
  // const importConfigs = [1,2,3,4]

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callImportData() {
    // Construct request
    const request = {
      name,
      importConfigs,
    };

    // Run request
    const [operation] = await aiplatformClient.importData(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callImportData();

checkRestoreDatasetVersionProgress(name)

checkRestoreDatasetVersionProgress(name: string): Promise<LROperation<protos.google.cloud.aiplatform.v1.DatasetVersion, protos.google.cloud.aiplatform.v1.RestoreDatasetVersionOperationMetadata>>;

Check the status of the long running operation returned by restoreDatasetVersion().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.aiplatform.v1.DatasetVersion, protos.google.cloud.aiplatform.v1.RestoreDatasetVersionOperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the DatasetVersion resource.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
   */
  // const name = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callRestoreDatasetVersion() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await aiplatformClient.restoreDatasetVersion(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRestoreDatasetVersion();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

contextPath(project, location, metadataStore, context)

contextPath(project: string, location: string, metadataStore: string, context: string): string;

Return a fully-qualified context resource name string.

Parameters
Name Description
project string
location string
metadataStore string
context string
Returns
Type Description
string

{string} Resource name string.

createDataset(request, options)

createDataset(request?: protos.google.cloud.aiplatform.v1.ICreateDatasetRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.ICreateDatasetOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a Dataset.

Parameters
Name Description
request ICreateDatasetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.ICreateDatasetOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Location to create the Dataset in.
   *  Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The Dataset to create.
   */
  // const dataset = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callCreateDataset() {
    // Construct request
    const request = {
      parent,
      dataset,
    };

    // Run request
    const [operation] = await aiplatformClient.createDataset(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateDataset();

createDataset(request, options, callback)

createDataset(request: protos.google.cloud.aiplatform.v1.ICreateDatasetRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.ICreateDatasetOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDatasetRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.ICreateDatasetOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createDataset(request, callback)

createDataset(request: protos.google.cloud.aiplatform.v1.ICreateDatasetRequest, callback: Callback<LROperation<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.ICreateDatasetOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDatasetRequest
callback Callback<LROperation<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.ICreateDatasetOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createDatasetVersion(request, options)

createDatasetVersion(request?: protos.google.cloud.aiplatform.v1.ICreateDatasetVersionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.ICreateDatasetVersionOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create a version from a Dataset.

Parameters
Name Description
request ICreateDatasetVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.ICreateDatasetVersionOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Dataset resource.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The version to be created. The same CMEK policies with the
   *  original Dataset will be applied the dataset version. So here we don't need
   *  to specify the EncryptionSpecType here.
   */
  // const datasetVersion = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callCreateDatasetVersion() {
    // Construct request
    const request = {
      parent,
      datasetVersion,
    };

    // Run request
    const [operation] = await aiplatformClient.createDatasetVersion(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateDatasetVersion();

createDatasetVersion(request, options, callback)

createDatasetVersion(request: protos.google.cloud.aiplatform.v1.ICreateDatasetVersionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.ICreateDatasetVersionOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDatasetVersionRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.ICreateDatasetVersionOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createDatasetVersion(request, callback)

createDatasetVersion(request: protos.google.cloud.aiplatform.v1.ICreateDatasetVersionRequest, callback: Callback<LROperation<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.ICreateDatasetVersionOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDatasetVersionRequest
callback Callback<LROperation<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.ICreateDatasetVersionOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

customJobPath(project, location, customJob)

customJobPath(project: string, location: string, customJob: string): string;

Return a fully-qualified customJob resource name string.

Parameters
Name Description
project string
location string
customJob string
Returns
Type Description
string

{string} Resource name string.

dataItemPath(project, location, dataset, dataItem)

dataItemPath(project: string, location: string, dataset: string, dataItem: string): string;

Return a fully-qualified dataItem resource name string.

Parameters
Name Description
project string
location string
dataset string
dataItem string
Returns
Type Description
string

{string} Resource name string.

dataLabelingJobPath(project, location, dataLabelingJob)

dataLabelingJobPath(project: string, location: string, dataLabelingJob: string): string;

Return a fully-qualified dataLabelingJob resource name string.

Parameters
Name Description
project string
location string
dataLabelingJob string
Returns
Type Description
string

{string} Resource name string.

datasetPath(project, location, dataset)

datasetPath(project: string, location: string, dataset: string): string;

Return a fully-qualified dataset resource name string.

Parameters
Name Description
project string
location string
dataset string
Returns
Type Description
string

{string} Resource name string.

datasetVersionPath(project, location, dataset, datasetVersion)

datasetVersionPath(project: string, location: string, dataset: string, datasetVersion: string): string;

Return a fully-qualified datasetVersion resource name string.

Parameters
Name Description
project string
location string
dataset string
datasetVersion string
Returns
Type Description
string

{string} Resource name string.

deleteDataset(request, options)

deleteDataset(request?: protos.google.cloud.aiplatform.v1.IDeleteDatasetRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a Dataset.

Parameters
Name Description
request IDeleteDatasetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Dataset to delete.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const name = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callDeleteDataset() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await aiplatformClient.deleteDataset(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteDataset();

deleteDataset(request, options, callback)

deleteDataset(request: protos.google.cloud.aiplatform.v1.IDeleteDatasetRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDatasetRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteDataset(request, callback)

deleteDataset(request: protos.google.cloud.aiplatform.v1.IDeleteDatasetRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDatasetRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteDatasetVersion(request, options)

deleteDatasetVersion(request?: protos.google.cloud.aiplatform.v1.IDeleteDatasetVersionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a Dataset version.

Parameters
Name Description
request IDeleteDatasetVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Dataset version to delete.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
   */
  // const name = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callDeleteDatasetVersion() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await aiplatformClient.deleteDatasetVersion(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteDatasetVersion();

deleteDatasetVersion(request, options, callback)

deleteDatasetVersion(request: protos.google.cloud.aiplatform.v1.IDeleteDatasetVersionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDatasetVersionRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteDatasetVersion(request, callback)

deleteDatasetVersion(request: protos.google.cloud.aiplatform.v1.IDeleteDatasetVersionRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDatasetVersionRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, optionsOrCallback, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request DeleteOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

deleteSavedQuery(request, options)

deleteSavedQuery(request?: protos.google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a SavedQuery.

Parameters
Name Description
request IDeleteSavedQueryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the SavedQuery to delete.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
   */
  // const name = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callDeleteSavedQuery() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await aiplatformClient.deleteSavedQuery(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteSavedQuery();

deleteSavedQuery(request, options, callback)

deleteSavedQuery(request: protos.google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSavedQueryRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSavedQuery(request, callback)

deleteSavedQuery(request: protos.google.cloud.aiplatform.v1.IDeleteSavedQueryRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSavedQueryRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.aiplatform.v1.IDeleteOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deploymentResourcePoolPath(project, location, deploymentResourcePool)

deploymentResourcePoolPath(project: string, location: string, deploymentResourcePool: string): string;

Return a fully-qualified deploymentResourcePool resource name string.

Parameters
Name Description
project string
location string
deploymentResourcePool string
Returns
Type Description
string

{string} Resource name string.

entityTypePath(project, location, featurestore, entityType)

entityTypePath(project: string, location: string, featurestore: string, entityType: string): string;

Return a fully-qualified entityType resource name string.

Parameters
Name Description
project string
location string
featurestore string
entityType string
Returns
Type Description
string

{string} Resource name string.

executionPath(project, location, metadataStore, execution)

executionPath(project: string, location: string, metadataStore: string, execution: string): string;

Return a fully-qualified execution resource name string.

Parameters
Name Description
project string
location string
metadataStore string
execution string
Returns
Type Description
string

{string} Resource name string.

exportData(request, options)

exportData(request?: protos.google.cloud.aiplatform.v1.IExportDataRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.aiplatform.v1.IExportDataResponse, protos.google.cloud.aiplatform.v1.IExportDataOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Exports data from a Dataset.

Parameters
Name Description
request IExportDataRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.aiplatform.v1.IExportDataResponse, protos.google.cloud.aiplatform.v1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Dataset resource.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const name = 'abc123'
  /**
   *  Required. The desired output location.
   */
  // const exportConfig = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callExportData() {
    // Construct request
    const request = {
      name,
      exportConfig,
    };

    // Run request
    const [operation] = await aiplatformClient.exportData(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callExportData();

exportData(request, options, callback)

exportData(request: protos.google.cloud.aiplatform.v1.IExportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.aiplatform.v1.IExportDataResponse, protos.google.cloud.aiplatform.v1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IExportDataRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.aiplatform.v1.IExportDataResponse, protos.google.cloud.aiplatform.v1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

exportData(request, callback)

exportData(request: protos.google.cloud.aiplatform.v1.IExportDataRequest, callback: Callback<LROperation<protos.google.cloud.aiplatform.v1.IExportDataResponse, protos.google.cloud.aiplatform.v1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IExportDataRequest
callback Callback<LROperation<protos.google.cloud.aiplatform.v1.IExportDataResponse, protos.google.cloud.aiplatform.v1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

featureGroupPath(project, location, featureGroup)

featureGroupPath(project: string, location: string, featureGroup: string): string;

Return a fully-qualified featureGroup resource name string.

Parameters
Name Description
project string
location string
featureGroup string
Returns
Type Description
string

{string} Resource name string.

featureOnlineStorePath(project, location, featureOnlineStore)

featureOnlineStorePath(project: string, location: string, featureOnlineStore: string): string;

Return a fully-qualified featureOnlineStore resource name string.

Parameters
Name Description
project string
location string
featureOnlineStore string
Returns
Type Description
string

{string} Resource name string.

featurestorePath(project, location, featurestore)

featurestorePath(project: string, location: string, featurestore: string): string;

Return a fully-qualified featurestore resource name string.

Parameters
Name Description
project string
location string
featurestore string
Returns
Type Description
string

{string} Resource name string.

featureViewPath(project, location, featureOnlineStore, featureView)

featureViewPath(project: string, location: string, featureOnlineStore: string, featureView: string): string;

Return a fully-qualified featureView resource name string.

Parameters
Name Description
project string
location string
featureOnlineStore string
featureView string
Returns
Type Description
string

{string} Resource name string.

featureViewSyncPath(project, location, featureOnlineStore, featureView)

featureViewSyncPath(project: string, location: string, featureOnlineStore: string, featureView: string): string;

Return a fully-qualified featureViewSync resource name string.

Parameters
Name Description
project string
location string
featureOnlineStore string
featureView string
Returns
Type Description
string

{string} Resource name string.

getAnnotationSpec(request, options)

getAnnotationSpec(request?: protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest, options?: CallOptions): Promise<[
        protos.google.cloud.aiplatform.v1.IAnnotationSpec,
        protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest | undefined,
        {} | undefined
    ]>;

Gets an AnnotationSpec.

Parameters
Name Description
request IGetAnnotationSpecRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.aiplatform.v1.IAnnotationSpec, protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnnotationSpec. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the AnnotationSpec resource.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
   */
  // const name = 'abc123'
  /**
   *  Mask specifying which fields to read.
   */
  // const readMask = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callGetAnnotationSpec() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await aiplatformClient.getAnnotationSpec(request);
    console.log(response);
  }

  callGetAnnotationSpec();

getAnnotationSpec(request, options, callback)

getAnnotationSpec(request: protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest, options: CallOptions, callback: Callback<protos.google.cloud.aiplatform.v1.IAnnotationSpec, protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAnnotationSpecRequest
options CallOptions
callback Callback<protos.google.cloud.aiplatform.v1.IAnnotationSpec, protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getAnnotationSpec(request, callback)

getAnnotationSpec(request: protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest, callback: Callback<protos.google.cloud.aiplatform.v1.IAnnotationSpec, protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAnnotationSpecRequest
callback Callback<protos.google.cloud.aiplatform.v1.IAnnotationSpec, protos.google.cloud.aiplatform.v1.IGetAnnotationSpecRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDataset(request, options)

getDataset(request?: protos.google.cloud.aiplatform.v1.IGetDatasetRequest, options?: CallOptions): Promise<[
        protos.google.cloud.aiplatform.v1.IDataset,
        protos.google.cloud.aiplatform.v1.IGetDatasetRequest | undefined,
        {} | undefined
    ]>;

Gets a Dataset.

Parameters
Name Description
request IGetDatasetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.IGetDatasetRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Dataset. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Dataset resource.
   */
  // const name = 'abc123'
  /**
   *  Mask specifying which fields to read.
   */
  // const readMask = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callGetDataset() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await aiplatformClient.getDataset(request);
    console.log(response);
  }

  callGetDataset();

getDataset(request, options, callback)

getDataset(request: protos.google.cloud.aiplatform.v1.IGetDatasetRequest, options: CallOptions, callback: Callback<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.IGetDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDatasetRequest
options CallOptions
callback Callback<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.IGetDatasetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDataset(request, callback)

getDataset(request: protos.google.cloud.aiplatform.v1.IGetDatasetRequest, callback: Callback<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.IGetDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDatasetRequest
callback Callback<protos.google.cloud.aiplatform.v1.IDataset, protos.google.cloud.aiplatform.v1.IGetDatasetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDatasetVersion(request, options)

getDatasetVersion(request?: protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest, options?: CallOptions): Promise<[
        protos.google.cloud.aiplatform.v1.IDatasetVersion,
        protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest | undefined,
        {} | undefined
    ]>;

Gets a Dataset version.

Parameters
Name Description
request IGetDatasetVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing DatasetVersion. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Dataset version to delete.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
   */
  // const name = 'abc123'
  /**
   *  Mask specifying which fields to read.
   */
  // const readMask = {}

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callGetDatasetVersion() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await aiplatformClient.getDatasetVersion(request);
    console.log(response);
  }

  callGetDatasetVersion();

getDatasetVersion(request, options, callback)

getDatasetVersion(request: protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest, options: CallOptions, callback: Callback<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDatasetVersionRequest
options CallOptions
callback Callback<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDatasetVersion(request, callback)

getDatasetVersion(request: protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest, callback: Callback<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDatasetVersionRequest
callback Callback<protos.google.cloud.aiplatform.v1.IDatasetVersion, protos.google.cloud.aiplatform.v1.IGetDatasetVersionRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
Name Description
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
Type Description
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

const [response] = await client.getLocation(request);

getOperation(request, optionsOrCallback, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
request GetOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

hyperparameterTuningJobPath(project, location, hyperparameterTuningJob)

hyperparameterTuningJobPath(project: string, location: string, hyperparameterTuningJob: string): string;

Return a fully-qualified hyperparameterTuningJob resource name string.

Parameters
Name Description
project string
location string
hyperparameterTuningJob string
Returns
Type Description
string

{string} Resource name string.

importData(request, options)

importData(request?: protos.google.cloud.aiplatform.v1.IImportDataRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.aiplatform.v1.IImportDataResponse, protos.google.cloud.aiplatform.v1.IImportDataOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Imports data into a Dataset.

Parameters
Name Description
request IImportDataRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.aiplatform.v1.IImportDataResponse, protos.google.cloud.aiplatform.v1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Dataset resource.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const name = 'abc123'
  /**
   *  Required. The desired input locations. The contents of all input locations
   *  will be imported in one batch.
   */
  // const importConfigs = [1,2,3,4]

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callImportData() {
    // Construct request
    const request = {
      name,
      importConfigs,
    };

    // Run request
    const [operation] = await aiplatformClient.importData(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callImportData();

importData(request, options, callback)

importData(request: protos.google.cloud.aiplatform.v1.IImportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.aiplatform.v1.IImportDataResponse, protos.google.cloud.aiplatform.v1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IImportDataRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.aiplatform.v1.IImportDataResponse, protos.google.cloud.aiplatform.v1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

importData(request, callback)

importData(request: protos.google.cloud.aiplatform.v1.IImportDataRequest, callback: Callback<LROperation<protos.google.cloud.aiplatform.v1.IImportDataResponse, protos.google.cloud.aiplatform.v1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IImportDataRequest
callback Callback<LROperation<protos.google.cloud.aiplatform.v1.IImportDataResponse, protos.google.cloud.aiplatform.v1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

indexEndpointPath(project, location, indexEndpoint)

indexEndpointPath(project: string, location: string, indexEndpoint: string): string;

Return a fully-qualified indexEndpoint resource name string.

Parameters
Name Description
project string
location string
indexEndpoint string
Returns
Type Description
string

{string} Resource name string.

indexPath(project, location, index)

indexPath(project: string, location: string, index: string): string;

Return a fully-qualified index resource name string.

Parameters
Name Description
project string
location string
index string
Returns
Type Description
string

{string} Resource name string.

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listAnnotations(request, options)

listAnnotations(request?: protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.aiplatform.v1.IAnnotation[],
        protos.google.cloud.aiplatform.v1.IListAnnotationsRequest | null,
        protos.google.cloud.aiplatform.v1.IListAnnotationsResponse
    ]>;

Lists Annotations belongs to a dataitem This RPC is only available in InternalDatasetService. It is only used for exporting conversation data to CCAI Insights.

Parameters
Name Description
request IListAnnotationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.aiplatform.v1.IAnnotation[], protos.google.cloud.aiplatform.v1.IListAnnotationsRequest | null, protos.google.cloud.aiplatform.v1.IListAnnotationsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Annotation. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listAnnotationsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAnnotations(request, options, callback)

listAnnotations(request: protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, protos.google.cloud.aiplatform.v1.IListAnnotationsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IAnnotation>): void;
Parameters
Name Description
request IListAnnotationsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, protos.google.cloud.aiplatform.v1.IListAnnotationsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IAnnotation>
Returns
Type Description
void

listAnnotations(request, callback)

listAnnotations(request: protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, callback: PaginationCallback<protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, protos.google.cloud.aiplatform.v1.IListAnnotationsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IAnnotation>): void;
Parameters
Name Description
request IListAnnotationsRequest
callback PaginationCallback<protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, protos.google.cloud.aiplatform.v1.IListAnnotationsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IAnnotation>
Returns
Type Description
void

listAnnotationsAsync(request, options)

listAnnotationsAsync(request?: protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.aiplatform.v1.IAnnotation>;

Equivalent to listAnnotations, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListAnnotationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.aiplatform.v1.IAnnotation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Annotation. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the DataItem to list Annotations from.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
   */
  // const parent = 'abc123'
  /**
   *  The standard list filter.
   */
  // const filter = 'abc123'
  /**
   *  The standard list page size.
   */
  // const pageSize = 1234
  /**
   *  The standard list page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Mask specifying which fields to read.
   */
  // const readMask = {}
  /**
   *  A comma-separated list of fields to order by, sorted in ascending order.
   *  Use "desc" after a field name for descending.
   */
  // const orderBy = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callListAnnotations() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = aiplatformClient.listAnnotationsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListAnnotations();

listAnnotationsStream(request, options)

listAnnotationsStream(request?: protos.google.cloud.aiplatform.v1.IListAnnotationsRequest, options?: CallOptions): Transform;

Equivalent to listAnnotations, but returns a NodeJS Stream object.

Parameters
Name Description
request IListAnnotationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Annotation on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listAnnotationsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listDataItems(request, options)

listDataItems(request?: protos.google.cloud.aiplatform.v1.IListDataItemsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.aiplatform.v1.IDataItem[],
        protos.google.cloud.aiplatform.v1.IListDataItemsRequest | null,
        protos.google.cloud.aiplatform.v1.IListDataItemsResponse
    ]>;

Lists DataItems in a Dataset.

Parameters
Name Description
request IListDataItemsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.aiplatform.v1.IDataItem[], protos.google.cloud.aiplatform.v1.IListDataItemsRequest | null, protos.google.cloud.aiplatform.v1.IListDataItemsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of DataItem. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listDataItemsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listDataItems(request, options, callback)

listDataItems(request: protos.google.cloud.aiplatform.v1.IListDataItemsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.aiplatform.v1.IListDataItemsRequest, protos.google.cloud.aiplatform.v1.IListDataItemsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDataItem>): void;
Parameters
Name Description
request IListDataItemsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.aiplatform.v1.IListDataItemsRequest, protos.google.cloud.aiplatform.v1.IListDataItemsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDataItem>
Returns
Type Description
void

listDataItems(request, callback)

listDataItems(request: protos.google.cloud.aiplatform.v1.IListDataItemsRequest, callback: PaginationCallback<protos.google.cloud.aiplatform.v1.IListDataItemsRequest, protos.google.cloud.aiplatform.v1.IListDataItemsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDataItem>): void;
Parameters
Name Description
request IListDataItemsRequest
callback PaginationCallback<protos.google.cloud.aiplatform.v1.IListDataItemsRequest, protos.google.cloud.aiplatform.v1.IListDataItemsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDataItem>
Returns
Type Description
void

listDataItemsAsync(request, options)

listDataItemsAsync(request?: protos.google.cloud.aiplatform.v1.IListDataItemsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.aiplatform.v1.IDataItem>;

Equivalent to listDataItems, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListDataItemsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.aiplatform.v1.IDataItem>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing DataItem. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Dataset to list DataItems from.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const parent = 'abc123'
  /**
   *  The standard list filter.
   */
  // const filter = 'abc123'
  /**
   *  The standard list page size.
   */
  // const pageSize = 1234
  /**
   *  The standard list page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Mask specifying which fields to read.
   */
  // const readMask = {}
  /**
   *  A comma-separated list of fields to order by, sorted in ascending order.
   *  Use "desc" after a field name for descending.
   */
  // const orderBy = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callListDataItems() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = aiplatformClient.listDataItemsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListDataItems();

listDataItemsStream(request, options)

listDataItemsStream(request?: protos.google.cloud.aiplatform.v1.IListDataItemsRequest, options?: CallOptions): Transform;

Equivalent to listDataItems, but returns a NodeJS Stream object.

Parameters
Name Description
request IListDataItemsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing DataItem on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listDataItemsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listDatasets(request, options)

listDatasets(request?: protos.google.cloud.aiplatform.v1.IListDatasetsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.aiplatform.v1.IDataset[],
        protos.google.cloud.aiplatform.v1.IListDatasetsRequest | null,
        protos.google.cloud.aiplatform.v1.IListDatasetsResponse
    ]>;

Lists Datasets in a Location.

Parameters
Name Description
request IListDatasetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.aiplatform.v1.IDataset[], protos.google.cloud.aiplatform.v1.IListDatasetsRequest | null, protos.google.cloud.aiplatform.v1.IListDatasetsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Dataset. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listDatasetsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listDatasets(request, options, callback)

listDatasets(request: protos.google.cloud.aiplatform.v1.IListDatasetsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.aiplatform.v1.IListDatasetsRequest, protos.google.cloud.aiplatform.v1.IListDatasetsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDataset>): void;
Parameters
Name Description
request IListDatasetsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.aiplatform.v1.IListDatasetsRequest, protos.google.cloud.aiplatform.v1.IListDatasetsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDataset>
Returns
Type Description
void

listDatasets(request, callback)

listDatasets(request: protos.google.cloud.aiplatform.v1.IListDatasetsRequest, callback: PaginationCallback<protos.google.cloud.aiplatform.v1.IListDatasetsRequest, protos.google.cloud.aiplatform.v1.IListDatasetsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDataset>): void;
Parameters
Name Description
request IListDatasetsRequest
callback PaginationCallback<protos.google.cloud.aiplatform.v1.IListDatasetsRequest, protos.google.cloud.aiplatform.v1.IListDatasetsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDataset>
Returns
Type Description
void

listDatasetsAsync(request, options)

listDatasetsAsync(request?: protos.google.cloud.aiplatform.v1.IListDatasetsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.aiplatform.v1.IDataset>;

Equivalent to listDatasets, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListDatasetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.aiplatform.v1.IDataset>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Dataset. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Dataset's parent resource.
   *  Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  An expression for filtering the results of the request. For field names
   *  both snake_case and camelCase are supported.
   *    * `display_name`: supports = and !=
   *    * `metadata_schema_uri`: supports = and !=
   *    * `labels` supports general map functions that is:
   *      * `labels.key=value` - key:value equality
   *      * `labels.key:* or labels:key - key existence
   *      * A key including a space must be quoted. `labels."a key"`.
   *  Some examples:
   *    * `displayName="myDisplayName"`
   *    * `labels.myKey="myValue"`
   */
  // const filter = 'abc123'
  /**
   *  The standard list page size.
   */
  // const pageSize = 1234
  /**
   *  The standard list page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Mask specifying which fields to read.
   */
  // const readMask = {}
  /**
   *  A comma-separated list of fields to order by, sorted in ascending order.
   *  Use "desc" after a field name for descending.
   *  Supported fields:
   *    * `display_name`
   *    * `create_time`
   *    * `update_time`
   */
  // const orderBy = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callListDatasets() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = aiplatformClient.listDatasetsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListDatasets();

listDatasetsStream(request, options)

listDatasetsStream(request?: protos.google.cloud.aiplatform.v1.IListDatasetsRequest, options?: CallOptions): Transform;

Equivalent to listDatasets, but returns a NodeJS Stream object.

Parameters
Name Description
request IListDatasetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Dataset on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listDatasetsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listDatasetVersions(request, options)

listDatasetVersions(request?: protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.aiplatform.v1.IDatasetVersion[],
        protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest | null,
        protos.google.cloud.aiplatform.v1.IListDatasetVersionsResponse
    ]>;

Lists DatasetVersions in a Dataset.

Parameters
Name Description
request IListDatasetVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.aiplatform.v1.IDatasetVersion[], protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest | null, protos.google.cloud.aiplatform.v1.IListDatasetVersionsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of DatasetVersion. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listDatasetVersionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listDatasetVersions(request, options, callback)

listDatasetVersions(request: protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, protos.google.cloud.aiplatform.v1.IListDatasetVersionsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDatasetVersion>): void;
Parameters
Name Description
request IListDatasetVersionsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, protos.google.cloud.aiplatform.v1.IListDatasetVersionsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDatasetVersion>
Returns
Type Description
void

listDatasetVersions(request, callback)

listDatasetVersions(request: protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, callback: PaginationCallback<protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, protos.google.cloud.aiplatform.v1.IListDatasetVersionsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDatasetVersion>): void;
Parameters
Name Description
request IListDatasetVersionsRequest
callback PaginationCallback<protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, protos.google.cloud.aiplatform.v1.IListDatasetVersionsResponse | null | undefined, protos.google.cloud.aiplatform.v1.IDatasetVersion>
Returns
Type Description
void

listDatasetVersionsAsync(request, options)

listDatasetVersionsAsync(request?: protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.aiplatform.v1.IDatasetVersion>;

Equivalent to listDatasetVersions, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListDatasetVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.aiplatform.v1.IDatasetVersion>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing DatasetVersion. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Dataset to list DatasetVersions from.
   *  Format:
   *  `projects/{project}/locations/{location}/datasets/{dataset}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The standard list filter.
   */
  // const filter = 'abc123'
  /**
   *  Optional. The standard list page size.
   */
  // const pageSize = 1234
  /**
   *  Optional. The standard list page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Mask specifying which fields to read.
   */
  // const readMask = {}
  /**
   *  Optional. A comma-separated list of fields to order by, sorted in ascending
   *  order. Use "desc" after a field name for descending.
   */
  // const orderBy = 'abc123'

  // Imports the Aiplatform library
  const {DatasetServiceClient} = require('@google-cloud/aiplatform').v1;

  // Instantiates a client
  const aiplatformClient = new DatasetServiceClient();

  async function callListDatasetVersions() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = aiplatformClient.listDatasetVersionsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListDatasetVersions();

listDatasetVersionsStream(request, options)

listDatasetVersionsStream(request?: protos.google.cloud.aiplatform.v1.IListDatasetVersionsRequest, options?: CallOptions): Transform;

Equivalent to listDatasetVersions, but returns a NodeJS Stream object.

Parameters
Name Description
request IListDatasetVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing DatasetVersion on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listDatasetVersionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable