{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-kinesis-stream.json",
  "title": "AWSKinesisStreamProperties",
  "description": "Resource Type definition for AWS::Kinesis::Stream. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-kinesis.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-kinesis-stream.json",
    "sourceSha256": "d88aec348fe51c3a6bab0a5a6534984f68c6ffcb1cd5555d53852e9f62182243"
  },
  "type": "object",
  "properties": {
    "StreamModeDetails": {
      "default": {
        "StreamMode": "PROVISIONED"
      },
      "description": "The mode in which the stream is running.",
      "$ref": "#/$defs/StreamModeDetails"
    },
    "StreamEncryption": {
      "description": "When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream.",
      "$ref": "#/$defs/StreamEncryption"
    },
    "RetentionPeriodHours": {
      "description": "The number of hours for the data records that are stored in shards to remain accessible.",
      "type": "integer",
      "minimum": 24
    },
    "Tags": {
      "uniqueItems": false,
      "description": "An arbitrary set of tags (key–value pairs) to associate with the Kinesis stream.",
      "insertionOrder": false,
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "Name": {
      "oneOf": [
        {
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9_.-]+$",
          "type": "string",
          "maxLength": 128
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the Kinesis stream."
    },
    "ShardCount": {
      "description": "The number of shards that the stream uses. Required when StreamMode = PROVISIONED is passed.",
      "type": "integer",
      "minimum": 1
    }
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-kinesis.git",
  "typeName": "AWS::Kinesis::Stream",
  "readOnlyProperties": [
    "/properties/Arn"
  ],
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/Name"
  ],
  "$defs": {
    "StreamModeDetails": {
      "description": "When specified, enables or updates the mode of stream. Default is PROVISIONED.",
      "title": "AWSKinesisStreamStreamModeDetailsDefinition",
      "type": "object",
      "properties": {
        "StreamMode": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "ON_DEMAND",
                "PROVISIONED"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The mode of the stream"
        }
      },
      "required": [
        "StreamMode"
      ],
      "additionalProperties": false
    },
    "StreamEncryption": {
      "description": "When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream. Removing this property from your stack template and updating your stack disables encryption.",
      "title": "AWSKinesisStreamStreamEncryptionDefinition",
      "type": "object",
      "properties": {
        "EncryptionType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "KMS"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The encryption type to use. The only valid value is KMS. "
        },
        "KeyId": {
          "oneOf": [
            {
              "minLength": 1,
              "type": "string",
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by \"alias/\".You can also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis."
        }
      },
      "required": [
        "EncryptionType",
        "KeyId"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "description": "An arbitrary set of tags (key-value pairs) to associate with the Kinesis stream.",
      "title": "AWSKinesisStreamTagDefinition",
      "type": "object",
      "properties": {
        "Value": {
          "oneOf": [
            {
              "minLength": 0,
              "type": "string",
              "maxLength": 255
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag. You can specify a value that is 0 to 255 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 -."
        },
        "Key": {
          "oneOf": [
            {
              "minLength": 1,
              "type": "string",
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "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 -."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    }
  },
  "primaryIdentifier": [
    "/properties/Name"
  ]
}
