{
  "typeName" : "AWS::KinesisVideo::Stream",
  "description" : "Resource Type Definition for AWS::KinesisVideo::Stream",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-kinesisvideo.git",
  "definitions" : {
    "Tag" : {
      "description" : "A key-value pair to associated with the Kinesis Video Stream.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. Specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. The following characters can be used: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. Specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. The following characters can be used: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "Arn" : {
      "description" : "The Amazon Resource Name (ARN) of the Kinesis Video stream.",
      "type" : "string"
    },
    "Name" : {
      "description" : "The name of the Kinesis Video stream.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 256,
      "pattern" : "[a-zA-Z0-9_.-]+"
    },
    "DataRetentionInHours" : {
      "description" : "The number of hours till which Kinesis Video will retain the data in the stream",
      "type" : "integer",
      "minimum" : 0,
      "maximum" : 87600
    },
    "DeviceName" : {
      "description" : "The name of the device that is writing to the stream.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 128,
      "pattern" : "[a-zA-Z0-9_.-]+"
    },
    "KmsKeyId" : {
      "description" : "AWS KMS key ID that Kinesis Video Streams uses to encrypt stream data.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048,
      "pattern" : ".+"
    },
    "MediaType" : {
      "description" : "The media type of the stream. Consumers of the stream can use this information when processing the stream.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 128,
      "pattern" : "[\\w\\-\\.\\+]+/[\\w\\-\\.\\+]+(,[\\w\\-\\.\\+]+/[\\w\\-\\.\\+]+)*"
    },
    "Tags" : {
      "description" : "An array of key-value pairs associated with the Kinesis Video Stream.",
      "type" : "array",
      "uniqueItems" : false,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "minItems" : 1,
      "maxItems" : 50
    }
  },
  "additionalProperties" : false,
  "required" : [ ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/Name" ],
  "primaryIdentifier" : [ "/properties/Name" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "kinesisvideo:DescribeStream", "kinesisvideo:CreateStream" ]
    },
    "read" : {
      "permissions" : [ "kinesisvideo:DescribeStream" ]
    },
    "update" : {
      "permissions" : [ "kinesisvideo:DescribeStream", "kinesisvideo:UpdateStream", "kinesisvideo:UpdateDataRetention" ]
    },
    "delete" : {
      "permissions" : [ "kinesisvideo:DescribeStream", "kinesisvideo:DeleteStream" ]
    }
  }
}