{
  "typeName" : "AWS::Connect::UserHierarchyGroup",
  "description" : "Resource Type definition for AWS::Connect::UserHierarchyGroup",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect",
  "definitions" : {
    "UserHierarchyGroupArn" : {
      "description" : "The Amazon Resource Name (ARN) for the user hierarchy group.",
      "type" : "string",
      "pattern" : "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/agent-group/[-a-zA-Z0-9]*$"
    }
  },
  "properties" : {
    "InstanceArn" : {
      "description" : "The identifier of the Amazon Connect instance.",
      "type" : "string",
      "pattern" : "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$"
    },
    "UserHierarchyGroupArn" : {
      "description" : "The Amazon Resource Name (ARN) for the user hierarchy group.",
      "$ref" : "#/definitions/UserHierarchyGroupArn"
    },
    "ParentGroupArn" : {
      "description" : "The Amazon Resource Name (ARN) for the parent user hierarchy group.",
      "$ref" : "#/definitions/UserHierarchyGroupArn"
    },
    "Name" : {
      "description" : "The name of the user hierarchy group.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    }
  },
  "required" : [ "Name", "InstanceArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "connect:CreateUserHierarchyGroup" ]
    },
    "read" : {
      "permissions" : [ "connect:DescribeUserHierarchyGroup" ]
    },
    "delete" : {
      "permissions" : [ "connect:DeleteUserHierarchyGroup" ]
    },
    "update" : {
      "permissions" : [ "connect:UpdateUserHierarchyGroupName" ]
    }
  },
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/UserHierarchyGroupArn" ],
  "readOnlyProperties" : [ "/properties/UserHierarchyGroupArn" ],
  "createOnlyProperties" : [ "/properties/ParentGroupArn" ]
}