{
  "typeName" : "AWS::LicenseManager::Grant",
  "description" : "An example resource schema demonstrating some basic constructs and validation rules.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "definitions" : {
    "Arn" : {
      "type" : "string",
      "maxLength" : 2048
    },
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag."
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag."
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "GrantArn" : {
      "description" : "Arn of the grant.",
      "$ref" : "#/definitions/Arn"
    },
    "GrantName" : {
      "description" : "Name for the created Grant.",
      "type" : "string"
    },
    "LicenseArn" : {
      "description" : "License Arn for the grant.",
      "$ref" : "#/definitions/Arn"
    },
    "HomeRegion" : {
      "description" : "Home region for the created grant.",
      "type" : "string"
    },
    "Version" : {
      "description" : "The version of the grant.",
      "type" : "string"
    },
    "AllowedOperations" : {
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "type" : "string"
      }
    },
    "Principals" : {
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "$ref" : "#/definitions/Arn"
      }
    },
    "Status" : {
      "type" : "string"
    },
    "Tags" : {
      "description" : "A list of tags to attach.",
      "type" : "array",
      "uniqueItems" : false,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "additionalProperties" : false,
  "required" : [ ],
  "readOnlyProperties" : [ "/properties/GrantArn", "/properties/Version" ],
  "writeOnlyProperties" : [ "/properties/Principals", "/properties/AllowedOperations", "/properties/Status" ],
  "primaryIdentifier" : [ "/properties/GrantArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "license-manager:CreateGrant", "license-manager:CreateGrantVersion", "license-manager:GetGrant", "license-manager:TagResource", "license-manager:ListTagsForResource" ]
    },
    "read" : {
      "permissions" : [ "license-manager:GetGrant", "license-manager:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "license-manager:CreateGrantVersion", "license-manager:GetGrant", "license-manager:TagResource", "license-manager:UntagResource", "license-manager:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "license-manager:DeleteGrant", "license-manager:GetGrant", "license-manager:ListTagsForResource" ]
    },
    "list" : {
      "permissions" : [ "license-manager:ListDistributedGrants" ]
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "license-manager:TagResource", "license-manager:UntagResource", "license-manager:ListTagsForResource" ]
  }
}