{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-guardduty/json-schema/amazon-guardduty-create-filter-request-schema.json",
  "title": "CreateFilterRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-guardduty-filter-api-openapi.yml#/components/schemas/CreateFilterRequest",
  "type": "object",
  "properties": {
    "DetectorId": {
      "type": "string",
      "description": "The detector ID associated with the GuardDuty account for which you want to create a filter. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API."
    },
    "Name": {
      "type": "string",
      "description": "The name of the filter. Valid characters include period (.), underscore (_), dash (-), and alphanumeric characters. A whitespace is considered to be an invalid character."
    },
    "Description": {
      "type": "string",
      "description": "The description of the filter. Valid characters include alphanumeric characters, and special characters such as hyphen, period, colon, underscore, parentheses ({ }, [ ], and ( )), forward slash, horizontal tab, vertical tab, newline, form feed, return, and whitespace."
    },
    "Action": {
      "type": "string",
      "enum": [
        "NOOP",
        "ARCHIVE"
      ],
      "description": "Specifies the action that is to be applied to the findings that match the filter. Default: NOOP"
    },
    "Rank": {
      "type": "integer",
      "description": "Specifies the position of the filter in the list of current filters. Also specifies the order in which this filter is applied to the findings."
    },
    "FindingCriteria": {
      "$ref": "#/$defs/FindingCriteria"
    },
    "ClientToken": {
      "type": "string",
      "description": "The idempotency token for the create request."
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags to be added to a new filter resource."
    }
  },
  "required": [
    "DetectorId",
    "Name",
    "FindingCriteria"
  ],
  "$defs": {
    "Condition": {
      "type": "object",
      "properties": {
        "Eq": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents the equal condition to be applied to a single field when querying for findings. Max values: 50"
        },
        "Neq": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents the not equal condition to be applied to a single field when querying for findings. Max values: 50"
        },
        "Gt": {
          "type": "integer",
          "description": "Represents a greater than condition to be applied to a single field when querying for findings."
        },
        "Gte": {
          "type": "integer",
          "description": "Represents a greater than or equal condition to be applied to a single field when querying for findings."
        },
        "Lt": {
          "type": "integer",
          "description": "Represents a less than condition to be applied to a single field when querying for findings."
        },
        "Lte": {
          "type": "integer",
          "description": "Represents a less than or equal condition to be applied to a single field when querying for findings."
        },
        "Equals": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents an equal condition to be applied to a single field when querying for findings. Max values: 50"
        },
        "NotEquals": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents a not equal condition to be applied to a single field when querying for findings. Max values: 50"
        },
        "GreaterThan": {
          "type": "integer",
          "description": "Represents a greater than condition to be applied to a single field when querying for findings."
        },
        "GreaterThanOrEqual": {
          "type": "integer",
          "description": "Represents a greater than or equal condition to be applied to a single field when querying for findings."
        },
        "LessThan": {
          "type": "integer",
          "description": "Represents a less than condition to be applied to a single field when querying for findings."
        },
        "LessThanOrEqual": {
          "type": "integer",
          "description": "Represents a less than or equal condition to be applied to a single field when querying for findings."
        },
        "Matches": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents the match condition to be applied to a single field when querying for findings. The matches condition is available only for create-filter and update-filter APIs."
        },
        "NotMatches": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents the not match condition to be applied to a single field when querying for findings. The not-matches condition is available only for create-filter and update-filter APIs."
        }
      }
    },
    "FindingCriteria": {
      "type": "object",
      "properties": {
        "Criterion": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Condition"
          },
          "description": "Represents a map of finding properties that match specified conditions and values when querying findings."
        }
      }
    }
  }
}