playback_restriction_policies
Creates, updates, deletes, gets or lists a playback_restriction_policies resource.
Overview
| Name | playback_restriction_policies |
| Type | Resource |
| Id | aws.ivs.playback_restriction_policies |
Fields
The following fields are returned by SELECT queries:
- get_playback_restriction_policy
- list_playback_restriction_policies
| Name | Datatype | Description |
|---|---|---|
name | string | Playback-restriction-policy name. The value does not need to be unique. (pattern: <code>[a-zA-Z0-9-_]*</code>) |
allowed_countries | array | A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an empty array). |
allowed_origins | array | A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin header defined at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). |
arn | string | Playback-restriction-policy ARN (pattern: <code>arn:aws:ivs:[a-z0-9-]+:[0-9]+:playback-restriction-policy/[a-zA-Z0-9-]+</code>) |
enable_strict_origin_enforcement | boolean | Whether channel playback is constrained by origin site. Default: false. |
tags | object | Tags attached to the resource. Array of 1-50 maps, each of the form string:string (key:value). See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there. |
| Name | Datatype | Description |
|---|---|---|
next_token | string | If there are more channels than maxResults, use nextToken in the request to get the next set. (pattern: <code>[a-zA-Z0-9+/=_-]*</code>) |
playback_restriction_policies | array | List of the matching policies. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_playback_restriction_policy | select | region | Gets the specified playback restriction policy. | |
list_playback_restriction_policies | select | region | Gets summary information about playback restriction policies. | |
create_playback_restriction_policy | insert | region | Creates a new playback restriction policy, for constraining playback by countries and/or origins. | |
update_playback_restriction_policy | update | region, arn | Updates a specified playback restriction policy. | |
delete_playback_restriction_policy | delete | region | Deletes the specified playback restriction policy. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_playback_restriction_policy
- list_playback_restriction_policies
Gets the specified playback restriction policy.
SELECT
name,
allowed_countries,
allowed_origins,
arn,
enable_strict_origin_enforcement,
tags
FROM aws.ivs.playback_restriction_policies
WHERE region = '{{ region }}' -- required
;
Gets summary information about playback restriction policies.
SELECT
next_token,
playback_restriction_policies
FROM aws.ivs.playback_restriction_policies
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_playback_restriction_policy
- Manifest
Creates a new playback restriction policy, for constraining playback by countries and/or origins.
INSERT INTO aws.ivs.playback_restriction_policies (
allowedCountries,
allowedOrigins,
enableStrictOriginEnforcement,
name,
tags,
region
)
SELECT
'{{ allowedCountries }}',
'{{ allowedOrigins }}',
{{ enableStrictOriginEnforcement }},
'{{ name }}',
'{{ tags }}',
'{{ region }}'
RETURNING
playback_restriction_policy
;
# Description fields are for documentation purposes
- name: playback_restriction_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the playback_restriction_policies resource.
- name: allowedCountries
value:
- "{{ allowedCountries }}"
- name: allowedOrigins
value:
- "{{ allowedOrigins }}"
- name: enableStrictOriginEnforcement
value: {{ enableStrictOriginEnforcement }}
- name: name
value: "{{ name }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_playback_restriction_policy
Updates a specified playback restriction policy.
UPDATE aws.ivs.playback_restriction_policies
SET
arn = '{{ arn }}',
allowedCountries = '{{ allowedCountries }}',
allowedOrigins = '{{ allowedOrigins }}',
enableStrictOriginEnforcement = {{ enableStrictOriginEnforcement }},
name = '{{ name }}'
WHERE
region = '{{ region }}' --required
AND arn = '{{ arn }}' --required
RETURNING
playback_restriction_policy;
DELETE examples
- delete_playback_restriction_policy
Deletes the specified playback restriction policy.
DELETE FROM aws.ivs.playback_restriction_policies
WHERE region = '{{ region }}' --required
;