{
  "typeName" : "AWS::CleanRooms::Collaboration",
  "description" : "Represents a collaboration between AWS accounts that allows for secure data collaboration",
  "documentationUrl" : "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cleanrooms-collaboration.html",
  "definitions" : {
    "AnalyticsEngine" : {
      "type" : "string",
      "enum" : [ "CLEAN_ROOMS_SQL", "SPARK" ]
    },
    "AutoApprovedChangeType" : {
      "type" : "string",
      "enum" : [ "ADD_MEMBER", "GRANT_RECEIVE_RESULTS_ABILITY", "REVOKE_RECEIVE_RESULTS_ABILITY" ]
    },
    "AutoApprovedChangeTypeList" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/AutoApprovedChangeType"
      },
      "uniqueItems" : true
    },
    "CollaborationJobLogStatus" : {
      "type" : "string",
      "enum" : [ "ENABLED", "DISABLED" ]
    },
    "SupportedS3Region" : {
      "type" : "string",
      "enum" : [ "us-west-1", "us-west-2", "us-east-1", "us-east-2", "af-south-1", "ap-east-1", "ap-east-2", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-5", "ap-southeast-4", "ap-southeast-7", "ap-south-1", "ap-northeast-3", "ap-northeast-1", "ap-northeast-2", "ca-central-1", "ca-west-1", "eu-south-1", "eu-west-3", "eu-south-2", "eu-central-2", "eu-central-1", "eu-north-1", "eu-west-1", "eu-west-2", "me-south-1", "me-central-1", "il-central-1", "sa-east-1", "mx-central-1" ]
    },
    "AllowedResultRegions" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/SupportedS3Region"
      },
      "uniqueItems" : true
    },
    "CollaborationQueryLogStatus" : {
      "type" : "string",
      "enum" : [ "ENABLED", "DISABLED" ]
    },
    "DataEncryptionMetadata" : {
      "type" : "object",
      "properties" : {
        "AllowCleartext" : {
          "type" : "boolean"
        },
        "AllowDuplicates" : {
          "type" : "boolean"
        },
        "AllowJoinsOnColumnsWithDifferentNames" : {
          "type" : "boolean"
        },
        "PreserveNulls" : {
          "type" : "boolean"
        }
      },
      "required" : [ "AllowCleartext", "AllowDuplicates", "AllowJoinsOnColumnsWithDifferentNames", "PreserveNulls" ],
      "additionalProperties" : false
    },
    "MemberAbility" : {
      "type" : "string",
      "enum" : [ "CAN_QUERY", "CAN_RUN_JOB", "CAN_RECEIVE_RESULTS" ]
    },
    "MemberAbilities" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/MemberAbility"
      },
      "uniqueItems" : true
    },
    "MLMemberAbilities" : {
      "type" : "object",
      "properties" : {
        "CustomMLMemberAbilities" : {
          "$ref" : "#/definitions/CustomMLMemberAbilities"
        }
      },
      "required" : [ "CustomMLMemberAbilities" ],
      "additionalProperties" : false
    },
    "CustomMLMemberAbility" : {
      "type" : "string",
      "enum" : [ "CAN_RECEIVE_MODEL_OUTPUT", "CAN_RECEIVE_INFERENCE_OUTPUT" ]
    },
    "CustomMLMemberAbilities" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/CustomMLMemberAbility"
      },
      "uniqueItems" : true
    },
    "MemberSpecification" : {
      "type" : "object",
      "properties" : {
        "AccountId" : {
          "type" : "string",
          "maxLength" : 12,
          "minLength" : 12,
          "pattern" : "^\\d+$"
        },
        "MemberAbilities" : {
          "$ref" : "#/definitions/MemberAbilities"
        },
        "MLMemberAbilities" : {
          "$ref" : "#/definitions/MLMemberAbilities"
        },
        "DisplayName" : {
          "$ref" : "#/definitions/Name"
        },
        "PaymentConfiguration" : {
          "$ref" : "#/definitions/PaymentConfiguration"
        }
      },
      "required" : [ "AccountId", "DisplayName" ],
      "additionalProperties" : false
    },
    "MemberStatus" : {
      "type" : "string",
      "enum" : [ "INVITED", "ACTIVE", "LEFT", "REMOVED" ]
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 256
        }
      },
      "required" : [ "Value", "Key" ]
    },
    "Name" : {
      "type" : "string",
      "maxLength" : 100,
      "minLength" : 1,
      "pattern" : "^(?!\\s*$)[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\t]*$"
    },
    "PaymentConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "JobCompute" : {
          "$ref" : "#/definitions/JobComputePaymentConfig"
        },
        "QueryCompute" : {
          "$ref" : "#/definitions/QueryComputePaymentConfig"
        },
        "MachineLearning" : {
          "$ref" : "#/definitions/MLPaymentConfig"
        }
      },
      "required" : [ "QueryCompute" ]
    },
    "JobComputePaymentConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "IsResponsible" : {
          "type" : "boolean"
        }
      },
      "required" : [ "IsResponsible" ]
    },
    "QueryComputePaymentConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "IsResponsible" : {
          "type" : "boolean"
        }
      },
      "required" : [ "IsResponsible" ]
    },
    "MLPaymentConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ModelTraining" : {
          "$ref" : "#/definitions/ModelTrainingPaymentConfig"
        },
        "ModelInference" : {
          "$ref" : "#/definitions/ModelInferencePaymentConfig"
        },
        "SyntheticDataGeneration" : {
          "$ref" : "#/definitions/SyntheticDataGenerationPaymentConfig"
        }
      }
    },
    "ModelTrainingPaymentConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "IsResponsible" : {
          "type" : "boolean"
        }
      },
      "required" : [ "IsResponsible" ]
    },
    "ModelInferencePaymentConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "IsResponsible" : {
          "type" : "boolean"
        }
      },
      "required" : [ "IsResponsible" ]
    },
    "SyntheticDataGenerationPaymentConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "IsResponsible" : {
          "type" : "boolean"
        }
      },
      "required" : [ "IsResponsible" ]
    }
  },
  "properties" : {
    "Arn" : {
      "type" : "string",
      "maxLength" : 100
    },
    "Tags" : {
      "description" : "An arbitrary set of tags (key-value pairs) for this cleanrooms collaboration.",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "uniqueItems" : true,
      "type" : "array"
    },
    "CollaborationIdentifier" : {
      "type" : "string",
      "maxLength" : 36,
      "minLength" : 36,
      "pattern" : "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
    },
    "CreatorDisplayName" : {
      "$ref" : "#/definitions/Name"
    },
    "CreatorMemberAbilities" : {
      "$ref" : "#/definitions/MemberAbilities"
    },
    "CreatorMLMemberAbilities" : {
      "$ref" : "#/definitions/MLMemberAbilities"
    },
    "DataEncryptionMetadata" : {
      "$ref" : "#/definitions/DataEncryptionMetadata"
    },
    "Description" : {
      "type" : "string",
      "maxLength" : 255,
      "minLength" : 1,
      "pattern" : "^(?!\\s*$)[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\t\\r\\n]*$"
    },
    "Members" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/MemberSpecification"
      },
      "maxItems" : 9,
      "minItems" : 0
    },
    "Name" : {
      "type" : "string",
      "maxLength" : 100,
      "minLength" : 1,
      "pattern" : "^(?!\\s*$)[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\t]*$"
    },
    "JobLogStatus" : {
      "$ref" : "#/definitions/CollaborationJobLogStatus"
    },
    "QueryLogStatus" : {
      "$ref" : "#/definitions/CollaborationQueryLogStatus"
    },
    "AnalyticsEngine" : {
      "$ref" : "#/definitions/AnalyticsEngine"
    },
    "CreatorPaymentConfiguration" : {
      "$ref" : "#/definitions/PaymentConfiguration"
    },
    "AutoApprovedChangeTypes" : {
      "$ref" : "#/definitions/AutoApprovedChangeTypeList"
    },
    "AllowedResultRegions" : {
      "$ref" : "#/definitions/AllowedResultRegions"
    },
    "IsMetricsEnabled" : {
      "type" : "boolean"
    }
  },
  "required" : [ "CreatorDisplayName", "Name", "Description", "QueryLogStatus" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/CollaborationIdentifier" ],
  "createOnlyProperties" : [ "/properties/CreatorDisplayName", "/properties/CreatorMemberAbilities", "/properties/CreatorMLMemberAbilities", "/properties/DataEncryptionMetadata", "/properties/JobLogStatus", "/properties/QueryLogStatus", "/properties/Members", "/properties/CreatorPaymentConfiguration", "/properties/AutoApprovedChangeTypes", "/properties/AllowedResultRegions" ],
  "primaryIdentifier" : [ "/properties/CollaborationIdentifier" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "cleanrooms:ListTagsForResource", "cleanrooms:UntagResource", "cleanrooms:TagResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "cleanrooms:CreateCollaboration", "cleanrooms:GetCollaboration", "cleanrooms:ListMembers", "cleanrooms:ListTagsForResource", "cleanrooms:TagResource", "cleanrooms:GetCollaboration", "cleanrooms:ListCollaborations" ]
    },
    "read" : {
      "permissions" : [ "cleanrooms:GetCollaboration", "cleanrooms:ListMembers", "cleanrooms:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "cleanrooms:UpdateCollaboration", "cleanrooms:GetCollaboration", "cleanrooms:ListMembers", "cleanrooms:ListTagsForResource", "cleanrooms:TagResource", "cleanrooms:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "cleanrooms:DeleteCollaboration", "cleanrooms:GetCollaboration", "cleanrooms:ListTagsForResource", "cleanrooms:UntagResource", "cleanrooms:ListMembers", "cleanrooms:ListCollaborations" ]
    },
    "list" : {
      "permissions" : [ "cleanrooms:ListCollaborations" ]
    }
  },
  "additionalProperties" : false
}