Method: securityPolicies.addRule

Inserts a rule into a security policy.

HTTP request

POST https://compute.googleapis.com/compute/v1/projects/{project}/global/securityPolicies/{resourceId}/addRule

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

resourceId

string

Name of the security policy to update.

Request body

The request body contains data with the following structure:

JSON representation
{
  "description": string,
  "priority": integer,
  "match": {
    "expr": {
      "expression": string,
      "title": string,
      "description": string,
      "location": string
    },
    "versionedExpr": enum,
    "config": {
      "srcIpRanges": [
        string
      ]
    }
  },
  "action": string,
  "preview": boolean,
  "rateLimitOptions": {
    "rateLimitThreshold": {
      "count": integer,
      "intervalSec": integer
    },
    "conformAction": string,