Mencabut penerbit

Mencabut penerbit. Penerbit yang dicabut akan mengalami kesalahan saat mengirim peristiwa ke Pusat Aktivitas yang ditentukan. Lihat Properti RevokedPublisherDescription.

Saat mencabut penerbit, Anda harus menentukan properti berikut di RevokedPublisherDescription.

Nama properti Deskripsi
Nama Nama penerbit yang dicabut.

Minta

Metode Meminta URI
PUT https://{servicebusNamespace}.servicebus.windows.net/{eventHubPath}/revokedpublishers/{publisherName}

Judul Permintaan

Lihat Parameter dan header umum untuk header dan parameter yang digunakan oleh semua permintaan yang terkait dengan Azure Event Hubs.

Respons

Respons mencakup kode status HTTP, sekumpulan header respons, dan isi respons.

Kode Respons

Kode Deskripsi
201 Dibuat.
400 Permintaan buruk.
401 Kegagalan otorisasi.
409 Penerbit yang ditentukan sudah dicabut.
500 Kesalahan internal.

Isi Respons

Jika permintaan berhasil, isi respons berisi deskripsi penerbit yang dicabut. Jika permintaan tidak berhasil, isi berisi kode kesalahan dan pesan kesalahan.

Nama elemen Diperlukan Jenis Versi Deskripsi
Nama Ya, baca-saja string 2014-01 Nama (ID) penerbit yang dicabut.

Contoh

Permintaan

Catatan

Anda juga dapat menggunakan token Azure Active Directory untuk header Otorisasi seperti yang tercantum dalam parameter dan header Umum. Misalnya: 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>  
  

Respons

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>