共用方式為


Content Key Policies - Get

取得內容金鑰原則
取得媒體服務帳戶中內容密鑰原則的詳細數據

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}?api-version=2022-08-01

URI 參數

名稱 位於 必要 類型 Description
accountName
path True

string

媒體服務帳戶名稱。

contentKeyPolicyName
path True

string

內容金鑰原則名稱。

resourceGroupName
path True

string

Azure 訂用帳戶內的資源組名。

subscriptionId
path True

string

Microsoft Azure 訂用帳戶的唯一標識符。

api-version
query True

string

要與用戶端要求搭配使用的 API 版本。

回應

名稱 類型 Description
200 OK

ContentKeyPolicy

確定

Other Status Codes

ErrorResponse

詳細的錯誤資訊。

範例

Get a Content Key Policy by name

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/contentKeyPolicies/PolicyWithMultipleOptions?api-version=2022-08-01

Sample Response

{
  "name": "PolicyWithMultipleOptions",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithMultipleOptions",
  "type": "Microsoft.Media/mediaservices/contentKeyPolicies",
  "properties": {
    "policyId": "ed7f3d1b-cfa7-4181-b966-e0b3027eec3a",
    "created": "2015-12-01T00:00:00Z",
    "lastModified": "2016-12-02T00:00:00Z",
    "description": "A policy with multiple options.",
    "options": [
      {
        "policyOptionId": "caf1e28c-8288-4301-8c46-c0f9312c512f",
        "configuration": {
          "@odata.type": "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"
        },
        "restriction": {
          "@odata.type": "#Microsoft.Media.ContentKeyPolicyTokenRestriction",
          "issuer": "http://testacs",
          "audience": "urn:test",
          "primaryVerificationKey": {
            "@odata.type": "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey",
            "keyValue": ""
          },
          "alternateVerificationKeys": [],
          "requiredClaims": [
            {
              "claimType": "urn:microsoft:azure:mediaservices:contentkeyidentifier"
            },
            {
              "claimType": "DRM",
              "claimValue": "Widevine"
            }
          ],
          "restrictionTokenType": "Jwt"
        }
      },
      {
        "policyOptionId": "da346259-0cd6-4609-89dc-15ac131bd92f",
        "configuration": {
          "@odata.type": "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration",
          "widevineTemplate": "{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"
        },
        "restriction": {
          "@odata.type": "#Microsoft.Media.ContentKeyPolicyOpenRestriction"
        }
      }
    ]
  }
}

定義

名稱 Description
ContentKeyPolicy

內容金鑰原則資源。

ContentKeyPolicyClearKeyConfiguration

表示非DRM金鑰的組態。

ContentKeyPolicyFairPlayConfiguration

指定 FairPlay 授權的設定。

ContentKeyPolicyFairPlayOfflineRentalConfiguration
ContentKeyPolicyFairPlayRentalAndLeaseKeyType

租用和租用金鑰類型。

ContentKeyPolicyOpenRestriction

表示開啟的限制。 授權或金鑰將會在每個要求上傳遞。

ContentKeyPolicyOption

表示原則選項。

ContentKeyPolicyPlayReadyConfiguration

指定 PlayReady 授權的設定。

ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

指定內容金鑰標識碼位於 PlayReady 標頭中。

ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

指定在 PlayReady 組態中指定內容金鑰標識碼。

ContentKeyPolicyPlayReadyContentType

PlayReady 內容類型。

ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

設定明確的模擬電視輸出限制控制位。 如需進一步的詳細數據,請參閱 PlayReady 合規性規則。

ContentKeyPolicyPlayReadyLicense

PlayReady 授權

ContentKeyPolicyPlayReadyLicenseType

授權類型。

ContentKeyPolicyPlayReadyPlayRight

在 PlayReady 授權中設定 Play Right。

ContentKeyPolicyPlayReadyUnknownOutputPassingOption

設定授權的未知輸出處理設定。

ContentKeyPolicyRestrictionTokenType

Token 的類型。

ContentKeyPolicyRsaTokenKey

指定令牌驗證的 RSA 金鑰

ContentKeyPolicySymmetricTokenKey

指定令牌驗證的對稱金鑰。

ContentKeyPolicyTokenClaim

表示令牌宣告。

ContentKeyPolicyTokenRestriction

表示令牌限制。 提供的令牌必須符合這些需求,才能成功授權或密鑰傳遞。

ContentKeyPolicyUnknownConfiguration

代表目前 API 版本中無法使用的 ContentKeyPolicyConfiguration。

ContentKeyPolicyUnknownRestriction

代表目前 API 版本中無法使用的 ContentKeyPolicyRestriction。

ContentKeyPolicyWidevineConfiguration

指定Widevine授權的設定。

ContentKeyPolicyX509CertificateTokenKey

指定令牌驗證的憑證。

createdByType

建立資源的身分識別類型。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

SecurityLevel

安全性層級。

systemData

與建立和上次修改資源相關的元數據。

ContentKeyPolicy

內容金鑰原則資源。

名稱 類型 Description
id

string

資源的完整資源識別碼。 Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

資源的名稱

properties.created

string

原則的建立日期

properties.description

string

原則的說明。

properties.lastModified

string

原則的上次修改日期

properties.options

ContentKeyPolicyOption[]

金鑰原則選項。

properties.policyId

string

舊版原則識別碼。

systemData

systemData

與此資源相關的系統元數據。

type

string

資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

ContentKeyPolicyClearKeyConfiguration

表示非DRM金鑰的組態。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration

衍生型別的辨別子。

ContentKeyPolicyFairPlayConfiguration

指定 FairPlay 授權的設定。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration

衍生型別的辨別子。

ask

string

必須做為 FairPlay 應用程式秘密金鑰的金鑰。 這必須是base64編碼。

fairPlayPfx

string

PKCS 12 (pfx) 格式的 FairPlay 憑證 Base64 表示法, (包括私鑰) 。

fairPlayPfxPassword

string

以 PKCS 12 (pfx) 格式加密 FairPlay 憑證的密碼。

offlineRentalConfiguration

ContentKeyPolicyFairPlayOfflineRentalConfiguration

脫機租用原則

rentalAndLeaseKeyType

ContentKeyPolicyFairPlayRentalAndLeaseKeyType

租用和租用金鑰類型。

rentalDuration

integer

租用期間。 必須大於或等於 0。

ContentKeyPolicyFairPlayOfflineRentalConfiguration

名稱 類型 Description
playbackDurationSeconds

integer

播放持續時間

storageDurationSeconds

integer

儲存期間

ContentKeyPolicyFairPlayRentalAndLeaseKeyType

租用和租用金鑰類型。

名稱 類型 Description
DualExpiry

string

脫機租用的雙重到期日。

PersistentLimited

string

內容密鑰可以保存,且有效的持續時間受限於 [租用工期] 值

PersistentUnlimited

string

內容金鑰可以保留無限制的持續時間

Undefined

string

未指定金鑰持續時間。

Unknown

string

代表目前 API 版本中無法使用的 ContentKeyPolicyFairPlayRentalAndLeaseKeyType。

ContentKeyPolicyOpenRestriction

表示開啟的限制。 授權或金鑰將會在每個要求上傳遞。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyOpenRestriction

衍生型別的辨別子。

ContentKeyPolicyOption

表示原則選項。

名稱 類型 Description
configuration ContentKeyPolicyConfiguration:

金鑰傳遞組態。

name

string

原則選項描述。

policyOptionId

string

舊版原則選項標識碼。

restriction ContentKeyPolicyRestriction:

必須符合才能使用此組態傳遞金鑰的需求

ContentKeyPolicyPlayReadyConfiguration

指定 PlayReady 授權的設定。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration

衍生型別的辨別子。

licenses

ContentKeyPolicyPlayReadyLicense[]

PlayReady 授權。

responseCustomData

string

自訂回應數據。

ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

指定內容金鑰標識碼位於 PlayReady 標頭中。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

衍生型別的辨別子。

ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

指定在 PlayReady 組態中指定內容金鑰標識碼。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

衍生型別的辨別子。

keyId

string

內容金鑰識別碼。

ContentKeyPolicyPlayReadyContentType

PlayReady 內容類型。

名稱 類型 Description
UltraVioletDownload

string

資源下載內容類型。

UltraVioletStreaming

string

串流內容類型。

Unknown

string

代表目前 API 版本中無法使用的 ContentKeyPolicyPlayReadyContentType。

Unspecified

string

未指定的內容類型。

ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

設定明確的模擬電視輸出限制控制位。 如需進一步的詳細數據,請參閱 PlayReady 合規性規則。

名稱 類型 Description
bestEffort

boolean

指出是否以最佳努力為基礎強制執行此限制。

configurationData

integer

設定限制控制位。 必須介於 0 到 3 之間。

ContentKeyPolicyPlayReadyLicense

PlayReady 授權

名稱 類型 Description
allowTestDevices

boolean

旗標,指出測試裝置是否可以使用授權。

beginDate

string

授權的開始日期

contentKeyLocation ContentKeyPolicyPlayReadyContentKeyLocation:

內容金鑰位置。

contentType

ContentKeyPolicyPlayReadyContentType

PlayReady 內容類型。

expirationDate

string

授權的到期日。

gracePeriod

string

授權的寬限期。

licenseType

ContentKeyPolicyPlayReadyLicenseType

授權類型。

playRight

ContentKeyPolicyPlayReadyPlayRight

授權 PlayRight

relativeBeginDate

string

授權的相對開始日期。

relativeExpirationDate

string

授權的相對到期日。

securityLevel

SecurityLevel

安全性層級。

ContentKeyPolicyPlayReadyLicenseType

授權類型。

名稱 類型 Description
NonPersistent

string

非持續性授權。

Persistent

string

持續性授權。 允許離線播放。

Unknown

string

代表目前 API 版本中無法使用的 ContentKeyPolicyPlayReadyLicenseType。

ContentKeyPolicyPlayReadyPlayRight

在 PlayReady 授權中設定 Play Right。

名稱 類型 Description
agcAndColorStripeRestriction

integer

在授權中 (設定 AGC) 和色彩等量自動控制。 必須介於 0 到 3 之間。

allowPassingVideoContentToUnknownOutput

ContentKeyPolicyPlayReadyUnknownOutputPassingOption

設定授權的未知輸出處理設定。

analogVideoOpl

integer

指定壓縮數位音訊的輸出保護等級。

compressedDigitalAudioOpl

integer

指定壓縮數位音訊的輸出保護等級。

compressedDigitalVideoOpl

integer

指定壓縮數位視訊的輸出保護層級。

digitalVideoOnlyContentRestriction

boolean

啟用授權中類比元件視訊限制的影像條件約束。

explicitAnalogTelevisionOutputRestriction

ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

在授權中設定明確的模擬電視輸出限制。 設定數據必須介於 0 到 3 之間。

firstPlayExpiration

string

授權第一次用來播放內容之後,授權有效的時間量。

imageConstraintForAnalogComponentVideoRestriction

boolean

啟用授權中類比元件視訊限制的影像條件約束。

imageConstraintForAnalogComputerMonitorRestriction

boolean

啟用授權中類比元件視訊限制的影像條件約束。

scmsRestriction

integer

在授權中設定序列複製管理系統 (SCMS) 。 必須介於 0 到 3 之間。

uncompressedDigitalAudioOpl

integer

指定未壓縮數位音訊的輸出保護等級。

uncompressedDigitalVideoOpl

integer

指定未壓縮數位視訊的輸出保護等級。

ContentKeyPolicyPlayReadyUnknownOutputPassingOption

設定授權的未知輸出處理設定。

名稱 類型 Description
Allowed

string

允許將受保護內容的視訊部分傳遞至未知的輸出。

AllowedWithVideoConstriction

string

允許將受保護內容的視訊部分傳遞至未知輸出,但解析度受限。

NotAllowed

string

不允許將受保護內容的視訊部分傳遞至未知輸出。

Unknown

string

代表目前 API 版本中無法使用的 ContentKeyPolicyPlayReadyUnknownOutputPassingOption。

ContentKeyPolicyRestrictionTokenType

Token 的類型。

名稱 類型 Description
Jwt

string

JSON Web 令牌。

Swt

string

簡單的 Web 令牌。

Unknown

string

代表目前 API 版本中無法使用的 ContentKeyPolicyRestrictionTokenType。

ContentKeyPolicyRsaTokenKey

指定令牌驗證的 RSA 金鑰

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyRsaTokenKey

衍生型別的辨別子。

exponent

string

RSA 參數指數

modulus

string

RSA 參數模數

ContentKeyPolicySymmetricTokenKey

指定令牌驗證的對稱金鑰。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicySymmetricTokenKey

衍生型別的辨別子。

keyValue

string

索引鍵的索引鍵值

ContentKeyPolicyTokenClaim

表示令牌宣告。

名稱 類型 Description
claimType

string

令牌宣告類型。

claimValue

string

令牌宣告值。

ContentKeyPolicyTokenRestriction

表示令牌限制。 提供的令牌必須符合這些需求,才能成功授權或密鑰傳遞。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyTokenRestriction

衍生型別的辨別子。

alternateVerificationKeys ContentKeyPolicyRestrictionTokenKey[]:

替代驗證金鑰的清單。

audience

string

令牌的物件。

issuer

string

令牌簽發者。

openIdConnectDiscoveryDocument

string

OpenID connect 探索檔。

primaryVerificationKey ContentKeyPolicyRestrictionTokenKey:

主要驗證金鑰。

requiredClaims

ContentKeyPolicyTokenClaim[]

必要令牌宣告的清單。

restrictionTokenType

ContentKeyPolicyRestrictionTokenType

Token 的類型。

ContentKeyPolicyUnknownConfiguration

代表目前 API 版本中無法使用的 ContentKeyPolicyConfiguration。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyUnknownConfiguration

衍生型別的辨別子。

ContentKeyPolicyUnknownRestriction

代表目前 API 版本中無法使用的 ContentKeyPolicyRestriction。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyUnknownRestriction

衍生型別的辨別子。

ContentKeyPolicyWidevineConfiguration

指定Widevine授權的設定。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyWidevineConfiguration

衍生型別的辨別子。

widevineTemplate

string

Widevine 範本。

ContentKeyPolicyX509CertificateTokenKey

指定令牌驗證的憑證。

名稱 類型 Description
@odata.type string:

#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey

衍生型別的辨別子。

rawBody

string

PKCS 12 格式的憑證原始數據欄位, (.NET) 中的 X509Certificate2

createdByType

建立資源的身分識別類型。

名稱 類型 Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

SecurityLevel

安全性層級。

名稱 類型 Description
SL150

string

針對開發或測試中的用戶端。 沒有保護,無法防止未經授權的使用。

SL2000

string

針對使用商業內容的強化裝置和應用程式。 軟體或硬體保護。

SL3000

string

僅適用於強化的裝置。 硬體保護。

Unknown

string

表示目前 API 版本中無法使用的 SecurityLevel。

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string

資源建立的時間戳 (UTC) 。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。