{
  "typeName" : "AWS::IoTWireless::Destination",
  "description" : "Destination's resource schema demonstrating some basic constructs and validation rules.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "definitions" : {
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 127
        },
        "Value" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 255
        }
      },
      "additionalProperties" : false
    }
  },
  "properties" : {
    "Name" : {
      "description" : "Unique name of destination",
      "type" : "string",
      "pattern" : "[a-zA-Z0-9:_-]+",
      "maxLength" : 128
    },
    "Expression" : {
      "description" : "Destination expression",
      "type" : "string"
    },
    "ExpressionType" : {
      "description" : "Must be RuleName",
      "type" : "string",
      "enum" : [ "RuleName", "MqttTopic" ]
    },
    "Description" : {
      "description" : "Destination description",
      "type" : "string",
      "maxLength" : 2048
    },
    "Tags" : {
      "description" : "A list of key-value pairs that contain metadata for the destination.",
      "type" : "array",
      "uniqueItems" : true,
      "maxItems" : 200,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "RoleArn" : {
      "description" : "AWS role ARN that grants access",
      "type" : "string",
      "minLength" : 20,
      "maxLength" : 2048
    },
    "Arn" : {
      "description" : "Destination arn. Returned after successful create.",
      "type" : "string"
    }
  },
  "additionalProperties" : false,
  "required" : [ "Name", "Expression", "ExpressionType", "RoleArn" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/Name" ],
  "primaryIdentifier" : [ "/properties/Name" ],
  "taggable" : true,
  "handlers" : {
    "create" : {
      "permissions" : [ "iotwireless:CreateDestination", "iotwireless:TagResource", "iotwireless:ListTagsForResource" ]
    },
    "read" : {
      "permissions" : [ "iotwireless:GetDestination", "iotwireless:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "iotwireless:UpdateDestination", "iotwireless:UntagResource", "iotwireless:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "iotwireless:DeleteDestination" ]
    },
    "list" : {
      "permissions" : [ "iotwireless:ListDestinations", "iotwireless:ListTagsForResource" ]
    }
  }
}