{
 "additionalProperties": false,
 "definitions": {
  "AutomationRulesAction": {
   "properties": {
    "FindingFieldsUpdate": {
     "$ref": "#/definitions/AutomationRulesFindingFieldsUpdate"
    },
    "Type": {
     "enum": [
      "FINDING_FIELDS_UPDATE"
     ],
     "type": "string"
    }
   },
   "required": [
    "Type",
    "FindingFieldsUpdate"
   ],
   "type": "object"
  },
  "AutomationRulesFindingFieldsUpdate": {
   "properties": {
    "Confidence": {
     "$ref": "#/definitions/int100"
    },
    "Criticality": {
     "$ref": "#/definitions/int100"
    },
    "Note": {
     "$ref": "#/definitions/NoteUpdate",
     "type": "object"
    },
    "RelatedFindings": {
     "items": {
      "$ref": "#/definitions/RelatedFinding"
     },
     "maxItems": 10,
     "minItems": 1,
     "type": "array"
    },
    "Severity": {
     "$ref": "#/definitions/SeverityUpdate",
     "type": "object"
    },
    "Types": {
     "items": {
      "pattern": "^([^/]+)(/[^/]+){0,2}$",
      "type": "string"
     },
     "maxItems": 50,
     "type": "array",
     "uniqueItems": true
    },
    "UserDefinedFields": {
     "$ref": "#/definitions/map"
    },
    "VerificationState": {
     "enum": [
      "UNKNOWN",
      "TRUE_POSITIVE",
      "FALSE_POSITIVE",
      "BENIGN_POSITIVE"
     ],
     "type": "string"
    },
    "Workflow": {
     "$ref": "#/definitions/WorkflowUpdate",
     "type": "object"
    }
   },
   "type": "object"
  },
  "AutomationRulesFindingFilters": {
   "additionalProperties": false,
   "properties": {
    "AwsAccountId": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 100,
     "type": "array"
    },
    "CompanyName": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ComplianceAssociatedStandardsId": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ComplianceSecurityControlId": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ComplianceStatus": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "Confidence": {
     "items": {
      "$ref": "#/definitions/NumberFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "CreatedAt": {
     "items": {
      "$ref": "#/definitions/DateFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "Criticality": {
     "items": {
      "$ref": "#/definitions/NumberFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "Description": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "FirstObservedAt": {
     "items": {
      "$ref": "#/definitions/DateFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "GeneratorId": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 100,
     "type": "array"
    },
    "Id": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "LastObservedAt": {
     "items": {
      "$ref": "#/definitions/DateFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "NoteText": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "NoteUpdatedAt": {
     "items": {
      "$ref": "#/definitions/DateFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "NoteUpdatedBy": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ProductArn": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ProductName": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "RecordState": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "RelatedFindingsId": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "RelatedFindingsProductArn": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ResourceDetailsOther": {
     "items": {
      "$ref": "#/definitions/MapFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ResourceId": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 100,
     "type": "array"
    },
    "ResourcePartition": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ResourceRegion": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ResourceTags": {
     "items": {
      "$ref": "#/definitions/MapFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "ResourceType": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "SeverityLabel": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "SourceUrl": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "Title": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 100,
     "type": "array"
    },
    "Type": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "UpdatedAt": {
     "items": {
      "$ref": "#/definitions/DateFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "UserDefinedFields": {
     "items": {
      "$ref": "#/definitions/MapFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "VerificationState": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    },
    "WorkflowStatus": {
     "items": {
      "$ref": "#/definitions/StringFilter"
     },
     "maxItems": 20,
     "type": "array"
    }
   },
   "type": "object"
  },
  "BooleanFilter": {
   "additionalProperties": false,
   "properties": {
    "Value": {
     "type": "boolean"
    }
   },
   "required": [
    "Value"
   ],
   "type": "object"
  },
  "DateFilter": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "DateRange"
     ]
    },
    {
     "allOf": [
      {
       "required": [
        "Start"
       ]
      },
      {
       "required": [
        "End"
       ]
      }
     ]
    }
   ],
   "properties": {
    "DateRange": {
     "$ref": "#/definitions/DateRange"
    },
    "End": {
     "$ref": "#/definitions/ISO8601DateString"
    },
    "Start": {
     "$ref": "#/definitions/ISO8601DateString"
    }
   },
   "type": "object"
  },
  "DateRange": {
   "additionalProperties": false,
   "properties": {
    "Unit": {
     "enum": [
      "DAYS"
     ],
     "type": "string"
    },
    "Value": {
     "type": "number"
    }
   },
   "required": [
    "Unit",
    "Value"
   ],
   "type": "object"
  },
  "ISO8601DateString": {
   "pattern": "^(\\d\\d\\d\\d)-([0][1-9]|[1][0-2])-([0][1-9]|[1-2](\\d)|[3][0-1])[T](?:([0-1](\\d)|[2][0-3]):[0-5](\\d):[0-5](\\d)|23:59:60)(?:\\.(\\d)+)?([Z]|[+-](\\d\\d)(:?(\\d\\d))?)$",
   "type": "string"
  },
  "MapFilter": {
   "additionalProperties": false,
   "properties": {
    "Comparison": {
     "enum": [
      "EQUALS",
      "NOT_EQUALS",
      "CONTAINS",
      "NOT_CONTAINS"
     ],
     "type": "string"
    },
    "Key": {
     "pattern": "\\S",
     "type": "string"
    },
    "Value": {
     "type": "string"
    }
   },
   "required": [
    "Comparison",
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "NonEmptyString": {
   "minLength": 1,
   "type": "string"
  },
  "NoteUpdate": {
   "additionalProperties": false,
   "properties": {
    "Text": {
     "maxLength": 512,
     "minLength": 1,
     "pattern": "\\S",
     "type": "string"
    },
    "UpdatedBy": {
     "$ref": "#/definitions/arnOrId"
    }
   },
   "required": [
    "Text",
    "UpdatedBy"
   ],
   "type": "object"
  },
  "NumberFilter": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "Eq"
     ]
    },
    {
     "anyOf": [
      {
       "required": [
        "Gte"
       ]
      },
      {
       "required": [
        "Lte"
       ]
      }
     ]
    }
   ],
   "properties": {
    "Eq": {
     "type": "number"
    },
    "Gte": {
     "type": "number"
    },
    "Lte": {
     "type": "number"
    }
   },
   "type": "object"
  },
  "RelatedFinding": {
   "additionalProperties": false,
   "properties": {
    "Id": {
     "$ref": "#/definitions/arnOrId"
    },
    "ProductArn": {
     "$ref": "#/definitions/arn"
    }
   },
   "required": [
    "ProductArn",
    "Id"
   ],
   "type": "object"
  },
  "SeverityUpdate": {
   "additionalProperties": false,
   "properties": {
    "Label": {
     "enum": [
      "INFORMATIONAL",
      "LOW",
      "MEDIUM",
      "HIGH",
      "CRITICAL"
     ],
     "type": "string"
    },
    "Normalized": {
     "$ref": "#/definitions/int100"
    },
    "Product": {
     "type": "number"
    }
   },
   "type": "object"
  },
  "StringFilter": {
   "additionalProperties": false,
   "properties": {
    "Comparison": {
     "$ref": "#/definitions/StringFilterComparison"
    },
    "Value": {
     "pattern": "\\S",
     "type": "string"
    }
   },
   "required": [
    "Comparison",
    "Value"
   ],
   "type": "object"
  },
  "StringFilterComparison": {
   "enum": [
    "EQUALS",
    "PREFIX",
    "NOT_EQUALS",
    "PREFIX_NOT_EQUALS",
    "CONTAINS",
    "NOT_CONTAINS"
   ],
   "type": "string"
  },
  "Tags": {
   "additionalProperties": false,
   "patternProperties": {
    "^[a-zA-Z0-9]{1,128}$": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "type": "object"
  },
  "WorkflowUpdate": {
   "additionalProperties": false,
   "properties": {
    "Status": {
     "enum": [
      "NEW",
      "NOTIFIED",
      "RESOLVED",
      "SUPPRESSED"
     ],
     "type": "string"
    }
   },
   "required": [
    "Status"
   ],
   "type": "object"
  },
  "arn": {
   "maxLength": 2048,
   "minLength": 12,
   "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso-?[a-z]{0,2}):[A-Za-z0-9]{1,63}:[a-z]+-([a-z]{1,10}-)?[a-z]+-[0-9]+:([0-9]{12})?:.+$",
   "type": "string"
  },
  "arnOrId": {
   "anyOf": [
    {
     "maxLength": 512,
     "minLength": 1,
     "type": "string"
    },
    {
     "$ref": "#/definitions/arn"
    }
   ],
   "pattern": "\\S"
  },
  "int100": {
   "maximum": 100,
   "minimum": 0,
   "type": "integer"
  },
  "map": {
   "additionalProperties": false,
   "maxProperties": 50,
   "minProperties": 1,
   "patternProperties": {
    "^[-_+=.:/@\\w\\s]{1,128}$": {
     "maxLength": 1024,
     "minLength": 0,
     "type": "string"
    }
   },
   "type": "object"
  },
  "timestamp": {
   "format": "date-time",
   "pattern": "(\\d\\d\\d\\d)-[0-1](\\d)-[0-3](\\d)[Tt](?:[0-2](\\d):[0-5](\\d):[0-5](\\d)|23:59:60)(?:\\.(\\d)+)?(?:[Zz]|[+-](\\d\\d)(?::?(\\d\\d))?)$",
   "type": "string"
  }
 },
 "primaryIdentifier": [
  "/properties/RuleArn"
 ],
 "properties": {
  "Actions": {
   "items": {
    "$ref": "#/definitions/AutomationRulesAction"
   },
   "maxItems": 1,
   "minItems": 1,
   "type": "array"
  },
  "CreatedAt": {
   "$ref": "#/definitions/ISO8601DateString"
  },
  "CreatedBy": {
   "maxLength": 256,
   "minLength": 1,
   "type": "string"
  },
  "Criteria": {
   "$ref": "#/definitions/AutomationRulesFindingFilters"
  },
  "Description": {
   "maxLength": 1024,
   "minLength": 1,
   "pattern": "\\S",
   "type": "string"
  },
  "IsTerminal": {
   "type": "boolean"
  },
  "RuleArn": {
   "pattern": "arn:aws\\S*:securityhub:\\S*",
   "type": "string"
  },
  "RuleName": {
   "maxLength": 256,
   "minLength": 1,
   "pattern": "\\S",
   "type": "string"
  },
  "RuleOrder": {
   "maximum": 1000,
   "minimum": 1,
   "type": "integer"
  },
  "RuleStatus": {
   "enum": [
    "ENABLED",
    "DISABLED"
   ],
   "type": "string"
  },
  "Tags": {
   "$ref": "#/definitions/Tags"
  },
  "UpdatedAt": {
   "$ref": "#/definitions/ISO8601DateString"
  }
 },
 "readOnlyProperties": [
  "/properties/RuleArn",
  "/properties/CreatedAt",
  "/properties/UpdatedAt",
  "/properties/CreatedBy"
 ],
 "required": [
  "RuleOrder",
  "RuleName",
  "Description",
  "Criteria",
  "Actions"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-securityhub",
 "tagging": {
  "cloudFormationSystemTags": false,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::SecurityHub::AutomationRule"
}
