{
  "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
    },
    "StreamStorageConfiguration" : {
      "description" : "Configuration for the storage tier of the Kinesis Video Stream.",
      "type" : "object",
      "properties" : {
        "DefaultStorageTier" : {
          "type" : "string",
          "description" : "The storage tier for the Kinesis Video Stream. Determines the storage class used for stream data.",
          "enum" : [ "HOT", "WARM" ],
          "default" : "HOT"
        }
      },
      "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
    },
    "StreamStorageConfiguration" : {
      "description" : "Configuration for the storage tier of the Kinesis Video Stream.",
      "$ref" : "#/definitions/StreamStorageConfiguration"
    }
  },
  "additionalProperties" : false,
  "required" : [ ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/Name" ],
  "primaryIdentifier" : [ "/properties/Name" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "kinesisvideo:TagStream", "kinesisvideo:UntagStream" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "kinesisvideo:DescribeStream", "kinesisvideo:CreateStream", "kinesisvideo:TagStream" ]
    },
    "read" : {
      "permissions" : [ "kinesisvideo:DescribeStream", "kinesisvideo:ListTagsForStream", "kinesisvideo:DescribeStreamStorageConfiguration" ]
    },
    "update" : {
      "permissions" : [ "kinesisvideo:DescribeStream", "kinesisvideo:UpdateStream", "kinesisvideo:UpdateDataRetention", "kinesisvideo:TagStream", "kinesisvideo:UntagStream", "kinesisvideo:ListTagsForStream" ]
    },
    "delete" : {
      "permissions" : [ "kinesisvideo:DescribeStream", "kinesisvideo:DeleteStream" ]
    },
    "list" : {
      "permissions" : [ "kinesisvideo:ListStreams" ]
    }
  }
}