{
  "typeName" : "AWS::Cognito::UserPoolResourceServer",
  "description" : "Resource Type definition for AWS::Cognito::UserPoolResourceServer",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "tagging" : {
    "taggable" : false,
    "tagOnCreate" : false,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : false
  },
  "definitions" : {
    "ResourceServerScopeType" : {
      "type" : "object",
      "properties" : {
        "ScopeDescription" : {
          "type" : "string"
        },
        "ScopeName" : {
          "type" : "string"
        }
      },
      "required" : [ "ScopeDescription", "ScopeName" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "UserPoolId" : {
      "type" : "string"
    },
    "Identifier" : {
      "type" : "string"
    },
    "Name" : {
      "type" : "string"
    },
    "Scopes" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/ResourceServerScopeType"
      }
    }
  },
  "additionalProperties" : false,
  "required" : [ "UserPoolId", "Identifier", "Name" ],
  "createOnlyProperties" : [ "/properties/UserPoolId", "/properties/Identifier" ],
  "primaryIdentifier" : [ "/properties/UserPoolId", "/properties/Identifier" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "cognito-idp:CreateResourceServer", "cognito-idp:DescribeResourceServer" ],
      "timeoutInMinutes" : 2
    },
    "read" : {
      "permissions" : [ "cognito-idp:DescribeResourceServer" ]
    },
    "update" : {
      "permissions" : [ "cognito-idp:UpdateResourceServer" ],
      "timeoutInMinutes" : 2
    },
    "delete" : {
      "permissions" : [ "cognito-idp:DeleteResourceServer" ],
      "timeoutInMinutes" : 2
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "UserPoolId" : {
            "$ref" : "resource-schema.json#/properties/UserPoolId"
          }
        },
        "required" : [ "UserPoolId" ]
      },
      "permissions" : [ "cognito-idp:ListResourceServers" ]
    }
  }
}