Share via


撤銷發行者

撤銷發行者。 撤銷的發行者將事件傳送至指定的事件中樞時,會遇到錯誤。 請參閱 RevokedPublisherDescription 屬性

撤銷發行者時,您必須在 RevokedPublisherDescription中指定下列屬性。

屬性名稱 描述
名稱 撤銷的發行者名稱。

要求

方法 要求 URI
PUT https://{servicebusNamespace}.servicebus.windows.net/{eventHubPath}/revokedpublishers/{publisherName}

要求標頭

如需與事件中樞相關的所有要求所使用的標頭和參數,請參閱 一般參數和標頭

回應

回應包括 HTTP 狀態碼、一組回應標頭和回應主體。

回應碼

程式碼 描述
201 已建立。
400 不正確的要求。
401 授權失敗。
409 指定的發行者已經撤銷。
500 內部錯誤。

回應本文

如果要求成功,回應本文會包含撤銷發行者的描述。 如果要求未成功,則主體包含錯誤碼和錯誤訊息。

元素名稱 必要 類型 版本 描述
名稱 是,唯讀 string 2014-01 撤銷發行者的名稱 (識別碼) 。

範例

要求

注意

您也可以使用 Azure Active Directory 權杖作為 授權 標頭,如 一般參數和標頭中所述。 例如:Authorization: Bearer <Azure AD token>

PUT https://your-namespace.servicebus.windows.net/your-event-hub/RevokedPublishers/your-publisher?timeout=60&api-version=2014-05 HTTP/1.1  
Authorization: SharedAccessSignature sr=your-namespace.servicebus.windows.net&sig=your-sas-key&se=1456362414&skn=RootManageSharedAccessKey  
Content-Type: application/atom+xml;type=entry;charset=utf-8  
Host: your-namespace.servicebus.windows.net  
Content-Length: 338  
  
<entry xmlns="http://www.w3.org/2005/Atom">  
   <content type="application/xml">  
      <RevokedPublisherDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
        <Name>your-publisher</Name>  
      </RevokedPublisherDescription>  
   </content>  
</entry>  
  

回應

HTTP/1.1 201 Created  
Content-Type: application/atom+xml;type=entry;charset=utf-8  
Server: Microsoft-HTTPAPI/2.0  
Date: Thu, 25 Feb 2016 00:41:11 GMT  
Content-Length: 660  
  
<?xml version="1.0" encoding="UTF-8"?>  
<entry xmlns="http://www.w3.org/2005/Atom">  
   <id>https://your-namespace.servicebus.windows.net/your-event-hub/RevokedPublishers/your-publisher?timeout=60&api-version=2014-05</id>  
   <title type="text">your-publisher</title>  
   <updated>2016-02-25T00:41:11Z</updated>  
   <link rel="self" href="https://your-namespace.servicebus.windows.net/your-event-hub/RevokedPublishers/your-publisher?timeout=60&api-version=2014-05" />  
   <content type="application/xml">  
      <RevokedPublisherDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
         <Name>your-publisher</Name>  
      </RevokedPublisherDescription>  
   </content>  
</entry>