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

NotificationEndPoint

要将有关作业状态的通知发送到的终结点。

媒体服务版本 2.1 中添加了此类型。

注意

Azure 队列通知可能会有所延迟。

本主题提供 NotificationEndPoint 实体的概述,并且还演示如何使用 Media Services REST API 执行各种操作。

重要

访问媒体服务中的实体时,必须在 HTTP 请求中设置特定标头字段和值。
有关详细信息,请参阅 设置媒体服务 REST API 开发 和使用 媒体服务 REST API 连接到媒体服务

NotificationEndPoint 实体属性

属性 类型 说明
ID

只读。 由媒体服务在创建时设置。
Edm.String 唯一标识符。 格式:nb:ncid:UUID:<GUID>。
名称

必需。
Edm.String 通知终结点的显示名称。
创建

只读。 由媒体服务在创建时设置。
Edm.DateTime 此值由媒体服务在创建时设置。
EndpointType

必需。 在创建实体后无法进行更新。
Edm.Int32 通知终结点的类型。

唯一有效的值为:AzureQueue = 1。
EndpointAddress

必需。 在创建实体后无法进行更新。
Edm.String EndpointAddress 是要使用的 AzureQueue 名称。 强制执行 Azure 队列的命名规则。 有关详细信息,请参阅 命名队列和元数据
CredentialType Edm.Int32 设置通知终结点 的凭据类型。
EncryptedEndPointCredential Edm.String 加密的 endPoint 凭据。
ProtectionKeyId Edm.String 保护密钥 ID。
ProtectionKeyType Edm.Int32 保护密钥类型。

创建 NotificationEndPoint

若要获取最新的 x-ms-version:,请参阅 媒体服务 REST

可以使用 HTTP POST 请求来创建 NotificationEndPoint。

POST https://<accountname>.restv2.<location>.media.azure.net/api/NotificationEndPoints HTTP/1.1  
User-Agent: Microsoft ADO.NET Data Services  
DataServiceVersion: 1.0  
MaxDataServiceVersion: 3.0  
Accept: application/atom+xml,application/xml  
Accept-Charset: UTF-8  
Authorization: Bearer <token value>  
x-ms-version: 2.19  
Content-Type: application/atom+xml  
Host: media.windows.net  
Content-Length: 533  
Expect: 100-continue  
  
<?xml version="1.0" encoding="utf-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id /><title /><updated>2013-04-21T21:44:14Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EndPointAddress>endpointpueu1</d:EndPointAddress><d:EndPointType m:type="Edm.Int32">1</d:EndPointType><d:Id m:null="true" /><d:Name>EndPointName1</d:Name></m:properties></content></entry>  
  

以下是针对 NotificationEndPoint 创建操作的响应:

HTTP/1.1 201 Created  
Cache-Control: no-cache  
Content-Length: 1113  
Content-Type: application/atom+xml;type=entry;charset=utf-8  
Location: https://&lt;accountname&gt;.restv2.&lt;location&gt;.media.azure.net/api/NotificationEndPoints('nb%3Anepid%3AUUID%3A1b373460-1fc4-4e80-aad6-b2b0cdb9e674')  
Server: Microsoft-IIS/7.5  
request-id: 9da4221a-7284-4767-905b-4a6823ae2f6f  
x-ms-request-id: 9da4221a-7284-4767-905b-4a6823ae2f6f  
X-Content-Type-Options: nosniff  
DataServiceVersion: 1.0;  
X-Powered-By: ASP.NET  
Date: Sun, 21 Apr 2013 21:44:17 GMT  
  
<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://&lt;accountname&gt;.restv2.&lt;location&gt;.media.azure.net/api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://&lt;accountname&gt;.restv2.&lt;location&gt;.media.azure.net/api/NotificationEndPoints('nb%3Anepid%3AUUID%3A1b373460-1fc4-4e80-aad6-b2b0cdb9e674')</id><category term="Microsoft.Cloud.Media.Vod.Rest.Data.Models.NotificationEndPoint" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="NotificationEndPoint" href="NotificationEndPoints('nb%3Anepid%3AUUID%3A1b373460-1fc4-4e80-aad6-b2b0cdb9e674')" /><title /><updated>2013-04-21T21:44:17Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id>nb:nepid:UUID:1b373460-1fc4-4e80-aad6-b2b0cdb9e674</d:Id><d:Name>EndPointName1</d:Name><d:Created m:type="Edm.DateTime">2013-04-21T21:44:16.4802609Z</d:Created><d:EndPointAddress>endpointpueu1</d:EndPointAddress><d:EndPointType m:type="Edm.Int32">1</d:EndPointType></m:properties></content></entry>  
  

更新 NotificationEndPoint

若要获取最新的 x-ms-version:,请参阅 媒体服务 REST

可以使用 HTTP POST 请求来更新 NotificationEndPoint。

MERGE https://<accountname>.restv2.<location>.media.azure.net/api/NotificationEndPoints('nb%3Anepid%3AUUID%3A64bb03ea-bb6a-4d3c-b6e9-4a0f3e346638') HTTP/1.1  
User-Agent: Microsoft ADO.NET Data Services  
DataServiceVersion: 1.0  
MaxDataServiceVersion: 3.0  
Accept: application/atom+xml,application/xml  
Accept-Charset: UTF-8  
Authorization: Bearer <token value>  
x-ms-version: 2.19  
Content-Type: application/atom+xml  
Host: media.windows.net  
Content-Length: 690  
Expect: 100-continue  
  
<?xml version="1.0" encoding="utf-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://&lt;accountname&gt;.restv2.&lt;location&gt;.media.azure.net/api/NotificationEndPoints('nb%3Anepid%3AUUID%3A64bb03ea-bb6a-4d3c-b6e9-4a0f3e346638')</id><title /><updated>2013-04-21T21:56:15Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EndPointAddress>endpointqueue2</d:EndPointAddress><d:EndPointType m:type="Edm.Int32">1</d:EndPointType><d:Id>nb:nepid:UUID:64bb03ea-bb6a-4d3c-b6e9-4a0f3e346638</d:Id><d:Name>NewEndPoint1</d:Name></m:properties></content></entry>  
  

以下是针对 NotificationEndPoint 更新操作的响应:

HTTP/1.1 204 No Content  
Cache-Control: no-cache  
Server: Microsoft-IIS/7.5  
request-id: 6e1533d9-1efc-4c45-b299-8060d2355e48  
x-ms-request-id: 6e1533d9-1efc-4c45-b299-8060d2355e48  
X-Content-Type-Options: nosniff  
DataServiceVersion: 1.0;  
X-Powered-By: ASP.NET  
Date: Sun, 21 Apr 2013 21:56:16 GMT  
  

获取 NotificationEndPoint

若要获取最新的 x-ms-version:,请参阅 媒体服务 REST

以下请求将获取指定的通知点。 若要获取所有通知点,请调用 NotificationEndPoints 不带 参数: GET https://<accountname>.restv2.<location>.media.azure.net/api/NotificationEndPoints

GET https://<accountname>.restv2.<location>.media.azure.net/api/NotificationEndPoints('nb%3Anepid%3AUUID%3A6286704e-e69f-454e-80e0-7fda53ce7dba') HTTP/1.1  
DataServiceVersion: 1.0;NetFx  
MaxDataServiceVersion: 3.0;NetFx  
Accept: application/atom+xml,application/xml  
Accept-Charset: UTF-8  
User-Agent: Microsoft ADO.NET Data Services  
Authorization: Bearer <token value>  
x-ms-version: 2.19  
Host: media.windows.net  
  
HTTP/1.1 200 OK  
Cache-Control: no-cache  
Content-Length: 1167  
Content-Type: application/atom+xml;type=entry;charset=utf-8  
Server: Microsoft-IIS/7.5  
request-id: aa32c140-8e59-4043-bbe8-c2221ca61a5f  
x-ms-request-id: aa32c140-8e59-4043-bbe8-c2221ca61a5f  
X-Content-Type-Options: nosniff  
DataServiceVersion: 1.0;  
X-Powered-By: ASP.NET  
Date: Fri, 02 Aug 2013 06:25:33 GMT  
  
<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://&lt;accountname&gt;.restv2.&lt;location&gt;.media.azure.net/api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://&lt;accountname&gt;.restv2.&lt;location&gt;.media.azure.net/api/NotificationEndPoints('nb%3Anepid%3AUUID%3A6286704e-e69f-454e-80e0-7fda53ce7dba')</id><category term="Microsoft.Cloud.Media.Vod.Rest.Data.Models.NotificationEndPoint" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="NotificationEndPoint" href="NotificationEndPoints('nb%3Anepid%3AUUID%3A6286704e-e69f-454e-80e0-7fda53ce7dba')" /><title /><updated>2013-08-02T06:25:33Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id>nb:nepid:UUID:6286704e-e69f-454e-80e0-7fda53ce7dba</d:Id><d:Name>62abde48-420f-4f76-9ca4-9ba1d8852f38</d:Name><d:Created m:type="Edm.DateTime">2013-08-02T06:25:02.48</d:Created><d:EndPointAddress>b71b6ac6-e598-4fdf-b5cb-e8494cb955ef</d:EndPointAddress><d:EndPointType m:type="Edm.Int32">1</d:EndPointType></m:properties></content></entry>  

删除 NotificationEndPoint

若要获取最新的 x-ms-version:,请参阅 媒体服务 REST

可以使用 HTTP POST 请求来删除 NotificationEndPoint。

DELETE https://<accountname>.restv2.<location>.media.azure.net/api/NotificationEndPoints('nb%3Anepid%3AUUID%3A64bb03ea-bb6a-4d3c-b6e9-4a0f3e346638') HTTP/1.1  
User-Agent: Microsoft ADO.NET Data Services  
DataServiceVersion: 1.0  
MaxDataServiceVersion: 3.0  
Accept: application/atom+xml,application/xml  
Accept-Charset: UTF-8  
Authorization: Bearer <token value>  
x-ms-version: 2.19  
Host: media.windows.net  
Content-Length: 0  
  

以下是针对 NotificationEndPoint 删除操作的响应:

HTTP/1.1 204 No Content  
Cache-Control: no-cache  
Server: Microsoft-IIS/7.5  
request-id: f838c56f-d9f6-4e6f-8e0a-945d10a7a48c  
x-ms-request-id: f838c56f-d9f6-4e6f-8e0a-945d10a7a48c  
X-Content-Type-Options: nosniff  
DataServiceVersion: 1.0;  
X-Powered-By: ASP.NET  
Date: Sun, 21 Apr 2013 21:56:17 GMT