Article 12/28/2022
1 contributor
Feedback
In this article
Bicep resource definition
The mediaServices/streamingPolicies resource type can be deployed to:
For a list of changed properties in each API version, see change log .
To create a Microsoft.Media/mediaServices/streamingPolicies resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Media/mediaServices/streamingPolicies@2018-06-01-preview' = {
name: 'string'
parent: resourceSymbolicName
properties: {
commonEncryptionCbcs: {
clearTracks: [
{
trackSelections: [
{
operation: 'string'
property: 'string'
value: 'string'
}
]
}
]
contentKeys: {
defaultKey: {
label: 'string'
policyName: 'string'
}
keyToTrackMappings: [
{
label: 'string'
policyName: 'string'
tracks: [
{
trackSelections: [
{
operation: 'string'
property: 'string'
value: 'string'
}
]
}
]
}
]
}
drm: {
fairPlay: {
allowPersistentLicense: bool
customLicenseAcquisitionUrlTemplate: 'string'
}
playReady: {
customLicenseAcquisitionUrlTemplate: 'string'
playReadyCustomAttributes: 'string'
}
widevine: {
customLicenseAcquisitionUrlTemplate: 'string'
}
}
enabledProtocols: {
dash: bool
download: bool
hls: bool
smoothStreaming: bool
}
}
commonEncryptionCenc: {
clearTracks: [
{
trackSelections: [
{
operation: 'string'
property: 'string'
value: 'string'
}
]
}
]
contentKeys: {
defaultKey: {
label: 'string'
policyName: 'string'
}
keyToTrackMappings: [
{
label: 'string'
policyName: 'string'
tracks: [
{
trackSelections: [
{
operation: 'string'
property: 'string'
value: 'string'
}
]
}
]
}
]
}
drm: {
playReady: {
customLicenseAcquisitionUrlTemplate: 'string'
playReadyCustomAttributes: 'string'
}
widevine: {
customLicenseAcquisitionUrlTemplate: 'string'
}
}
enabledProtocols: {
dash: bool
download: bool
hls: bool
smoothStreaming: bool
}
}
defaultContentKeyPolicyName: 'string'
envelopeEncryption: {
clearTracks: [
{
trackSelections: [
{
operation: 'string'
property: 'string'
value: 'string'
}
]
}
]
contentKeys: {
defaultKey: {
label: 'string'
policyName: 'string'
}
keyToTrackMappings: [
{
label: 'string'
policyName: 'string'
tracks: [
{
trackSelections: [
{
operation: 'string'
property: 'string'
value: 'string'
}
]
}
]
}
]
}
customKeyAcquisitionUrlTemplate: 'string'
enabledProtocols: {
dash: bool
download: bool
hls: bool
smoothStreaming: bool
}
}
noEncryption: {
enabledProtocols: {
dash: bool
download: bool
hls: bool
smoothStreaming: bool
}
}
}
}
Property values
Name
Description
Value
name
The resource name See how to set names and types for child resources in Bicep .
string (required)
parent
In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource .
Symbolic name for resource of type: mediaServices
properties
Class to specify properties of Streaming Policy
StreamingPolicyProperties
StreamingPolicyProperties
Name
Description
Value
commonEncryptionCbcs
Configuration of CommonEncryptionCbcs
CommonEncryptionCbcs
commonEncryptionCenc
Configuration of CommonEncryptionCenc
CommonEncryptionCenc
defaultContentKeyPolicyName
Default ContentKey used by current Streaming Policy
string
envelopeEncryption
Configuration of EnvelopeEncryption
EnvelopeEncryption
noEncryption
Configurations of NoEncryption
NoEncryption
CommonEncryptionCbcs
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
drm
Configuration of DRMs for current encryption scheme
CbcsDrmConfiguration
enabledProtocols
Representing supported protocols
EnabledProtocols
TrackSelection
Name
Description
Value
trackSelections
TrackSelections is a track property condition list which can specify track(s)
TrackPropertyCondition []
TrackPropertyCondition
Name
Description
Value
operation
Track property condition operation
'Equal' 'Unknown' (required)
property
Track property type
'FourCC' 'Unknown' (required)
value
Track property value
string
StreamingPolicyContentKeys
Name
Description
Value
defaultKey
Default content key for an encryption scheme
DefaultKey
keyToTrackMappings
Representing tracks needs separate content key
StreamingPolicyContentKey []
DefaultKey
Name
Description
Value
label
Label can be used to specify Content Key when creating a Streaming Locator
string
policyName
Policy used by Default Key
string
StreamingPolicyContentKey
Name
Description
Value
label
Label can be used to specify Content Key when creating a Streaming Locator
string
policyName
Policy used by Content Key
string
tracks
Tracks which use this content key
TrackSelection []
CbcsDrmConfiguration
StreamingPolicyFairPlayConfiguration
Name
Description
Value
allowPersistentLicense
All license to be persistent or not
bool (required)
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
StreamingPolicyPlayReadyConfiguration
Name
Description
Value
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
playReadyCustomAttributes
Custom attributes for PlayReady
string
StreamingPolicyWidevineConfiguration
Name
Description
Value
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
EnabledProtocols
Name
Description
Value
dash
Enable DASH protocol or not
bool (required)
download
Enable Download protocol or not
bool (required)
hls
Enable HLS protocol or not
bool (required)
smoothStreaming
Enable SmoothStreaming protocol or not
bool (required)
CommonEncryptionCenc
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
drm
Configuration of DRMs for CommonEncryptionCenc encryption scheme
CencDrmConfiguration
enabledProtocols
Representing supported protocols
EnabledProtocols
CencDrmConfiguration
EnvelopeEncryption
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
customKeyAcquisitionUrlTemplate
KeyAcquisitionUrlTemplate is used to point to user specified service to delivery content keys
string
enabledProtocols
Representing supported protocols
EnabledProtocols
NoEncryption
Name
Description
Value
enabledProtocols
Representing supported protocols
EnabledProtocols
ARM template resource definition
The mediaServices/streamingPolicies resource type can be deployed to:
For a list of changed properties in each API version, see change log .
To create a Microsoft.Media/mediaServices/streamingPolicies resource, add the following JSON to your template.
{
"type": "Microsoft.Media/mediaServices/streamingPolicies",
"apiVersion": "2018-06-01-preview",
"name": "string",
"properties": {
"commonEncryptionCbcs": {
"clearTracks": [
{
"trackSelections": [
{
"operation": "string",
"property": "string",
"value": "string"
}
]
}
],
"contentKeys": {
"defaultKey": {
"label": "string",
"policyName": "string"
},
"keyToTrackMappings": [
{
"label": "string",
"policyName": "string",
"tracks": [
{
"trackSelections": [
{
"operation": "string",
"property": "string",
"value": "string"
}
]
}
]
}
]
},
"drm": {
"fairPlay": {
"allowPersistentLicense": "bool",
"customLicenseAcquisitionUrlTemplate": "string"
},
"playReady": {
"customLicenseAcquisitionUrlTemplate": "string",
"playReadyCustomAttributes": "string"
},
"widevine": {
"customLicenseAcquisitionUrlTemplate": "string"
}
},
"enabledProtocols": {
"dash": "bool",
"download": "bool",
"hls": "bool",
"smoothStreaming": "bool"
}
},
"commonEncryptionCenc": {
"clearTracks": [
{
"trackSelections": [
{
"operation": "string",
"property": "string",
"value": "string"
}
]
}
],
"contentKeys": {
"defaultKey": {
"label": "string",
"policyName": "string"
},
"keyToTrackMappings": [
{
"label": "string",
"policyName": "string",
"tracks": [
{
"trackSelections": [
{
"operation": "string",
"property": "string",
"value": "string"
}
]
}
]
}
]
},
"drm": {
"playReady": {
"customLicenseAcquisitionUrlTemplate": "string",
"playReadyCustomAttributes": "string"
},
"widevine": {
"customLicenseAcquisitionUrlTemplate": "string"
}
},
"enabledProtocols": {
"dash": "bool",
"download": "bool",
"hls": "bool",
"smoothStreaming": "bool"
}
},
"defaultContentKeyPolicyName": "string",
"envelopeEncryption": {
"clearTracks": [
{
"trackSelections": [
{
"operation": "string",
"property": "string",
"value": "string"
}
]
}
],
"contentKeys": {
"defaultKey": {
"label": "string",
"policyName": "string"
},
"keyToTrackMappings": [
{
"label": "string",
"policyName": "string",
"tracks": [
{
"trackSelections": [
{
"operation": "string",
"property": "string",
"value": "string"
}
]
}
]
}
]
},
"customKeyAcquisitionUrlTemplate": "string",
"enabledProtocols": {
"dash": "bool",
"download": "bool",
"hls": "bool",
"smoothStreaming": "bool"
}
},
"noEncryption": {
"enabledProtocols": {
"dash": "bool",
"download": "bool",
"hls": "bool",
"smoothStreaming": "bool"
}
}
}
}
Property values
Name
Description
Value
type
The resource type
'Microsoft.Media/mediaServices/streamingPolicies'
apiVersion
The resource api version
'2018-06-01-preview'
name
The resource name See how to set names and types for child resources in JSON ARM templates .
string (required)
properties
Class to specify properties of Streaming Policy
StreamingPolicyProperties
StreamingPolicyProperties
Name
Description
Value
commonEncryptionCbcs
Configuration of CommonEncryptionCbcs
CommonEncryptionCbcs
commonEncryptionCenc
Configuration of CommonEncryptionCenc
CommonEncryptionCenc
defaultContentKeyPolicyName
Default ContentKey used by current Streaming Policy
string
envelopeEncryption
Configuration of EnvelopeEncryption
EnvelopeEncryption
noEncryption
Configurations of NoEncryption
NoEncryption
CommonEncryptionCbcs
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
drm
Configuration of DRMs for current encryption scheme
CbcsDrmConfiguration
enabledProtocols
Representing supported protocols
EnabledProtocols
TrackSelection
Name
Description
Value
trackSelections
TrackSelections is a track property condition list which can specify track(s)
TrackPropertyCondition []
TrackPropertyCondition
Name
Description
Value
operation
Track property condition operation
'Equal' 'Unknown' (required)
property
Track property type
'FourCC' 'Unknown' (required)
value
Track property value
string
StreamingPolicyContentKeys
Name
Description
Value
defaultKey
Default content key for an encryption scheme
DefaultKey
keyToTrackMappings
Representing tracks needs separate content key
StreamingPolicyContentKey []
DefaultKey
Name
Description
Value
label
Label can be used to specify Content Key when creating a Streaming Locator
string
policyName
Policy used by Default Key
string
StreamingPolicyContentKey
Name
Description
Value
label
Label can be used to specify Content Key when creating a Streaming Locator
string
policyName
Policy used by Content Key
string
tracks
Tracks which use this content key
TrackSelection []
CbcsDrmConfiguration
StreamingPolicyFairPlayConfiguration
Name
Description
Value
allowPersistentLicense
All license to be persistent or not
bool (required)
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
StreamingPolicyPlayReadyConfiguration
Name
Description
Value
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
playReadyCustomAttributes
Custom attributes for PlayReady
string
StreamingPolicyWidevineConfiguration
Name
Description
Value
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
EnabledProtocols
Name
Description
Value
dash
Enable DASH protocol or not
bool (required)
download
Enable Download protocol or not
bool (required)
hls
Enable HLS protocol or not
bool (required)
smoothStreaming
Enable SmoothStreaming protocol or not
bool (required)
CommonEncryptionCenc
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
drm
Configuration of DRMs for CommonEncryptionCenc encryption scheme
CencDrmConfiguration
enabledProtocols
Representing supported protocols
EnabledProtocols
CencDrmConfiguration
EnvelopeEncryption
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
customKeyAcquisitionUrlTemplate
KeyAcquisitionUrlTemplate is used to point to user specified service to delivery content keys
string
enabledProtocols
Representing supported protocols
EnabledProtocols
NoEncryption
Name
Description
Value
enabledProtocols
Representing supported protocols
EnabledProtocols
The mediaServices/streamingPolicies resource type can be deployed to:
For a list of changed properties in each API version, see change log .
To create a Microsoft.Media/mediaServices/streamingPolicies resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Media/mediaServices/streamingPolicies@2018-06-01-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
commonEncryptionCbcs = {
clearTracks = [
{
trackSelections = [
{
operation = "string"
property = "string"
value = "string"
}
]
}
]
contentKeys = {
defaultKey = {
label = "string"
policyName = "string"
}
keyToTrackMappings = [
{
label = "string"
policyName = "string"
tracks = [
{
trackSelections = [
{
operation = "string"
property = "string"
value = "string"
}
]
}
]
}
]
}
drm = {
fairPlay = {
allowPersistentLicense = bool
customLicenseAcquisitionUrlTemplate = "string"
}
playReady = {
customLicenseAcquisitionUrlTemplate = "string"
playReadyCustomAttributes = "string"
}
widevine = {
customLicenseAcquisitionUrlTemplate = "string"
}
}
enabledProtocols = {
dash = bool
download = bool
hls = bool
smoothStreaming = bool
}
}
commonEncryptionCenc = {
clearTracks = [
{
trackSelections = [
{
operation = "string"
property = "string"
value = "string"
}
]
}
]
contentKeys = {
defaultKey = {
label = "string"
policyName = "string"
}
keyToTrackMappings = [
{
label = "string"
policyName = "string"
tracks = [
{
trackSelections = [
{
operation = "string"
property = "string"
value = "string"
}
]
}
]
}
]
}
drm = {
playReady = {
customLicenseAcquisitionUrlTemplate = "string"
playReadyCustomAttributes = "string"
}
widevine = {
customLicenseAcquisitionUrlTemplate = "string"
}
}
enabledProtocols = {
dash = bool
download = bool
hls = bool
smoothStreaming = bool
}
}
defaultContentKeyPolicyName = "string"
envelopeEncryption = {
clearTracks = [
{
trackSelections = [
{
operation = "string"
property = "string"
value = "string"
}
]
}
]
contentKeys = {
defaultKey = {
label = "string"
policyName = "string"
}
keyToTrackMappings = [
{
label = "string"
policyName = "string"
tracks = [
{
trackSelections = [
{
operation = "string"
property = "string"
value = "string"
}
]
}
]
}
]
}
customKeyAcquisitionUrlTemplate = "string"
enabledProtocols = {
dash = bool
download = bool
hls = bool
smoothStreaming = bool
}
}
noEncryption = {
enabledProtocols = {
dash = bool
download = bool
hls = bool
smoothStreaming = bool
}
}
}
})
}
Property values
Name
Description
Value
type
The resource type
"Microsoft.Media/mediaServices/streamingPolicies@2018-06-01-preview"
name
The resource name
string (required)
parent_id
The ID of the resource that is the parent for this resource.
ID for resource of type: mediaServices
properties
Class to specify properties of Streaming Policy
StreamingPolicyProperties
StreamingPolicyProperties
Name
Description
Value
commonEncryptionCbcs
Configuration of CommonEncryptionCbcs
CommonEncryptionCbcs
commonEncryptionCenc
Configuration of CommonEncryptionCenc
CommonEncryptionCenc
defaultContentKeyPolicyName
Default ContentKey used by current Streaming Policy
string
envelopeEncryption
Configuration of EnvelopeEncryption
EnvelopeEncryption
noEncryption
Configurations of NoEncryption
NoEncryption
CommonEncryptionCbcs
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
drm
Configuration of DRMs for current encryption scheme
CbcsDrmConfiguration
enabledProtocols
Representing supported protocols
EnabledProtocols
TrackSelection
Name
Description
Value
trackSelections
TrackSelections is a track property condition list which can specify track(s)
TrackPropertyCondition []
TrackPropertyCondition
Name
Description
Value
operation
Track property condition operation
"Equal" "Unknown" (required)
property
Track property type
"FourCC" "Unknown" (required)
value
Track property value
string
StreamingPolicyContentKeys
Name
Description
Value
defaultKey
Default content key for an encryption scheme
DefaultKey
keyToTrackMappings
Representing tracks needs separate content key
StreamingPolicyContentKey []
DefaultKey
Name
Description
Value
label
Label can be used to specify Content Key when creating a Streaming Locator
string
policyName
Policy used by Default Key
string
StreamingPolicyContentKey
Name
Description
Value
label
Label can be used to specify Content Key when creating a Streaming Locator
string
policyName
Policy used by Content Key
string
tracks
Tracks which use this content key
TrackSelection []
CbcsDrmConfiguration
StreamingPolicyFairPlayConfiguration
Name
Description
Value
allowPersistentLicense
All license to be persistent or not
bool (required)
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
StreamingPolicyPlayReadyConfiguration
Name
Description
Value
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
playReadyCustomAttributes
Custom attributes for PlayReady
string
StreamingPolicyWidevineConfiguration
Name
Description
Value
customLicenseAcquisitionUrlTemplate
The template for a customer service to deliver keys to end users. Not needed when using Azure Media Services for issuing keys.
string
EnabledProtocols
Name
Description
Value
dash
Enable DASH protocol or not
bool (required)
download
Enable Download protocol or not
bool (required)
hls
Enable HLS protocol or not
bool (required)
smoothStreaming
Enable SmoothStreaming protocol or not
bool (required)
CommonEncryptionCenc
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
drm
Configuration of DRMs for CommonEncryptionCenc encryption scheme
CencDrmConfiguration
enabledProtocols
Representing supported protocols
EnabledProtocols
CencDrmConfiguration
EnvelopeEncryption
Name
Description
Value
clearTracks
Representing which tracks should not be encrypted
TrackSelection []
contentKeys
Representing default content key for each encryption scheme and separate content keys for specific tracks
StreamingPolicyContentKeys
customKeyAcquisitionUrlTemplate
KeyAcquisitionUrlTemplate is used to point to user specified service to delivery content keys
string
enabledProtocols
Representing supported protocols
EnabledProtocols
NoEncryption
Name
Description
Value
enabledProtocols
Representing supported protocols
EnabledProtocols