{
  "typeName" : "AWS::DataZone::Project",
  "description" : "Amazon DataZone projects are business use case–based groupings of people, assets (data), and tools used to simplify access to the AWS analytics.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-datazone",
  "definitions" : {
    "Member" : {
      "type" : "object",
      "description" : "The member of the project.",
      "properties" : {
        "UserIdentifier" : {
          "type" : "string"
        },
        "GroupIdentifier" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "UserDesignation" : {
      "type" : "string",
      "enum" : [ "PROJECT_OWNER", "PROJECT_CONTRIBUTOR" ]
    },
    "ProjectMembershipAssignment" : {
      "type" : "object",
      "description" : "The project membership assignment.",
      "properties" : {
        "Member" : {
          "$ref" : "#/definitions/Member"
        },
        "Designation" : {
          "$ref" : "#/definitions/UserDesignation"
        }
      },
      "required" : [ "Member", "Designation" ],
      "additionalProperties" : false
    },
    "EnvironmentConfigurationUserParameter" : {
      "type" : "object",
      "properties" : {
        "EnvironmentId" : {
          "type" : "string",
          "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
        },
        "EnvironmentConfigurationName" : {
          "type" : "string",
          "maxLength" : 64,
          "minLength" : 1,
          "pattern" : "^[\\w -]+$"
        },
        "EnvironmentParameters" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/EnvironmentParameter"
          }
        }
      },
      "additionalProperties" : false
    },
    "EnvironmentDeploymentDetails" : {
      "type" : "object",
      "properties" : {
        "OverallDeploymentStatus" : {
          "$ref" : "#/definitions/OverallDeploymentStatus"
        },
        "EnvironmentFailureReasons" : {
          "$ref" : "#/definitions/EnvironmentFailureReasons"
        }
      },
      "additionalProperties" : false
    },
    "EnvironmentError" : {
      "type" : "object",
      "properties" : {
        "Code" : {
          "type" : "string"
        },
        "Message" : {
          "type" : "string"
        }
      },
      "required" : [ "Message" ],
      "additionalProperties" : false
    },
    "EnvironmentFailureReasons" : {
      "type" : "object",
      "patternProperties" : {
        ".+" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/EnvironmentError"
          }
        }
      },
      "additionalProperties" : false
    },
    "EnvironmentParameter" : {
      "type" : "object",
      "properties" : {
        "Name" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "EnvironmentResolvedAccount" : {
      "type" : "object",
      "properties" : {
        "AwsAccountId" : {
          "type" : "string",
          "pattern" : "^\\d{12}$"
        },
        "RegionName" : {
          "type" : "string",
          "pattern" : "^[a-z]{2}-[a-z]{4,10}-\\d$"
        },
        "SourceAccountPoolId" : {
          "type" : "string",
          "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
        }
      },
      "required" : [ "AwsAccountId", "RegionName", "SourceAccountPoolId" ],
      "additionalProperties" : false
    },
    "OverallDeploymentStatus" : {
      "type" : "string",
      "enum" : [ "PENDING_DEPLOYMENT", "IN_PROGRESS", "SUCCESSFUL", "FAILED_VALIDATION", "FAILED_DEPLOYMENT" ]
    },
    "ProjectDeletionError" : {
      "type" : "object",
      "description" : "Error that occurred during project deletion",
      "properties" : {
        "Code" : {
          "type" : "string",
          "description" : "Project Deletion Error Code"
        },
        "Message" : {
          "type" : "string",
          "description" : "Project Deletion Error Message"
        }
      },
      "additionalProperties" : false
    },
    "ProjectStatus" : {
      "type" : "string",
      "enum" : [ "ACTIVE", "MOVING", "DELETING", "DELETE_FAILED", "UPDATING", "UPDATE_FAILED" ]
    },
    "Tags" : {
      "type" : "object",
      "patternProperties" : {
        "^[\\w \\.:/=+@-]+$" : {
          "type" : "string",
          "maxLength" : 256,
          "pattern" : "^[\\w \\.:/=+@-]*$"
        }
      },
      "additionalProperties" : false
    },
    "ResourceTag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "pattern" : "^[\\w \\.:/=+@-]+$",
          "maxLength" : 128,
          "minLength" : 1
        },
        "Value" : {
          "type" : "string",
          "pattern" : "^[\\w \\.:/=+@-]*$",
          "maxLength" : 256,
          "minLength" : 0
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "CreatedAt" : {
      "description" : "The timestamp of when the project was created.",
      "type" : "string",
      "format" : "date-time"
    },
    "CreatedBy" : {
      "description" : "The Amazon DataZone user who created the project.",
      "type" : "string"
    },
    "Description" : {
      "description" : "The description of the Amazon DataZone project.",
      "type" : "string",
      "maxLength" : 2048
    },
    "DomainId" : {
      "description" : "The identifier of the Amazon DataZone domain in which the project was created.",
      "type" : "string",
      "pattern" : "^dzd[-_][a-zA-Z0-9_-]{1,36}$"
    },
    "DomainIdentifier" : {
      "description" : "The ID of the Amazon DataZone domain in which this project is created.",
      "type" : "string",
      "pattern" : "^dzd[-_][a-zA-Z0-9_-]{1,36}$"
    },
    "DomainUnitId" : {
      "description" : "The ID of the domain unit.",
      "type" : "string",
      "pattern" : "^[a-z0-9_\\-]+$"
    },
    "GlossaryTerms" : {
      "description" : "The glossary terms that can be used in this Amazon DataZone project.",
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "type" : "string",
        "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
      },
      "maxItems" : 20,
      "minItems" : 0
    },
    "Id" : {
      "description" : "The ID of the Amazon DataZone project.",
      "type" : "string",
      "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
    },
    "LastUpdatedAt" : {
      "description" : "The timestamp of when the project was last updated.",
      "type" : "string",
      "format" : "date-time"
    },
    "Name" : {
      "description" : "The name of the Amazon DataZone project.",
      "type" : "string",
      "maxLength" : 64,
      "minLength" : 1,
      "pattern" : "^[\\w -]+$"
    },
    "ProjectProfileId" : {
      "description" : "The project profile ID.",
      "type" : "string",
      "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
    },
    "ProjectProfileVersion" : {
      "description" : "The project profile version to which the project should be updated. You can only specify the following string for this parameter: latest.",
      "type" : "string"
    },
    "ProjectStatus" : {
      "description" : "The status of the project.",
      "$ref" : "#/definitions/ProjectStatus"
    },
    "UserParameters" : {
      "description" : "The user parameters of the project.",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/EnvironmentConfigurationUserParameter"
      }
    },
    "ResourceTags" : {
      "description" : "The resource tags of the project.",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/ResourceTag"
      }
    },
    "MembershipAssignments" : {
      "description" : "The project membership assignments.",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/ProjectMembershipAssignment"
      }
    },
    "ProjectCategory" : {
      "description" : "The project category.",
      "type" : "string"
    },
    "ProjectExecutionRole" : {
      "description" : "The project execution role ARN.",
      "type" : "string",
      "pattern" : "^arn:aws[^:]*:iam::\\d{12}:role/[\\w+=,.@/-]+$"
    }
  },
  "required" : [ "DomainIdentifier", "Name" ],
  "readOnlyProperties" : [ "/properties/Id", "/properties/CreatedAt", "/properties/CreatedBy", "/properties/DomainId", "/properties/LastUpdatedAt", "/properties/ProjectStatus" ],
  "writeOnlyProperties" : [ "/properties/DomainIdentifier", "/properties/ProjectProfileVersion", "/properties/ProjectProfileId", "/properties/UserParameters", "/properties/MembershipAssignments", "/properties/ProjectExecutionRole" ],
  "primaryIdentifier" : [ "/properties/DomainId", "/properties/Id" ],
  "createOnlyProperties" : [ "/properties/ProjectProfileId", "/properties/DomainIdentifier", "/properties/MembershipAssignments", "/properties/ProjectCategory", "/properties/ProjectExecutionRole" ],
  "additionalIdentifiers" : [ [ "/properties/DomainIdentifier" ] ],
  "tagging" : {
    "taggable" : false,
    "tagOnCreate" : false,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "datazone:CreateProject", "datazone:GetProject", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "datazone:GetProject" ]
    },
    "update" : {
      "permissions" : [ "datazone:UpdateProject", "datazone:GetProject" ]
    },
    "delete" : {
      "permissions" : [ "datazone:DeleteProject", "datazone:GetProject" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "DomainIdentifier" : {
            "$ref" : "resource-schema.json#/properties/DomainIdentifier"
          }
        },
        "required" : [ "DomainIdentifier" ]
      },
      "permissions" : [ "datazone:ListProjects" ]
    }
  },
  "additionalProperties" : false
}