取得事件中心

擷取與指定之事件中樞相關聯的所有中繼資料。 請參閱 EventHubDescription 屬性

要求

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

要求標頭

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

回應

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

元素名稱 必要 類型 版本 描述
AuthorizationRules 是,唯讀 string 2014-01 授權規則。
MessageRetentionInDays 是,唯讀 string 2014-01 保留此事件中樞事件的天數。
Status 是,唯讀 string 2014-01 啟用或停用事件中樞的目前狀態 () 。
CreatedAt 是,唯讀 string 2014-01 建立事件中樞的確切時間。
UpdatedAt 是,唯讀 string 2014-01 事件中樞的確切更新時間。
PartitionCount 是,唯讀 string 2014-01 事件中樞上的目前分割區數目。
PartitionIds 是,唯讀 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?timeout=60&api-version=2014-01 HTTP/1.1  
Authorization: SharedAccessSignature sr=your-namespace.servicebus.windows.net&sig=tYu8qdH563Pc96Lky0SFs5PhbGnljF7mLYQwCZmk9M0%3d&se=1403736877&skn=RootManageSharedAccessKey  
ContentType: application/atom+xml;type=entry;charset=utf-8  
Host: your-namespace.servicebus.windows.net  

回應

HTTP/1.1 200 Created  
Transfer-Encoding: chunked  
Content-Type: application/atom+xml;type=entry;charset=utf-8  
Server: Microsoft-HTTPAPI/2.0  
Date: Wed, 25 Jun 2014 22:43:27 GMT  
  
<entry xmlns="http://www.w3.org/2005/Atom">  
  <id>https://your-namespace.servicebus.windows.net/your-event-hub?timeout=60&api-version=2014-01</id>  
  <title type="text">your-event-hub</title>  
  <published>2014-06-25T22:43:16Z</published>  
  <updated>2014-06-25T22:43:27Z</updated>  
  <author>  
    <name>your-namespace</name>  
  </author>  
  <link rel="self" href="https://your-namespace.servicebus.windows.net/your-event-hub?timeout=60&api-version=2014-01"/>  
  <content type="application/xml">  
    <EventHubDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
      <SizeInBytes>0</SizeInBytes>  
      <MessageRetentionInDays>2</MessageRetentionInDays>  
      <AuthorizationRules></AuthorizationRules>  
      <Status>Active</Status>  
      <CreatedAt>2014-06-25T22:51:47.8656642</CreatedAt>  
      <UpdatedAt>2014-06-25T22:51:50.623Z</UpdatedAt>  
      <AccessedAt>0001-01-01T00:00:00Z</AccessedAt>  
      <PartitionCount>4</PartitionCount>  
      <EntityAvailabilityStatus>Available</EntityAvailabilityStatus>  
    </EventHubDescription>  
  </content>  
</entry>