{
  "typeName" : "AWS::MSK::ServerlessCluster",
  "description" : "Resource Type definition for AWS::MSK::ServerlessCluster",
  "additionalProperties" : false,
  "properties" : {
    "Arn" : {
      "type" : "string"
    },
    "ClusterName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 64
    },
    "VpcConfigs" : {
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/VpcConfig"
      }
    },
    "ClientAuthentication" : {
      "$ref" : "#/definitions/ClientAuthentication"
    },
    "Tags" : {
      "type" : "object",
      "description" : "A key-value pair to associate with a resource.",
      "patternProperties" : {
        "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    }
  },
  "definitions" : {
    "VpcConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "SecurityGroups" : {
          "type" : "array",
          "uniqueItems" : true,
          "insertionOrder" : false,
          "items" : {
            "type" : "string"
          }
        },
        "SubnetIds" : {
          "type" : "array",
          "uniqueItems" : true,
          "insertionOrder" : false,
          "items" : {
            "type" : "string"
          }
        }
      },
      "required" : [ "SubnetIds" ]
    },
    "ClientAuthentication" : {
      "type" : "object",
      "properties" : {
        "Sasl" : {
          "$ref" : "#/definitions/Sasl"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Sasl" ]
    },
    "Sasl" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Iam" : {
          "$ref" : "#/definitions/Iam"
        }
      },
      "required" : [ "Iam" ]
    },
    "Iam" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Enabled" : {
          "type" : "boolean"
        }
      },
      "required" : [ "Enabled" ]
    }
  },
  "required" : [ "ClusterName", "VpcConfigs", "ClientAuthentication" ],
  "createOnlyProperties" : [ "/properties/ClusterName", "/properties/VpcConfigs", "/properties/ClientAuthentication", "/properties/Tags" ],
  "primaryIdentifier" : [ "/properties/Arn" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags"
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "kafka:CreateClusterV2", "kafka:TagResource", "ec2:CreateVpcEndpoint", "ec2:CreateTags", "ec2:DescribeVpcAttribute", "ec2:DescribeSubnets", "ec2:DescribeVpcEndpoints", "ec2:DescribeVpcs", "ec2:DescribeSecurityGroups" ],
      "timeoutInMinutes" : 120
    },
    "read" : {
      "permissions" : [ "kafka:DescribeClusterV2" ]
    },
    "delete" : {
      "permissions" : [ "kafka:DeleteCluster", "ec2:DeleteVpcEndpoints" ],
      "timeoutInMinutes" : 75
    },
    "list" : {
      "permissions" : [ "kafka:ListClustersV2" ]
    }
  }
}