{
  "typeName" : "AWS::SageMaker::Project",
  "description" : "Resource Type definition for AWS::SageMaker::Project",
  "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" : 128,
          "pattern" : "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
        },
        "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 -. ",
          "maxLength" : 256,
          "pattern" : "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    },
    "ProjectDescription" : {
      "type" : "string",
      "description" : "The description of the project.",
      "pattern" : ".*",
      "maxLength" : 1024
    },
    "ProjectId" : {
      "type" : "string",
      "description" : "Project Id.",
      "pattern" : "^[a-zA-Z0-9](-*[a-zA-Z0-9])*",
      "maxLength" : 20
    },
    "ProvisionedProductStatusMessage" : {
      "type" : "string",
      "description" : "Provisioned Product Status Message"
    },
    "ProjectName" : {
      "type" : "string",
      "description" : "The name of the project.",
      "pattern" : "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
      "minLength" : 1,
      "maxLength" : 32
    },
    "ProjectArn" : {
      "description" : "The Amazon Resource Name (ARN) of the Project.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048,
      "pattern" : "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:project.*"
    },
    "ProductId" : {
      "type" : "string",
      "description" : "Service Catalog product identifier.",
      "pattern" : "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
      "maxLength" : 100
    },
    "ProvisioningArtifactId" : {
      "type" : "string",
      "description" : "The identifier of the provisioning artifact (also known as a version).",
      "pattern" : "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
      "maxLength" : 100
    },
    "PathId" : {
      "type" : "string",
      "description" : "The path identifier of the product.",
      "pattern" : "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
      "maxLength" : 100
    },
    "ProvisioningParameter" : {
      "description" : "Information about a parameter used to provision a product.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The parameter key.",
          "minLength" : 1,
          "maxLength" : 1000,
          "pattern" : ".*"
        },
        "Value" : {
          "type" : "string",
          "description" : "The parameter value.",
          "maxLength" : 4096,
          "pattern" : ".*"
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "Tags" : {
      "type" : "array",
      "maxItems" : 40,
      "description" : "An array of key-value pairs to apply to this resource.",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "ProjectArn" : {
      "$ref" : "#/definitions/ProjectArn"
    },
    "ProjectId" : {
      "$ref" : "#/definitions/ProjectId"
    },
    "ProjectName" : {
      "$ref" : "#/definitions/ProjectName"
    },
    "ProjectDescription" : {
      "$ref" : "#/definitions/ProjectDescription"
    },
    "CreationTime" : {
      "description" : "The time at which the project was created.",
      "type" : "string"
    },
    "ServiceCatalogProvisioningDetails" : {
      "description" : "Input ServiceCatalog Provisioning Details",
      "type" : "object",
      "properties" : {
        "ProductId" : {
          "$ref" : "#/definitions/ProductId"
        },
        "ProvisioningArtifactId" : {
          "$ref" : "#/definitions/ProvisioningArtifactId"
        },
        "PathId" : {
          "$ref" : "#/definitions/PathId"
        },
        "ProvisioningParameters" : {
          "type" : "array",
          "description" : "Parameters specified by the administrator that are required for provisioning the product.",
          "items" : {
            "$ref" : "#/definitions/ProvisioningParameter"
          }
        }
      },
      "required" : [ "ProductId" ],
      "additionalProperties" : false
    },
    "ServiceCatalogProvisionedProductDetails" : {
      "description" : "Provisioned ServiceCatalog  Details",
      "type" : "object",
      "properties" : {
        "ProvisionedProductId" : {
          "$ref" : "#/definitions/ProvisioningArtifactId"
        },
        "ProvisionedProductStatusMessage" : {
          "$ref" : "#/definitions/ProvisionedProductStatusMessage"
        }
      },
      "additionalProperties" : false
    },
    "ProjectStatus" : {
      "description" : "The status of a project.",
      "type" : "string",
      "enum" : [ "Pending", "CreateInProgress", "CreateCompleted", "CreateFailed", "DeleteInProgress", "DeleteFailed", "DeleteCompleted" ]
    }
  },
  "additionalProperties" : false,
  "required" : [ "ProjectName", "ServiceCatalogProvisioningDetails" ],
  "readOnlyProperties" : [ "/properties/ProjectArn", "/properties/CreationTime", "/properties/ProjectId", "/properties/ServiceCatalogProvisionedProductDetails", "/properties/ProjectStatus" ],
  "createOnlyProperties" : [ "/properties/ProjectName", "/properties/ProjectDescription", "/properties/ServiceCatalogProvisioningDetails", "/properties/Tags" ],
  "primaryIdentifier" : [ "/properties/ProjectArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "sagemaker:CreateProject", "sagemaker:DescribeProject", "servicecatalog:DescribeProduct", "servicecatalog:DescribeProvisioningArtifact", "servicecatalog:ProvisionProduct", "servicecatalog:DescribeProvisionedProduct", "servicecatalog:TerminateProvisionedProduct" ]
    },
    "read" : {
      "permissions" : [ "sagemaker:DescribeProject", "sagemaker:ListTags" ]
    },
    "update" : {
      "permissions" : [ "sagemaker:DescribeProject", "sagemaker:ListTags", "sagemaker:AddTags", "sagemaker:DeleteTags" ]
    },
    "delete" : {
      "permissions" : [ "sagemaker:DeleteProject" ]
    },
    "list" : {
      "permissions" : [ "sagemaker:ListProjects" ]
    }
  }
}