Document: "StreamingPoliciesAndStreamingLocators"
A Streaming Policy resource
azure_streaming_policy {
account_name => "account_name",
api_version => "api_version",
parameters => "parameters",
properties => $azure_streaming_policy_properties
resource_group_name => "resource_group_name",
subscription_id => "subscription_id",
}
Name | Type | Required | Description |
---|---|---|---|
account_name | String | true | The Media Services account name. |
api_version | String | true | The Version of the API to be used with the client request. |
parameters | Hash | true | The request parameters |
properties | StreamingPolicyProperties | false | |
resource_group_name | String | true | The name of the resource group within the Azure subscription. |
subscription_id | String | true | The unique identifier for a Microsoft Azure subscription. |
Class to specify properties of Streaming Policy
$azure_streaming_policy_properties = {
commonEncryptionCbcs => $azure_common_encryption_cbcs
commonEncryptionCenc => $azure_common_encryption_cenc
defaultContentKeyPolicyName => "defaultContentKeyPolicyName (optional)",
envelopeEncryption => $azure_envelope_encryption
noEncryption => $azure_no_encryption
}
Name | Type | Required | Description |
---|---|---|---|
commonEncryptionCbcs | CommonEncryptionCbcs | false | Configuration of CommonEncryptionCbcs |
commonEncryptionCenc | CommonEncryptionCenc | false | Configuration of CommonEncryptionCenc |
defaultContentKeyPolicyName | String | false | Default ContentKey used by current Streaming Policy |
envelopeEncryption | EnvelopeEncryption | false | Configuration of EnvelopeEncryption |
noEncryption | NoEncryption | false | Configurations of NoEncryption |
Class for CommonEncryptionCbcs encryption scheme
$azure_common_encryption_cbcs = {
clearTracks => $azure_track_selection
contentKeys => $azure_streaming_policy_content_keys
drm => $azure_cbcs_drm_configuration
enabledProtocols => $azure_enabled_protocols
}
Name | Type | Required | Description |
---|---|---|---|
clearTracks | TrackSelection | false | Representing which tracks should not be encrypted |
contentKeys | StreamingPolicyContentKeys | false | Representing default content key for each encryption scheme and separate content keys for specific tracks |
drm | CbcsDrmConfiguration | false | Configuration of DRMs for current encryption scheme |
enabledProtocols | EnabledProtocols | false | Representing supported protocols |
Class to select a track
$azure_track_selection = {
trackSelections => $azure_track_property_condition
}
Name | Type | Required | Description |
---|---|---|---|
trackSelections | TrackPropertyCondition | false | TrackSelections is a track property condition list which can specify track(s) |
Class to specify one track property condition
$azure_track_property_condition = {
operation => "operation",
property => "property",
value => "value (optional)",
}
Name | Type | Required | Description |
---|---|---|---|
operation | String | true | Track property condition operation |
property | String | true | Track property type |
value | String | false | Track property value |
Class to specify properties of all content keys in Streaming Policy
$azure_streaming_policy_content_keys = {
defaultKey => $azure_default_key
keyToTrackMappings => $azure_streaming_policy_content_key
}
Name | Type | Required | Description |
---|---|---|---|
defaultKey | DefaultKey | false | Default content key for an encryption scheme |
keyToTrackMappings | StreamingPolicyContentKey | false | Representing tracks needs separate content key |
Class to specify properties of default content key for each encryption scheme
$azure_default_key = {
label => "label (optional)",
policyName => "policyName (optional)",
}
Name | Type | Required | Description |
---|---|---|---|
label | String | false | Label can be used to specify Content Key when creating a Streaming Locator |
policyName | String | false | Policy used by Default Key |
Class to specify properties of content key
$azure_streaming_policy_content_key = {
label => "label (optional)",
policyName => "policyName (optional)",
tracks => $azure_track_selection
}
Name | Type | Required | Description |
---|---|---|---|
label | String | false | Label can be used to specify Content Key when creating a Streaming Locator |
policyName | String | false | Policy used by Content Key |
tracks | TrackSelection | false | Tracks which use this content key |
Class to specify DRM configurations of CommonEncryptionCbcs scheme in Streaming Policy
$azure_cbcs_drm_configuration = {
fairPlay => $azure_streaming_policy_fair_play_configuration
playReady => $azure_streaming_policy_play_ready_configuration
widevine => $azure_streaming_policy_widevine_configuration
}
Name | Type | Required | Description |
---|---|---|---|
fairPlay | StreamingPolicyFairPlayConfiguration | false | FairPlay configurations |
playReady | StreamingPolicyPlayReadyConfiguration | false | PlayReady configurations |
widevine | StreamingPolicyWidevineConfiguration | false | Widevine configurations |
Class to specify configurations of FairPlay in Streaming Policy
$azure_streaming_policy_fair_play_configuration = {
allowPersistentLicense => "allowPersistentLicense",
customLicenseAcquisitionUrlTemplate => "customLicenseAcquisitionUrlTemplate (optional)",
}
Name | Type | Required | Description |
---|---|---|---|
allowPersistentLicense | Boolean | true | All license to be persistent or not |
customLicenseAcquisitionUrlTemplate | String | false | Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. |
Class to specify configurations of PlayReady in Streaming Policy
$azure_streaming_policy_play_ready_configuration = {
customLicenseAcquisitionUrlTemplate => "customLicenseAcquisitionUrlTemplate (optional)",
playReadyCustomAttributes => "playReadyCustomAttributes (optional)",
}
Name | Type | Required | Description |
---|---|---|---|
customLicenseAcquisitionUrlTemplate | String | false | Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. |
playReadyCustomAttributes | String | false | Custom attributes for PlayReady |
Class to specify configurations of Widevine in Streaming Policy
$azure_streaming_policy_widevine_configuration = {
customLicenseAcquisitionUrlTemplate => "customLicenseAcquisitionUrlTemplate (optional)",
}
Name | Type | Required | Description |
---|---|---|---|
customLicenseAcquisitionUrlTemplate | String | false | Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for issuing licenses. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. |
Class to specify which protocols are enabled
$azure_enabled_protocols = {
dash => "dash",
download => "download",
hls => "hls",
smoothStreaming => "smoothStreaming",
}
Name | Type | Required | Description |
---|---|---|---|
dash | Boolean | true | Enable DASH protocol or not |
download | Boolean | true | Enable Download protocol or not |
hls | Boolean | true | Enable HLS protocol or not |
smoothStreaming | Boolean | true | Enable SmoothStreaming protocol or not |
Class for envelope encryption scheme
$azure_common_encryption_cenc = {
clearTracks => $azure_track_selection
contentKeys => $azure_streaming_policy_content_keys
drm => $azure_cenc_drm_configuration
enabledProtocols => $azure_enabled_protocols
}
Name | Type | Required | Description |
---|---|---|---|
clearTracks | TrackSelection | false | Representing which tracks should not be encrypted |
contentKeys | StreamingPolicyContentKeys | false | Representing default content key for each encryption scheme and separate content keys for specific tracks |
drm | CencDrmConfiguration | false | Configuration of DRMs for CommonEncryptionCenc encryption scheme |
enabledProtocols | EnabledProtocols | false | Representing supported protocols |
Class to specify DRM configurations of CommonEncryptionCenc scheme in Streaming Policy
$azure_cenc_drm_configuration = {
playReady => $azure_streaming_policy_play_ready_configuration
widevine => $azure_streaming_policy_widevine_configuration
}
Name | Type | Required | Description |
---|---|---|---|
playReady | StreamingPolicyPlayReadyConfiguration | false | PlayReady configurations |
widevine | StreamingPolicyWidevineConfiguration | false | Widevine configurations |
Class for EnvelopeEncryption encryption scheme
$azure_envelope_encryption = {
clearTracks => $azure_track_selection
contentKeys => $azure_streaming_policy_content_keys
customKeyAcquisitionUrlTemplate => "customKeyAcquisitionUrlTemplate (optional)",
enabledProtocols => $azure_enabled_protocols
}
Name | Type | Required | Description |
---|---|---|---|
clearTracks | TrackSelection | false | Representing which tracks should not be encrypted |
contentKeys | StreamingPolicyContentKeys | false | Representing default content key for each encryption scheme and separate content keys for specific tracks |
customKeyAcquisitionUrlTemplate | String | false | Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services for issuing keys. The template supports replaceable tokens that the service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId}, which is replaced with the value of StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being requested. |
enabledProtocols | EnabledProtocols | false | Representing supported protocols |
Class for NoEncryption scheme
$azure_no_encryption = {
enabledProtocols => $azure_enabled_protocols
}
Name | Type | Required | Description |
---|---|---|---|
enabledProtocols | EnabledProtocols | false | Representing supported protocols |
Here is a list of endpoints that we use to create, read, update and delete the StreamingPolicy
Operation | Path | Verb | Description | OperationID |
---|---|---|---|---|
Create | /subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Media/mediaServices/%{account_name}/streamingPolicies/%{streaming_policy_name} |
Put | Create a Streaming Policy in the Media Services account | StreamingPolicies_Create |
List - list all | `` | |||
List - get one | /subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Media/mediaServices/%{account_name}/streamingPolicies/%{streaming_policy_name} |
Get | Get the details of a Streaming Policy in the Media Services account | StreamingPolicies_Get |
List - get list using params | /subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Media/mediaServices/%{account_name}/streamingPolicies |
Get | Lists the Streaming Policies in the account | StreamingPolicies_List |
Update | /subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Media/mediaServices/%{account_name}/streamingPolicies/%{streaming_policy_name} |
Put | Create a Streaming Policy in the Media Services account | StreamingPolicies_Create |
Delete | /subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Media/mediaServices/%{account_name}/streamingPolicies/%{streaming_policy_name} |
Delete | Deletes a Streaming Policy in the Media Services account | StreamingPolicies_Delete |