{
  "typeName" : "AWS::MediaTailor::Channel",
  "description" : "Definition of AWS::MediaTailor::Channel Resource Type",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-mediatailor.git",
  "definitions" : {
    "DashPlaylistSettings" : {
      "type" : "object",
      "description" : "<p>Dash manifest configuration parameters.</p>",
      "properties" : {
        "ManifestWindowSeconds" : {
          "type" : "number",
          "description" : "<p>The total duration (in seconds) of each manifest. Minimum value: <code>30</code> seconds. Maximum value: <code>3600</code> seconds.</p>"
        },
        "MinBufferTimeSeconds" : {
          "type" : "number",
          "description" : "<p>Minimum amount of content (measured in seconds) that a player must keep available in the buffer. Minimum value: <code>2</code> seconds. Maximum value: <code>60</code> seconds.</p>"
        },
        "MinUpdatePeriodSeconds" : {
          "type" : "number",
          "description" : "<p>Minimum amount of time (in seconds) that the player should wait before requesting updates to the manifest. Minimum value: <code>2</code> seconds. Maximum value: <code>60</code> seconds.</p>"
        },
        "SuggestedPresentationDelaySeconds" : {
          "type" : "number",
          "description" : "<p>Amount of time (in seconds) that the player should be from the live point at the end of the manifest. Minimum value: <code>2</code> seconds. Maximum value: <code>60</code> seconds.</p>"
        }
      },
      "additionalProperties" : false
    },
    "HlsPlaylistSettings" : {
      "type" : "object",
      "description" : "<p>HLS playlist configuration parameters.</p>",
      "properties" : {
        "ManifestWindowSeconds" : {
          "type" : "number",
          "description" : "<p>The total duration (in seconds) of each manifest. Minimum value: <code>30</code> seconds. Maximum value: <code>3600</code> seconds.</p>"
        },
        "AdMarkupType" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/AdMarkupType"
          },
          "description" : "<p>Determines the type of SCTE 35 tags to use in ad markup. Specify <code>DATERANGE</code> to use <code>DATERANGE</code> tags (for live or VOD content). Specify <code>SCTE35_ENHANCED</code> to use <code>EXT-X-CUE-OUT</code> and <code>EXT-X-CUE-IN</code> tags (for VOD content only).</p>"
        }
      },
      "additionalProperties" : false
    },
    "LogConfigurationForChannel" : {
      "type" : "object",
      "description" : "<p>The log configuration for the channel.</p>",
      "properties" : {
        "LogTypes" : {
          "type" : "array",
          "insertionOrder" : false,
          "items" : {
            "$ref" : "#/definitions/LogType"
          },
          "description" : "<p>The log types.</p>"
        }
      },
      "additionalProperties" : false
    },
    "LogType" : {
      "type" : "string",
      "enum" : [ "AS_RUN" ]
    },
    "PlaybackMode" : {
      "type" : "string",
      "enum" : [ "LOOP", "LINEAR" ]
    },
    "AdMarkupType" : {
      "type" : "string",
      "enum" : [ "DATERANGE", "SCTE35_ENHANCED" ]
    },
    "RequestOutputItem" : {
      "type" : "object",
      "description" : "<p>The output configuration for this channel.</p>",
      "properties" : {
        "DashPlaylistSettings" : {
          "$ref" : "#/definitions/DashPlaylistSettings"
        },
        "HlsPlaylistSettings" : {
          "$ref" : "#/definitions/HlsPlaylistSettings"
        },
        "ManifestName" : {
          "type" : "string",
          "description" : "<p>The name of the manifest for the channel. The name appears in the <code>PlaybackUrl</code>.</p>"
        },
        "SourceGroup" : {
          "type" : "string",
          "description" : "<p>A string used to match which <code>HttpPackageConfiguration</code> is used for each <code>VodSource</code>.</p>"
        }
      },
      "required" : [ "ManifestName", "SourceGroup" ],
      "additionalProperties" : false
    },
    "SlateSource" : {
      "type" : "object",
      "description" : "<p>Slate VOD source configuration.</p>",
      "properties" : {
        "SourceLocationName" : {
          "type" : "string",
          "description" : "<p>The name of the source location where the slate VOD source is stored.</p>"
        },
        "VodSourceName" : {
          "type" : "string",
          "description" : "<p>The slate VOD source name. The VOD source must already exist in a source location before it can be used for slate.</p>"
        }
      },
      "additionalProperties" : false
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    },
    "Tier" : {
      "type" : "string",
      "enum" : [ "BASIC", "STANDARD" ]
    },
    "TimeShiftConfiguration" : {
      "type" : "object",
      "description" : "<p>The configuration for time-shifted viewing.</p>",
      "properties" : {
        "MaxTimeDelaySeconds" : {
          "type" : "number",
          "description" : "<p>The maximum time delay for time-shifted viewing. The minimum allowed maximum time delay is 0 seconds, and the maximum allowed maximum time delay is 21600 seconds (6 hours).</p>"
        }
      },
      "required" : [ "MaxTimeDelaySeconds" ],
      "additionalProperties" : false
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "mediatailor:TagResource", "mediatailor:UntagResource" ]
  },
  "properties" : {
    "Arn" : {
      "type" : "string",
      "description" : "<p>The ARN of the channel.</p>"
    },
    "Audiences" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      },
      "description" : "<p>The list of audiences defined in channel.</p>"
    },
    "ChannelName" : {
      "type" : "string"
    },
    "FillerSlate" : {
      "$ref" : "#/definitions/SlateSource"
    },
    "LogConfiguration" : {
      "$ref" : "#/definitions/LogConfigurationForChannel"
    },
    "Outputs" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/RequestOutputItem"
      },
      "description" : "<p>The channel's output properties.</p>"
    },
    "PlaybackMode" : {
      "$ref" : "#/definitions/PlaybackMode"
    },
    "Tags" : {
      "description" : "The tags to assign to the channel.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "Tier" : {
      "$ref" : "#/definitions/Tier"
    },
    "TimeShiftConfiguration" : {
      "$ref" : "#/definitions/TimeShiftConfiguration"
    }
  },
  "required" : [ "ChannelName", "Outputs", "PlaybackMode" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/ChannelName", "/properties/Tier" ],
  "primaryIdentifier" : [ "/properties/ChannelName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "mediatailor:CreateChannel", "mediatailor:TagResource", "mediatailor:ConfigureLogsForChannel", "iam:CreateServiceLinkedRole", "mediatailor:DescribeChannel" ]
    },
    "read" : {
      "permissions" : [ "mediatailor:DescribeChannel" ]
    },
    "update" : {
      "permissions" : [ "mediatailor:UpdateChannel", "mediatailor:TagResource", "mediatailor:UntagResource", "iam:CreateServiceLinkedRole", "mediatailor:ConfigureLogsForChannel", "mediatailor:DescribeChannel" ]
    },
    "delete" : {
      "permissions" : [ "mediatailor:DeleteChannel", "mediatailor:DescribeChannel" ]
    },
    "list" : {
      "permissions" : [ "mediatailor:ListChannels" ]
    }
  },
  "additionalProperties" : false
}