{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/MonitoringScheduleName"
 ],
 "definitions": {
  "BaselineConfig": {
   "additionalProperties": false,
   "properties": {
    "ConstraintsResource": {
     "$ref": "#/definitions/ConstraintsResource"
    },
    "StatisticsResource": {
     "$ref": "#/definitions/StatisticsResource"
    }
   },
   "type": "object"
  },
  "BatchTransformInput": {
   "additionalProperties": false,
   "properties": {
    "DataCapturedDestinationS3Uri": {
     "maxLength": 512,
     "minLength": 0,
     "pattern": "^(https|s3)://([^/]+)/?(.*)$",
     "type": "string"
    },
    "DatasetFormat": {
     "$ref": "#/definitions/DatasetFormat"
    },
    "ExcludeFeaturesAttribute": {
     "maxLength": 100,
     "minLength": 0,
     "type": "string"
    },
    "LocalPath": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": ".*",
     "type": "string"
    },
    "S3DataDistributionType": {
     "enum": [
      "FullyReplicated",
      "ShardedByS3Key"
     ],
     "type": "string"
    },
    "S3InputMode": {
     "enum": [
      "Pipe",
      "File"
     ],
     "type": "string"
    }
   },
   "required": [
    "DataCapturedDestinationS3Uri",
    "DatasetFormat",
    "LocalPath"
   ],
   "type": "object"
  },
  "ClusterConfig": {
   "additionalProperties": false,
   "properties": {
    "InstanceCount": {
     "maximum": 100,
     "minimum": 1,
     "type": "integer"
    },
    "InstanceType": {
     "enum": [
      "ml.c4.2xlarge",
      "ml.c4.4xlarge",
      "ml.c4.8xlarge",
      "ml.c4.xlarge",
      "ml.c5.18xlarge",
      "ml.c5.2xlarge",
      "ml.c5.4xlarge",
      "ml.c5.9xlarge",
      "ml.c5.xlarge",
      "ml.c6i.12xlarge",
      "ml.c6i.16xlarge",
      "ml.c6i.24xlarge",
      "ml.c6i.2xlarge",
      "ml.c6i.32xlarge",
      "ml.c6i.4xlarge",
      "ml.c6i.8xlarge",
      "ml.c6i.xlarge",
      "ml.c7i.12xlarge",
      "ml.c7i.16xlarge",
      "ml.c7i.24xlarge",
      "ml.c7i.2xlarge",
      "ml.c7i.48xlarge",
      "ml.c7i.4xlarge",
      "ml.c7i.8xlarge",
      "ml.c7i.large",
      "ml.c7i.xlarge",
      "ml.g4dn.12xlarge",
      "ml.g4dn.16xlarge",
      "ml.g4dn.2xlarge",
      "ml.g4dn.4xlarge",
      "ml.g4dn.8xlarge",
      "ml.g4dn.xlarge",
      "ml.g5.12xlarge",
      "ml.g5.16xlarge",
      "ml.g5.24xlarge",
      "ml.g5.2xlarge",
      "ml.g5.48xlarge",
      "ml.g5.4xlarge",
      "ml.g5.8xlarge",
      "ml.g5.xlarge",
      "ml.g6.12xlarge",
      "ml.g6.16xlarge",
      "ml.g6.24xlarge",
      "ml.g6.2xlarge",
      "ml.g6.48xlarge",
      "ml.g6.4xlarge",
      "ml.g6.8xlarge",
      "ml.g6.xlarge",
      "ml.g6e.12xlarge",
      "ml.g6e.16xlarge",
      "ml.g6e.24xlarge",
      "ml.g6e.2xlarge",
      "ml.g6e.48xlarge",
      "ml.g6e.4xlarge",
      "ml.g6e.8xlarge",
      "ml.g6e.xlarge",
      "ml.g7e.12xlarge",
      "ml.g7e.24xlarge",
      "ml.g7e.2xlarge",
      "ml.g7e.48xlarge",
      "ml.g7e.4xlarge",
      "ml.g7e.8xlarge",
      "ml.m4.10xlarge",
      "ml.m4.16xlarge",
      "ml.m4.2xlarge",
      "ml.m4.4xlarge",
      "ml.m4.xlarge",
      "ml.m5.12xlarge",
      "ml.m5.24xlarge",
      "ml.m5.2xlarge",
      "ml.m5.4xlarge",
      "ml.m5.large",
      "ml.m5.xlarge",
      "ml.m6i.12xlarge",
      "ml.m6i.16xlarge",
      "ml.m6i.24xlarge",
      "ml.m6i.2xlarge",
      "ml.m6i.32xlarge",
      "ml.m6i.4xlarge",
      "ml.m6i.8xlarge",
      "ml.m6i.large",
      "ml.m6i.xlarge",
      "ml.m7i.12xlarge",
      "ml.m7i.16xlarge",
      "ml.m7i.24xlarge",
      "ml.m7i.2xlarge",
      "ml.m7i.48xlarge",
      "ml.m7i.4xlarge",
      "ml.m7i.8xlarge",
      "ml.m7i.large",
      "ml.m7i.xlarge",
      "ml.p2.16xlarge",
      "ml.p2.8xlarge",
      "ml.p2.xlarge",
      "ml.p3.16xlarge",
      "ml.p3.2xlarge",
      "ml.p3.8xlarge",
      "ml.p5.4xlarge",
      "ml.r5.12xlarge",
      "ml.r5.16xlarge",
      "ml.r5.24xlarge",
      "ml.r5.2xlarge",
      "ml.r5.4xlarge",
      "ml.r5.8xlarge",
      "ml.r5.large",
      "ml.r5.xlarge",
      "ml.r5d.12xlarge",
      "ml.r5d.16xlarge",
      "ml.r5d.24xlarge",
      "ml.r5d.2xlarge",
      "ml.r5d.4xlarge",
      "ml.r5d.8xlarge",
      "ml.r5d.large",
      "ml.r5d.xlarge",
      "ml.r7i.12xlarge",
      "ml.r7i.16xlarge",
      "ml.r7i.24xlarge",
      "ml.r7i.2xlarge",
      "ml.r7i.48xlarge",
      "ml.r7i.4xlarge",
      "ml.r7i.8xlarge",
      "ml.r7i.large",
      "ml.r7i.xlarge",
      "ml.t3.2xlarge",
      "ml.t3.large",
      "ml.t3.medium",
      "ml.t3.xlarge"
     ],
     "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"
  },
  "ContainerArgument": {
   "additionalProperties": false,
   "maxLength": 256,
   "minLength": 1,
   "type": "string"
  },
  "Csv": {
   "properties": {
    "Header": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "DataAnalysisTimeString": {
   "maxLength": 15,
   "minLength": 1,
   "pattern": "^.?P.*",
   "type": "string"
  },
  "DatasetFormat": {
   "properties": {
    "Csv": {
     "$ref": "#/definitions/Csv"
    },
    "Json": {
     "$ref": "#/definitions/Json"
    },
    "Parquet": {
     "$ref": "#/definitions/Parquet"
    }
   },
   "type": "object"
  },
  "EndpointInput": {
   "additionalProperties": false,
   "properties": {
    "EndpointName": {
     "$ref": "#/definitions/EndpointName"
    },
    "ExcludeFeaturesAttribute": {
     "maxLength": 100,
     "minLength": 0,
     "type": "string"
    },
    "LocalPath": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": ".*",
     "type": "string"
    },
    "S3DataDistributionType": {
     "enum": [
      "FullyReplicated",
      "ShardedByS3Key"
     ],
     "type": "string"
    },
    "S3InputMode": {
     "enum": [
      "Pipe",
      "File"
     ],
     "type": "string"
    }
   },
   "required": [
    "EndpointName",
    "LocalPath"
   ],
   "type": "object"
  },
  "EndpointName": {
   "maxLength": 63,
   "minLength": 0,
   "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*",
   "type": "string"
  },
  "Json": {
   "properties": {
    "Line": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "MonitoringAppSpecification": {
   "additionalProperties": false,
   "properties": {
    "ContainerArguments": {
     "items": {
      "$ref": "#/definitions/ContainerArgument"
     },
     "maxItems": 50,
     "minItems": 1,
     "type": "array"
    },
    "ContainerEntrypoint": {
     "items": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    },
    "ImageUri": {
     "maxLength": 255,
     "minLength": 0,
     "pattern": ".*",
     "type": "string"
    },
    "PostAnalyticsProcessorSourceUri": {
     "$ref": "#/definitions/S3Uri"
    },
    "RecordPreprocessorSourceUri": {
     "$ref": "#/definitions/S3Uri"
    }
   },
   "required": [
    "ImageUri"
   ],
   "type": "object"
  },
  "MonitoringExecutionSummary": {
   "properties": {
    "CreationTime": {
     "type": "string"
    },
    "EndpointName": {
     "$ref": "#/definitions/EndpointName"
    },
    "FailureReason": {
     "maxLength": 1024,
     "type": "string"
    },
    "LastModifiedTime": {
     "type": "string"
    },
    "MonitoringExecutionStatus": {
     "enum": [
      "Pending",
      "Completed",
      "CompletedWithViolations",
      "InProgress",
      "Failed",
      "Stopping",
      "Stopped"
     ],
     "type": "string"
    },
    "MonitoringScheduleName": {
     "$ref": "#/definitions/MonitoringScheduleName"
    },
    "ProcessingJobArn": {
     "maxLength": 256,
     "pattern": "aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:processing-job/.*",
     "type": "string"
    },
    "ScheduledTime": {
     "type": "string"
    }
   },
   "required": [
    "CreationTime",
    "LastModifiedTime",
    "MonitoringExecutionStatus",
    "MonitoringScheduleName",
    "ScheduledTime"
   ],
   "type": "object"
  },
  "MonitoringInput": {
   "additionalProperties": false,
   "properties": {
    "BatchTransformInput": {
     "$ref": "#/definitions/BatchTransformInput"
    },
    "EndpointInput": {
     "$ref": "#/definitions/EndpointInput"
    }
   },
   "type": "object"
  },
  "MonitoringInputs": {
   "additionalProperties": false,
   "items": {
    "$ref": "#/definitions/MonitoringInput"
   },
   "maxItems": 1,
   "minItems": 1,
   "type": "array"
  },
  "MonitoringJobDefinition": {
   "additionalProperties": false,
   "properties": {
    "BaselineConfig": {
     "$ref": "#/definitions/BaselineConfig"
    },
    "Environment": {
     "patternProperties": {
      "[\\S\\s]*": {
       "maxLength": 256,
       "type": "string"
      },
      "[a-zA-Z_][a-zA-Z0-9_]*": {
       "maxLength": 256,
       "minLength": 1,
       "type": "string"
      }
     },
     "type": "object"
    },
    "MonitoringAppSpecification": {
     "$ref": "#/definitions/MonitoringAppSpecification"
    },
    "MonitoringInputs": {
     "$ref": "#/definitions/MonitoringInputs"
    },
    "MonitoringOutputConfig": {
     "$ref": "#/definitions/MonitoringOutputConfig"
    },
    "MonitoringResources": {
     "$ref": "#/definitions/MonitoringResources"
    },
    "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"
    }
   },
   "required": [
    "MonitoringAppSpecification",
    "MonitoringInputs",
    "MonitoringOutputConfig",
    "MonitoringResources",
    "RoleArn"
   ],
   "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"
  },
  "MonitoringScheduleConfig": {
   "additionalProperties": false,
   "properties": {
    "MonitoringJobDefinition": {
     "$ref": "#/definitions/MonitoringJobDefinition"
    },
    "MonitoringJobDefinitionName": {
     "maxLength": 63,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
     "type": "string"
    },
    "MonitoringType": {
     "$ref": "#/definitions/MonitoringType"
    },
    "ScheduleConfig": {
     "$ref": "#/definitions/ScheduleConfig"
    }
   },
   "type": "object"
  },
  "MonitoringScheduleName": {
   "maxLength": 63,
   "minLength": 1,
   "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
   "type": "string"
  },
  "MonitoringType": {
   "enum": [
    "DataQuality",
    "ModelQuality",
    "ModelBias",
    "ModelExplainability"
   ],
   "type": "string"
  },
  "NetworkConfig": {
   "additionalProperties": false,
   "properties": {
    "EnableInterContainerTrafficEncryption": {
     "type": "boolean"
    },
    "EnableNetworkIsolation": {
     "type": "boolean"
    },
    "VpcConfig": {
     "$ref": "#/definitions/VpcConfig"
    }
   },
   "type": "object"
  },
  "Parquet": {
   "type": "boolean"
  },
  "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"
  },
  "ScheduleConfig": {
   "additionalProperties": false,
   "properties": {
    "DataAnalysisEndTime": {
     "$ref": "#/definitions/DataAnalysisTimeString"
    },
    "DataAnalysisStartTime": {
     "$ref": "#/definitions/DataAnalysisTimeString"
    },
    "ScheduleExpression": {
     "maxLength": 256,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "ScheduleExpression"
   ],
   "type": "object"
  },
  "StatisticsResource": {
   "additionalProperties": false,
   "properties": {
    "S3Uri": {
     "$ref": "#/definitions/S3Uri"
    }
   },
   "type": "object"
  },
  "StoppingCondition": {
   "additionalProperties": false,
   "properties": {
    "MaxRuntimeInSeconds": {
     "maximum": 86400,
     "minimum": 1,
     "type": "integer"
    }
   },
   "required": [
    "MaxRuntimeInSeconds"
   ],
   "type": "object"
  },
  "Tag": {
   "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/MonitoringScheduleArn"
 ],
 "properties": {
  "CreationTime": {
   "type": "string"
  },
  "EndpointName": {
   "$ref": "#/definitions/EndpointName"
  },
  "FailureReason": {
   "maxLength": 1024,
   "minLength": 1,
   "type": "string"
  },
  "LastModifiedTime": {
   "type": "string"
  },
  "LastMonitoringExecutionSummary": {
   "$ref": "#/definitions/MonitoringExecutionSummary"
  },
  "MonitoringScheduleArn": {
   "maxLength": 256,
   "minLength": 1,
   "type": "string"
  },
  "MonitoringScheduleConfig": {
   "$ref": "#/definitions/MonitoringScheduleConfig"
  },
  "MonitoringScheduleName": {
   "$ref": "#/definitions/MonitoringScheduleName"
  },
  "MonitoringScheduleStatus": {
   "enum": [
    "Pending",
    "Failed",
    "Scheduled",
    "Stopped"
   ],
   "type": "string"
  },
  "Tags": {
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "minItems": 0,
   "type": "array"
  }
 },
 "readOnlyProperties": [
  "/properties/MonitoringScheduleArn",
  "/properties/CreationTime",
  "/properties/LastModifiedTime"
 ],
 "required": [
  "MonitoringScheduleConfig",
  "MonitoringScheduleName"
 ],
 "typeName": "AWS::SageMaker::MonitoringSchedule"
}
