{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Name",
  "/properties/EventBusName"
 ],
 "definitions": {
  "AwsVpcConfiguration": {
   "additionalProperties": false,
   "properties": {
    "AssignPublicIp": {
     "enum": [
      "DISABLED",
      "ENABLED"
     ],
     "type": "string"
    },
    "SecurityGroups": {
     "format": "AWS::EC2::SecurityGroup.Ids",
     "items": {
      "format": "AWS::EC2::SecurityGroup.Id",
      "type": "string"
     },
     "type": "array",
     "uniqueItems": true
    },
    "Subnets": {
     "format": "AWS::EC2::Subnet.Ids",
     "items": {
      "format": "AWS::EC2::Subnet.Id",
      "type": "string"
     },
     "type": "array",
     "uniqueItems": true
    }
   },
   "required": [
    "Subnets"
   ],
   "type": "object"
  },
  "BatchArrayProperties": {
   "additionalProperties": false,
   "properties": {
    "Size": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "BatchParameters": {
   "additionalProperties": false,
   "properties": {
    "ArrayProperties": {
     "$ref": "#/definitions/BatchArrayProperties"
    },
    "JobDefinition": {
     "type": "string"
    },
    "JobName": {
     "type": "string"
    },
    "RetryStrategy": {
     "$ref": "#/definitions/BatchRetryStrategy"
    }
   },
   "required": [
    "JobName",
    "JobDefinition"
   ],
   "type": "object"
  },
  "BatchRetryStrategy": {
   "additionalProperties": false,
   "properties": {
    "Attempts": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "CapacityProviderStrategyItem": {
   "additionalProperties": false,
   "properties": {
    "Base": {
     "maximum": 100000,
     "minimum": 0,
     "type": "integer"
    },
    "CapacityProvider": {
     "maxLength": 255,
     "minLength": 1,
     "type": "string"
    },
    "Weight": {
     "maximum": 1000,
     "minimum": 0,
     "type": "integer"
    }
   },
   "required": [
    "CapacityProvider"
   ],
   "type": "object"
  },
  "DeadLetterConfig": {
   "additionalProperties": false,
   "properties": {
    "Arn": {
     "maxLength": 1600,
     "minLength": 1,
     "type": "string"
    }
   },
   "type": "object"
  },
  "EcsParameters": {
   "additionalProperties": false,
   "properties": {
    "CapacityProviderStrategy": {
     "items": {
      "$ref": "#/definitions/CapacityProviderStrategyItem"
     },
     "maxItems": 6,
     "minItems": 0,
     "type": "array",
     "uniqueItems": true
    },
    "EnableECSManagedTags": {
     "type": "boolean"
    },
    "EnableExecuteCommand": {
     "type": "boolean"
    },
    "Group": {
     "type": "string"
    },
    "LaunchType": {
     "enum": [
      "EC2",
      "EXTERNAL",
      "FARGATE"
     ],
     "type": "string"
    },
    "NetworkConfiguration": {
     "$ref": "#/definitions/NetworkConfiguration"
    },
    "PlacementConstraints": {
     "items": {
      "$ref": "#/definitions/PlacementConstraint"
     },
     "maxItems": 10,
     "minItems": 0,
     "type": "array",
     "uniqueItems": true
    },
    "PlacementStrategies": {
     "items": {
      "$ref": "#/definitions/PlacementStrategy"
     },
     "type": "array",
     "uniqueItems": true
    },
    "PlatformVersion": {
     "type": "string"
    },
    "PropagateTags": {
     "enum": [
      "TASK_DEFINITION"
     ],
     "type": "string"
    },
    "ReferenceId": {
     "maxLength": 1024,
     "minLength": 0,
     "type": "string"
    },
    "TagList": {
     "items": {
      "$ref": "#/definitions/Tag"
     },
     "type": "array",
     "uniqueItems": true
    },
    "TaskCount": {
     "minimum": 1,
     "type": "integer"
    },
    "TaskDefinitionArn": {
     "maxLength": 1600,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "TaskDefinitionArn"
   ],
   "type": "object"
  },
  "HttpParameters": {
   "additionalProperties": false,
   "properties": {
    "HeaderParameters": {
     "patternProperties": {
      "[a-zA-Z0-9]+": {
       "type": "string"
      }
     },
     "type": "object"
    },
    "PathParameterValues": {
     "items": {
      "pattern": "^(?!\\s*$).+$",
      "type": "string"
     },
     "type": "array",
     "uniqueItems": true
    },
    "QueryStringParameters": {
     "patternProperties": {
      "[a-zA-Z0-9]+": {
       "type": "string"
      }
     },
     "type": "object"
    }
   },
   "type": "object"
  },
  "InputTransformer": {
   "additionalProperties": false,
   "properties": {
    "InputPathsMap": {
     "patternProperties": {
      "[a-zA-Z0-9]+": {
       "type": "string"
      }
     },
     "type": "object"
    },
    "InputTemplate": {
     "maxLength": 8192,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "InputTemplate"
   ],
   "type": "object"
  },
  "KinesisParameters": {
   "additionalProperties": false,
   "properties": {
    "PartitionKeyPath": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "PartitionKeyPath"
   ],
   "type": "object"
  },
  "NetworkConfiguration": {
   "additionalProperties": false,
   "properties": {
    "AwsVpcConfiguration": {
     "$ref": "#/definitions/AwsVpcConfiguration"
    }
   },
   "type": "object"
  },
  "PlacementConstraint": {
   "additionalProperties": false,
   "properties": {
    "Expression": {
     "maxLength": 2000,
     "minLength": 0,
     "type": "string"
    },
    "Type": {
     "enum": [
      "distinctInstance",
      "memberOf"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "PlacementStrategy": {
   "additionalProperties": false,
   "properties": {
    "Field": {
     "type": "string"
    },
    "Type": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "RedshiftDataParameters": {
   "additionalProperties": false,
   "properties": {
    "Database": {
     "maxLength": 64,
     "minLength": 1,
     "type": "string"
    },
    "DbUser": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "SecretManagerArn": {
     "maxLength": 1600,
     "minLength": 1,
     "pattern": "^(^arn:aws([a-z]|\\-)*:secretsmanager:[a-z0-9-.]+:.*)|(\\$(\\.[\\w_-]+(\\[(\\d+|\\*)\\])*)*)$",
     "type": "string"
    },
    "Sql": {
     "maxLength": 100000,
     "minLength": 1,
     "type": "string"
    },
    "StatementName": {
     "maxLength": 500,
     "minLength": 1,
     "type": "string"
    },
    "WithEvent": {
     "type": "boolean"
    }
   },
   "required": [
    "Database"
   ],
   "type": "object"
  },
  "RetryPolicy": {
   "additionalProperties": false,
   "properties": {
    "MaximumEventAgeInSeconds": {
     "maximum": 86400,
     "minimum": 60,
     "type": "integer"
    },
    "MaximumRetryAttempts": {
     "maximum": 185,
     "minimum": 0,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "RunCommandParameters": {
   "additionalProperties": false,
   "properties": {
    "RunCommandTargets": {
     "items": {
      "$ref": "#/definitions/RunCommandTarget"
     },
     "maxItems": 5,
     "minItems": 1,
     "type": "array",
     "uniqueItems": true
    }
   },
   "required": [
    "RunCommandTargets"
   ],
   "type": "object"
  },
  "RunCommandTarget": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$",
     "type": "string"
    },
    "Values": {
     "items": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string"
     },
     "maxItems": 50,
     "minItems": 1,
     "type": "array",
     "uniqueItems": true
    }
   },
   "required": [
    "Values",
    "Key"
   ],
   "type": "object"
  },
  "SageMakerPipelineParameter": {
   "additionalProperties": false,
   "properties": {
    "Name": {
     "maxLength": 256,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
     "type": "string"
    },
    "Value": {
     "maxLength": 1024,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Name"
   ],
   "type": "object"
  },
  "SageMakerPipelineParameters": {
   "additionalProperties": false,
   "properties": {
    "PipelineParameterList": {
     "items": {
      "$ref": "#/definitions/SageMakerPipelineParameter"
     },
     "maxItems": 200,
     "minItems": 0,
     "type": "array",
     "uniqueItems": true
    }
   },
   "type": "object"
  },
  "SqsParameters": {
   "additionalProperties": false,
   "properties": {
    "MessageGroupId": {
     "type": "string"
    }
   },
   "required": [
    "MessageGroupId"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "type": "object"
  },
  "Target": {
   "additionalProperties": false,
   "properties": {
    "Arn": {
     "maxLength": 1600,
     "minLength": 1,
     "type": "string"
    },
    "BatchParameters": {
     "$ref": "#/definitions/BatchParameters"
    },
    "DeadLetterConfig": {
     "$ref": "#/definitions/DeadLetterConfig"
    },
    "EcsParameters": {
     "$ref": "#/definitions/EcsParameters"
    },
    "HttpParameters": {
     "$ref": "#/definitions/HttpParameters"
    },
    "Id": {
     "maxLength": 64,
     "minLength": 1,
     "pattern": "^[\\.\\-_A-Za-z0-9]+$",
     "type": "string"
    },
    "Input": {
     "maxLength": 8192,
     "minLength": 0,
     "type": "string"
    },
    "InputPath": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    },
    "InputTransformer": {
     "$ref": "#/definitions/InputTransformer"
    },
    "KinesisParameters": {
     "$ref": "#/definitions/KinesisParameters"
    },
    "RedshiftDataParameters": {
     "$ref": "#/definitions/RedshiftDataParameters"
    },
    "RetryPolicy": {
     "$ref": "#/definitions/RetryPolicy"
    },
    "RoleArn": {
     "format": "AWS::IAM::Role.Arn",
     "maxLength": 1600,
     "minLength": 1,
     "type": "string"
    },
    "RunCommandParameters": {
     "$ref": "#/definitions/RunCommandParameters"
    },
    "SageMakerPipelineParameters": {
     "$ref": "#/definitions/SageMakerPipelineParameters"
    },
    "SqsParameters": {
     "$ref": "#/definitions/SqsParameters"
    }
   },
   "required": [
    "Id",
    "Arn"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Id"
 ],
 "properties": {
  "Arn": {
   "type": "string"
  },
  "Description": {
   "maxLength": 512,
   "minLength": 0,
   "type": "string"
  },
  "EventBusName": {
   "maxLength": 1600,
   "minLength": 1,
   "pattern": "^(arn:aws[\\w-]*:events:[a-z]{2}-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$",
   "type": "string"
  },
  "EventPattern": {
   "format": "json",
   "type": [
    "object",
    "string"
   ]
  },
  "Id": {
   "type": "string"
  },
  "Name": {
   "maxLength": 64,
   "minLength": 1,
   "pattern": "^[\\.\\-_A-Za-z0-9]+$",
   "type": "string"
  },
  "RoleArn": {
   "format": "AWS::IAM::Role.Arn",
   "maxLength": 1600,
   "minLength": 1,
   "type": "string"
  },
  "ScheduleExpression": {
   "maxLength": 256,
   "minLength": 0,
   "type": "string"
  },
  "State": {
   "type": "string"
  },
  "Targets": {
   "items": {
    "$ref": "#/definitions/Target"
   },
   "maxItems": 100,
   "minItems": 1,
   "type": "array",
   "uniqueItems": true
  }
 },
 "readOnlyProperties": [
  "/properties/Id",
  "/properties/Arn"
 ],
 "requiredOr": [
  "EventPattern",
  "ScheduleExpression"
 ],
 "typeName": "AWS::Events::Rule"
}
