PutOriginEndpointPolicy - AWS Elemental MediaPackage V2 Live API

PutOriginEndpointPolicy

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

Request Syntax

POST /channelGroup/ChannelGroupName/channel/ChannelName/originEndpoint/OriginEndpointName/policy HTTP/1.1 Content-type: application/json { "CdnAuthConfiguration": { "CdnIdentifierSecretArns": [ "string" ], "SecretsRoleArn": "string" }, "Policy": "string" }

URI Request Parameters

The request uses the following URI parameters.

ChannelGroupName

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [a-zA-Z0-9_-]+

Required: Yes

ChannelName

The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [a-zA-Z0-9_-]+

Required: Yes

OriginEndpointName

The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and and must be unique for your account in the AWS Region and channel.

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [a-zA-Z0-9_-]+

Required: Yes

Request Body

The request accepts the following data in JSON format.

CdnAuthConfiguration

The settings for using authorization headers between the MediaPackage endpoint and your CDN.

For information about CDN authorization, see CDN authorization in AWS Elemental MediaPackage in the MediaPackage user guide.

Type: CdnAuthConfiguration object

Required: No

Policy

The policy to attach to the specified origin endpoint.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 6144.

Required: Yes

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.

HTTP Status Code: 403

ConflictException

Updating or deleting this resource can cause an inconsistent state.

HTTP Status Code: 409

InternalServerException

Indicates that an error from the service occurred while trying to process a request.

HTTP Status Code: 500

ResourceNotFoundException

The specified resource doesn't exist.

HTTP Status Code: 404

ThrottlingException

The request throughput limit was exceeded.

HTTP Status Code: 429

ValidationException

The input failed to meet the constraints specified by the AWS service.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: