Class v1.RuleServiceClient (0.10.1)

RuleService provides interface for user-created rules. v1

Package

@google-cloud/chronicle

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of RuleServiceClient.

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 RuleServiceClient({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;
    };

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

ruleServiceStub

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

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

bigQueryExportPath(project, location, instance)

bigQueryExportPath(project: string, location: string, instance: string): string;

Return a fully-qualified bigQueryExport resource name string.

Parameters
Name Description
project string
location string
instance 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: ''});

checkCreateRetrohuntProgress(name)

checkCreateRetrohuntProgress(name: string): Promise<LROperation<protos.google.cloud.chronicle.v1.Retrohunt, protos.google.cloud.chronicle.v1.RetrohuntMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.chronicle.v1.Retrohunt, protos.google.cloud.chronicle.v1.RetrohuntMetadata>>

{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 parent of retrohunt, which is a rule.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The retrohunt to create.
   */
  // const retrohunt = {}

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

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

  callCreateRetrohunt();

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.

createRetrohunt(request, options)

createRetrohunt(request?: protos.google.cloud.chronicle.v1.ICreateRetrohuntRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create a Retrohunt.

Parameters
Name Description
request ICreateRetrohuntRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>, 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 parent of retrohunt, which is a rule.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The retrohunt to create.
   */
  // const retrohunt = {}

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

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

  callCreateRetrohunt();

createRetrohunt(request, options, callback)

createRetrohunt(request: protos.google.cloud.chronicle.v1.ICreateRetrohuntRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRetrohuntRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRetrohunt(request, callback)

createRetrohunt(request: protos.google.cloud.chronicle.v1.ICreateRetrohuntRequest, callback: Callback<LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRetrohuntRequest
callback Callback<LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRule(request, options)

createRule(request?: protos.google.cloud.chronicle.v1.ICreateRuleRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRule,
        protos.google.cloud.chronicle.v1.ICreateRuleRequest | undefined,
        {} | undefined
    ]>;

Creates a new Rule.

Parameters
Name Description
request ICreateRuleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.ICreateRuleRequest | 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. The parent resource where this rule will be created.
   *  Format: `projects/{project}/locations/{location}/instances/{instance}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The rule to create.
   */
  // const rule = {}

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

    // Run request
    const response = await chronicleClient.createRule(request);
    console.log(response);
  }

  callCreateRule();

createRule(request, options, callback)

createRule(request: protos.google.cloud.chronicle.v1.ICreateRuleRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.ICreateRuleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRuleRequest
options CallOptions
callback Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.ICreateRuleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRule(request, callback)

createRule(request: protos.google.cloud.chronicle.v1.ICreateRuleRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.ICreateRuleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRuleRequest
callback Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.ICreateRuleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

dashboardChartPath(project, location, instance, chart)

dashboardChartPath(project: string, location: string, instance: string, chart: string): string;

Return a fully-qualified dashboardChart resource name string.

Parameters
Name Description
project string
location string
instance string
chart string
Returns
Type Description
string

{string} Resource name string.

dashboardQueryPath(project, location, instance, query)

dashboardQueryPath(project: string, location: string, instance: string, query: string): string;

Return a fully-qualified dashboardQuery resource name string.

Parameters
Name Description
project string
location string
instance string
query string
Returns
Type Description
string

{string} Resource name string.

dataAccessLabelPath(project, location, instance, dataAccessLabel)

dataAccessLabelPath(project: string, location: string, instance: string, dataAccessLabel: string): string;

Return a fully-qualified dataAccessLabel resource name string.

Parameters
Name Description
project string
location string
instance string
dataAccessLabel string
Returns
Type Description
string

{string} Resource name string.

dataAccessScopePath(project, location, instance, dataAccessScope)

dataAccessScopePath(project: string, location: string, instance: string, dataAccessScope: string): string;

Return a fully-qualified dataAccessScope resource name string.

Parameters
Name Description
project string
location string
instance string
dataAccessScope string
Returns
Type Description
string

{string} Resource name string.

dataTableOperationErrorsPath(project, location, instance, dataTableOperationErrors)

dataTableOperationErrorsPath(project: string, location: string, instance: string, dataTableOperationErrors: string): string;

Return a fully-qualified dataTableOperationErrors resource name string.

Parameters
Name Description
project string
location string
instance string
dataTableOperationErrors string
Returns
Type Description
string

{string} Resource name string.

dataTablePath(project, location, instance, dataTable)

dataTablePath(project: string, location: string, instance: string, dataTable: string): string;

Return a fully-qualified dataTable resource name string.

Parameters
Name Description
project string
location string
instance string
dataTable string
Returns
Type Description
string

{string} Resource name string.

dataTableRowPath(project, location, instance, dataTable, dataTableRow)

dataTableRowPath(project: string, location: string, instance: string, dataTable: string, dataTableRow: string): string;

Return a fully-qualified dataTableRow resource name string.

Parameters
Name Description
project string
location string
instance string
dataTable string
dataTableRow string
Returns
Type Description
string

{string} Resource name string.

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

deleteRule(request, options)

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

Deletes a Rule.

Parameters
Name Description
request IDeleteRuleRequest

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.chronicle.v1.IDeleteRuleRequest | 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. The name of the rule to delete. A rule revision timestamp cannot
   *  be specified as part of the name, as deleting specific revisions is not
   *  supported.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
   */
  // const name = 'abc123'
  /**
   *  Optional. If set to true, any retrohunts and any detections associated with
   *  the rule will also be deleted. If set to false, the call will only succeed
   *  if the rule has no associated retrohunts, including completed retrohunts,
   *  and no associated detections. Regardless of this field's value, the rule
   *  deployment associated with this rule will also be deleted.
   */
  // const force = true

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

    // Run request
    const response = await chronicleClient.deleteRule(request);
    console.log(response);
  }

  callDeleteRule();

deleteRule(request, options, callback)

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

deleteRule(request, callback)

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

featuredContentNativeDashboardPath(project, location, instance, featuredContentNativeDashboard)

featuredContentNativeDashboardPath(project: string, location: string, instance: string, featuredContentNativeDashboard: string): string;

Return a fully-qualified featuredContentNativeDashboard resource name string.

Parameters
Name Description
project string
location string
instance string
featuredContentNativeDashboard string
Returns
Type Description
string

{string} Resource name string.

feedPackPath(project, location, instance, feedPack)

feedPackPath(project: string, location: string, instance: string, feedPack: string): string;

Return a fully-qualified feedPack resource name string.

Parameters
Name Description
project string
location string
instance string
feedPack string
Returns
Type Description
string

{string} Resource name string.

feedPath(project, location, instance, feed)

feedPath(project: string, location: string, instance: string, feed: string): string;

Return a fully-qualified feed resource name string.

Parameters
Name Description
project string
location string
instance string
feed string
Returns
Type Description
string

{string} Resource name string.

feedServiceAccountPath(project, location, instance, feedServiceAccount)

feedServiceAccountPath(project: string, location: string, instance: string, feedServiceAccount: string): string;

Return a fully-qualified feedServiceAccount resource name string.

Parameters
Name Description
project string
location string
instance string
feedServiceAccount string
Returns
Type Description
string

{string} Resource name string.

feedSourceTypeSchemaPath(project, location, instance, feedSourceType)

feedSourceTypeSchemaPath(project: string, location: string, instance: string, feedSourceType: string): string;

Return a fully-qualified feedSourceTypeSchema resource name string.

Parameters
Name Description
project string
location string
instance string
feedSourceType string
Returns
Type Description
string

{string} Resource name string.

findingsRefinementDeploymentPath(project, location, instance, findingsRefinement)

findingsRefinementDeploymentPath(project: string, location: string, instance: string, findingsRefinement: string): string;

Return a fully-qualified findingsRefinementDeployment resource name string.

Parameters
Name Description
project string
location string
instance string
findingsRefinement string
Returns
Type Description
string

{string} Resource name string.

findingsRefinementPath(project, location, instance, findingsRefinement)

findingsRefinementPath(project: string, location: string, instance: string, findingsRefinement: string): string;

Return a fully-qualified findingsRefinement resource name string.

Parameters
Name Description
project string
location string
instance string
findingsRefinement string
Returns
Type Description
string

{string} Resource name string.

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

getRetrohunt(request, options)

getRetrohunt(request?: protos.google.cloud.chronicle.v1.IGetRetrohuntRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRetrohunt,
        protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | undefined,
        {} | undefined
    ]>;

Get a Retrohunt.

Parameters
Name Description
request IGetRetrohuntRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | 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. The name of the retrohunt to retrieve.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}`
   */
  // const name = 'abc123'

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

    // Run request
    const response = await chronicleClient.getRetrohunt(request);
    console.log(response);
  }

  callGetRetrohunt();

getRetrohunt(request, options, callback)

getRetrohunt(request: protos.google.cloud.chronicle.v1.IGetRetrohuntRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRetrohuntRequest
options CallOptions
callback Callback<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRetrohunt(request, callback)

getRetrohunt(request: protos.google.cloud.chronicle.v1.IGetRetrohuntRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRetrohuntRequest
callback Callback<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRule(request, options)

getRule(request?: protos.google.cloud.chronicle.v1.IGetRuleRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRule,
        protos.google.cloud.chronicle.v1.IGetRuleRequest | undefined,
        {} | undefined
    ]>;

Gets a Rule.

Parameters
Name Description
request IGetRuleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IGetRuleRequest | 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. The name of the rule to retrieve.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
   */
  // const name = 'abc123'
  /**
   *  The view field indicates the scope of fields to populate for the Rule being
   *  returned. If unspecified, defaults to FULL.
   */
  // const view = {}

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

    // Run request
    const response = await chronicleClient.getRule(request);
    console.log(response);
  }

  callGetRule();

getRule(request, options, callback)

getRule(request: protos.google.cloud.chronicle.v1.IGetRuleRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IGetRuleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRuleRequest
options CallOptions
callback Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IGetRuleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRule(request, callback)

getRule(request: protos.google.cloud.chronicle.v1.IGetRuleRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IGetRuleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRuleRequest
callback Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IGetRuleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRuleDeployment(request, options)

getRuleDeployment(request?: protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRuleDeployment,
        protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | undefined,
        {} | undefined
    ]>;

Gets a RuleDeployment.

Parameters
Name Description
request IGetRuleDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | 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. The name of the rule deployment to retrieve.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment`
   */
  // const name = 'abc123'

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

    // Run request
    const response = await chronicleClient.getRuleDeployment(request);
    console.log(response);
  }

  callGetRuleDeployment();

getRuleDeployment(request, options, callback)

getRuleDeployment(request: protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRuleDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRuleDeployment(request, callback)

getRuleDeployment(request: protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRuleDeploymentRequest
callback Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | 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.

instancePath(project, location, instance)

instancePath(project: string, location: string, instance: string): string;

Return a fully-qualified instance resource name string.

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

{string} Resource name string.

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)

listRetrohunts(request, options)

listRetrohunts(request?: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRetrohunt[],
        protos.google.cloud.chronicle.v1.IListRetrohuntsRequest | null,
        protos.google.cloud.chronicle.v1.IListRetrohuntsResponse
    ]>;

List Retrohunts.

Parameters
Name Description
request IListRetrohuntsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRetrohunt[], protos.google.cloud.chronicle.v1.IListRetrohuntsRequest | null, protos.google.cloud.chronicle.v1.IListRetrohuntsResponse ]>

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

listRetrohunts(request, options, callback)

listRetrohunts(request: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, protos.google.cloud.chronicle.v1.IListRetrohuntsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRetrohunt>): void;
Parameters
Name Description
request IListRetrohuntsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, protos.google.cloud.chronicle.v1.IListRetrohuntsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRetrohunt>
Returns
Type Description
void

listRetrohunts(request, callback)

listRetrohunts(request: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, protos.google.cloud.chronicle.v1.IListRetrohuntsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRetrohunt>): void;
Parameters
Name Description
request IListRetrohuntsRequest
callback PaginationCallback<protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, protos.google.cloud.chronicle.v1.IListRetrohuntsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRetrohunt>
Returns
Type Description
void

listRetrohuntsAsync(request, options)

listRetrohuntsAsync(request?: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.chronicle.v1.IRetrohunt>;

Equivalent to listRetrohunts, but returns an iterable object.

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

Parameters
Name Description
request IListRetrohuntsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.chronicle.v1.IRetrohunt>

{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. The rule that the retrohunts belong to.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of retrohunt to return. The service may return fewer
   *  than this value. If unspecified, at most 100 retrohunts will be returned.
   *  The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListRetrohunts` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListRetrohunts` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter that can be used to retrieve specific rule deployments.
   *  The following fields are filterable:
   *  state
   */
  // const filter = 'abc123'

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

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

  callListRetrohunts();

listRetrohuntsStream(request, options)

listRetrohuntsStream(request?: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, options?: CallOptions): Transform;

Equivalent to listRetrohunts, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRetrohuntsRequest

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

listRuleDeployments(request, options)

listRuleDeployments(request?: protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRuleDeployment[],
        protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest | null,
        protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse
    ]>;

Lists RuleDeployments across all Rules.

Parameters
Name Description
request IListRuleDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRuleDeployment[], protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest | null, protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse ]>

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

listRuleDeployments(request, options, callback)

listRuleDeployments(request: protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRuleDeployment>): void;
Parameters
Name Description
request IListRuleDeploymentsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRuleDeployment>
Returns
Type Description
void

listRuleDeployments(request, callback)

listRuleDeployments(request: protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRuleDeployment>): void;
Parameters
Name Description
request IListRuleDeploymentsRequest
callback PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRuleDeployment>
Returns
Type Description
void

listRuleDeploymentsAsync(request, options)

listRuleDeploymentsAsync(request?: protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.chronicle.v1.IRuleDeployment>;

Equivalent to listRuleDeployments, but returns an iterable object.

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

Parameters
Name Description
request IListRuleDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.chronicle.v1.IRuleDeployment>

{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. The collection of all parents which own all rule deployments. The
   *  "-" wildcard token must be used as the rule identifier in the resource
   *  path. Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/-`
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of rule deployments to return. The service may return
   *  fewer than this value. If unspecified, at most 100 rule deployments will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListRuleDeployments` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListRuleDeployments`
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter that can be used to retrieve specific rule deployments.
   *  The following fields are filterable:
   *  archived, name
   */
  // const filter = 'abc123'

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

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

  callListRuleDeployments();

listRuleDeploymentsStream(request, options)

listRuleDeploymentsStream(request?: protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, options?: CallOptions): Transform;

Equivalent to listRuleDeployments, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRuleDeploymentsRequest

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

listRuleRevisions(request, options)

listRuleRevisions(request?: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRule[],
        protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest | null,
        protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse
    ]>;

Lists all revisions of the rule.

Parameters
Name Description
request IListRuleRevisionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRule[], protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest | null, protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse ]>

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

listRuleRevisions(request, options, callback)

listRuleRevisions(request: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>): void;
Parameters
Name Description
request IListRuleRevisionsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>
Returns
Type Description
void

listRuleRevisions(request, callback)

listRuleRevisions(request: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>): void;
Parameters
Name Description
request IListRuleRevisionsRequest
callback PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>
Returns
Type Description
void

listRuleRevisionsAsync(request, options)

listRuleRevisionsAsync(request?: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.chronicle.v1.IRule>;

Equivalent to listRuleRevisions, but returns an iterable object.

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

Parameters
Name Description
request IListRuleRevisionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.chronicle.v1.IRule>

{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. The name of the rule to list revisions for.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
   */
  // const name = 'abc123'
  /**
   *  The maximum number of revisions to return per page. The service may return
   *  fewer than this value. If unspecified, at most 100 revisions will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  The page token, received from a previous `ListRuleRevisions` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListRuleRevisions`
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  The view field indicates the scope of fields to populate for the revision
   *  being returned. If unspecified, defaults to BASIC.
   */
  // const view = {}

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

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

  callListRuleRevisions();

listRuleRevisionsStream(request, options)

listRuleRevisionsStream(request?: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, options?: CallOptions): Transform;

Equivalent to listRuleRevisions, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRuleRevisionsRequest

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

listRules(request, options)

listRules(request?: protos.google.cloud.chronicle.v1.IListRulesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRule[],
        protos.google.cloud.chronicle.v1.IListRulesRequest | null,
        protos.google.cloud.chronicle.v1.IListRulesResponse
    ]>;

Lists Rules.

Parameters
Name Description
request IListRulesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRule[], protos.google.cloud.chronicle.v1.IListRulesRequest | null, protos.google.cloud.chronicle.v1.IListRulesResponse ]>

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

listRules(request, options, callback)

listRules(request: protos.google.cloud.chronicle.v1.IListRulesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRulesRequest, protos.google.cloud.chronicle.v1.IListRulesResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>): void;
Parameters
Name Description
request IListRulesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.chronicle.v1.IListRulesRequest, protos.google.cloud.chronicle.v1.IListRulesResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>
Returns
Type Description
void

listRules(request, callback)

listRules(request: protos.google.cloud.chronicle.v1.IListRulesRequest, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRulesRequest, protos.google.cloud.chronicle.v1.IListRulesResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>): void;
Parameters
Name Description
request IListRulesRequest
callback PaginationCallback<protos.google.cloud.chronicle.v1.IListRulesRequest, protos.google.cloud.chronicle.v1.IListRulesResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>
Returns
Type Description
void

listRulesAsync(request, options)

listRulesAsync(request?: protos.google.cloud.chronicle.v1.IListRulesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.chronicle.v1.IRule>;

Equivalent to listRules, but returns an iterable object.

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

Parameters
Name Description
request IListRulesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.chronicle.v1.IRule>

{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. The parent, which owns this collection of rules.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}`
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of rules to return. The service may return fewer than
   *  this value. If unspecified, at most 100 rules will be returned. The
   *  maximum value is 1000; values above 1000 will be coerced to 1000.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListRules` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListRules`
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  view indicates the scope of fields to populate for the Rule being returned.
   *  If unspecified, defaults to BASIC.
   */
  // const view = {}
  /**
   *  Only the following filters are allowed:
   *  "reference_lists:{reference_list_name}"
   *  "data_tables:{data_table_name}"
   *  "display_name:{display_name}"
   */
  // const filter = 'abc123'

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

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

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

  callListRules();

listRulesStream(request, options)

listRulesStream(request?: protos.google.cloud.chronicle.v1.IListRulesRequest, options?: CallOptions): Transform;

Equivalent to listRules, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRulesRequest

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 listRulesAsync() 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.

logTypeSchemaPath(project, location, instance, feedSourceType, logType)

logTypeSchemaPath(project: string, location: string, instance: string, feedSourceType: string, logType: string): string;

Return a fully-qualified logTypeSchema resource name string.

Parameters
Name Description
project string
location string
instance string
feedSourceType string
logType string
Returns
Type Description
string

{string} Resource name string.

matchChartFromDashboardChartName(dashboardChartName)

matchChartFromDashboardChartName(dashboardChartName: string): string | number;

Parse the chart from DashboardChart resource.

Parameter
Name Description
dashboardChartName string

A fully-qualified path representing DashboardChart resource.

Returns
Type Description
string | number

{string} A string representing the chart.

matchDashboardFromNativeDashboardName(nativeDashboardName)

matchDashboardFromNativeDashboardName(nativeDashboardName: string): string | number;

Parse the dashboard from NativeDashboard resource.

Parameter
Name Description
nativeDashboardName string

A fully-qualified path representing NativeDashboard resource.

Returns
Type Description
string | number

{string} A string representing the dashboard.

matchDataAccessLabelFromDataAccessLabelName(dataAccessLabelName)

matchDataAccessLabelFromDataAccessLabelName(dataAccessLabelName: string): string | number;

Parse the data_access_label from DataAccessLabel resource.

Parameter
Name Description
dataAccessLabelName string

A fully-qualified path representing DataAccessLabel resource.

Returns
Type Description
string | number

{string} A string representing the data_access_label.

matchDataAccessScopeFromDataAccessScopeName(dataAccessScopeName)

matchDataAccessScopeFromDataAccessScopeName(dataAccessScopeName: string): string | number;

Parse the data_access_scope from DataAccessScope resource.

Parameter
Name Description
dataAccessScopeName string

A fully-qualified path representing DataAccessScope resource.

Returns
Type Description
string | number

{string} A string representing the data_access_scope.

matchDataTableFromDataTableName(dataTableName)

matchDataTableFromDataTableName(dataTableName: string): string | number;

Parse the data_table from DataTable resource.

Parameter
Name Description
dataTableName string

A fully-qualified path representing DataTable resource.

Returns
Type Description
string | number

{string} A string representing the data_table.

matchDataTableFromDataTableRowName(dataTableRowName)

matchDataTableFromDataTableRowName(dataTableRowName: string): string | number;

Parse the data_table from DataTableRow resource.

Parameter
Name Description
dataTableRowName string

A fully-qualified path representing DataTableRow resource.

Returns
Type Description
string | number

{string} A string representing the data_table.

matchDataTableOperationErrorsFromDataTableOperationErrorsName(dataTableOperationErrorsName)

matchDataTableOperationErrorsFromDataTableOperationErrorsName(dataTableOperationErrorsName: string): string | number;

Parse the data_table_operation_errors from DataTableOperationErrors resource.

Parameter
Name Description
dataTableOperationErrorsName string

A fully-qualified path representing DataTableOperationErrors resource.

Returns
Type Description
string | number

{string} A string representing the data_table_operation_errors.

matchDataTableRowFromDataTableRowName(dataTableRowName)

matchDataTableRowFromDataTableRowName(dataTableRowName: string): string | number;

Parse the data_table_row from DataTableRow resource.

Parameter
Name Description
dataTableRowName string

A fully-qualified path representing DataTableRow resource.

Returns
Type Description
string | number

{string} A string representing the data_table_row.

matchFeaturedContentNativeDashboardFromFeaturedContentNativeDashboardName(featuredContentNativeDashboardName)

matchFeaturedContentNativeDashboardFromFeaturedContentNativeDashboardName(featuredContentNativeDashboardName: string): string | number;

Parse the featured_content_native_dashboard from FeaturedContentNativeDashboard resource.

Parameter
Name Description
featuredContentNativeDashboardName string

A fully-qualified path representing FeaturedContentNativeDashboard resource.

Returns
Type Description
string | number

{string} A string representing the featured_content_native_dashboard.

matchFeedFromFeedName(feedName)

matchFeedFromFeedName(feedName: string): string | number;

Parse the feed from Feed resource.

Parameter
Name Description
feedName string

A fully-qualified path representing Feed resource.

Returns
Type Description
string | number

{string} A string representing the feed.

matchFeedPackFromFeedPackName(feedPackName)

matchFeedPackFromFeedPackName(feedPackName: string): string | number;

Parse the feed_pack from FeedPack resource.

Parameter
Name Description
feedPackName string

A fully-qualified path representing FeedPack resource.

Returns
Type Description
string | number

{string} A string representing the feed_pack.

matchFeedServiceAccountFromFeedServiceAccountName(feedServiceAccountName)

matchFeedServiceAccountFromFeedServiceAccountName(feedServiceAccountName: string): string | number;

Parse the feed_service_account from FeedServiceAccount resource.

Parameter
Name Description
feedServiceAccountName string

A fully-qualified path representing FeedServiceAccount resource.

Returns
Type Description
string | number

{string} A string representing the feed_service_account.

matchFeedSourceTypeFromFeedSourceTypeSchemaName(feedSourceTypeSchemaName)

matchFeedSourceTypeFromFeedSourceTypeSchemaName(feedSourceTypeSchemaName: string): string | number;

Parse the feed_source_type from FeedSourceTypeSchema resource.

Parameter
Name Description
feedSourceTypeSchemaName string

A fully-qualified path representing FeedSourceTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the feed_source_type.

matchFeedSourceTypeFromLogTypeSchemaName(logTypeSchemaName)

matchFeedSourceTypeFromLogTypeSchemaName(logTypeSchemaName: string): string | number;

Parse the feed_source_type from LogTypeSchema resource.

Parameter
Name Description
logTypeSchemaName string

A fully-qualified path representing LogTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the feed_source_type.

matchFindingsRefinementFromFindingsRefinementDeploymentName(findingsRefinementDeploymentName)

matchFindingsRefinementFromFindingsRefinementDeploymentName(findingsRefinementDeploymentName: string): string | number;

Parse the findings_refinement from FindingsRefinementDeployment resource.

Parameter
Name Description
findingsRefinementDeploymentName string

A fully-qualified path representing FindingsRefinementDeployment resource.

Returns
Type Description
string | number

{string} A string representing the findings_refinement.

matchFindingsRefinementFromFindingsRefinementName(findingsRefinementName)

matchFindingsRefinementFromFindingsRefinementName(findingsRefinementName: string): string | number;

Parse the findings_refinement from FindingsRefinement resource.

Parameter
Name Description
findingsRefinementName string

A fully-qualified path representing FindingsRefinement resource.

Returns
Type Description
string | number

{string} A string representing the findings_refinement.

matchInstanceFromBigQueryExportName(bigQueryExportName)

matchInstanceFromBigQueryExportName(bigQueryExportName: string): string | number;

Parse the instance from BigQueryExport resource.

Parameter
Name Description
bigQueryExportName string

A fully-qualified path representing BigQueryExport resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromDashboardChartName(dashboardChartName)

matchInstanceFromDashboardChartName(dashboardChartName: string): string | number;

Parse the instance from DashboardChart resource.

Parameter
Name Description
dashboardChartName string

A fully-qualified path representing DashboardChart resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromDashboardQueryName(dashboardQueryName)

matchInstanceFromDashboardQueryName(dashboardQueryName: string): string | number;

Parse the instance from DashboardQuery resource.

Parameter
Name Description
dashboardQueryName string

A fully-qualified path representing DashboardQuery resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromDataAccessLabelName(dataAccessLabelName)

matchInstanceFromDataAccessLabelName(dataAccessLabelName: string): string | number;

Parse the instance from DataAccessLabel resource.

Parameter
Name Description
dataAccessLabelName string

A fully-qualified path representing DataAccessLabel resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromDataAccessScopeName(dataAccessScopeName)

matchInstanceFromDataAccessScopeName(dataAccessScopeName: string): string | number;

Parse the instance from DataAccessScope resource.

Parameter
Name Description
dataAccessScopeName string

A fully-qualified path representing DataAccessScope resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromDataTableName(dataTableName)

matchInstanceFromDataTableName(dataTableName: string): string | number;

Parse the instance from DataTable resource.

Parameter
Name Description
dataTableName string

A fully-qualified path representing DataTable resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromDataTableOperationErrorsName(dataTableOperationErrorsName)

matchInstanceFromDataTableOperationErrorsName(dataTableOperationErrorsName: string): string | number;

Parse the instance from DataTableOperationErrors resource.

Parameter
Name Description
dataTableOperationErrorsName string

A fully-qualified path representing DataTableOperationErrors resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromDataTableRowName(dataTableRowName)

matchInstanceFromDataTableRowName(dataTableRowName: string): string | number;

Parse the instance from DataTableRow resource.

Parameter
Name Description
dataTableRowName string

A fully-qualified path representing DataTableRow resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromFeaturedContentNativeDashboardName(featuredContentNativeDashboardName)

matchInstanceFromFeaturedContentNativeDashboardName(featuredContentNativeDashboardName: string): string | number;

Parse the instance from FeaturedContentNativeDashboard resource.

Parameter
Name Description
featuredContentNativeDashboardName string

A fully-qualified path representing FeaturedContentNativeDashboard resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromFeedName(feedName)

matchInstanceFromFeedName(feedName: string): string | number;

Parse the instance from Feed resource.

Parameter
Name Description
feedName string

A fully-qualified path representing Feed resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromFeedPackName(feedPackName)

matchInstanceFromFeedPackName(feedPackName: string): string | number;

Parse the instance from FeedPack resource.

Parameter
Name Description
feedPackName string

A fully-qualified path representing FeedPack resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromFeedServiceAccountName(feedServiceAccountName)

matchInstanceFromFeedServiceAccountName(feedServiceAccountName: string): string | number;

Parse the instance from FeedServiceAccount resource.

Parameter
Name Description
feedServiceAccountName string

A fully-qualified path representing FeedServiceAccount resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromFeedSourceTypeSchemaName(feedSourceTypeSchemaName)

matchInstanceFromFeedSourceTypeSchemaName(feedSourceTypeSchemaName: string): string | number;

Parse the instance from FeedSourceTypeSchema resource.

Parameter
Name Description
feedSourceTypeSchemaName string

A fully-qualified path representing FeedSourceTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromFindingsRefinementDeploymentName(findingsRefinementDeploymentName)

matchInstanceFromFindingsRefinementDeploymentName(findingsRefinementDeploymentName: string): string | number;

Parse the instance from FindingsRefinementDeployment resource.

Parameter
Name Description
findingsRefinementDeploymentName string

A fully-qualified path representing FindingsRefinementDeployment resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromFindingsRefinementName(findingsRefinementName)

matchInstanceFromFindingsRefinementName(findingsRefinementName: string): string | number;

Parse the instance from FindingsRefinement resource.

Parameter
Name Description
findingsRefinementName string

A fully-qualified path representing FindingsRefinement resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
Name Description
instanceName string

A fully-qualified path representing Instance resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromLogTypeSchemaName(logTypeSchemaName)

matchInstanceFromLogTypeSchemaName(logTypeSchemaName: string): string | number;

Parse the instance from LogTypeSchema resource.

Parameter
Name Description
logTypeSchemaName string

A fully-qualified path representing LogTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromNativeDashboardName(nativeDashboardName)

matchInstanceFromNativeDashboardName(nativeDashboardName: string): string | number;

Parse the instance from NativeDashboard resource.

Parameter
Name Description
nativeDashboardName string

A fully-qualified path representing NativeDashboard resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromReferenceListName(referenceListName)

matchInstanceFromReferenceListName(referenceListName: string): string | number;

Parse the instance from ReferenceList resource.

Parameter
Name Description
referenceListName string

A fully-qualified path representing ReferenceList resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromRetrohuntName(retrohuntName)

matchInstanceFromRetrohuntName(retrohuntName: string): string | number;

Parse the instance from Retrohunt resource.

Parameter
Name Description
retrohuntName string

A fully-qualified path representing Retrohunt resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromRuleDeploymentName(ruleDeploymentName)

matchInstanceFromRuleDeploymentName(ruleDeploymentName: string): string | number;

Parse the instance from RuleDeployment resource.

Parameter
Name Description
ruleDeploymentName string

A fully-qualified path representing RuleDeployment resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromRuleExecutionErrorName(ruleExecutionErrorName)

matchInstanceFromRuleExecutionErrorName(ruleExecutionErrorName: string): string | number;

Parse the instance from RuleExecutionError resource.

Parameter
Name Description
ruleExecutionErrorName string

A fully-qualified path representing RuleExecutionError resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromRuleName(ruleName)

matchInstanceFromRuleName(ruleName: string): string | number;

Parse the instance from Rule resource.

Parameter
Name Description
ruleName string

A fully-qualified path representing Rule resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromWatchlistName(watchlistName)

matchInstanceFromWatchlistName(watchlistName: string): string | number;

Parse the instance from Watchlist resource.

Parameter
Name Description
watchlistName string

A fully-qualified path representing Watchlist resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchLocationFromBigQueryExportName(bigQueryExportName)

matchLocationFromBigQueryExportName(bigQueryExportName: string): string | number;

Parse the location from BigQueryExport resource.

Parameter
Name Description
bigQueryExportName string

A fully-qualified path representing BigQueryExport resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromDashboardChartName(dashboardChartName)

matchLocationFromDashboardChartName(dashboardChartName: string): string | number;

Parse the location from DashboardChart resource.

Parameter
Name Description
dashboardChartName string

A fully-qualified path representing DashboardChart resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromDashboardQueryName(dashboardQueryName)

matchLocationFromDashboardQueryName(dashboardQueryName: string): string | number;

Parse the location from DashboardQuery resource.

Parameter
Name Description
dashboardQueryName string

A fully-qualified path representing DashboardQuery resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromDataAccessLabelName(dataAccessLabelName)

matchLocationFromDataAccessLabelName(dataAccessLabelName: string): string | number;

Parse the location from DataAccessLabel resource.

Parameter
Name Description
dataAccessLabelName string

A fully-qualified path representing DataAccessLabel resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromDataAccessScopeName(dataAccessScopeName)

matchLocationFromDataAccessScopeName(dataAccessScopeName: string): string | number;

Parse the location from DataAccessScope resource.

Parameter
Name Description
dataAccessScopeName string

A fully-qualified path representing DataAccessScope resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromDataTableName(dataTableName)

matchLocationFromDataTableName(dataTableName: string): string | number;

Parse the location from DataTable resource.

Parameter
Name Description
dataTableName string

A fully-qualified path representing DataTable resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromDataTableOperationErrorsName(dataTableOperationErrorsName)

matchLocationFromDataTableOperationErrorsName(dataTableOperationErrorsName: string): string | number;

Parse the location from DataTableOperationErrors resource.

Parameter
Name Description
dataTableOperationErrorsName string

A fully-qualified path representing DataTableOperationErrors resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromDataTableRowName(dataTableRowName)

matchLocationFromDataTableRowName(dataTableRowName: string): string | number;

Parse the location from DataTableRow resource.

Parameter
Name Description
dataTableRowName string

A fully-qualified path representing DataTableRow resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromFeaturedContentNativeDashboardName(featuredContentNativeDashboardName)

matchLocationFromFeaturedContentNativeDashboardName(featuredContentNativeDashboardName: string): string | number;

Parse the location from FeaturedContentNativeDashboard resource.

Parameter
Name Description
featuredContentNativeDashboardName string

A fully-qualified path representing FeaturedContentNativeDashboard resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromFeedName(feedName)

matchLocationFromFeedName(feedName: string): string | number;

Parse the location from Feed resource.

Parameter
Name Description
feedName string

A fully-qualified path representing Feed resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromFeedPackName(feedPackName)

matchLocationFromFeedPackName(feedPackName: string): string | number;

Parse the location from FeedPack resource.

Parameter
Name Description
feedPackName string

A fully-qualified path representing FeedPack resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromFeedServiceAccountName(feedServiceAccountName)

matchLocationFromFeedServiceAccountName(feedServiceAccountName: string): string | number;

Parse the location from FeedServiceAccount resource.

Parameter
Name Description
feedServiceAccountName string

A fully-qualified path representing FeedServiceAccount resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromFeedSourceTypeSchemaName(feedSourceTypeSchemaName)

matchLocationFromFeedSourceTypeSchemaName(feedSourceTypeSchemaName: string): string | number;

Parse the location from FeedSourceTypeSchema resource.

Parameter
Name Description
feedSourceTypeSchemaName string

A fully-qualified path representing FeedSourceTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromFindingsRefinementDeploymentName(findingsRefinementDeploymentName)

matchLocationFromFindingsRefinementDeploymentName(findingsRefinementDeploymentName: string): string | number;

Parse the location from FindingsRefinementDeployment resource.

Parameter
Name Description
findingsRefinementDeploymentName string

A fully-qualified path representing FindingsRefinementDeployment resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromFindingsRefinementName(findingsRefinementName)

matchLocationFromFindingsRefinementName(findingsRefinementName: string): string | number;

Parse the location from FindingsRefinement resource.

Parameter
Name Description
findingsRefinementName string

A fully-qualified path representing FindingsRefinement resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromInstanceName(instanceName)

matchLocationFromInstanceName(instanceName: string): string | number;

Parse the location from Instance resource.

Parameter
Name Description
instanceName string

A fully-qualified path representing Instance 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.

matchLocationFromLogTypeSchemaName(logTypeSchemaName)

matchLocationFromLogTypeSchemaName(logTypeSchemaName: string): string | number;

Parse the location from LogTypeSchema resource.

Parameter
Name Description
logTypeSchemaName string

A fully-qualified path representing LogTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromNativeDashboardName(nativeDashboardName)

matchLocationFromNativeDashboardName(nativeDashboardName: string): string | number;

Parse the location from NativeDashboard resource.

Parameter
Name Description
nativeDashboardName string

A fully-qualified path representing NativeDashboard resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromReferenceListName(referenceListName)

matchLocationFromReferenceListName(referenceListName: string): string | number;

Parse the location from ReferenceList resource.

Parameter
Name Description
referenceListName string

A fully-qualified path representing ReferenceList resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRetrohuntName(retrohuntName)

matchLocationFromRetrohuntName(retrohuntName: string): string | number;

Parse the location from Retrohunt resource.

Parameter
Name Description
retrohuntName string

A fully-qualified path representing Retrohunt resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRuleDeploymentName(ruleDeploymentName)

matchLocationFromRuleDeploymentName(ruleDeploymentName: string): string | number;

Parse the location from RuleDeployment resource.

Parameter
Name Description
ruleDeploymentName string

A fully-qualified path representing RuleDeployment resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRuleExecutionErrorName(ruleExecutionErrorName)

matchLocationFromRuleExecutionErrorName(ruleExecutionErrorName: string): string | number;

Parse the location from RuleExecutionError resource.

Parameter
Name Description
ruleExecutionErrorName string

A fully-qualified path representing RuleExecutionError resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRuleName(ruleName)

matchLocationFromRuleName(ruleName: string): string | number;

Parse the location from Rule resource.

Parameter
Name Description
ruleName string

A fully-qualified path representing Rule resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromWatchlistName(watchlistName)

matchLocationFromWatchlistName(watchlistName: string): string | number;

Parse the location from Watchlist resource.

Parameter
Name Description
watchlistName string

A fully-qualified path representing Watchlist resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLogTypeFromLogTypeSchemaName(logTypeSchemaName)

matchLogTypeFromLogTypeSchemaName(logTypeSchemaName: string): string | number;

Parse the log_type from LogTypeSchema resource.

Parameter
Name Description
logTypeSchemaName string

A fully-qualified path representing LogTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the log_type.

matchProjectFromBigQueryExportName(bigQueryExportName)

matchProjectFromBigQueryExportName(bigQueryExportName: string): string | number;

Parse the project from BigQueryExport resource.

Parameter
Name Description
bigQueryExportName string

A fully-qualified path representing BigQueryExport resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDashboardChartName(dashboardChartName)

matchProjectFromDashboardChartName(dashboardChartName: string): string | number;

Parse the project from DashboardChart resource.

Parameter
Name Description
dashboardChartName string

A fully-qualified path representing DashboardChart resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDashboardQueryName(dashboardQueryName)

matchProjectFromDashboardQueryName(dashboardQueryName: string): string | number;

Parse the project from DashboardQuery resource.

Parameter
Name Description
dashboardQueryName string

A fully-qualified path representing DashboardQuery resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDataAccessLabelName(dataAccessLabelName)

matchProjectFromDataAccessLabelName(dataAccessLabelName: string): string | number;

Parse the project from DataAccessLabel resource.

Parameter
Name Description
dataAccessLabelName string

A fully-qualified path representing DataAccessLabel resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDataAccessScopeName(dataAccessScopeName)

matchProjectFromDataAccessScopeName(dataAccessScopeName: string): string | number;

Parse the project from DataAccessScope resource.

Parameter
Name Description
dataAccessScopeName string

A fully-qualified path representing DataAccessScope resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDataTableName(dataTableName)

matchProjectFromDataTableName(dataTableName: string): string | number;

Parse the project from DataTable resource.

Parameter
Name Description
dataTableName string

A fully-qualified path representing DataTable resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDataTableOperationErrorsName(dataTableOperationErrorsName)

matchProjectFromDataTableOperationErrorsName(dataTableOperationErrorsName: string): string | number;

Parse the project from DataTableOperationErrors resource.

Parameter
Name Description
dataTableOperationErrorsName string

A fully-qualified path representing DataTableOperationErrors resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDataTableRowName(dataTableRowName)

matchProjectFromDataTableRowName(dataTableRowName: string): string | number;

Parse the project from DataTableRow resource.

Parameter
Name Description
dataTableRowName string

A fully-qualified path representing DataTableRow resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromFeaturedContentNativeDashboardName(featuredContentNativeDashboardName)

matchProjectFromFeaturedContentNativeDashboardName(featuredContentNativeDashboardName: string): string | number;

Parse the project from FeaturedContentNativeDashboard resource.

Parameter
Name Description
featuredContentNativeDashboardName string

A fully-qualified path representing FeaturedContentNativeDashboard resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromFeedName(feedName)

matchProjectFromFeedName(feedName: string): string | number;

Parse the project from Feed resource.

Parameter
Name Description
feedName string

A fully-qualified path representing Feed resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromFeedPackName(feedPackName)

matchProjectFromFeedPackName(feedPackName: string): string | number;

Parse the project from FeedPack resource.

Parameter
Name Description
feedPackName string

A fully-qualified path representing FeedPack resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromFeedServiceAccountName(feedServiceAccountName)

matchProjectFromFeedServiceAccountName(feedServiceAccountName: string): string | number;

Parse the project from FeedServiceAccount resource.

Parameter
Name Description
feedServiceAccountName string

A fully-qualified path representing FeedServiceAccount resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromFeedSourceTypeSchemaName(feedSourceTypeSchemaName)

matchProjectFromFeedSourceTypeSchemaName(feedSourceTypeSchemaName: string): string | number;

Parse the project from FeedSourceTypeSchema resource.

Parameter
Name Description
feedSourceTypeSchemaName string

A fully-qualified path representing FeedSourceTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromFindingsRefinementDeploymentName(findingsRefinementDeploymentName)

matchProjectFromFindingsRefinementDeploymentName(findingsRefinementDeploymentName: string): string | number;

Parse the project from FindingsRefinementDeployment resource.

Parameter
Name Description
findingsRefinementDeploymentName string

A fully-qualified path representing FindingsRefinementDeployment resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromFindingsRefinementName(findingsRefinementName)

matchProjectFromFindingsRefinementName(findingsRefinementName: string): string | number;

Parse the project from FindingsRefinement resource.

Parameter
Name Description
findingsRefinementName string

A fully-qualified path representing FindingsRefinement resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromInstanceName(instanceName)

matchProjectFromInstanceName(instanceName: string): string | number;

Parse the project from Instance resource.

Parameter
Name Description
instanceName string

A fully-qualified path representing Instance 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.

matchProjectFromLogTypeSchemaName(logTypeSchemaName)

matchProjectFromLogTypeSchemaName(logTypeSchemaName: string): string | number;

Parse the project from LogTypeSchema resource.

Parameter
Name Description
logTypeSchemaName string

A fully-qualified path representing LogTypeSchema resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromNativeDashboardName(nativeDashboardName)

matchProjectFromNativeDashboardName(nativeDashboardName: string): string | number;

Parse the project from NativeDashboard resource.

Parameter
Name Description
nativeDashboardName string

A fully-qualified path representing NativeDashboard 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.

matchProjectFromReferenceListName(referenceListName)

matchProjectFromReferenceListName(referenceListName: string): string | number;

Parse the project from ReferenceList resource.

Parameter
Name Description
referenceListName string

A fully-qualified path representing ReferenceList resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRetrohuntName(retrohuntName)

matchProjectFromRetrohuntName(retrohuntName: string): string | number;

Parse the project from Retrohunt resource.

Parameter
Name Description
retrohuntName string

A fully-qualified path representing Retrohunt resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRuleDeploymentName(ruleDeploymentName)

matchProjectFromRuleDeploymentName(ruleDeploymentName: string): string | number;

Parse the project from RuleDeployment resource.

Parameter
Name Description
ruleDeploymentName string

A fully-qualified path representing RuleDeployment resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRuleExecutionErrorName(ruleExecutionErrorName)

matchProjectFromRuleExecutionErrorName(ruleExecutionErrorName: string): string | number;

Parse the project from RuleExecutionError resource.

Parameter
Name Description
ruleExecutionErrorName string

A fully-qualified path representing RuleExecutionError resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRuleName(ruleName)

matchProjectFromRuleName(ruleName: string): string | number;

Parse the project from Rule resource.

Parameter
Name Description
ruleName string

A fully-qualified path representing Rule resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromWatchlistName(watchlistName)

matchProjectFromWatchlistName(watchlistName: string): string | number;

Parse the project from Watchlist resource.

Parameter
Name Description
watchlistName string

A fully-qualified path representing Watchlist resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchQueryFromDashboardQueryName(dashboardQueryName)

matchQueryFromDashboardQueryName(dashboardQueryName: string): string | number;

Parse the query from DashboardQuery resource.

Parameter
Name Description
dashboardQueryName string

A fully-qualified path representing DashboardQuery resource.

Returns
Type Description
string | number

{string} A string representing the query.

matchReferenceListFromReferenceListName(referenceListName)

matchReferenceListFromReferenceListName(referenceListName: string): string | number;

Parse the reference_list from ReferenceList resource.

Parameter
Name Description
referenceListName string

A fully-qualified path representing ReferenceList resource.

Returns
Type Description
string | number

{string} A string representing the reference_list.

matchRetrohuntFromRetrohuntName(retrohuntName)

matchRetrohuntFromRetrohuntName(retrohuntName: string): string | number;

Parse the retrohunt from Retrohunt resource.

Parameter
Name Description
retrohuntName string

A fully-qualified path representing Retrohunt resource.

Returns
Type Description
string | number

{string} A string representing the retrohunt.

matchRuleExecutionErrorFromRuleExecutionErrorName(ruleExecutionErrorName)

matchRuleExecutionErrorFromRuleExecutionErrorName(ruleExecutionErrorName: string): string | number;

Parse the rule_execution_error from RuleExecutionError resource.

Parameter
Name Description
ruleExecutionErrorName string

A fully-qualified path representing RuleExecutionError resource.

Returns
Type Description
string | number

{string} A string representing the rule_execution_error.

matchRuleFromRetrohuntName(retrohuntName)

matchRuleFromRetrohuntName(retrohuntName: string): string | number;

Parse the rule from Retrohunt resource.

Parameter
Name Description
retrohuntName string

A fully-qualified path representing Retrohunt resource.

Returns
Type Description
string | number

{string} A string representing the rule.

matchRuleFromRuleDeploymentName(ruleDeploymentName)

matchRuleFromRuleDeploymentName(ruleDeploymentName: string): string | number;

Parse the rule from RuleDeployment resource.

Parameter
Name Description
ruleDeploymentName string

A fully-qualified path representing RuleDeployment resource.

Returns
Type Description
string | number

{string} A string representing the rule.

matchRuleFromRuleName(ruleName)

matchRuleFromRuleName(ruleName: string): string | number;

Parse the rule from Rule resource.

Parameter
Name Description
ruleName string

A fully-qualified path representing Rule resource.

Returns
Type Description
string | number

{string} A string representing the rule.

matchWatchlistFromWatchlistName(watchlistName)

matchWatchlistFromWatchlistName(watchlistName: string): string | number;

Parse the watchlist from Watchlist resource.

Parameter
Name Description
watchlistName string

A fully-qualified path representing Watchlist resource.

Returns
Type Description
string | number

{string} A string representing the watchlist.

nativeDashboardPath(project, location, instance, dashboard)

nativeDashboardPath(project: string, location: string, instance: string, dashboard: string): string;

Return a fully-qualified nativeDashboard resource name string.

Parameters
Name Description
project string
location string
instance string
dashboard string
Returns
Type Description
string

{string} Resource name string.

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.

referenceListPath(project, location, instance, referenceList)

referenceListPath(project: string, location: string, instance: string, referenceList: string): string;

Return a fully-qualified referenceList resource name string.

Parameters
Name Description
project string
location string
instance string
referenceList string
Returns
Type Description
string

{string} Resource name string.

retrohuntPath(project, location, instance, rule, retrohunt)

retrohuntPath(project: string, location: string, instance: string, rule: string, retrohunt: string): string;

Return a fully-qualified retrohunt resource name string.

Parameters
Name Description
project string
location string
instance string
rule string
retrohunt string
Returns
Type Description
string

{string} Resource name string.

ruleDeploymentPath(project, location, instance, rule)

ruleDeploymentPath(project: string, location: string, instance: string, rule: string): string;

Return a fully-qualified ruleDeployment resource name string.

Parameters
Name Description
project string
location string
instance string
rule string
Returns
Type Description
string

{string} Resource name string.

ruleExecutionErrorPath(project, location, instance, ruleExecutionError)

ruleExecutionErrorPath(project: string, location: string, instance: string, ruleExecutionError: string): string;

Return a fully-qualified ruleExecutionError resource name string.

Parameters
Name Description
project string
location string
instance string
ruleExecutionError string
Returns
Type Description
string

{string} Resource name string.

rulePath(project, location, instance, rule)

rulePath(project: string, location: string, instance: string, rule: string): string;

Return a fully-qualified rule resource name string.

Parameters
Name Description
project string
location string
instance string
rule string
Returns
Type Description
string

{string} Resource name string.

updateRule(request, options)

updateRule(request?: protos.google.cloud.chronicle.v1.IUpdateRuleRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRule,
        protos.google.cloud.chronicle.v1.IUpdateRuleRequest | undefined,
        {} | undefined
    ]>;

Updates a Rule.

Parameters
Name Description
request IUpdateRuleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IUpdateRuleRequest | 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. The rule to update.
   *  The rule's `name` field is used to identify the rule to update.
   *  Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`
   */
  // const rule = {}
  /**
   *  The list of fields to update. If not included, all fields with a non-empty
   *  value will be overwritten.
   */
  // const updateMask = {}

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

  async function callUpdateRule() {
    // Construct request
    const request = {
      rule,
    };

    // Run request
    const response = await chronicleClient.updateRule(request);
    console.log(response);
  }

  callUpdateRule();

updateRule(request, options, callback)

updateRule(request: protos.google.cloud.chronicle.v1.IUpdateRuleRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IUpdateRuleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRuleRequest
options CallOptions
callback Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IUpdateRuleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRule(request, callback)

updateRule(request: protos.google.cloud.chronicle.v1.IUpdateRuleRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IUpdateRuleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRuleRequest
callback Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IUpdateRuleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRuleDeployment(request, options)

updateRuleDeployment(request?: protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IRuleDeployment,
        protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | undefined,
        {} | undefined
    ]>;

Updates a RuleDeployment. Failures are not necessarily atomic. If there is a request to update multiple fields, and any update to a single field fails, an error will be returned, but other fields may remain successfully updated.

Parameters
Name Description
request IUpdateRuleDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | 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. The rule deployment to update.
   *  The rule deployment's `name` field is used to identify the rule deployment
   *  to update. Format:
   *  `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment`
   */
  // const ruleDeployment = {}
  /**
   *  Required. The list of fields to update.
   */
  // const updateMask = {}

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

  async function callUpdateRuleDeployment() {
    // Construct request
    const request = {
      ruleDeployment,
      updateMask,
    };

    // Run request
    const response = await chronicleClient.updateRuleDeployment(request);
    console.log(response);
  }

  callUpdateRuleDeployment();

updateRuleDeployment(request, options, callback)

updateRuleDeployment(request: protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRuleDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRuleDeployment(request, callback)

updateRuleDeployment(request: protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRuleDeploymentRequest
callback Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

verifyRuleText(request, options)

verifyRuleText(request?: protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest, options?: CallOptions): Promise<[
        protos.google.cloud.chronicle.v1.IVerifyRuleTextResponse,
        protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest | undefined,
        {} | undefined
    ]>;

Verifies the given rule text.

Parameters
Name Description
request IVerifyRuleTextRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.chronicle.v1.IVerifyRuleTextResponse, protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing VerifyRuleTextResponse. 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 parent resource, which is the SecOps instance
   *  associated with the request. Format:
   *  `projects/{project}/locations/{location}/instances/{instance}`
   */
  // const instance = 'abc123'
  /**
   *  Required. The rule text to verify as a UTF-8 string.
   */
  // const ruleText = 'abc123'

  // Imports the Chronicle library
  const {RuleServiceClient} = require('@google-cloud/chronicle').v1;

  // Instantiates a client
  const chronicleClient = new RuleServiceClient();

  async function callVerifyRuleText() {
    // Construct request
    const request = {
      instance,
      ruleText,
    };

    // Run request
    const response = await chronicleClient.verifyRuleText(request);
    console.log(response);
  }

  callVerifyRuleText();

verifyRuleText(request, options, callback)

verifyRuleText(request: protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IVerifyRuleTextResponse, protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IVerifyRuleTextRequest
options CallOptions
callback Callback<protos.google.cloud.chronicle.v1.IVerifyRuleTextResponse, protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

verifyRuleText(request, callback)

verifyRuleText(request: protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest, callback: Callback<protos.google.cloud.chronicle.v1.IVerifyRuleTextResponse, protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IVerifyRuleTextRequest
callback Callback<protos.google.cloud.chronicle.v1.IVerifyRuleTextResponse, protos.google.cloud.chronicle.v1.IVerifyRuleTextRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

watchlistPath(project, location, instance, watchlist)

watchlistPath(project: string, location: string, instance: string, watchlist: string): string;

Return a fully-qualified watchlist resource name string.

Parameters
Name Description
project string
location string
instance string
watchlist string
Returns
Type Description
string

{string} Resource name string.