共用方式為


Topics - List By Namespace

取得命名空間中的所有主題。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics?api-version=2024-01-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics?api-version=2024-01-01&$skip={$skip}&$top={$top}

URI 參數

名稱 位於 必要 類型 Description
namespaceName
path True

string

minLength: 6
maxLength: 50

命名空間名稱

resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string

可唯一識別Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。

api-version
query True

string

minLength: 1

要用於這項作業的 API 版本。

$skip
query

integer

minimum: 0
maximum: 1000

只有在先前的作業傳回部分結果時,才會使用Skip。 如果先前的回應包含 nextLink 元素,則 nextLink 元素的值會包含 skip 參數,指定要用於後續呼叫的起點。

$top
query

integer

minimum: 1
maximum: 1000

可用來將結果數目限制為最新的 N usageDetails。

回應

名稱 類型 Description
200 OK

SBTopicListResult

已成功擷取的主題清單。

Other Status Codes

ErrorResponse

描述作業失敗原因的 ServiceBus 錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 流

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

TopicGet

範例要求

GET https://management.azure.com/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1617/topics?api-version=2024-01-01

範例回覆

{
  "value": [
    {
      "id": "/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1617/topics/sdk-topics-5488",
      "name": "sdk-topics-5488",
      "type": "Microsoft.ServiceBus/Namespaces/Topics",
      "properties": {
        "defaultMessageTimeToLive": "P10675199DT2H48M5.4775807S",
        "maxSizeInMegabytes": 10240,
        "maxMessageSizeInKilobytes": 10240,
        "requiresDuplicateDetection": false,
        "duplicateDetectionHistoryTimeWindow": "PT10M",
        "enableBatchedOperations": true,
        "sizeInBytes": 0,
        "status": "Active",
        "supportOrdering": true,
        "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S",
        "enablePartitioning": false,
        "enableExpress": true,
        "createdAt": "2017-05-26T20:50:31.4442694Z",
        "updatedAt": "2017-05-26T20:52:32.2092264Z",
        "accessedAt": "0001-01-01T00:00:00Z",
        "subscriptionCount": 0
      }
    }
  ]
}

定義

名稱 Description
createdByType

建立資源的身分識別類型。

EntityStatus

實體狀態。

Error

error 物件。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorResponse

資源管理錯誤回應。

MessageCountDetails

訊息計數詳細數據。

SBTopic

主題資源的描述。

SBTopicListResult

清單主題作業的回應。

systemData

與建立和上次修改資源相關的元數據。

createdByType

建立資源的身分識別類型。

Description
User
Application
ManagedIdentity
Key

EntityStatus

實體狀態。

Description
Active
Disabled
Restoring
SendDisabled
ReceiveDisabled
Creating
Deleting
Renaming
Unknown

Error

error 物件。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorResponse[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorResponse

資源管理錯誤回應。

名稱 類型 Description
error

Error

error 物件。

MessageCountDetails

訊息計數詳細數據。

名稱 類型 Description
activeMessageCount

integer (int64)

佇列、主題或訂用帳戶中的作用中訊息數目。

deadLetterMessageCount

integer (int64)

寄不出的信件數目。

scheduledMessageCount

integer (int64)

排程的訊息數目。

transferDeadLetterMessageCount

integer (int64)

傳送到寄不出的信件的訊息數目。

transferMessageCount

integer (int64)

傳送至另一個佇列、主題或訂用帳戶的訊息數目。

SBTopic

主題資源的描述。

名稱 類型 Description
id

string

資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

資源所在的地理位置

name

string

資源的名稱

properties.accessedAt

string (date-time)

上次傳送訊息或收到本主題的要求時。

properties.autoDeleteOnIdle

string (duration)

ISO 8601 時間範圍閑置間隔之後,主題會自動刪除。 持續時間下限為 5 分鐘。

properties.countDetails

MessageCountDetails

訊息計數詳細數據

properties.createdAt

string (date-time)

建立訊息的確切時間。

properties.defaultMessageTimeToLive

string (duration)

ISO 8601 預設訊息時間範圍到即時值。 這是訊息到期的持續時間,從訊息傳送至服務總線時開始。 這是當 TimeToLive 未在訊息本身上設定時所使用的預設值。

properties.duplicateDetectionHistoryTimeWindow

string (duration)

ISO8601時間範圍結構,定義重複偵測歷程記錄的持續時間。 預設值為 10 分鐘。

properties.enableBatchedOperations

boolean

值,指出是否啟用伺服器端批次作業。

properties.enableExpress

boolean

值,指出是否啟用 Express 實體。 快速主題會在將訊息寫入永續性記憶體之前,暫時將訊息儲存在記憶體中。

properties.enablePartitioning

boolean

值,指出是否已啟用跨多個訊息代理程式分割的主題。

properties.maxMessageSizeInKilobytes

integer (int64)

主題可接受之訊息承載的大小上限(以 KB 為單位)。 這個屬性目前只會在 Premium 中使用,預設值為 1024。

properties.maxSizeInMegabytes

integer (int32)

主題的大小上限,以 MB 為單位,這是為主題配置的記憶體大小。 預設值為 1024。

properties.requiresDuplicateDetection

boolean

指出本主題是否需要重複偵測的值。

properties.sizeInBytes

integer (int64)

主題的大小,以位元組為單位。

properties.status

EntityStatus

列舉傳訊實體狀態的可能值。

properties.subscriptionCount

integer (int32)

訂用帳戶數目。

properties.supportOrdering

boolean

值,指出主題是否支援排序。

properties.updatedAt

string (date-time)

訊息更新的確切時間。

systemData

systemData

與此資源相關的系統元數據。

type

string

資源的型別。 例如“Microsoft.EventHub/Namespaces” 或 “Microsoft.EventHub/Namespaces/EventHubs”

SBTopicListResult

清單主題作業的回應。

名稱 類型 Description
nextLink

string

連結到下一組結果。 如果 Value 包含未完成的主題清單,則為空白。

value

SBTopic[]

清單主題作業的結果。

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string (date-time)

上次修改資源的身分識別類型。

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。