{
  "typeName" : "AWS::Deadline::Monitor",
  "description" : "Resource Type definition for AWS::Deadline::Monitor",
  "definitions" : {
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ",
          "minLength" : 1,
          "maxLength" : 127
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ",
          "minLength" : 1,
          "maxLength" : 255
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "DisplayName" : {
      "type" : "string",
      "maxLength" : 100,
      "minLength" : 1
    },
    "IdentityCenterApplicationArn" : {
      "type" : "string"
    },
    "IdentityCenterInstanceArn" : {
      "type" : "string",
      "pattern" : "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}$"
    },
    "IdentityCenterRegion" : {
      "type" : "string",
      "description" : "The AWS region where IAM Identity Center is enabled. Required when Identity Center is in a different region than the monitor.",
      "minLength" : 1,
      "maxLength" : 25,
      "pattern" : "^[a-z0-9-]+$"
    },
    "MonitorId" : {
      "type" : "string",
      "pattern" : "^monitor-[0-9a-f]{32}$"
    },
    "RoleArn" : {
      "type" : "string",
      "pattern" : "^arn:(aws[a-zA-Z-]*):iam::\\d{12}:role(/[!-.0-~]+)*/[\\w+=,.@-]+$"
    },
    "Subdomain" : {
      "type" : "string",
      "pattern" : "^[a-z0-9-]{1,100}$"
    },
    "Tags" : {
      "type" : "array",
      "maxItems" : 50,
      "description" : "An array of key-value pairs to apply to this resource.",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "insertionOrder" : false,
      "uniqueItems" : true
    },
    "Url" : {
      "type" : "string"
    },
    "Arn" : {
      "type" : "string",
      "pattern" : "^arn:(aws[a-zA-Z-]*):deadline:[a-z0-9-]+:[0-9]+:monitor/monitor-[0-9a-z]{32}$"
    }
  },
  "required" : [ "DisplayName", "IdentityCenterInstanceArn", "RoleArn", "Subdomain" ],
  "readOnlyProperties" : [ "/properties/IdentityCenterApplicationArn", "/properties/MonitorId", "/properties/Url", "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/IdentityCenterInstanceArn", "/properties/IdentityCenterRegion" ],
  "primaryIdentifier" : [ "/properties/Arn" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "deadline:TagResource", "deadline:UntagResource", "deadline:ListTagsForResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "deadline:CreateMonitor", "deadline:GetMonitor", "deadline:TagResource", "deadline:ListTagsForResource", "iam:PassRole", "kms:CreateGrant", "sso:CreateApplication", "sso:DeleteApplication", "sso:PutApplicationAssignmentConfiguration", "sso:PutApplicationAuthenticationMethod", "sso:PutApplicationGrant" ]
    },
    "read" : {
      "permissions" : [ "deadline:GetMonitor", "deadline:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "deadline:GetMonitor", "deadline:TagResource", "deadline:UntagResource", "deadline:ListTagsForResource", "deadline:UpdateMonitor", "iam:PassRole", "kms:CreateGrant", "sso:PutApplicationGrant", "sso:UpdateApplication" ]
    },
    "delete" : {
      "permissions" : [ "deadline:DeleteMonitor", "deadline:GetMonitor", "sso:DeleteApplication" ]
    },
    "list" : {
      "permissions" : [ "deadline:ListMonitors" ]
    }
  },
  "additionalProperties" : false
}