PutChannelPolicyCommand

Creates an IAM policy for the channel. IAM policies are used to control access to your channel.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { MediaTailorClient, PutChannelPolicyCommand } from "@aws-sdk/client-mediatailor"; // ES Modules import
// const { MediaTailorClient, PutChannelPolicyCommand } = require("@aws-sdk/client-mediatailor"); // CommonJS import
const client = new MediaTailorClient(config);
const input = { // PutChannelPolicyRequest
  ChannelName: "STRING_VALUE", // required
  Policy: "STRING_VALUE", // required
};
const command = new PutChannelPolicyCommand(input);
const response = await client.send(command);
// {};

PutChannelPolicyCommand Input

See PutChannelPolicyCommandInput for more details

Parameter
Type
Description
ChannelName
Required
string | undefined

The channel name associated with this Channel Policy.

Policy
Required
string | undefined

Adds an IAM role that determines the permissions of your channel.

PutChannelPolicyCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
MediaTailorServiceException
Base exception class for all service exceptions from MediaTailor service.