Class v1.StorageInsightsClient (2.1.0)

Service describing handlers for resources v1

Package

@google-cloud/storageinsights

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of StorageInsightsClient.

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 StorageInsightsClient({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;

descriptors

descriptors: Descriptors;

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.

storageInsightsStub

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

universeDomain

get universeDomain(): string;

warn

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

Methods

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: ''});

checkCreateDatasetConfigProgress(name)

checkCreateDatasetConfigProgress(name: string): Promise<LROperation<protos.google.cloud.storageinsights.v1.DatasetConfig, protos.google.cloud.storageinsights.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.storageinsights.v1.DatasetConfig, protos.google.cloud.storageinsights.v1.OperationMetadata>>

{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. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   *  If auto-generating ID is enabled on the server-side, remove this field and
   *  `dataset_config_id` from the method_signature of Create RPC
   *  Note: The value should not contain any hyphens.
   */
  // const datasetConfigId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const datasetConfig = {}
  /**
   *  Optional. A unique identifier for your request.
   *  Specify the request ID if you need to retry the request.
   *  If you retry the request with the same ID within 60 minutes, the server
   *  ignores the request if it has already completed the original request.
   *  For example, if your initial request times out and you retry the request
   *  using the same request ID, the server recognizes the original request and
   *  does not process the new request.
   *  The request ID must be a valid UUID and cannot be a zero UUID
   *  (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

  async function callCreateDatasetConfig() {
    // Construct request
    const request = {
      parent,
      datasetConfigId,
      datasetConfig,
    };

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

  callCreateDatasetConfig();

checkDeleteDatasetConfigProgress(name)

checkDeleteDatasetConfigProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.storageinsights.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.storageinsights.v1.OperationMetadata>>

{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. Name of the resource
   */
  // const name = 'abc123'
  /**
   *  Optional. A unique identifier for your request.
   *  Specify the request ID if you need to retry the request.
   *  If you retry the request with the same ID within 60 minutes, the server
   *  ignores the request if it has already completed the original request.
   *  For example, if your initial request times out and you retry the request
   *  using the same request ID, the server recognizes the original request and
   *  does not process the new request.
   *  The request ID must be a valid UUID and cannot be a zero UUID
   *  (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callDeleteDatasetConfig();

checkLinkDatasetProgress(name)

checkLinkDatasetProgress(name: string): Promise<LROperation<protos.google.cloud.storageinsights.v1.LinkDatasetResponse, protos.google.cloud.storageinsights.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.storageinsights.v1.LinkDatasetResponse, protos.google.cloud.storageinsights.v1.OperationMetadata>>

{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. Name of the resource
   */
  // const name = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callLinkDataset();

checkUnlinkDatasetProgress(name)

checkUnlinkDatasetProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.storageinsights.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.storageinsights.v1.OperationMetadata>>

{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. Name of the resource
   */
  // const name = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callUnlinkDataset();

checkUpdateDatasetConfigProgress(name)

checkUpdateDatasetConfigProgress(name: string): Promise<LROperation<protos.google.cloud.storageinsights.v1.DatasetConfig, protos.google.cloud.storageinsights.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.storageinsights.v1.DatasetConfig, protos.google.cloud.storageinsights.v1.OperationMetadata>>

{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. Field mask is used to specify the fields to be overwritten in the
   *  `DatasetConfig` resource by the update.
   *  The fields specified in the `update_mask` are relative to the resource, not
   *  the full request. A field is overwritten if it is in the mask. If the
   *  user does not provide a mask then it returns an "Invalid Argument" error.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const datasetConfig = {}
  /**
   *  Optional. A unique identifier for your request.
   *  Specify the request ID if you need to retry the request.
   *  If you retry the request with the same ID within 60 minutes, the server
   *  ignores the request if it has already completed the original request.
   *  For example, if your initial request times out and you retry the request
   *  using the same request ID, the server recognizes the original request and
   *  does not process the new request.
   *  The request ID must be a valid UUID and cannot be a zero UUID
   *  (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

  async function callUpdateDatasetConfig() {
    // Construct request
    const request = {
      updateMask,
      datasetConfig,
    };

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

  callUpdateDatasetConfig();

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.

createDatasetConfig(request, options)

createDatasetConfig(request?: protos.google.cloud.storageinsights.v1.ICreateDatasetConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a dataset configuration in a given project for a given location.

Parameters
Name Description
request ICreateDatasetConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, 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. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   *  If auto-generating ID is enabled on the server-side, remove this field and
   *  `dataset_config_id` from the method_signature of Create RPC
   *  Note: The value should not contain any hyphens.
   */
  // const datasetConfigId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const datasetConfig = {}
  /**
   *  Optional. A unique identifier for your request.
   *  Specify the request ID if you need to retry the request.
   *  If you retry the request with the same ID within 60 minutes, the server
   *  ignores the request if it has already completed the original request.
   *  For example, if your initial request times out and you retry the request
   *  using the same request ID, the server recognizes the original request and
   *  does not process the new request.
   *  The request ID must be a valid UUID and cannot be a zero UUID
   *  (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

  async function callCreateDatasetConfig() {
    // Construct request
    const request = {
      parent,
      datasetConfigId,
      datasetConfig,
    };

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

  callCreateDatasetConfig();

createDatasetConfig(request, options, callback)

createDatasetConfig(request: protos.google.cloud.storageinsights.v1.ICreateDatasetConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDatasetConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createDatasetConfig(request, callback)

createDatasetConfig(request: protos.google.cloud.storageinsights.v1.ICreateDatasetConfigRequest, callback: Callback<LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDatasetConfigRequest
callback Callback<LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createReportConfig(request, options)

createReportConfig(request?: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.storageinsights.v1.IReportConfig,
        (protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | undefined),
        {} | undefined
    ]>;

Creates a new ReportConfig in a given project and location.

Parameters
Name Description
request ICreateReportConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.storageinsights.v1.IReportConfig, (protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ReportConfig. 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. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const reportConfig = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

    // Run request
    const response = await storageinsightsClient.createReportConfig(request);
    console.log(response);
  }

  callCreateReportConfig();

createReportConfig(request, options, callback)

createReportConfig(request: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateReportConfigRequest
options CallOptions
callback Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createReportConfig(request, callback)

createReportConfig(request: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateReportConfigRequest
callback Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

datasetConfigPath(project, location, datasetConfig)

datasetConfigPath(project: string, location: string, datasetConfig: string): string;

Return a fully-qualified datasetConfig resource name string.

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

{string} Resource name string.

deleteDatasetConfig(request, options)

deleteDatasetConfig(request?: protos.google.cloud.storageinsights.v1.IDeleteDatasetConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a dataset configuration in a given project for a given location.

Parameters
Name Description
request IDeleteDatasetConfigRequest

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.storageinsights.v1.IOperationMetadata>, 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. Name of the resource
   */
  // const name = 'abc123'
  /**
   *  Optional. A unique identifier for your request.
   *  Specify the request ID if you need to retry the request.
   *  If you retry the request with the same ID within 60 minutes, the server
   *  ignores the request if it has already completed the original request.
   *  For example, if your initial request times out and you retry the request
   *  using the same request ID, the server recognizes the original request and
   *  does not process the new request.
   *  The request ID must be a valid UUID and cannot be a zero UUID
   *  (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callDeleteDatasetConfig();

deleteDatasetConfig(request, options, callback)

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

deleteDatasetConfig(request, callback)

deleteDatasetConfig(request: protos.google.cloud.storageinsights.v1.IDeleteDatasetConfigRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDatasetConfigRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IOperationMetadata>, 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: ''});

deleteReportConfig(request, options)

deleteReportConfig(request?: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | undefined),
        {} | undefined
    ]>;

Deletes a single ReportConfig.

Parameters
Name Description
request IDeleteReportConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. 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. Name of the resource
   */
  // const name = 'abc123'
  /**
   *  Optional. If set, all ReportDetails for this ReportConfig will be deleted.
   */
  // const force = true
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

    // Run request
    const response = await storageinsightsClient.deleteReportConfig(request);
    console.log(response);
  }

  callDeleteReportConfig();

deleteReportConfig(request, options, callback)

deleteReportConfig(request: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteReportConfigRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteReportConfig(request, callback)

deleteReportConfig(request: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteReportConfigRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDatasetConfig(request, options)

getDatasetConfig(request?: protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.storageinsights.v1.IDatasetConfig,
        (protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest | undefined),
        {} | undefined
    ]>;

Gets the dataset configuration in a given project for a given location.

Parameters
Name Description
request IGetDatasetConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.storageinsights.v1.IDatasetConfig, (protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest | undefined), {} | undefined ]>

{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

  /**
   * 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. Name of the resource
   */
  // const name = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

    // Run request
    const response = await storageinsightsClient.getDatasetConfig(request);
    console.log(response);
  }

  callGetDatasetConfig();

getDatasetConfig(request, options, callback)

getDatasetConfig(request: protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDatasetConfigRequest
options CallOptions
callback Callback<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDatasetConfig(request, callback)

getDatasetConfig(request: protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDatasetConfigRequest
callback Callback<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IGetDatasetConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

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

getReportConfig(request, options)

getReportConfig(request?: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.storageinsights.v1.IReportConfig,
        (protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single ReportConfig.

Parameters
Name Description
request IGetReportConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.storageinsights.v1.IReportConfig, (protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ReportConfig. 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. Name of the resource
   */
  // const name = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

    // Run request
    const response = await storageinsightsClient.getReportConfig(request);
    console.log(response);
  }

  callGetReportConfig();

getReportConfig(request, options, callback)

getReportConfig(request: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReportConfigRequest
options CallOptions
callback Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getReportConfig(request, callback)

getReportConfig(request: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReportConfigRequest
callback Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getReportDetail(request, options)

getReportDetail(request?: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, options?: CallOptions): Promise<[
        protos.google.cloud.storageinsights.v1.IReportDetail,
        (protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single ReportDetail.

Parameters
Name Description
request IGetReportDetailRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.storageinsights.v1.IReportDetail, (protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | undefined), {} | undefined ]>

{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

  /**
   * 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. Name of the resource
   */
  // const name = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

    // Run request
    const response = await storageinsightsClient.getReportDetail(request);
    console.log(response);
  }

  callGetReportDetail();

getReportDetail(request, options, callback)

getReportDetail(request: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IReportDetail, protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReportDetailRequest
options CallOptions
callback Callback<protos.google.cloud.storageinsights.v1.IReportDetail, protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getReportDetail(request, callback)

getReportDetail(request: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IReportDetail, protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReportDetailRequest
callback Callback<protos.google.cloud.storageinsights.v1.IReportDetail, protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

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.

linkDataset(request, options)

linkDataset(request?: protos.google.cloud.storageinsights.v1.ILinkDatasetRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.storageinsights.v1.ILinkDatasetResponse, protos.google.cloud.storageinsights.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Links a dataset to BigQuery in a given project for a given location.

Parameters
Name Description
request ILinkDatasetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.storageinsights.v1.ILinkDatasetResponse, protos.google.cloud.storageinsights.v1.IOperationMetadata>, 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. Name of the resource
   */
  // const name = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callLinkDataset();

linkDataset(request, options, callback)

linkDataset(request: protos.google.cloud.storageinsights.v1.ILinkDatasetRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.storageinsights.v1.ILinkDatasetResponse, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ILinkDatasetRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.storageinsights.v1.ILinkDatasetResponse, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

linkDataset(request, callback)

linkDataset(request: protos.google.cloud.storageinsights.v1.ILinkDatasetRequest, callback: Callback<LROperation<protos.google.cloud.storageinsights.v1.ILinkDatasetResponse, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ILinkDatasetRequest
callback Callback<LROperation<protos.google.cloud.storageinsights.v1.ILinkDatasetResponse, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

listDatasetConfigs(request, options)

listDatasetConfigs(request?: protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.storageinsights.v1.IDatasetConfig[],
        protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest | null,
        protos.google.cloud.storageinsights.v1.IListDatasetConfigsResponse
    ]>;

Lists the dataset configurations in a given project for a given location.

Parameters
Name Description
request IListDatasetConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.storageinsights.v1.IDatasetConfig[], protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest | null, protos.google.cloud.storageinsights.v1.IListDatasetConfigsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listDatasetConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listDatasetConfigs(request, options, callback)

listDatasetConfigs(request: protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, protos.google.cloud.storageinsights.v1.IListDatasetConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IDatasetConfig>): void;
Parameters
Name Description
request IListDatasetConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, protos.google.cloud.storageinsights.v1.IListDatasetConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IDatasetConfig>
Returns
Type Description
void

listDatasetConfigs(request, callback)

listDatasetConfigs(request: protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, protos.google.cloud.storageinsights.v1.IListDatasetConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IDatasetConfig>): void;
Parameters
Name Description
request IListDatasetConfigsRequest
callback PaginationCallback<protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, protos.google.cloud.storageinsights.v1.IListDatasetConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IDatasetConfig>
Returns
Type Description
void

listDatasetConfigsAsync(request, options)

listDatasetConfigsAsync(request?: protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.storageinsights.v1.IDatasetConfig>;

Equivalent to listDatasetConfigs, but returns an iterable object.

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

Parameters
Name Description
request IListDatasetConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.storageinsights.v1.IDatasetConfig>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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. Parent value for ListDatasetConfigsRequest
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server might return fewer items than requested.
   *  If unspecified, server picks an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results
   */
  // const filter = 'abc123'
  /**
   *  Hint for how to order the results
   */
  // const orderBy = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callListDatasetConfigs();

listDatasetConfigsStream(request, options)

listDatasetConfigsStream(request?: protos.google.cloud.storageinsights.v1.IListDatasetConfigsRequest, options?: CallOptions): Transform;

Equivalent to listDatasetConfigs, but returns a NodeJS Stream object.

Parameters
Name Description
request IListDatasetConfigsRequest

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 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 listDatasetConfigsAsync() 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<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
Name Description
request ListOperationsRequest

The request object that will be sent.

options CallOptions

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

Returns
Type Description
AsyncIterable<protos.google.longrunning.IOperation>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listReportConfigs(request, options)

listReportConfigs(request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.storageinsights.v1.IReportConfig[],
        protos.google.cloud.storageinsights.v1.IListReportConfigsRequest | null,
        protos.google.cloud.storageinsights.v1.IListReportConfigsResponse
    ]>;

Lists ReportConfigs in a given project and location.

Parameters
Name Description
request IListReportConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.storageinsights.v1.IReportConfig[], protos.google.cloud.storageinsights.v1.IListReportConfigsRequest | null, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of ReportConfig. 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 listReportConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listReportConfigs(request, options, callback)

listReportConfigs(request: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportConfig>): void;
Parameters
Name Description
request IListReportConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportConfig>
Returns
Type Description
void

listReportConfigs(request, callback)

listReportConfigs(request: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportConfig>): void;
Parameters
Name Description
request IListReportConfigsRequest
callback PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportConfig>
Returns
Type Description
void

listReportConfigsAsync(request, options)

listReportConfigsAsync(request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.storageinsights.v1.IReportConfig>;

Equivalent to listReportConfigs, but returns an iterable object.

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

Parameters
Name Description
request IListReportConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.storageinsights.v1.IReportConfig>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ReportConfig. 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. Parent value for ListReportConfigsRequest
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results
   */
  // const filter = 'abc123'
  /**
   *  Hint for how to order the results
   */
  // const orderBy = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callListReportConfigs();

listReportConfigsStream(request, options)

listReportConfigsStream(request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, options?: CallOptions): Transform;

Equivalent to listReportConfigs, but returns a NodeJS Stream object.

Parameters
Name Description
request IListReportConfigsRequest

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 ReportConfig 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 listReportConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listReportDetails(request, options)

listReportDetails(request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.storageinsights.v1.IReportDetail[],
        protos.google.cloud.storageinsights.v1.IListReportDetailsRequest | null,
        protos.google.cloud.storageinsights.v1.IListReportDetailsResponse
    ]>;

Lists ReportDetails in a given project and location.

Parameters
Name Description
request IListReportDetailsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.storageinsights.v1.IReportDetail[], protos.google.cloud.storageinsights.v1.IListReportDetailsRequest | null, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listReportDetailsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listReportDetails(request, options, callback)

listReportDetails(request: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportDetail>): void;
Parameters
Name Description
request IListReportDetailsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportDetail>
Returns
Type Description
void

listReportDetails(request, callback)

listReportDetails(request: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportDetail>): void;
Parameters
Name Description
request IListReportDetailsRequest
callback PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportDetail>
Returns
Type Description
void

listReportDetailsAsync(request, options)

listReportDetailsAsync(request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.storageinsights.v1.IReportDetail>;

Equivalent to listReportDetails, but returns an iterable object.

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

Parameters
Name Description
request IListReportDetailsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.storageinsights.v1.IReportDetail>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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. Parent value for ListReportDetailsRequest
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results
   */
  // const filter = 'abc123'
  /**
   *  Hint for how to order the results
   */
  // const orderBy = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callListReportDetails();

listReportDetailsStream(request, options)

listReportDetailsStream(request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, options?: CallOptions): Transform;

Equivalent to listReportDetails, but returns a NodeJS Stream object.

Parameters
Name Description
request IListReportDetailsRequest

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 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 listReportDetailsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchDatasetConfigFromDatasetConfigName(datasetConfigName)

matchDatasetConfigFromDatasetConfigName(datasetConfigName: string): string | number;

Parse the dataset_config from DatasetConfig resource.

Parameter
Name Description
datasetConfigName string

A fully-qualified path representing DatasetConfig resource.

Returns
Type Description
string | number

{string} A string representing the dataset_config.

matchLocationFromDatasetConfigName(datasetConfigName)

matchLocationFromDatasetConfigName(datasetConfigName: string): string | number;

Parse the location from DatasetConfig resource.

Parameter
Name Description
datasetConfigName string

A fully-qualified path representing DatasetConfig resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromReportConfigName(reportConfigName)

matchLocationFromReportConfigName(reportConfigName: string): string | number;

Parse the location from ReportConfig resource.

Parameter
Name Description
reportConfigName string

A fully-qualified path representing ReportConfig resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromReportDetailName(reportDetailName)

matchLocationFromReportDetailName(reportDetailName: string): string | number;

Parse the location from ReportDetail resource.

Parameter
Name Description
reportDetailName string

A fully-qualified path representing ReportDetail resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchProjectFromDatasetConfigName(datasetConfigName)

matchProjectFromDatasetConfigName(datasetConfigName: string): string | number;

Parse the project from DatasetConfig resource.

Parameter
Name Description
datasetConfigName string

A fully-qualified path representing DatasetConfig resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromReportConfigName(reportConfigName)

matchProjectFromReportConfigName(reportConfigName: string): string | number;

Parse the project from ReportConfig resource.

Parameter
Name Description
reportConfigName string

A fully-qualified path representing ReportConfig resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromReportDetailName(reportDetailName)

matchProjectFromReportDetailName(reportDetailName: string): string | number;

Parse the project from ReportDetail resource.

Parameter
Name Description
reportDetailName string

A fully-qualified path representing ReportDetail resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchReportConfigFromReportConfigName(reportConfigName)

matchReportConfigFromReportConfigName(reportConfigName: string): string | number;

Parse the report_config from ReportConfig resource.

Parameter
Name Description
reportConfigName string

A fully-qualified path representing ReportConfig resource.

Returns
Type Description
string | number

{string} A string representing the report_config.

matchReportConfigFromReportDetailName(reportDetailName)

matchReportConfigFromReportDetailName(reportDetailName: string): string | number;

Parse the report_config from ReportDetail resource.

Parameter
Name Description
reportDetailName string

A fully-qualified path representing ReportDetail resource.

Returns
Type Description
string | number

{string} A string representing the report_config.

matchReportDetailFromReportDetailName(reportDetailName)

matchReportDetailFromReportDetailName(reportDetailName: string): string | number;

Parse the report_detail from ReportDetail resource.

Parameter
Name Description
reportDetailName string

A fully-qualified path representing ReportDetail resource.

Returns
Type Description
string | number

{string} A string representing the report_detail.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

reportConfigPath(project, location, reportConfig)

reportConfigPath(project: string, location: string, reportConfig: string): string;

Return a fully-qualified reportConfig resource name string.

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

{string} Resource name string.

reportDetailPath(project, location, reportConfig, reportDetail)

reportDetailPath(project: string, location: string, reportConfig: string, reportDetail: string): string;

Return a fully-qualified reportDetail resource name string.

Parameters
Name Description
project string
location string
reportConfig string
reportDetail string
Returns
Type Description
string

{string} Resource name string.

unlinkDataset(request, options)

unlinkDataset(request?: protos.google.cloud.storageinsights.v1.IUnlinkDatasetRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Unlinks a dataset from BigQuery in a given project for a given location.

Parameters
Name Description
request IUnlinkDatasetRequest

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.storageinsights.v1.IOperationMetadata>, 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. Name of the resource
   */
  // const name = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

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

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

  callUnlinkDataset();

unlinkDataset(request, options, callback)

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

unlinkDataset(request, callback)

unlinkDataset(request: protos.google.cloud.storageinsights.v1.IUnlinkDatasetRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUnlinkDatasetRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateDatasetConfig(request, options)

updateDatasetConfig(request?: protos.google.cloud.storageinsights.v1.IUpdateDatasetConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a dataset configuration in a given project for a given location.

Parameters
Name Description
request IUpdateDatasetConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, 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. Field mask is used to specify the fields to be overwritten in the
   *  `DatasetConfig` resource by the update.
   *  The fields specified in the `update_mask` are relative to the resource, not
   *  the full request. A field is overwritten if it is in the mask. If the
   *  user does not provide a mask then it returns an "Invalid Argument" error.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const datasetConfig = {}
  /**
   *  Optional. A unique identifier for your request.
   *  Specify the request ID if you need to retry the request.
   *  If you retry the request with the same ID within 60 minutes, the server
   *  ignores the request if it has already completed the original request.
   *  For example, if your initial request times out and you retry the request
   *  using the same request ID, the server recognizes the original request and
   *  does not process the new request.
   *  The request ID must be a valid UUID and cannot be a zero UUID
   *  (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

  async function callUpdateDatasetConfig() {
    // Construct request
    const request = {
      updateMask,
      datasetConfig,
    };

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

  callUpdateDatasetConfig();

updateDatasetConfig(request, options, callback)

updateDatasetConfig(request: protos.google.cloud.storageinsights.v1.IUpdateDatasetConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateDatasetConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateDatasetConfig(request, callback)

updateDatasetConfig(request: protos.google.cloud.storageinsights.v1.IUpdateDatasetConfigRequest, callback: Callback<LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateDatasetConfigRequest
callback Callback<LROperation<protos.google.cloud.storageinsights.v1.IDatasetConfig, protos.google.cloud.storageinsights.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateReportConfig(request, options)

updateReportConfig(request?: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.storageinsights.v1.IReportConfig,
        (protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | undefined),
        {} | undefined
    ]>;

Updates the parameters of a single ReportConfig.

Parameters
Name Description
request IUpdateReportConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.storageinsights.v1.IReportConfig, (protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ReportConfig. 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. Field mask is used to specify the fields to be overwritten in the
   *  ReportConfig resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const reportConfig = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Storageinsights library
  const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;

  // Instantiates a client
  const storageinsightsClient = new StorageInsightsClient();

  async function callUpdateReportConfig() {
    // Construct request
    const request = {
      updateMask,
      reportConfig,
    };

    // Run request
    const response = await storageinsightsClient.updateReportConfig(request);
    console.log(response);
  }

  callUpdateReportConfig();

updateReportConfig(request, options, callback)

updateReportConfig(request: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateReportConfigRequest
options CallOptions
callback Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateReportConfig(request, callback)

updateReportConfig(request: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateReportConfigRequest
callback Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void