{
  "typeName" : "AWS::MediaPackage::Asset",
  "description" : "Resource schema for AWS::MediaPackage::Asset",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "properties" : {
    "Arn" : {
      "description" : "The ARN of the Asset.",
      "type" : "string"
    },
    "CreatedAt" : {
      "description" : "The time the Asset was initially submitted for Ingest.",
      "type" : "string"
    },
    "EgressEndpoints" : {
      "description" : "The list of egress endpoints available for the Asset.",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/EgressEndpoint"
      }
    },
    "Id" : {
      "description" : "The unique identifier for the Asset.",
      "type" : "string"
    },
    "PackagingGroupId" : {
      "description" : "The ID of the PackagingGroup for the Asset.",
      "type" : "string"
    },
    "ResourceId" : {
      "description" : "The resource ID to include in SPEKE key requests.",
      "type" : "string"
    },
    "SourceArn" : {
      "description" : "ARN of the source object in S3.",
      "type" : "string"
    },
    "SourceRoleArn" : {
      "description" : "The IAM role_arn used to access the source S3 bucket.",
      "type" : "string"
    },
    "Tags" : {
      "description" : "A collection of tags associated with a resource",
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "definitions" : {
    "EgressEndpoint" : {
      "description" : "The endpoint URL used to access an Asset using one PackagingConfiguration.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "PackagingConfigurationId" : {
          "description" : "The ID of the PackagingConfiguration being applied to the Asset.",
          "type" : "string"
        },
        "Url" : {
          "description" : "The URL of the parent manifest for the repackaged Asset.",
          "type" : "string"
        }
      },
      "required" : [ "PackagingConfigurationId", "Url" ]
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "mediapackage-vod:TagResource", "mediapackage-vod:UntagResource", "mediapackage-vod:ListTagsForResource" ]
  },
  "additionalProperties" : false,
  "required" : [ "Id", "PackagingGroupId", "SourceArn", "SourceRoleArn" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/CreatedAt", "/properties/EgressEndpoints/*/PackagingConfigurationId", "/properties/EgressEndpoints/*/Url" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "createOnlyProperties" : [ "/properties/Id", "/properties/Tags" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "mediapackage-vod:CreateAsset", "mediapackage-vod:DescribeAsset", "mediapackage-vod:TagResource", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "mediapackage-vod:DescribeAsset" ]
    },
    "delete" : {
      "permissions" : [ "mediapackage-vod:DescribeAsset", "mediapackage-vod:DeleteAsset" ]
    },
    "list" : {
      "permissions" : [ "mediapackage-vod:ListAssets", "mediapackage-vod:DescribePackagingGroup" ]
    }
  }
}