---
title: "POST /channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy"
method: POST
path: "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy"
---

# POST /channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy

`POST /channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy`

Attaches an IAM policy to the specified origin endpoint. You can attach only one policy with each request.

## Path parameters

- `ChannelGroupName` string, required
- `ChannelName` string, required
- `OriginEndpointName` string, required

## Request body

- object
  - `Policy` string, required — The policy to attach to the specified origin endpoint.
  - `CdnAuthConfiguration` object — The settings to enable CDN authorization headers in MediaPackage.
    - `CdnIdentifierSecretArns` CdnIdentifierSecretArn[] — The ARN for the secret in Secrets Manager that your CDN uses for authorization to access the endpoint.
    - `SecretsRoleArn` string — The ARN for the IAM role that gives MediaPackage read access to Secrets Manager and KMS for CDN authorization.

## Response `200`

Success

- PutOriginEndpointPolicyResponse

## Other responses

- `480` — ConflictException
- `481` — ThrottlingException
- `482` — AccessDeniedException
- `483` — InternalServerException
- `484` — ValidationException
- `485` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/mediapackagev2.md) · [All operations](https://skmtc.net/aws/apis/mediapackagev2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/mediapackagev2/versions/f05393167369/schema)
