Skip to main content

playback_restriction_policies

Creates, updates, deletes, gets or lists a playback_restriction_policies resource.

Overview

Nameplayback_restriction_policies
TypeResource
Idaws.ivs.playback_restriction_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringPlayback-restriction-policy name. The value does not need to be unique. (pattern: <code>[a-zA-Z0-9-_]*</code>)
allowed_countriesarrayA 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_originsarrayA 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).
arnstringPlayback-restriction-policy ARN (pattern: <code>arn:aws:ivs:[a-z0-9-]+:[0-9]+:playback-restriction-policy/[a-zA-Z0-9-]+</code>)
enable_strict_origin_enforcementbooleanWhether channel playback is constrained by origin site. Default: false.
tagsobjectTags 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_playback_restriction_policyselectregionGets the specified playback restriction policy.
list_playback_restriction_policiesselectregionGets summary information about playback restriction policies.
create_playback_restriction_policyinsertregionCreates a new playback restriction policy, for constraining playback by countries and/or origins.
update_playback_restriction_policyupdateregion, arnUpdates a specified playback restriction policy.
delete_playback_restriction_policydeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

Deletes the specified playback restriction policy.

DELETE FROM aws.ivs.playback_restriction_policies
WHERE region = '{{ region }}' --required
;