origin_endpoint_policies
Creates, updates, deletes or gets an origin_endpoint_policy
resource or lists origin_endpoint_policies
in a region
Overview
Name | origin_endpoint_policies |
Type | Resource |
Description | Represents a resource policy that allows or denies access to an origin endpoint. |
Id | aws.mediapackagev2.origin_endpoint_policies |
Fields
Name | Datatype | Description |
---|---|---|
channel_group_name | string | |
channel_name | string | |
origin_endpoint_name | string | |
policy | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ChannelGroupName, ChannelName, OriginEndpointName, Policy, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.mediapackagev2.origin_endpoint_policies (
ChannelGroupName,
ChannelName,
OriginEndpointName,
Policy,
region
)
SELECT
'{{ ChannelGroupName }}',
'{{ ChannelName }}',
'{{ OriginEndpointName }}',
'{{ Policy }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.mediapackagev2.origin_endpoint_policies (
ChannelGroupName,
ChannelName,
OriginEndpointName,
Policy,
region
)
SELECT
'{{ ChannelGroupName }}',
'{{ ChannelName }}',
'{{ OriginEndpointName }}',
'{{ Policy }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: origin_endpoint_policy
props:
- name: ChannelGroupName
value: '{{ ChannelGroupName }}'
- name: ChannelName
value: '{{ ChannelName }}'
- name: OriginEndpointName
value: '{{ OriginEndpointName }}'
- name: Policy
value: {}
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