{
  "typeName" : "AWS::MediaPackageV2::OriginEndpointPolicy",
  "description" : "<p>Represents a resource policy that allows or denies access to an origin endpoint.</p>",
  "definitions" : {
    "CdnAuthConfiguration" : {
      "type" : "object",
      "description" : "<p>The settings to enable CDN authorization headers in MediaPackage.</p>",
      "properties" : {
        "CdnIdentifierSecretArns" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "maxLength" : 2048,
            "minLength" : 20
          },
          "maxItems" : 100,
          "minItems" : 1,
          "description" : "<p>The ARN for the secret in Secrets Manager that your CDN uses for authorization to access the endpoint.</p>"
        },
        "SecretsRoleArn" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 20,
          "description" : "<p>The ARN for the IAM role that gives MediaPackage read access to Secrets Manager and KMS for CDN authorization.</p>"
        }
      },
      "required" : [ "CdnIdentifierSecretArns", "SecretsRoleArn" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "CdnAuthConfiguration" : {
      "$ref" : "#/definitions/CdnAuthConfiguration"
    },
    "ChannelGroupName" : {
      "type" : "string",
      "maxLength" : 256,
      "minLength" : 1,
      "pattern" : "^[a-zA-Z0-9_-]+$"
    },
    "ChannelName" : {
      "type" : "string",
      "maxLength" : 256,
      "minLength" : 1,
      "pattern" : "^[a-zA-Z0-9_-]+$"
    },
    "OriginEndpointName" : {
      "type" : "string",
      "maxLength" : 256,
      "minLength" : 1,
      "pattern" : "^[a-zA-Z0-9_-]+$"
    },
    "Policy" : {
      "type" : [ "object", "string" ]
    }
  },
  "required" : [ "ChannelGroupName", "ChannelName", "OriginEndpointName", "Policy" ],
  "createOnlyProperties" : [ "/properties/ChannelGroupName", "/properties/ChannelName", "/properties/OriginEndpointName" ],
  "primaryIdentifier" : [ "/properties/ChannelGroupName", "/properties/ChannelName", "/properties/OriginEndpointName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "mediapackagev2:GetOriginEndpointPolicy", "mediapackagev2:PutOriginEndpointPolicy", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "mediapackagev2:GetOriginEndpointPolicy" ]
    },
    "update" : {
      "permissions" : [ "mediapackagev2:GetOriginEndpointPolicy", "mediapackagev2:PutOriginEndpointPolicy", "iam:PassRole" ]
    },
    "delete" : {
      "permissions" : [ "mediapackagev2:GetOriginEndpointPolicy", "mediapackagev2:DeleteOriginEndpointPolicy" ]
    }
  },
  "tagging" : {
    "taggable" : false,
    "tagOnCreate" : false,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : false
  },
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-mediapackagev2",
  "additionalProperties" : false
}