{
  "typeName" : "AWS::IoT::TopicRuleDestination",
  "description" : "Resource Type definition for AWS::IoT::TopicRuleDestination",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "definitions" : {
    "TopicRuleDestinationStatus" : {
      "type" : "string",
      "enum" : [ "ENABLED", "IN_PROGRESS", "DISABLED" ]
    },
    "HttpUrlDestinationSummary" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ConfirmationUrl" : {
          "type" : "string"
        }
      }
    },
    "VpcDestinationProperties" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "SubnetIds" : {
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "type" : "string"
          }
        },
        "SecurityGroups" : {
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "type" : "string"
          }
        },
        "VpcId" : {
          "type" : "string"
        },
        "RoleArn" : {
          "type" : "string"
        }
      }
    }
  },
  "properties" : {
    "Arn" : {
      "description" : "Amazon Resource Name (ARN).",
      "type" : "string"
    },
    "Status" : {
      "description" : "The status of the TopicRuleDestination.",
      "$ref" : "#/definitions/TopicRuleDestinationStatus"
    },
    "HttpUrlProperties" : {
      "description" : "HTTP URL destination properties.",
      "$ref" : "#/definitions/HttpUrlDestinationSummary"
    },
    "StatusReason" : {
      "description" : "The reasoning for the current status of the TopicRuleDestination.",
      "type" : "string"
    },
    "VpcProperties" : {
      "description" : "VPC destination properties.",
      "$ref" : "#/definitions/VpcDestinationProperties"
    }
  },
  "additionalProperties" : false,
  "readOnlyProperties" : [ "/properties/Arn", "/properties/StatusReason" ],
  "createOnlyProperties" : [ "/properties/HttpUrlProperties", "/properties/VpcProperties" ],
  "primaryIdentifier" : [ "/properties/Arn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "iot:CreateTopicRuleDestination", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "iot:GetTopicRuleDestination" ]
    },
    "update" : {
      "permissions" : [ "iot:UpdateTopicRuleDestination" ]
    },
    "delete" : {
      "permissions" : [ "iot:DeleteTopicRuleDestination" ]
    },
    "list" : {
      "permissions" : [ "iot:ListTopicRuleDestinations" ]
    }
  }
}