{
  "typeName" : "AWS::IVS::StreamKey",
  "description" : "Resource Type definition for AWS::IVS::StreamKey",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "definitions" : {
    "Tag" : {
      "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 and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Value", "Key" ]
    }
  },
  "properties" : {
    "Arn" : {
      "description" : "Stream Key ARN is automatically generated on creation and assigned as the unique identifier.",
      "type" : "string",
      "pattern" : "^arn:aws:ivs:[a-z0-9-]+:[0-9]+:stream-key/[a-zA-Z0-9-]+$",
      "minLength" : 1,
      "maxLength" : 128
    },
    "ChannelArn" : {
      "description" : "Channel ARN for the stream.",
      "type" : "string",
      "pattern" : "^arn:aws:ivs:[a-z0-9-]+:[0-9]+:channel/[a-zA-Z0-9-]+$"
    },
    "Tags" : {
      "description" : "A list of key-value pairs that contain metadata for the asset model.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "maxItems" : 50,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "Value" : {
      "description" : "Stream-key value.",
      "type" : "string"
    }
  },
  "additionalProperties" : false,
  "replacementStrategy" : "delete_then_create",
  "required" : [ "ChannelArn" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "ivs:TagResource", "ivs:UntagResource", "ivs:ListTagsForResource" ]
  },
  "createOnlyProperties" : [ "/properties/ChannelArn" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/Value" ],
  "primaryIdentifier" : [ "/properties/Arn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "ivs:TagResource", "ivs:UntagResource", "ivs:CreateStreamKey" ]
    },
    "read" : {
      "permissions" : [ "ivs:GetStreamKey", "ivs:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "ivs:GetStreamKey", "ivs:TagResource", "ivs:UntagResource", "ivs:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "ivs:DeleteStreamKey", "ivs:UntagResource" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "ChannelArn" : {
            "$ref" : "resource-schema.json#/properties/ChannelArn"
          }
        },
        "required" : [ "ChannelArn" ]
      },
      "permissions" : [ "ivs:ListStreamKeys", "ivs:ListTagsForResource" ]
    }
  }
}