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 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
namespace
|
path | True |
string minLength: 6maxLength: 50 |
命名空间名称 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
|
subscription
|
path | True |
string |
唯一标识Microsoft Azure 订阅的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
|
$skip
|
query |
integer minimum: 0maximum: 1000 |
仅当上一个作返回了部分结果时,才使用 Skip。 如果以前的响应包含 nextLink 元素,则 nextLink 元素的值将包含一个 skip 参数,该参数指定用于后续调用的起点。 |
|
|
$top
|
query |
integer minimum: 1maximum: 1000 |
可用于将结果数限制为最新的 N usageDetails。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
已成功检索到主题列表。 |
|
| Other Status Codes |
描述作失败的原因的 ServiceBus 错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| 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
}
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
created |
创建资源的标识的类型。 |
|
Entity |
实体状态。 |
| Error |
错误对象。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
资源管理错误响应。 |
|
Message |
消息计数详细信息。 |
| SBTopic |
主题资源的说明。 |
|
SBTopic |
对列表主题作的响应。 |
|
system |
与创建和上次修改资源相关的元数据。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
EntityStatus
实体状态。
| 值 | 说明 |
|---|---|
| Active | |
| Disabled | |
| Restoring | |
| SendDisabled | |
| ReceiveDisabled | |
| Creating | |
| Deleting | |
| Renaming | |
| Unknown |
Error
错误对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorResponse
资源管理错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
MessageCountDetails
消息计数详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| activeMessageCount |
integer (int64) |
队列、主题或订阅中的活动消息数。 |
| deadLetterMessageCount |
integer (int64) |
死信的消息数。 |
| scheduledMessageCount |
integer (int64) |
计划消息数。 |
| transferDeadLetterMessageCount |
integer (int64) |
传输到死信的消息数。 |
| transferMessageCount |
integer (int64) |
传输到另一个队列、主题或订阅的消息数。 |
SBTopic
主题资源的说明。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定资源 ID。 示例 - /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 |
消息计数详细信息 |
|
| properties.createdAt |
string (date-time) |
创建消息的确切时间。 |
| properties.defaultMessageTimeToLive |
string (duration) |
ISO 8601 默认消息时间跨度为实时值。 这是消息过期的持续时间,从消息发送到服务总线时开始。 这是未在消息本身上设置 TimeToLive 时使用的默认值。 |
| properties.duplicateDetectionHistoryTimeWindow |
string (duration) |
ISO8601定义重复检测历史记录持续时间的时间跨度结构。 默认值为 10 分钟。 |
| properties.enableBatchedOperations |
boolean |
指示是否启用服务器端批处理作的值。 |
| properties.enableExpress |
boolean |
指示是否启用快速实体的值。 快速主题将消息暂时保存在内存中,然后再将其写入永久性存储。 |
| properties.enablePartitioning |
boolean |
指示是否启用了跨多个消息中转站分区的主题的值。 |
| properties.maxMessageSizeInKilobytes |
integer (int64) |
主题可以接受的消息有效负载的最大大小(以 KB 为单位)。 此属性仅在高级版中使用,默认值为 1024。 |
| properties.maxSizeInMegabytes |
integer (int32) |
主题的最大大小(以兆字节为单位),即为主题分配的内存大小。 默认值为 1024。 |
| properties.requiresDuplicateDetection |
boolean |
指示本主题是否需要重复检测的值。 |
| properties.sizeInBytes |
integer (int64) |
主题的大小(以字节为单位)。 |
| properties.status |
枚举消息实体状态的可能值。 |
|
| properties.subscriptionCount |
integer (int32) |
订阅数。 |
| properties.supportOrdering |
boolean |
指示主题是否支持排序的值。 |
| properties.updatedAt |
string (date-time) |
消息的确切更新时间。 |
| systemData |
与此资源相关的系统元数据。 |
|
| type |
string |
资源的类型。 例如“Microsoft.EventHub/Namespaces”或“Microsoft.EventHub/Namespaces/EventHubs” |
SBTopicListResult
对列表主题作的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
链接到下一组结果。 如果 Value 包含主题列表不完整,则不为空。 |
| value |
SBTopic[] |
列表主题作的结果。 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改资源的标识的类型。 |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |