{
  "typeName" : "AWS::MediaPackage::PackagingGroup",
  "description" : "Resource schema for AWS::MediaPackage::PackagingGroup",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-mediapackage.git",
  "properties" : {
    "Id" : {
      "description" : "The ID of the PackagingGroup.",
      "type" : "string",
      "pattern" : "\\A[0-9a-zA-Z-_]+\\Z",
      "minLength" : 1,
      "maxLength" : 256
    },
    "Arn" : {
      "description" : "The ARN of the PackagingGroup.",
      "type" : "string"
    },
    "DomainName" : {
      "description" : "The fully qualified domain name for Assets in the PackagingGroup.",
      "type" : "string"
    },
    "Authorization" : {
      "description" : "CDN Authorization",
      "$ref" : "#/definitions/Authorization"
    },
    "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"
    }
  },
  "definitions" : {
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    },
    "Authorization" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CdnIdentifierSecret" : {
          "description" : "The Amazon Resource Name (ARN) for the secret in AWS Secrets Manager that is used for CDN authorization.",
          "type" : "string"
        },
        "SecretsRoleArn" : {
          "description" : "The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.",
          "type" : "string"
        }
      },
      "required" : [ "CdnIdentifierSecret", "SecretsRoleArn" ]
    },
    "LogConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "LogGroupName" : {
          "description" : "Sets a custom AWS CloudWatch log group name for egress logs. If a log group name isn't specified, the default name is used: /aws/MediaPackage/VodEgressAccessLogs.",
          "type" : "string",
          "pattern" : "\\A\\/aws\\/MediaPackage\\/[0-9a-zA-Z-_\\/\\.#]+\\Z",
          "minLength" : 1,
          "maxLength" : 512
        }
      }
    }
  },
  "additionalProperties" : false,
  "required" : [ "Id" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/DomainName" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "createOnlyProperties" : [ "/properties/Id", "/properties/Tags" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "mediapackage-vod:CreatePackagingGroup", "mediapackage-vod:DescribePackagingGroup", "mediapackage-vod:TagResource", "mediapackage-vod:ConfigureLogs", "iam:PassRole", "iam:CreateServiceLinkedRole" ]
    },
    "read" : {
      "permissions" : [ "mediapackage-vod:DescribePackagingGroup" ]
    },
    "update" : {
      "permissions" : [ "mediapackage-vod:UpdatePackagingGroup", "mediapackage-vod:ConfigureLogs", "mediapackage-vod:TagResource", "iam:PassRole", "iam:CreateServiceLinkedRole" ]
    },
    "list" : {
      "permissions" : [ "mediapackage-vod:ListPackagingGroups" ]
    },
    "delete" : {
      "permissions" : [ "mediapackage-vod:DeletePackagingGroup" ]
    }
  }
}