{
  "typeName" : "AWS::MediaPackage::Channel",
  "description" : "Resource schema for AWS::MediaPackage::Channel",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "properties" : {
    "Arn" : {
      "description" : "The Amazon Resource Name (ARN) assigned to the Channel.",
      "type" : "string"
    },
    "Id" : {
      "description" : "The ID of the Channel.",
      "type" : "string",
      "pattern" : "\\A[0-9a-zA-Z-_]+\\Z",
      "minLength" : 1,
      "maxLength" : 256
    },
    "Description" : {
      "description" : "A short text description of the Channel.",
      "type" : "string"
    },
    "HlsIngest" : {
      "description" : "An HTTP Live Streaming (HLS) ingest resource configuration.",
      "$ref" : "#/definitions/HlsIngest"
    },
    "Tags" : {
      "description" : "A collection of tags associated with a resource",
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "EgressAccessLogs" : {
      "description" : "The configuration parameters for egress access logging.",
      "$ref" : "#/definitions/LogConfiguration"
    },
    "IngressAccessLogs" : {
      "description" : "The configuration parameters for egress access logging.",
      "$ref" : "#/definitions/LogConfiguration"
    }
  },
  "definitions" : {
    "HlsIngest" : {
      "description" : "An HTTP Live Streaming (HLS) ingest resource configuration.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ingestEndpoints" : {
          "description" : "A list of endpoints to which the source stream should be sent.",
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/IngestEndpoint"
          }
        }
      }
    },
    "IngestEndpoint" : {
      "description" : "An endpoint for ingesting source content for a Channel.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Id" : {
          "description" : "The system generated unique identifier for the IngestEndpoint",
          "type" : "string"
        },
        "Username" : {
          "description" : "The system generated username for ingest authentication.",
          "type" : "string"
        },
        "Password" : {
          "description" : "The system generated password for ingest authentication.",
          "type" : "string"
        },
        "Url" : {
          "description" : "The ingest URL to which the source stream should be sent.",
          "type" : "string"
        }
      }
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    },
    "LogConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "LogGroupName" : {
          "description" : "Sets a custom AWS CloudWatch log group name for access logs. If a log group name isn't specified, the defaults are used: /aws/MediaPackage/EgressAccessLogs for egress access logs and /aws/MediaPackage/IngressAccessLogs for ingress access logs.",
          "type" : "string",
          "pattern" : "\\A^(\\/aws\\/MediaPackage\\/)[a-zA-Z0-9_-]+\\Z",
          "minLength" : 1,
          "maxLength" : 256
        }
      }
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "mediapackage:TagResource", "mediapackage:UntagResource", "mediapackage:ListTagsForResource" ]
  },
  "additionalProperties" : false,
  "required" : [ "Id" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/HlsIngest/ingestEndpoints/*/Id", "/properties/HlsIngest/ingestEndpoints/*/Username", "/properties/HlsIngest/ingestEndpoints/*/Password", "/properties/HlsIngest/ingestEndpoints/*/Url" ],
  "createOnlyProperties" : [ "/properties/Id", "/properties/Tags" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "mediapackage:CreateChannel", "mediapackage:DescribeChannel", "mediapackage:UpdateChannel", "mediapackage:TagResource", "mediapackage:ConfigureLogs", "iam:CreateServiceLinkedRole" ]
    },
    "read" : {
      "permissions" : [ "mediapackage:DescribeChannel" ]
    },
    "update" : {
      "permissions" : [ "mediapackage:UpdateChannel", "mediapackage:ConfigureLogs", "iam:CreateServiceLinkedRole" ]
    },
    "delete" : {
      "permissions" : [ "mediapackage:DeleteChannel" ]
    },
    "list" : {
      "permissions" : [ "mediapackage:ListChannels" ]
    }
  }
}