Skip to main content

origin_endpoint_policies

Creates, updates, deletes or gets an origin_endpoint_policy resource or lists origin_endpoint_policies in a region

Overview

Nameorigin_endpoint_policies
TypeResource
Description

Represents a resource policy that allows or denies access to an origin endpoint.

Idaws.mediapackagev2.origin_endpoint_policies

Fields

NameDatatypeDescription
channel_group_namestring
channel_namestring
origin_endpoint_namestring
policyobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTChannelGroupName, ChannelName, OriginEndpointName, Policy, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual origin_endpoint_policy.

SELECT
region,
channel_group_name,
channel_name,
origin_endpoint_name,
policy
FROM aws.mediapackagev2.origin_endpoint_policies
WHERE region = 'us-east-1' AND data__Identifier = '<ChannelGroupName>|<ChannelName>|<OriginEndpointName>';

INSERT example

Use the following StackQL query and manifest file to create a new origin_endpoint_policy resource, using stack-deploy.

/*+ create */
INSERT INTO aws.mediapackagev2.origin_endpoint_policies (
ChannelGroupName,
ChannelName,
OriginEndpointName,
Policy,
region
)
SELECT
'{{ ChannelGroupName }}',
'{{ ChannelName }}',
'{{ OriginEndpointName }}',
'{{ Policy }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.mediapackagev2.origin_endpoint_policies
WHERE data__Identifier = '<ChannelGroupName|ChannelName|OriginEndpointName>'
AND region = 'us-east-1';

Permissions

To operate on the origin_endpoint_policies resource, the following permissions are required:

Create

mediapackagev2:GetOriginEndpointPolicy,
mediapackagev2:PutOriginEndpointPolicy

Read

mediapackagev2:GetOriginEndpointPolicy

Update

mediapackagev2:GetOriginEndpointPolicy,
mediapackagev2:PutOriginEndpointPolicy

Delete

mediapackagev2:GetOriginEndpointPolicy,
mediapackagev2:DeleteOriginEndpointPolicy