{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-rate-limiting-rules-patch-request-schema.json",
  "title": "RateLimitingRulesPatchRequest",
  "description": "Update a rate limiting rule.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-zones-api-openapi.yml#/components/schemas/RateLimitingRulesPatchRequest",
  "type": "object",
  "properties": {
    "description": {
      "type": "string",
      "description": "The description of the rate limiting rule.",
      "pattern": "^.*$"
    },
    "expression": {
      "type": "string",
      "description": "The expression that defines when to evaluate the rate limiting rule.",
      "pattern": "^.*$"
    },
    "characteristics": {
      "items": {
        "type": "string",
        "pattern": "^.*$"
      },
      "type": "array",
      "description": "Set of parameters defining how to group requests when tracking the request rate."
    },
    "action": {
      "type": "string",
      "description": "The action applied by the rate limiting rule. Valid actions are \"block\", \"managed_challenge\", \"js_challenge\", \"legacy_captcha\", and \"log\".",
      "pattern": "^.*$"
    },
    "period": {
      "type": "integer",
      "description": "The period of time to consider when evaluating the request rate (in seconds). Valid values are 10, 60, 120, 300, and 600."
    },
    "requestsPerPeriod": {
      "type": "integer",
      "description": "The limit for the number of requests in the specified period of time."
    },
    "mitigationTimeout": {
      "type": "integer",
      "description": "After the rate is reached, the rate limiting rule applies the rule action to further requests for the period of time defined in this field (in seconds). When set to 0, the rule throttles requests over the maximum configured rate. When greater than 0, the action is presented for the selected duration after the configured rate is exceeded. Valid values are 0, 60, 120, 300, 600, 3600, and 86400."
    },
    "countingExpression": {
      "type": "string",
      "description": "The expression that defines what kind of requests we want to rate limit.",
      "pattern": "^.*$"
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether or not the rate limiting rule is enabled."
    },
    "position": {
      "$ref": "#/$defs/RulePosition"
    }
  },
  "$defs": {
    "RulePosition": {
      "type": "object",
      "properties": {
        "before": {
          "type": "string",
          "description": "Insert the current rule before this ruleId.",
          "pattern": "^.*$"
        },
        "after": {
          "type": "string",
          "description": "Insert the current rule after this ruleId.",
          "pattern": "^.*$"
        }
      },
      "description": "Used to specify the position of a rule."
    }
  }
}