共用方式為


列出取用者群組

擷取與指定之事件中樞相關聯的所有取用者群組。 請參閱 ConsumerGroupDescription 屬性

要求

方法 要求 URI
GET https://{servicebusNamespace}.servicebus.windows.net/{eventHubPath}/consumergroups

要求標頭

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

回應

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

元素名稱 必要 類型 版本 描述
CreatedAt 是,唯讀 string 2014-01 建立取用者群組的確切時間。
UpdatedAt 是,唯讀 string 2014-01 取用者群組更新的確切時間。

回應本文

如果要求成功,回應本文會包含指定事件中樞內所有取用者群組的描述。 如果要求失敗,本文會包含錯誤碼和錯誤訊息

程式碼 描述
200 成功。
401 授權失敗。
500 內部錯誤。

範例

要求

注意

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

GET https://your-namespace.servicebus.windows.net/your-event-hub/consumergroups?timeout=60&api-version=2014-01 HTTP/1.1  
Authorization: SharedAccessSignature sr=https%3A%2F%2Fyour-namespace.servicebus.windows.net%2F&sig=your-sas-key&se=1455847106&skn=RootManageSharedAccessKey  
Content-Type: application/atom+xml;type=entry;charset=utf-8  
Host: your-namespace.servicebus.windows.net  

回應

HTTP/1.1 200 OK  
Content-Type: application/atom+xml;type=feed;charset=utf-8  
Server: Microsoft-HTTPAPI/2.0  
Date: Fri, 19 Feb 2016 01:40:40 GMT  
Content-Length: 1179  
  
<?xml version="1.0" encoding="UTF-8"?>  
<feed xmlns="http://www.w3.org/2005/Atom">  
   <title type="text">ConsumerGroups</title>  
   <id>https://your-namespace.servicebus.windows.net/your-event-hub/consumergroups?timeout=60&api-version=2014-01</id>  
   <updated>2016-02-19T01:40:41Z</updated>  
   <link rel="self" href="https://your-namespace.servicebus.windows.net/your-event-hub/consumergroups?timeout=60&api-version=2014-01" />  
   <entry xml:base="https://your-namespace.servicebus.windows.net/your-event-hub/consumergroups?timeout=60&api-version=2014-01">  
      <id>https://your-namespace.servicebus.windows.net/your-event-hub/consumergroups/$Default?api-version=2014-01</id>  
      <title type="text">$Default</title>  
      <published>2015-09-09T20:31:00Z</published>  
      <updated>2015-09-09T20:31:00Z</updated>  
      <link rel="self" href="consumergroups/$Default?api-version=2014-01" />  
      <content type="application/xml">  
         <ConsumerGroupDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
            <CreatedAt>2015-09-09T20:31:00.4479782</CreatedAt>  
            <UpdatedAt>2015-09-09T20:31:00.4479782</UpdatedAt>  
         </ConsumerGroupDescription>  
      </content>  
   </entry>  
</feed>