{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-security-hub/json-schema/aws-security-hub-create-automation-rule-request-schema.json",
  "title": "CreateAutomationRuleRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-security-hub-automation-rules-api-openapi.yml#/components/schemas/CreateAutomationRuleRequest",
  "type": "object",
  "properties": {
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "User-defined tags associated with an automation rule."
    },
    "RuleStatus": {
      "type": "string",
      "enum": [
        "ENABLED",
        "DISABLED"
      ],
      "description": "Whether the rule is active after it is created. If this parameter is equal to ENABLED, Security Hub CSPM starts applying the rule to findings and finding updates after the rule is created. To change the value of this parameter after creating a rule, use BatchUpdateAutomationRules ."
    },
    "RuleOrder": {
      "type": "integer",
      "description": "An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. Security Hub CSPM applies rules with lower values for this parameter first."
    },
    "RuleName": {
      "type": "string",
      "description": "The name of the rule."
    },
    "Description": {
      "type": "string",
      "description": "A description of the rule."
    },
    "IsTerminal": {
      "type": "boolean",
      "description": "Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule is terminal, Security Hub CSPM applies the rule action to a finding that matches the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal."
    },
    "Criteria": {
      "$ref": "#/$defs/AutomationRulesFindingFilters"
    },
    "Actions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AutomationRulesAction"
      },
      "description": "One or more actions to update finding fields if a finding matches the conditions specified in Criteria."
    }
  },
  "required": [
    "RuleOrder",
    "RuleName",
    "Description",
    "Criteria",
    "Actions"
  ],
  "$defs": {
    "AutomationRulesAction": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "FINDING_FIELDS_UPDATE"
          ],
          "description": "Specifies the type of action that Security Hub CSPM takes when a finding matches the defined criteria of a rule."
        },
        "FindingFieldsUpdate": {
          "$ref": "#/$defs/AutomationRulesFindingFieldsUpdate"
        }
      }
    },
    "AutomationRulesFindingFieldsUpdate": {
      "type": "object",
      "properties": {
        "Note": {
          "$ref": "#/$defs/NoteUpdate"
        },
        "Severity": {
          "$ref": "#/$defs/SeverityUpdate"
        },
        "VerificationState": {
          "type": "string",
          "enum": [
            "UNKNOWN",
            "TRUE_POSITIVE",
            "FALSE_POSITIVE",
            "BENIGN_POSITIVE"
          ],
          "description": "The rule action updates the VerificationState field of a finding."
        },
        "Confidence": {
          "type": "integer",
          "description": "The rule action updates the Confidence field of a finding."
        },
        "Criticality": {
          "type": "integer",
          "description": "The rule action updates the Criticality field of a finding."
        },
        "Types": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The rule action updates the Types field of a finding."
        },
        "UserDefinedFields": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The rule action updates the UserDefinedFields field of a finding."
        },
        "Workflow": {
          "$ref": "#/$defs/WorkflowUpdate"
        },
        "RelatedFindings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RelatedFinding"
          },
          "description": "The rule action updates the RelatedFindings field of a finding."
        }
      }
    },
    "AutomationRulesFindingFilters": {
      "type": "object",
      "properties": {
        "ProductArn": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The Amazon Resource Name (ARN) for a third-party product that generated a finding in Security Hub CSPM. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "AwsAccountId": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The Amazon Web Services account ID in which a finding was generated. Array Members: Minimum number of 1 item. Maximum number of 100 items."
        },
        "Id": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The product-specific identifier for a finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "GeneratorId": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The identifier for the solution-specific component that generated a finding. Array Members: Minimum number of 1 item. Maximum number of 100 items."
        },
        "Type": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "One or more finding types in the format of namespace/category/classifier that classify a finding. For a list of namespaces, classifiers, and categories, see Types taxonomy for ASFF in the Security Hub CSPM User Guide. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "FirstObservedAt": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DateFilter"
          },
          "description": "A timestamp that indicates when the potential security issue captured by a finding was first observed by the security findings product. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "LastObservedAt": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DateFilter"
          },
          "description": "A timestamp that indicates when the security findings provider most recently observed a change in the resource that is involved in the finding. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "CreatedAt": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DateFilter"
          },
          "description": "A timestamp that indicates when this finding record was created. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "UpdatedAt": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DateFilter"
          },
          "description": "A timestamp that indicates when the finding record was most recently updated. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "Confidence": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NumberFilter"
          },
          "description": "The likelihood that a finding accurately identifies the behavior or issue that it was intended to identify. Confidence is scored on a 0–100 basis using a ratio scale. A value of 0 means 0 percent confidence, and a value of 100 means 100 percent confidence. For example, a data exfiltration detection based on a statistical deviation of network traffic has low confidence because an actual exfiltration hasn't been verified. For more information, see Confidence in the Security Hub CSPM User Guide. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "Criticality": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NumberFilter"
          },
          "description": "The level of importance that is assigned to the resources that are associated with a finding. Criticality is scored on a 0–100 basis, using a ratio scale that supports only full integers. A score of 0 means that the underlying resources have no criticality, and a score of 100 is reserved for the most critical resources. For more information, see Criticality in the Security Hub CSPM User Guide. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "Title": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "A finding's title. Array Members: Minimum number of 1 item. Maximum number of 100 items."
        },
        "Description": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "A finding's description. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "SourceUrl": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "Provides a URL that links to a page about the current finding in the finding product. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ProductName": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "Provides the name of the product that generated the finding. For control-based findings, the product name is Security Hub CSPM. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "CompanyName": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The name of the company for the product that generated the finding. For control-based findings, the company is Amazon Web Services. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "SeverityLabel": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The severity value of the finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ResourceType": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The type of resource that the finding pertains to. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ResourceId": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The identifier for the given resource type. For Amazon Web Services resources that are identified by Amazon Resource Names (ARNs), this is the ARN. For Amazon Web Services resources that lack ARNs, this is the identifier as defined by the Amazon Web Services service that created the resource. For non-Amazon Web Services resources, this is a unique identifier that is associated with the resource. Array Members: Minimum number of 1 item. Maximum number of 100 items."
        },
        "ResourcePartition": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The partition in which the resource that the finding pertains to is located. A partition is a group of Amazon Web Services Regions. Each Amazon Web Services account is scoped to one partition. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ResourceRegion": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The Amazon Web Services Region where the resource that a finding pertains to is located. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ResourceTags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MapFilter"
          },
          "description": "A list of Amazon Web Services tags associated with a resource at the time the finding was processed. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ResourceDetailsOther": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MapFilter"
          },
          "description": "Custom fields and values about the resource that a finding pertains to. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ComplianceStatus": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The result of a security check. This field is only used for findings generated from controls. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ComplianceSecurityControlId": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The security control ID for which a finding was generated. Security control IDs are the same across standards. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ComplianceAssociatedStandardsId": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The unique identifier of a standard in which a control is enabled. This field consists of the resource portion of the Amazon Resource Name (ARN) returned for a standard in the DescribeStandards API response. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "VerificationState": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "Provides the veracity of a finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "WorkflowStatus": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "Provides information about the status of the investigation into a finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "RecordState": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "Provides the current state of a finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "RelatedFindingsProductArn": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The ARN for the product that generated a related finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "RelatedFindingsId": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The product-generated identifier for a related finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "NoteText": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The text of a user-defined note that's added to a finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "NoteUpdatedAt": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DateFilter"
          },
          "description": "The timestamp of when the note was updated. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "NoteUpdatedBy": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The principal that created a note. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "UserDefinedFields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MapFilter"
          },
          "description": "A list of user-defined name and value string pairs added to a finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ResourceApplicationArn": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The Amazon Resource Name (ARN) of the application that is related to a finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ResourceApplicationName": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The name of the application that is related to a finding. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "AwsAccountName": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The name of the Amazon Web Services account in which a finding was generated. Array Members: Minimum number of 1 item. Maximum number of 20 items."
        },
        "ResourceProvider": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud provider that the resource belongs to. Valid values are AWS and Azure."
        },
        "ResourceOwnerAccountId": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The unique identifier of the account that owns the resource that the finding applies to, for example, Azure Subscription Id or Amazon Web Services Account Id"
        },
        "ResourceOwnerOrgId": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The unique identifier of the organization that owns the resource that the finding applies to, for example, Azure Tenant Id"
        }
      }
    },
    "DateFilter": {
      "type": "object",
      "properties": {
        "Start": {
          "type": "string",
          "description": "A timestamp that provides the start date for the date filter. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps."
        },
        "End": {
          "type": "string",
          "description": "A timestamp that provides the end date for the date filter. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps."
        },
        "DateRange": {
          "$ref": "#/$defs/DateRange"
        }
      }
    },
    "DateRange": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "integer",
          "description": "A date range value for the date filter."
        },
        "Unit": {
          "type": "string",
          "enum": [
            "DAYS"
          ],
          "description": "A date range unit for the date filter."
        },
        "Comparison": {
          "type": "string",
          "enum": [
            "WITHIN",
            "OLDER_THAN"
          ],
          "description": "The condition to apply to a date range filter. If you specify WITHIN, Security Hub filters for dates within the specified date range. If you specify OLDER_THAN, Security Hub filters for dates before the specified date range. If you don't specify a value, the default is WITHIN."
        }
      }
    },
    "MapFilter": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key of the map filter. For example, for ResourceTags, Key identifies the name of the tag. For UserDefinedFields, Key is the name of the field."
        },
        "Value": {
          "type": "string",
          "description": "The value for the key in the map filter. Filter values are case sensitive. For example, one of the values for a tag called Department might be Security. If you provide security as the filter value, then there's no match."
        },
        "Comparison": {
          "type": "string",
          "enum": [
            "EQUALS",
            "NOT_EQUALS",
            "CONTAINS",
            "NOT_CONTAINS"
          ],
          "description": "The condition to apply to the key value when filtering Security Hub CSPM findings with a map filter. To search for values that have the filter value, use one of the following comparison operators: To search for values that include the filter value, use CONTAINS. For example, for the ResourceTags field, the filter Department CONTAINS Security matches findings that include the value Security for the Department tag. In the same example, a finding with a value of Security team for the Department tag is a match. To search for values that exactly match the filter value, use EQUALS. For example, for "
        }
      }
    },
    "NoteUpdate": {
      "type": "object",
      "properties": {
        "Text": {
          "type": "string",
          "description": "The updated note text."
        },
        "UpdatedBy": {
          "type": "string",
          "description": "The principal that updated the note."
        }
      },
      "required": [
        "Text",
        "UpdatedBy"
      ]
    },
    "NumberFilter": {
      "type": "object",
      "properties": {
        "Gte": {
          "type": "number",
          "description": "The greater-than-equal condition to be applied to a single field when querying for findings."
        },
        "Lte": {
          "type": "number",
          "description": "The less-than-equal condition to be applied to a single field when querying for findings."
        },
        "Eq": {
          "type": "number",
          "description": "The equal-to condition to be applied to a single field when querying for findings."
        },
        "Gt": {
          "type": "number",
          "description": "The greater-than condition to be applied to a single field when querying for findings."
        },
        "Lt": {
          "type": "number",
          "description": "The less-than condition to be applied to a single field when querying for findings."
        }
      }
    },
    "RelatedFinding": {
      "type": "object",
      "properties": {
        "ProductArn": {
          "type": "string",
          "description": "The ARN of the product that generated a related finding."
        },
        "Id": {
          "type": "string",
          "description": "The product-generated identifier for a related finding."
        }
      },
      "required": [
        "ProductArn",
        "Id"
      ]
    },
    "SeverityUpdate": {
      "type": "object",
      "properties": {
        "Normalized": {
          "type": "integer",
          "description": "The normalized severity for the finding. This attribute is to be deprecated in favor of Label. If you provide Normalized and don't provide Label, Label is set automatically as follows. 0 - INFORMATIONAL 1–39 - LOW 40–69 - MEDIUM 70–89 - HIGH 90–100 - CRITICAL"
        },
        "Product": {
          "type": "number",
          "description": "The native severity as defined by the Amazon Web Services service or integrated partner product that generated the finding."
        },
        "Label": {
          "type": "string",
          "enum": [
            "INFORMATIONAL",
            "LOW",
            "MEDIUM",
            "HIGH",
            "CRITICAL"
          ],
          "description": "The severity value of the finding. The allowed values are the following. INFORMATIONAL - No issue was found. LOW - The issue does not require action on its own. MEDIUM - The issue must be addressed but not urgently. HIGH - The issue must be addressed as a priority. CRITICAL - The issue must be remediated immediately to avoid it escalating."
        }
      }
    },
    "StringFilter": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "string",
          "description": "The string filter value. Filter values are case sensitive. For example, the product name for control-based findings is Security Hub CSPM. If you provide security hub as the filter value, there's no match."
        },
        "Comparison": {
          "type": "string",
          "enum": [
            "EQUALS",
            "PREFIX",
            "NOT_EQUALS",
            "PREFIX_NOT_EQUALS",
            "CONTAINS",
            "NOT_CONTAINS",
            "CONTAINS_WORD"
          ],
          "description": "The condition to apply to a string value when filtering Security Hub CSPM findings. To search for values that have the filter value, use one of the following comparison operators: To search for values that include the filter value, use CONTAINS. For example, the filter Title CONTAINS CloudFront matches findings that have a Title that includes the string CloudFront. To search for values that contain a word matching the filter value, regardless of case, use CONTAINS_WORD. For example, the filter Title CONTAINS_WORD lambda matches a finding whose Title is GuardDuty Lambda Protection, because the "
        }
      }
    },
    "WorkflowUpdate": {
      "type": "object",
      "properties": {
        "Status": {
          "type": "string",
          "enum": [
            "NEW",
            "NOTIFIED",
            "RESOLVED",
            "SUPPRESSED"
          ],
          "description": "The status of the investigation into the finding. The workflow status is specific to an individual finding. It does not affect the generation of new findings. For example, setting the workflow status to SUPPRESSED or RESOLVED does not prevent a new finding for the same issue. The allowed values are the following. NEW - The initial state of a finding, before it is reviewed. Security Hub CSPM also resets WorkFlowStatus from NOTIFIED or RESOLVED to NEW in the following cases: The record state changes from ARCHIVED to ACTIVE. The compliance status changes from PASSED to either WARNING, FAILED, or "
        }
      }
    }
  }
}