{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/JobDefinitionName",
  "/properties/ModelQualityAppSpecification",
  "/properties/ModelQualityBaselineConfig",
  "/properties/ModelQualityJobInput",
  "/properties/ModelQualityJobOutputConfig",
  "/properties/JobResources",
  "/properties/NetworkConfig",
  "/properties/RoleArn",
  "/properties/StoppingCondition",
  "/properties/Tags",
  "/properties/EndpointName"
 ],
 "definitions": {
  "BatchTransformInput": {
   "additionalProperties": false,
   "properties": {
    "DataCapturedDestinationS3Uri": {
     "maxLength": 512,
     "minLength": 0,
     "pattern": "^(https|s3)://([^/]+)/?(.*)$",
     "type": "string"
    },
    "DatasetFormat": {
     "$ref": "#/definitions/DatasetFormat"
    },
    "EndTimeOffset": {
     "$ref": "#/definitions/MonitoringTimeOffsetString"
    },
    "InferenceAttribute": {
     "maxLength": 256,
     "type": "string"
    },
    "LocalPath": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": ".*",
     "type": "string"
    },
    "ProbabilityAttribute": {
     "maxLength": 256,
     "type": "string"
    },
    "ProbabilityThresholdAttribute": {
     "format": "double",
     "type": "number"
    },
    "S3DataDistributionType": {
     "enum": [
      "FullyReplicated",
      "ShardedByS3Key"
     ],
     "type": "string"
    },
    "S3InputMode": {
     "enum": [
      "Pipe",
      "File"
     ],
     "type": "string"
    },
    "StartTimeOffset": {
     "$ref": "#/definitions/MonitoringTimeOffsetString"
    }
   },
   "required": [
    "DataCapturedDestinationS3Uri",
    "DatasetFormat",
    "LocalPath"
   ],
   "type": "object"
  },
  "ClusterConfig": {
   "additionalProperties": false,
   "properties": {
    "InstanceCount": {
     "maximum": 100,
     "minimum": 1,
     "type": "integer"
    },
    "InstanceType": {
     "type": "string"
    },
    "VolumeKmsKeyId": {
     "maxLength": 2048,
     "maximum": 2048,
     "minLength": 0,
     "minimum": 1,
     "pattern": "^[a-zA-Z0-9:/_-]*$",
     "type": "string"
    },
    "VolumeSizeInGB": {
     "maximum": 16384,
     "minimum": 1,
     "type": "integer"
    }
   },
   "required": [
    "InstanceCount",
    "InstanceType",
    "VolumeSizeInGB"
   ],
   "type": "object"
  },
  "ConstraintsResource": {
   "additionalProperties": false,
   "properties": {
    "S3Uri": {
     "$ref": "#/definitions/S3Uri"
    }
   },
   "type": "object"
  },
  "Csv": {
   "properties": {
    "Header": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "DatasetFormat": {
   "properties": {
    "Csv": {
     "$ref": "#/definitions/Csv"
    },
    "Json": {
     "$ref": "#/definitions/Json"
    },
    "Parquet": {
     "$ref": "#/definitions/Parquet"
    }
   },
   "type": "object"
  },
  "EndpointInput": {
   "additionalProperties": false,
   "properties": {
    "EndTimeOffset": {
     "$ref": "#/definitions/MonitoringTimeOffsetString"
    },
    "EndpointName": {
     "$ref": "#/definitions/EndpointName"
    },
    "InferenceAttribute": {
     "maxLength": 256,
     "type": "string"
    },
    "LocalPath": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": ".*",
     "type": "string"
    },
    "ProbabilityAttribute": {
     "maxLength": 256,
     "type": "string"
    },
    "ProbabilityThresholdAttribute": {
     "format": "double",
     "type": "number"
    },
    "S3DataDistributionType": {
     "enum": [
      "FullyReplicated",
      "ShardedByS3Key"
     ],
     "type": "string"
    },
    "S3InputMode": {
     "enum": [
      "Pipe",
      "File"
     ],
     "type": "string"
    },
    "StartTimeOffset": {
     "$ref": "#/definitions/MonitoringTimeOffsetString"
    }
   },
   "required": [
    "EndpointName",
    "LocalPath"
   ],
   "type": "object"
  },
  "EndpointName": {
   "maxLength": 63,
   "minLength": 0,
   "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*",
   "type": "string"
  },
  "JobDefinitionName": {
   "maxLength": 63,
   "minLength": 1,
   "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
   "type": "string"
  },
  "Json": {
   "properties": {
    "Line": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "ModelQualityAppSpecification": {
   "additionalProperties": false,
   "properties": {
    "ContainerArguments": {
     "items": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string"
     },
     "maxItems": 50,
     "minItems": 1,
     "type": "array"
    },
    "ContainerEntrypoint": {
     "items": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    },
    "Environment": {
     "additionalProperties": false,
     "patternProperties": {
      "[\\S\\s]*": {
       "maxLength": 256,
       "type": "string"
      },
      "[a-zA-Z_][a-zA-Z0-9_]*": {
       "maxLength": 256,
       "minLength": 1,
       "type": "string"
      }
     },
     "type": "object"
    },
    "ImageUri": {
     "maxLength": 255,
     "minLength": 0,
     "pattern": ".*",
     "type": "string"
    },
    "PostAnalyticsProcessorSourceUri": {
     "$ref": "#/definitions/S3Uri"
    },
    "ProblemType": {
     "$ref": "#/definitions/ProblemType"
    },
    "RecordPreprocessorSourceUri": {
     "$ref": "#/definitions/S3Uri"
    }
   },
   "required": [
    "ImageUri",
    "ProblemType"
   ],
   "type": "object"
  },
  "ModelQualityBaselineConfig": {
   "additionalProperties": false,
   "properties": {
    "BaseliningJobName": {
     "$ref": "#/definitions/ProcessingJobName"
    },
    "ConstraintsResource": {
     "$ref": "#/definitions/ConstraintsResource"
    }
   },
   "type": "object"
  },
  "ModelQualityJobInput": {
   "additionalProperties": false,
   "properties": {
    "BatchTransformInput": {
     "$ref": "#/definitions/BatchTransformInput"
    },
    "EndpointInput": {
     "$ref": "#/definitions/EndpointInput"
    },
    "GroundTruthS3Input": {
     "$ref": "#/definitions/MonitoringGroundTruthS3Input"
    }
   },
   "required": [
    "GroundTruthS3Input"
   ],
   "type": "object"
  },
  "MonitoringGroundTruthS3Input": {
   "additionalProperties": false,
   "properties": {
    "S3Uri": {
     "maxLength": 512,
     "minLength": 0,
     "pattern": "^(https|s3)://([^/]+)/?(.*)$",
     "type": "string"
    }
   },
   "required": [
    "S3Uri"
   ],
   "type": "object"
  },
  "MonitoringOutput": {
   "additionalProperties": false,
   "properties": {
    "S3Output": {
     "$ref": "#/definitions/S3Output"
    }
   },
   "required": [
    "S3Output"
   ],
   "type": "object"
  },
  "MonitoringOutputConfig": {
   "additionalProperties": false,
   "properties": {
    "KmsKeyId": {
     "anyOf": [
      {
       "format": "AWS::KMS::Key.Arn"
      },
      {
       "format": "AWS::KMS::Key.Id"
      },
      {
       "format": "AWS::KMS::Alias.AliasName"
      }
     ],
     "maxLength": 2048,
     "minLength": 0,
     "pattern": ".*",
     "type": "string"
    },
    "MonitoringOutputs": {
     "items": {
      "$ref": "#/definitions/MonitoringOutput"
     },
     "maxItems": 1,
     "maxLength": 1,
     "minItems": 1,
     "minLength": 1,
     "type": "array"
    }
   },
   "required": [
    "MonitoringOutputs"
   ],
   "type": "object"
  },
  "MonitoringResources": {
   "additionalProperties": false,
   "properties": {
    "ClusterConfig": {
     "$ref": "#/definitions/ClusterConfig"
    }
   },
   "required": [
    "ClusterConfig"
   ],
   "type": "object"
  },
  "MonitoringTimeOffsetString": {
   "maxLength": 15,
   "minLength": 1,
   "pattern": "^.?P.*",
   "type": "string"
  },
  "NetworkConfig": {
   "additionalProperties": false,
   "properties": {
    "EnableInterContainerTrafficEncryption": {
     "type": "boolean"
    },
    "EnableNetworkIsolation": {
     "type": "boolean"
    },
    "VpcConfig": {
     "$ref": "#/definitions/VpcConfig"
    }
   },
   "type": "object"
  },
  "Parquet": {
   "type": "boolean"
  },
  "ProblemType": {
   "enum": [
    "BinaryClassification",
    "MulticlassClassification",
    "Regression"
   ],
   "type": "string"
  },
  "ProcessingJobName": {
   "maxLength": 63,
   "minLength": 1,
   "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
   "type": "string"
  },
  "S3Output": {
   "additionalProperties": false,
   "properties": {
    "LocalPath": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": ".*",
     "type": "string"
    },
    "S3UploadMode": {
     "enum": [
      "Continuous",
      "EndOfJob"
     ],
     "type": "string"
    },
    "S3Uri": {
     "maxLength": 512,
     "minLength": 0,
     "pattern": "^(https|s3)://([^/]+)/?(.*)$",
     "type": "string"
    }
   },
   "required": [
    "LocalPath",
    "S3Uri"
   ],
   "type": "object"
  },
  "S3Uri": {
   "maxLength": 1024,
   "minLength": 0,
   "pattern": "^(https|s3)://([^/]+)/?(.*)$",
   "type": "string"
  },
  "StoppingCondition": {
   "additionalProperties": false,
   "properties": {
    "MaxRuntimeInSeconds": {
     "maximum": 86400,
     "minimum": 1,
     "type": "integer"
    }
   },
   "required": [
    "MaxRuntimeInSeconds"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "VpcConfig": {
   "additionalProperties": false,
   "properties": {
    "SecurityGroupIds": {
     "format": "AWS::EC2::SecurityGroup.Ids",
     "items": {
      "format": "AWS::EC2::SecurityGroup.Id",
      "maxLength": 32,
      "minLength": 0,
      "pattern": "[-0-9a-zA-Z]+",
      "type": "string"
     },
     "maxItems": 5,
     "minItems": 1,
     "type": "array"
    },
    "Subnets": {
     "format": "AWS::EC2::Subnet.Ids",
     "items": {
      "format": "AWS::EC2::Subnet.Id",
      "maxLength": 32,
      "minLength": 0,
      "pattern": "[-0-9a-zA-Z]+",
      "type": "string"
     },
     "maxItems": 16,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "SecurityGroupIds",
    "Subnets"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/JobDefinitionArn"
 ],
 "properties": {
  "CreationTime": {
   "type": "string"
  },
  "EndpointName": {
   "$ref": "#/definitions/EndpointName"
  },
  "JobDefinitionArn": {
   "maxLength": 256,
   "minLength": 1,
   "type": "string"
  },
  "JobDefinitionName": {
   "$ref": "#/definitions/JobDefinitionName"
  },
  "JobResources": {
   "$ref": "#/definitions/MonitoringResources"
  },
  "ModelQualityAppSpecification": {
   "$ref": "#/definitions/ModelQualityAppSpecification"
  },
  "ModelQualityBaselineConfig": {
   "$ref": "#/definitions/ModelQualityBaselineConfig"
  },
  "ModelQualityJobInput": {
   "$ref": "#/definitions/ModelQualityJobInput"
  },
  "ModelQualityJobOutputConfig": {
   "$ref": "#/definitions/MonitoringOutputConfig"
  },
  "NetworkConfig": {
   "$ref": "#/definitions/NetworkConfig"
  },
  "RoleArn": {
   "format": "AWS::IAM::Role.Arn",
   "maxLength": 2048,
   "minLength": 20,
   "pattern": "^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$",
   "type": "string"
  },
  "StoppingCondition": {
   "$ref": "#/definitions/StoppingCondition"
  },
  "Tags": {
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "minItems": 0,
   "type": "array"
  }
 },
 "readOnlyProperties": [
  "/properties/CreationTime",
  "/properties/JobDefinitionArn"
 ],
 "required": [
  "ModelQualityAppSpecification",
  "ModelQualityJobInput",
  "ModelQualityJobOutputConfig",
  "JobResources",
  "RoleArn"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": false,
  "taggable": true
 },
 "typeName": "AWS::SageMaker::ModelQualityJobDefinition",
 "writeOnlyProperties": [
  "/properties/EndpointName"
 ]
}
