你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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 参数

名称 必需 类型 说明
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 的版本。

响应

名称 类型 说明
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"
        }
      }
    ]
  }
}

定义

名称 说明
ContentKeyPolicy

内容密钥策略资源。

ContentKeyPolicyClearKeyConfiguration

表示非 DRM 密钥的配置。

ContentKeyPolicyFairPlayConfiguration

指定 FairPlay 许可证的配置。

ContentKeyPolicyFairPlayOfflineRentalConfiguration
ContentKeyPolicyFairPlayRentalAndLeaseKeyType

租赁密钥和租用密钥类型。

ContentKeyPolicyOpenRestriction

表示开放限制。 许可证或密钥将针对每个请求传递。

ContentKeyPolicyOption

表示策略选项。

ContentKeyPolicyPlayReadyConfiguration

指定 PlayReady 许可证的配置。

ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

指定内容密钥 ID 位于 PlayReady 标头中。

ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

指定在 PlayReady 配置中指定内容密钥 ID。

ContentKeyPolicyPlayReadyContentType

PlayReady 内容类型。

ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

配置显式模拟电视输出限制控制位。 有关详细信息,请参阅 PlayReady 合规性规则。

ContentKeyPolicyPlayReadyLicense

PlayReady 许可证

ContentKeyPolicyPlayReadyLicenseType

许可证类型。

ContentKeyPolicyPlayReadyPlayRight

在 PlayReady 许可证中配置播放权限。

ContentKeyPolicyPlayReadyUnknownOutputPassingOption

配置许可证的未知输出处理设置。

ContentKeyPolicyRestrictionTokenType

令牌类型。

ContentKeyPolicyRsaTokenKey

指定用于令牌验证的 RSA 密钥

ContentKeyPolicySymmetricTokenKey

指定用于令牌验证的对称密钥。

ContentKeyPolicyTokenClaim

表示令牌声明。

ContentKeyPolicyTokenRestriction

表示令牌限制。 提供的令牌必须满足这些要求才能成功传递许可证或密钥。

ContentKeyPolicyUnknownConfiguration

表示在当前 API 版本中不可用的 ContentKeyPolicyConfiguration。

ContentKeyPolicyUnknownRestriction

表示在当前 API 版本中不可用的 ContentKeyPolicyRestriction。

ContentKeyPolicyWidevineConfiguration

指定 Widevine 许可证的配置。

ContentKeyPolicyX509CertificateTokenKey

指定用于令牌验证的证书。

createdByType

创建资源的标识类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

SecurityLevel

安全级别。

systemData

与资源的创建和上次修改相关的元数据。

ContentKeyPolicy

内容密钥策略资源。

名称 类型 说明
id

string

资源的完全限定的资源 ID。 例如 - /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

旧版策略 ID。

systemData

systemData

与此资源相关的系统元数据。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

ContentKeyPolicyClearKeyConfiguration

表示非 DRM 密钥的配置。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration

派生类型的鉴别器。

ContentKeyPolicyFairPlayConfiguration

指定 FairPlay 许可证的配置。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration

派生类型的鉴别器。

ask

string

必须用作 FairPlay 应用程序机密密钥的密钥。 这需要进行 base64 编码。

fairPlayPfx

string

PKCS 12 中 FairPlay 证书的 Base64 表示形式 (pfx) 格式 (包括私钥) 。

fairPlayPfxPassword

string

PKCS 12 中的加密 FairPlay 证书的密码 (pfx) 格式。

offlineRentalConfiguration

ContentKeyPolicyFairPlayOfflineRentalConfiguration

脱机租赁策略

rentalAndLeaseKeyType

ContentKeyPolicyFairPlayRentalAndLeaseKeyType

租赁密钥和租用密钥类型。

rentalDuration

integer

租赁持续时间。 必须大于或等于 0。

ContentKeyPolicyFairPlayOfflineRentalConfiguration

名称 类型 说明
playbackDurationSeconds

integer

播放持续时间

storageDurationSeconds

integer

存储持续时间

ContentKeyPolicyFairPlayRentalAndLeaseKeyType

租赁密钥和租用密钥类型。

名称 类型 说明
DualExpiry

string

离线租赁的双重到期时间。

PersistentLimited

string

内容密钥可以持久保存,有效持续时间受“租赁持续时间”值的限制

PersistentUnlimited

string

内容密钥可以保留无限期

Undefined

string

未指定密钥持续时间。

Unknown

string

表示在当前 API 版本中不可用的 ContentKeyPolicyFairPlayRentalAndLeaseKeyType。

ContentKeyPolicyOpenRestriction

表示开放限制。 许可证或密钥将针对每个请求传递。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyOpenRestriction

派生类型的鉴别器。

ContentKeyPolicyOption

表示策略选项。

名称 类型 说明
configuration ContentKeyPolicyConfiguration:

密钥传递配置。

name

string

策略选项说明。

policyOptionId

string

旧策略选项 ID。

restriction ContentKeyPolicyRestriction:

使用此配置传递密钥必须满足的要求

ContentKeyPolicyPlayReadyConfiguration

指定 PlayReady 许可证的配置。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration

派生类型的鉴别器。

licenses

ContentKeyPolicyPlayReadyLicense[]

PlayReady 许可证。

responseCustomData

string

自定义响应数据。

ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

指定内容密钥 ID 位于 PlayReady 标头中。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

派生类型的鉴别器。

ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

指定在 PlayReady 配置中指定内容密钥 ID。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

派生类型的鉴别器。

keyId

string

内容密钥 ID。

ContentKeyPolicyPlayReadyContentType

PlayReady 内容类型。

名称 类型 说明
UltraVioletDownload

string

Uv 下载内容类型。

UltraVioletStreaming

string

紫外线流式处理内容类型。

Unknown

string

表示在当前 API 版本中不可用的 ContentKeyPolicyPlayReadyContentType。

Unspecified

string

未指定的内容类型。

ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

配置显式模拟电视输出限制控制位。 有关详细信息,请参阅 PlayReady 合规性规则。

名称 类型 说明
bestEffort

boolean

指示是否尽最大努力强制执行此限制。

configurationData

integer

配置限制控制位。 必须介于 0 和 3 之间(含 0 到 3)。

ContentKeyPolicyPlayReadyLicense

PlayReady 许可证

名称 类型 说明
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

许可证类型。

名称 类型 说明
NonPersistent

string

非永久性许可证。

Persistent

string

永久性许可证。 允许脱机播放。

Unknown

string

表示在当前 API 版本中不可用的 ContentKeyPolicyPlayReadyLicenseType。

ContentKeyPolicyPlayReadyPlayRight

在 PlayReady 许可证中配置播放权限。

名称 类型 说明
agcAndColorStripeRestriction

integer

在许可证中 (AGC) 和色带配置自动增益控制。 必须介于 0 和 3 之间(含 0 到 3)。

allowPassingVideoContentToUnknownOutput

ContentKeyPolicyPlayReadyUnknownOutputPassingOption

配置许可证的未知输出处理设置。

analogVideoOpl

integer

指定压缩数字音频的输出保护级别。

compressedDigitalAudioOpl

integer

指定压缩数字音频的输出保护级别。

compressedDigitalVideoOpl

integer

指定压缩数字视频的输出保护级别。

digitalVideoOnlyContentRestriction

boolean

在许可证中启用模拟组件视频限制的图像约束。

explicitAnalogTelevisionOutputRestriction

ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

在许可证中配置显式模拟电视输出限制。 配置数据必须介于 0 和 3 之间(含 0 到 3)。

firstPlayExpiration

string

首次使用许可证播放内容后许可证的有效期。

imageConstraintForAnalogComponentVideoRestriction

boolean

在许可证中启用模拟组件视频限制的图像约束。

imageConstraintForAnalogComputerMonitorRestriction

boolean

在许可证中启用模拟组件视频限制的图像约束。

scmsRestriction

integer

(许可证中的 SCMS) 配置串行复制管理系统。 必须介于 0 和 3 之间(含 0 到 3)。

uncompressedDigitalAudioOpl

integer

指定未压缩数字音频的输出保护级别。

uncompressedDigitalVideoOpl

integer

指定未压缩数字视频的输出保护级别。

ContentKeyPolicyPlayReadyUnknownOutputPassingOption

配置许可证的未知输出处理设置。

名称 类型 说明
Allowed

string

允许将受保护内容的视频部分传递给未知输出。

AllowedWithVideoConstriction

string

允许将受保护内容的视频部分传递给未知输出,但分辨率受约束。

NotAllowed

string

不允许将受保护内容的视频部分传递给未知输出。

Unknown

string

表示在当前 API 版本中不可用的 ContentKeyPolicyPlayReadyUnknownOutputPassingOption。

ContentKeyPolicyRestrictionTokenType

令牌类型。

名称 类型 说明
Jwt

string

JSON Web 令牌。

Swt

string

简单 Web 令牌。

Unknown

string

表示在当前 API 版本中不可用的 ContentKeyPolicyRestrictionTokenType。

ContentKeyPolicyRsaTokenKey

指定用于令牌验证的 RSA 密钥

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyRsaTokenKey

派生类型的鉴别器。

exponent

string

RSA 参数指数

modulus

string

RSA 参数模数

ContentKeyPolicySymmetricTokenKey

指定用于令牌验证的对称密钥。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicySymmetricTokenKey

派生类型的鉴别器。

keyValue

string

密钥的键值

ContentKeyPolicyTokenClaim

表示令牌声明。

名称 类型 说明
claimType

string

令牌声明类型。

claimValue

string

令牌声明值。

ContentKeyPolicyTokenRestriction

表示令牌限制。 提供的令牌必须满足这些要求才能成功传递许可证或密钥。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyTokenRestriction

派生类型的鉴别器。

alternateVerificationKeys ContentKeyPolicyRestrictionTokenKey[]:

备用验证密钥的列表。

audience

string

令牌的受众。

issuer

string

令牌颁发者。

openIdConnectDiscoveryDocument

string

OpenID connect 发现文档。

primaryVerificationKey ContentKeyPolicyRestrictionTokenKey:

主验证密钥。

requiredClaims

ContentKeyPolicyTokenClaim[]

所需令牌声明的列表。

restrictionTokenType

ContentKeyPolicyRestrictionTokenType

令牌类型。

ContentKeyPolicyUnknownConfiguration

表示在当前 API 版本中不可用的 ContentKeyPolicyConfiguration。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyUnknownConfiguration

派生类型的鉴别器。

ContentKeyPolicyUnknownRestriction

表示在当前 API 版本中不可用的 ContentKeyPolicyRestriction。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyUnknownRestriction

派生类型的鉴别器。

ContentKeyPolicyWidevineConfiguration

指定 Widevine 许可证的配置。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyWidevineConfiguration

派生类型的鉴别器。

widevineTemplate

string

Widevine 模板。

ContentKeyPolicyX509CertificateTokenKey

指定用于令牌验证的证书。

名称 类型 说明
@odata.type string:

#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey

派生类型的鉴别器。

rawBody

string

.NET (X509Certificate2 的 PKCS 12 格式证书的原始数据字段)

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

SecurityLevel

安全级别。

名称 类型 说明
SL150

string

对于正在开发或测试的客户端。 无法防止未经授权的使用。

SL2000

string

适用于使用商业内容的强化设备和应用程序。 软件或硬件保护。

SL3000

string

仅适用于强化设备。 硬件保护。

Unknown

string

表示在当前 API 版本中不可用的 SecurityLevel。

systemData

与资源的创建和上次修改相关的元数据。

名称 类型 说明
createdAt

string

资源的创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

资源上次修改的时间戳 (UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识类型。