Method: rules.modifyRules

Full name: projects.locations.instances.rules.modifyRules

rules.modifyRules allows users to modify the rule config for multiple rules at once.

HTTP request


POST https://chronicle.africa-south1.rep.googleapis.com/v1alpha/{parent}/rules:modifyRules

Path parameters

Parameters
parent

string

Required. The parent, which owns this collection of rules. Format: projects/{project}/locations/{location}/instances/{instance}

Request body

The request body contains data with the following structure:

JSON representation
{
  "requests": [
    {
      object (UpdateRuleRequest)
    }
  ]
}
Fields
requests[]

object (UpdateRuleRequest)

Required. The list of requests to modify the rule configuration.

Response body

Response message for rules.modifyRules method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "ruleUpdates": [
    {
      object (RuleUpdates)
    }
  ],
  "failedRequests": {
    integer: {
      object (Status)
    },
    ...
  }
}
Fields
ruleUpdates[]

object (RuleUpdates)

Updated Rule fields. Similar to the partial successes, the array index indicates the correct rule modification.

failedRequests

map (key: integer, value: object (Status))

The key in this map is the index of the request in the requests field in the batch request. The value in each map entry must mirror the error(s) that would normally be returned by the singular Standard Update method.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateRuleRequest

Request message for rules.patch method.

JSON representation
{
  "rule": {
    object (Rule)
  },
  "updateMask": string
}
Fields
rule

object (Rule)

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}

updateMask

string (FieldMask format)

Optional. The list of fields to update. If not included, all fields with a non-empty value will be overwritten.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

RuleUpdates

RuleUpdates indicates which fields were updated for a rule.

JSON representation
{

  // Union field updated_rule_configuration can be only one of the following:
  "alertingStateUpdated": boolean,
  "liveModeStateUpdated": boolean,
  "archivedState": boolean,
  "tagsUpdated": boolean
  // End of list of possible types for union field updated_rule_configuration.
}
Fields
Union field updated_rule_configuration. Indicates which fields were updated for a rule. updated_rule_configuration can be only one of the following:
alertingStateUpdated

boolean

Indicates if the alerting state was updated.

liveModeStateUpdated

boolean

Indicates if the live mode state was updated.

archivedState

boolean

Indicates if the archived state was updated.

tagsUpdated

boolean

Indicates if the tags were updated.