{
  "typeName" : "AWS::Logs::Destination",
  "description" : "The AWS::Logs::Destination resource specifies a CloudWatch Logs destination. A destination encapsulates a physical resource (such as an Amazon Kinesis data stream) and enables you to subscribe that resource to a stream of log events.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-logs.git",
  "definitions" : {
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., :, /, =, +, - and @.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., :, /, =, +, - and @.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ]
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "logs:TagResource", "logs:UntagResource", "logs:ListTagsForResource" ]
  },
  "properties" : {
    "Arn" : {
      "type" : "string"
    },
    "Tags" : {
      "description" : "An array of key-value pairs to apply to this resource.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "DestinationName" : {
      "description" : "The name of the destination resource",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 512,
      "pattern" : "^[^:*]{1,512}$"
    },
    "DestinationPolicy" : {
      "description" : "An IAM policy document that governs which AWS accounts can create subscription filters against this destination.",
      "type" : "string",
      "minLength" : 1
    },
    "RoleArn" : {
      "description" : "The ARN of an IAM role that permits CloudWatch Logs to send data to the specified AWS resource",
      "type" : "string",
      "minLength" : 1
    },
    "TargetArn" : {
      "description" : "The ARN of the physical target where the log events are delivered (for example, a Kinesis stream)",
      "type" : "string",
      "minLength" : 1
    }
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "logs:PutDestination", "logs:PutDestinationPolicy", "logs:DescribeDestinations", "logs:TagResource", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "logs:DescribeDestinations", "logs:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "logs:PutDestination", "logs:PutDestinationPolicy", "logs:DescribeDestinations", "logs:TagResource", "logs:UntagResource", "logs:ListTagsForResource", "iam:PassRole" ]
    },
    "delete" : {
      "permissions" : [ "logs:DeleteDestination" ]
    },
    "list" : {
      "permissions" : [ "logs:DescribeDestinations", "logs:ListTagsForResource" ]
    }
  },
  "required" : [ "DestinationName", "TargetArn", "RoleArn" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/DestinationName" ],
  "primaryIdentifier" : [ "/properties/DestinationName" ],
  "additionalProperties" : false
}