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
預設金鑰
| 名字 |
描述 |
價值 |
| 標籤 |
建立串流定位器時,可以使用標籤來指定內容密鑰 |
字串 |
| 政策名稱 |
預設金鑰所使用的原則 |
字串 |
EnabledProtocols
| 名字 |
描述 |
價值 |
| 破折號 |
啟用 DASH 通訊協定或未啟用 |
布林 (必要) |
| 下載 |
啟用下載通訊協定 |
布林 (必要) |
| hls |
啟用 HLS 通訊協定或否 |
布林 (必要) |
| smoothStreaming |
啟用 SmoothStreaming 通訊協定或否 |
布林 (必要) |
EnvelopeEncryption
| 名字 |
描述 |
價值 |
| clearTracks |
表示不應該加密哪些曲目 |
TrackSelection[] |
| contentKeys |
代表每個加密配置的預設內容密鑰,以及特定曲目的不同內容金鑰 |
StreamingPolicyContentKeys |
| customKeyAcquisitionUrlTemplate |
自訂服務 URL 的範本,將金鑰傳遞給使用者播放機。 使用 Azure 媒體服務發出金鑰時不需要。 此範本支援服務將在運行時間更新的可取代令牌,其值為要求特定的值。 目前支援的令牌值為 {AlternativeMediaId},其會取代為 StreamingLocatorId.AlternativeMediaId 和 {ContentKeyId}的值,其會取代為所要求的密鑰標識碼值。 |
字串 |
| enabledProtocols |
表示支援的通訊協定 |
EnabledProtocols |
NoEncryption
StreamingPolicyContentKey
| 名字 |
描述 |
價值 |
| 標籤 |
建立串流定位器時,可以使用標籤來指定內容密鑰 |
字串 |
| 政策名稱 |
內容金鑰所使用的原則 |
字串 |
| 軌道 |
追蹤使用此內容金鑰的追蹤 |
TrackSelection[] |
StreamingPolicyContentKeys
StreamingPolicyFairPlayConfiguration
| 名字 |
描述 |
價值 |
| allowPersistentLicense |
所有要永續性的授權 |
布林 (必要) |
| 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' 未知未知 ( 必要 ) |
| 財產 |
追蹤屬性類型 |
'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
預設金鑰
| 名字 |
描述 |
價值 |
| 標籤 |
建立串流定位器時,可以使用標籤來指定內容密鑰 |
字串 |
| 政策名稱 |
預設金鑰所使用的原則 |
字串 |
EnabledProtocols
| 名字 |
描述 |
價值 |
| 破折號 |
啟用 DASH 通訊協定或未啟用 |
布林 (必要) |
| 下載 |
啟用下載通訊協定 |
布林 (必要) |
| hls |
啟用 HLS 通訊協定或否 |
布林 (必要) |
| smoothStreaming |
啟用 SmoothStreaming 通訊協定或否 |
布林 (必要) |
EnvelopeEncryption
| 名字 |
描述 |
價值 |
| clearTracks |
表示不應該加密哪些曲目 |
TrackSelection[] |
| contentKeys |
代表每個加密配置的預設內容密鑰,以及特定曲目的不同內容金鑰 |
StreamingPolicyContentKeys |
| customKeyAcquisitionUrlTemplate |
自訂服務 URL 的範本,將金鑰傳遞給使用者播放機。 使用 Azure 媒體服務發出金鑰時不需要。 此範本支援服務將在運行時間更新的可取代令牌,其值為要求特定的值。 目前支援的令牌值為 {AlternativeMediaId},其會取代為 StreamingLocatorId.AlternativeMediaId 和 {ContentKeyId}的值,其會取代為所要求的密鑰標識碼值。 |
字串 |
| enabledProtocols |
表示支援的通訊協定 |
EnabledProtocols |
| 名字 |
描述 |
價值 |
| apiVersion |
API 版本 |
'2018-07-01' |
| 名字 |
資源名稱 |
字串 (必要) |
| 性能 |
指定串流原則屬性的類別 |
StreamingPolicyProperties |
| 類型 |
資源類型 |
'Microsoft.Media/mediaServices/streamingPolicies' |
NoEncryption
StreamingPolicyContentKey
| 名字 |
描述 |
價值 |
| 標籤 |
建立串流定位器時,可以使用標籤來指定內容密鑰 |
字串 |
| 政策名稱 |
內容金鑰所使用的原則 |
字串 |
| 軌道 |
追蹤使用此內容金鑰的追蹤 |
TrackSelection[] |
StreamingPolicyContentKeys
StreamingPolicyFairPlayConfiguration
| 名字 |
描述 |
價值 |
| allowPersistentLicense |
所有要永續性的授權 |
布林 (必要) |
| 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' 未知未知 ( 必要 ) |
| 財產 |
追蹤屬性類型 |
'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
預設金鑰
| 名字 |
描述 |
價值 |
| 標籤 |
建立串流定位器時,可以使用標籤來指定內容密鑰 |
字串 |
| 政策名稱 |
預設金鑰所使用的原則 |
字串 |
EnabledProtocols
| 名字 |
描述 |
價值 |
| 破折號 |
啟用 DASH 通訊協定或未啟用 |
布林 (必要) |
| 下載 |
啟用下載通訊協定 |
布林 (必要) |
| hls |
啟用 HLS 通訊協定或否 |
布林 (必要) |
| smoothStreaming |
啟用 SmoothStreaming 通訊協定或否 |
布林 (必要) |
EnvelopeEncryption
| 名字 |
描述 |
價值 |
| clearTracks |
表示不應該加密哪些曲目 |
TrackSelection[] |
| contentKeys |
代表每個加密配置的預設內容密鑰,以及特定曲目的不同內容金鑰 |
StreamingPolicyContentKeys |
| customKeyAcquisitionUrlTemplate |
自訂服務 URL 的範本,將金鑰傳遞給使用者播放機。 使用 Azure 媒體服務發出金鑰時不需要。 此範本支援服務將在運行時間更新的可取代令牌,其值為要求特定的值。 目前支援的令牌值為 {AlternativeMediaId},其會取代為 StreamingLocatorId.AlternativeMediaId 和 {ContentKeyId}的值,其會取代為所要求的密鑰標識碼值。 |
字串 |
| enabledProtocols |
表示支援的通訊協定 |
EnabledProtocols |
NoEncryption
StreamingPolicyContentKey
| 名字 |
描述 |
價值 |
| 標籤 |
建立串流定位器時,可以使用標籤來指定內容密鑰 |
字串 |
| 政策名稱 |
內容金鑰所使用的原則 |
字串 |
| 軌道 |
追蹤使用此內容金鑰的追蹤 |
TrackSelection[] |
StreamingPolicyContentKeys
StreamingPolicyFairPlayConfiguration
| 名字 |
描述 |
價值 |
| allowPersistentLicense |
所有要永續性的授權 |
布林 (必要) |
| 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' 未知未知 ( 必要 ) |
| 財產 |
追蹤屬性類型 |
'FourCC' 未知未知 ( 必要 ) |
| 價值 |
追蹤屬性值 |
字串 |
TrackSelection