create_playback_restriction_policy
async
¶
create_playback_restriction_policy(
*,
config_overrides: Optional[AsyncivsClientConfig] = None,
allowed_countries: Optional[PlaybackRestrictionPolicyAllowedCountryList] = None,
allowed_origins: Optional[PlaybackRestrictionPolicyAllowedOriginList] = None,
enable_strict_origin_enforcement: Optional[
PlaybackRestrictionPolicyEnableStrictOriginEnforcement
] = None,
name: Optional[PlaybackRestrictionPolicyName] = None,
tags: Optional[Tags] = None,
) -> CreatePlaybackRestrictionPolicyResponse
Creates a new playback restriction policy, for constraining playback by countries and/or origins.
Parameters:
-
allowed_countries(Optional[PlaybackRestrictionPolicyAllowedCountryList], default:None) –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(Optional[PlaybackRestrictionPolicyAllowedOriginList], default:None) –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).
-
enable_strict_origin_enforcement(Optional[PlaybackRestrictionPolicyEnableStrictOriginEnforcement], default:None) –Whether channel playback is constrained by origin site. Default:
false. -
name(Optional[PlaybackRestrictionPolicyName], default:None) –Playback-restriction-policy name. The value does not need to be unique.
-
tags(Optional[Tags], default:None) –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.
Raises:
-
AccessDeniedException–User does not have sufficient access to perform this action.
-
PendingVerification–Your account is pending verification.
-
ServiceQuotaExceededException–Request would cause a service quota to be exceeded.
-
ThrottlingException–Request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.