你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Topics - List By Namespace

获取命名空间中的所有主题。

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

URI 参数

名称 必需 类型 说明
namespaceName
path True

string

命名空间名称

resourceGroupName
path True

string

Azure 订阅中资源组的名称。

subscriptionId
path True

string

唯一标识 Microsoft Azure 订阅的订阅凭据。 此订阅 ID 是每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

$skip
query

integer

仅当上一个操作返回部分结果时,才使用 Skip。 如果以前的响应包含 nextLink 元素,则 nextLink 元素的值将包含一个 skip 参数,该参数指定用于后续调用的起点。

$top
query

integer

可用于将结果数限制为最近的 N usageDetails。

响应

名称 类型 说明
200 OK

SBTopicListResult

已成功检索的主题列表。

Other Status Codes

ErrorResponse

描述操作失败原因的 ServiceBus 错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

TopicGet

Sample Request

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=2021-11-01

Sample Response

{
  "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
      }
    }
  ]
}

定义

名称 说明
createdByType

创建资源的标识类型。

EntityStatus

实体状态。

Error

错误对象。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorResponse

资源管理错误响应。

MessageCountDetails

消息计数详细信息。

SBTopic

主题资源的说明。

SBTopicListResult

对“列出主题”操作的响应。

systemData

与资源的创建和上次修改相关的元数据。

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

EntityStatus

实体状态。

名称 类型 说明
Active

string

Creating

string

Deleting

string

Disabled

string

ReceiveDisabled

string

Renaming

string

Restoring

string

SendDisabled

string

Unknown

string

Error

错误对象。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorResponse[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorResponse

资源管理错误响应。

名称 类型 说明
error

Error

错误对象。

MessageCountDetails

消息计数详细信息。

名称 类型 说明
activeMessageCount

integer

队列、主题或订阅中的活动消息数。

deadLetterMessageCount

integer

死信的消息数。

scheduledMessageCount

integer

计划的消息数。

transferDeadLetterMessageCount

integer

传输成死信的消息数。

transferMessageCount

integer

传输到另一个队列、主题或订阅的消息数。

SBTopic

主题资源的说明。

名称 类型 说明
id

string

资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

资源所在的地理位置

name

string

资源的名称

properties.accessedAt

string

上一次发送此主题的消息或收到请求的时间。

properties.autoDeleteOnIdle

string

ISO 8601 时间跨度空闲间隔,在此间隔后将自动删除主题。 最短持续时间为 5 分钟。

properties.countDetails

MessageCountDetails

消息计数详细信息

properties.createdAt

string

创建消息的确切时间。

properties.defaultMessageTimeToLive

string

ISO 8601 默认消息时间跨度到实时值。 这是消息过期的持续时间,从消息发送到服务总线时开始。 这是未在消息本身上设置 TimeToLive 时使用的默认值。

properties.duplicateDetectionHistoryTimeWindow

string

ISO8601定义重复检测历史记录持续时间的时间跨度结构。 默认值为 10 分钟。

properties.enableBatchedOperations

boolean

指示是否启用服务器端批处理操作的值。

properties.enableExpress

boolean

指示是否启用快速实体的值。 在将消息写入永久性存储之前,快速主题暂时将消息保留在内存中。

properties.enablePartitioning

boolean

指示是否启用要在多个消息中转站之间分区的主题的值。

properties.maxMessageSizeInKilobytes

integer

主题可以接受的消息有效负载的最大大小 (kb) 。 此属性目前仅在高级版中使用,默认值为 1024。

properties.maxSizeInMegabytes

integer

主题的最大大小(以 MB 为单位),即为主题分配的内存大小。 默认值为 1024。

properties.requiresDuplicateDetection

boolean

指示本主题是否需要重复检测的值。

properties.sizeInBytes

integer

主题的大小(以字节为单位)。

properties.status

EntityStatus

枚举消息实体状态的可能值。

properties.subscriptionCount

integer

订阅数。

properties.supportOrdering

boolean

指示主题是否支持排序的值。

properties.updatedAt

string

更新消息的确切时间。

systemData

systemData

与此资源相关的系统元数据。

type

string

资源类型。 例如“Microsoft.EventHub/Namespaces”或“Microsoft.EventHub/Namespaces/EventHubs”

SBTopicListResult

对“列出主题”操作的响应。

名称 类型 说明
nextLink

string

链接到下一组结果。 如果 Value 包含不完整的主题列表,则不为空。

value

SBTopic[]

列出主题操作的结果。

systemData

与资源的创建和上次修改相关的元数据。

名称 类型 说明
createdAt

string

资源创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

上次修改资源的标识类型。

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识类型。