Bicep 资源定义
可以使用目标操作部署 mediaServices/streamingPolicies 资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.Media/mediaServices/streamingPolicies 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.Media/mediaServices/streamingPolicies@2018-07-01' = {
parent: resourceSymbolicName
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
}
}
}
}
属性值
CbcsDrmConfiguration
CencDrmConfiguration
CommonEncryptionCbcs
CommonEncryptionCenc
DefaultKey
| 名字 |
描述 |
价值 |
| 标签 |
创建流式处理定位符时,标签可用于指定内容密钥 |
字符串 |
| 政策名称 |
默认密钥使用的策略 |
字符串 |
EnabledProtocols
| 名字 |
描述 |
价值 |
| 破折号 |
启用 DASH 协议 |
bool (必需) |
| 下载 |
启用下载协议 |
bool (必需) |
| hls |
启用 HLS 协议 |
bool (必需) |
| smoothStreaming |
启用平滑流式处理协议 |
bool (必需) |
EnvelopeEncryption
| 名字 |
描述 |
价值 |
| clearTracks |
表示不应加密的曲目 |
TrackSelection[] |
| contentKeys |
表示每个加密方案的默认内容密钥,以及特定曲目的不同内容密钥 |
StreamingPolicyContentKeys |
| customKeyAcquisitionUrlTemplate |
将密钥传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发密钥时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
| enabledProtocols |
表示支持的协议 |
EnabledProtocols |
NoEncryption
StreamingPolicyContentKey
| 名字 |
描述 |
价值 |
| 标签 |
创建流式处理定位符时,标签可用于指定内容密钥 |
字符串 |
| 政策名称 |
内容密钥使用的策略 |
字符串 |
| 轨道 |
跟踪使用此内容密钥的跟踪 |
TrackSelection[] |
StreamingPolicyContentKeys
StreamingPolicyFairPlayConfiguration
| 名字 |
描述 |
价值 |
| allowPersistentLicense |
要永久或不具有的所有许可证 |
bool (必需) |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
StreamingPolicyPlayReadyConfiguration
| 名字 |
描述 |
价值 |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
| playReadyCustomAttributes |
PlayReady 的自定义属性 |
字符串 |
StreamingPolicyProperties
StreamingPolicyWidevineConfiguration
| 名字 |
描述 |
价值 |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
TrackPropertyCondition
| 名字 |
描述 |
价值 |
| 操作 |
跟踪属性条件操作 |
“Equal” “未知”(必需) |
| 财产 |
Track 属性类型 |
“FourCC” “未知”(必需) |
| 价值 |
跟踪属性值 |
字符串 |
TrackSelection
ARM 模板资源定义
可以使用目标操作部署 mediaServices/streamingPolicies 资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.Media/mediaServices/streamingPolicies 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.Media/mediaServices/streamingPolicies",
"apiVersion": "2018-07-01",
"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"
}
}
}
}
属性值
CbcsDrmConfiguration
CencDrmConfiguration
CommonEncryptionCbcs
CommonEncryptionCenc
DefaultKey
| 名字 |
描述 |
价值 |
| 标签 |
创建流式处理定位符时,标签可用于指定内容密钥 |
字符串 |
| 政策名称 |
默认密钥使用的策略 |
字符串 |
EnabledProtocols
| 名字 |
描述 |
价值 |
| 破折号 |
启用 DASH 协议 |
bool (必需) |
| 下载 |
启用下载协议 |
bool (必需) |
| hls |
启用 HLS 协议 |
bool (必需) |
| smoothStreaming |
启用平滑流式处理协议 |
bool (必需) |
EnvelopeEncryption
| 名字 |
描述 |
价值 |
| clearTracks |
表示不应加密的曲目 |
TrackSelection[] |
| contentKeys |
表示每个加密方案的默认内容密钥,以及特定曲目的不同内容密钥 |
StreamingPolicyContentKeys |
| customKeyAcquisitionUrlTemplate |
将密钥传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发密钥时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
| enabledProtocols |
表示支持的协议 |
EnabledProtocols |
| 名字 |
描述 |
价值 |
| apiVersion |
API 版本 |
'2018-07-01' |
| 名字 |
资源名称 |
string (必需) |
| 性能 |
用于指定流式处理策略属性的类 |
StreamingPolicyProperties |
| 类型 |
资源类型 |
“Microsoft.Media/mediaServices/streamingPolicies” |
NoEncryption
StreamingPolicyContentKey
| 名字 |
描述 |
价值 |
| 标签 |
创建流式处理定位符时,标签可用于指定内容密钥 |
字符串 |
| 政策名称 |
内容密钥使用的策略 |
字符串 |
| 轨道 |
跟踪使用此内容密钥的跟踪 |
TrackSelection[] |
StreamingPolicyContentKeys
StreamingPolicyFairPlayConfiguration
| 名字 |
描述 |
价值 |
| allowPersistentLicense |
要永久或不具有的所有许可证 |
bool (必需) |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
StreamingPolicyPlayReadyConfiguration
| 名字 |
描述 |
价值 |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
| playReadyCustomAttributes |
PlayReady 的自定义属性 |
字符串 |
StreamingPolicyProperties
StreamingPolicyWidevineConfiguration
| 名字 |
描述 |
价值 |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
TrackPropertyCondition
| 名字 |
描述 |
价值 |
| 操作 |
跟踪属性条件操作 |
“Equal” “未知”(必需) |
| 财产 |
Track 属性类型 |
“FourCC” “未知”(必需) |
| 价值 |
跟踪属性值 |
字符串 |
TrackSelection
用法示例
可以使用目标操作部署 mediaServices/streamingPolicies 资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.Media/mediaServices/streamingPolicies 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Media/mediaServices/streamingPolicies@2018-07-01"
name = "string"
parent_id = "string"
body = {
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
}
}
}
}
}
属性值
CbcsDrmConfiguration
CencDrmConfiguration
CommonEncryptionCbcs
CommonEncryptionCenc
DefaultKey
| 名字 |
描述 |
价值 |
| 标签 |
创建流式处理定位符时,标签可用于指定内容密钥 |
字符串 |
| 政策名称 |
默认密钥使用的策略 |
字符串 |
EnabledProtocols
| 名字 |
描述 |
价值 |
| 破折号 |
启用 DASH 协议 |
bool (必需) |
| 下载 |
启用下载协议 |
bool (必需) |
| hls |
启用 HLS 协议 |
bool (必需) |
| smoothStreaming |
启用平滑流式处理协议 |
bool (必需) |
EnvelopeEncryption
| 名字 |
描述 |
价值 |
| clearTracks |
表示不应加密的曲目 |
TrackSelection[] |
| contentKeys |
表示每个加密方案的默认内容密钥,以及特定曲目的不同内容密钥 |
StreamingPolicyContentKeys |
| customKeyAcquisitionUrlTemplate |
将密钥传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发密钥时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
| enabledProtocols |
表示支持的协议 |
EnabledProtocols |
NoEncryption
StreamingPolicyContentKey
| 名字 |
描述 |
价值 |
| 标签 |
创建流式处理定位符时,标签可用于指定内容密钥 |
字符串 |
| 政策名称 |
内容密钥使用的策略 |
字符串 |
| 轨道 |
跟踪使用此内容密钥的跟踪 |
TrackSelection[] |
StreamingPolicyContentKeys
StreamingPolicyFairPlayConfiguration
| 名字 |
描述 |
价值 |
| allowPersistentLicense |
要永久或不具有的所有许可证 |
bool (必需) |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
StreamingPolicyPlayReadyConfiguration
| 名字 |
描述 |
价值 |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
| playReadyCustomAttributes |
PlayReady 的自定义属性 |
字符串 |
StreamingPolicyProperties
StreamingPolicyWidevineConfiguration
| 名字 |
描述 |
价值 |
| customLicenseAcquisitionUrlTemplate |
将许可证传送给最终用户玩家的自定义服务的 URL 的模板。 使用 Azure 媒体服务颁发许可证时不需要。 该模板支持服务在运行时将使用特定于请求的值更新的可替换令牌。 当前支持的令牌值为 {AlternativeMediaId},该值替换为 StreamingLocatorId.AlternativeMediaId 的值和 {ContentKeyId},该值替换为所请求的密钥的标识符值。 |
字符串 |
TrackPropertyCondition
| 名字 |
描述 |
价值 |
| 操作 |
跟踪属性条件操作 |
“Equal” “未知”(必需) |
| 财产 |
Track 属性类型 |
“FourCC” “未知”(必需) |
| 价值 |
跟踪属性值 |
字符串 |
TrackSelection