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

Event Hubs - List By Namespace

获取命名空间中的所有事件中心。

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

URI 参数

名称 必需 类型 说明
namespaceName
path True

string

minLength: 6
maxLength: 50
pattern: ^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$

Namespace名称

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Azure 订阅中的资源组的名称。

subscriptionId
path True

string

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

api-version
query True

string

客户端 API 版本。

$skip
query

integer

minimum: 0
maximum: 1000

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

$top
query

integer

minimum: 1
maximum: 1000

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

响应

名称 类型 说明
200 OK

EventHubListResult

已成功检索事件中心列表。

Other Status Codes

ErrorResponse

事件中心错误响应,描述作失败的原因。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

EventHubsListAll

示例请求

GET https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-5357/eventhubs?api-version=2024-01-01

示例响应

{
  "value": [
    {
      "id": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-716/eventhubs/sdk-eventhub-10",
      "name": "sdk-eventhub-10",
      "type": "Microsoft.EventHub/Namespaces/EventHubs",
      "properties": {
        "messageRetentionInDays": 4,
        "partitionCount": 4,
        "status": "Active",
        "createdAt": "2017-06-28T02:45:55.877Z",
        "updatedAt": "2017-06-28T02:46:05.877Z",
        "partitionIds": [
          "0",
          "1",
          "2",
          "3"
        ],
        "captureDescription": {
          "enabled": true,
          "encoding": "Avro",
          "destination": {
            "name": "EventHubArchive.AzureBlockBlob",
            "properties": {
              "storageAccountResourceId": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage",
              "blobContainer": "container",
              "archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
            }
          },
          "intervalInSeconds": 120,
          "sizeLimitInBytes": 10485763
        },
        "retentionDescription": {
          "cleanupPolicy": "Delete",
          "retentionTimeInHours": 96,
          "tombstoneRetentionTimeInHours": 1
        }
      }
    }
  ]
}

定义

名称 说明
CaptureDescription

配置事件中心捕获说明的属性

CaptureIdentity

一个值,该值指示是否启用捕获说明。

CaptureIdentityType

Azure Active Directory 托管标识的类型。

CleanupPolicyRetentionDescription

枚举清理策略的可能值

createdByType

创建资源的标识的类型。

Destination

捕获存储详细信息以获取捕获说明

EncodingCaptureDescription

枚举捕获说明的编码格式的可能值。 注意:新 API 版本中将弃用“AvroDeflate”

EntityStatus

枚举事件中心状态的可能值。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应指示事件中心服务无法处理传入请求。 错误消息中提供了原因。

Eventhub

列表或获取事件中心操作中的单个项

EventHubListResult

List EventHubs 操作的结果。

RetentionDescription

配置事件中心保留设置的属性

systemData

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

CaptureDescription

配置事件中心捕获说明的属性

名称 类型 说明
destination

Destination

将存储捕获的目标的属性。 (存储帐户、Blob 名称)

enabled

boolean

一个值,该值指示是否启用捕获说明。

encoding

EncodingCaptureDescription

枚举捕获说明的编码格式的可能值。 注意:新 API 版本中将弃用“AvroDeflate”

intervalInSeconds

integer (int32)

使用时间范围可以设置捕获到 Azure Blob 的频率,值应介于 60 到 900 秒之间

sizeLimitInBytes

integer (int32)

大小窗口定义在捕获作之前在事件中心生成的数据量,值应在10485760到524288000字节之间

skipEmptyArchives

boolean

一个值,该值指示是否跳过空存档

CaptureIdentity

一个值,该值指示是否启用捕获说明。

名称 类型 说明
type

CaptureIdentityType

Azure Active Directory 托管标识的类型。

userAssignedIdentity

string

托管用户标识的 ARM ID。 此属性是必需的,类型为 UserAssignedIdentity。 如果类型为 SystemAssigned,则将使用与命名空间关联的系统分配标识。

CaptureIdentityType

Azure Active Directory 托管标识的类型。

说明
SystemAssigned
UserAssigned

CleanupPolicyRetentionDescription

枚举清理策略的可能值

说明
Compact
Delete

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

Destination

捕获存储详细信息以获取捕获说明

名称 类型 说明
identity

CaptureIdentity

一个值,该值指示是否启用捕获说明。

name

string

捕获目标的名称

properties.archiveNameFormat

string

存档的 Blob 命名约定,例如 {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}。 此处的所有参数(Namespace,EventHub .. 等)都是强制性的,无论顺序如何

properties.blobContainer

string

Blob 容器名称

properties.dataLakeAccountName

string

捕获事件的 Azure Data Lake Store 名称

properties.dataLakeFolderPath

string

捕获事件的目标文件夹路径

properties.dataLakeSubscriptionId

string (uuid)

Azure Data Lake Store 的订阅 ID

properties.storageAccountResourceId

string

用于创建 Blob 的存储帐户的资源 ID

EncodingCaptureDescription

枚举捕获说明的编码格式的可能值。 注意:新 API 版本中将弃用“AvroDeflate”

说明
Avro
AvroDeflate

EntityStatus

枚举事件中心状态的可能值。

说明
Active
Creating
Deleting
Disabled
ReceiveDisabled
Renaming
Restoring
SendDisabled
Unknown

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应指示事件中心服务无法处理传入请求。 错误消息中提供了原因。

名称 类型 说明
error

ErrorDetail

错误对象。

Eventhub

列表或获取事件中心操作中的单个项

名称 类型 说明
id

string

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

location

string

资源所在的地理位置

name

string

资源的名称

properties.captureDescription

CaptureDescription

捕获说明的属性

properties.createdAt

string (date-time)

创建事件中心的确切时间。

properties.messageRetentionInDays

integer (int64)

minimum: 1

保留此事件中心的事件的天数,值应为 1 到 7 天

properties.partitionCount

integer (int64)

minimum: 1

为事件中心创建的分区数,允许的值从 1 到 32 个分区。

properties.partitionIds

string[]

事件中心上的当前分片数。

properties.retentionDescription

RetentionDescription

事件中心保留设置

properties.status

EntityStatus

枚举事件中心状态的可能值。

properties.updatedAt

string (date-time)

消息的确切更新时间。

properties.userMetadata

string

获取和设置用户的元数据。

systemData

systemData

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

type

string

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

EventHubListResult

List EventHubs 操作的结果。

名称 类型 说明
nextLink

string

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

value

Eventhub[]

List EventHubs作的结果。

RetentionDescription

配置事件中心保留设置的属性

名称 类型 说明
cleanupPolicy

CleanupPolicyRetentionDescription

枚举清理策略的可能值

retentionTimeInHours

integer (int64)

保留此事件中心的事件的小时数。 仅当 cleanupPolicy 为 Delete 时,才使用此值。 如果 cleanupPolicy 为 Compact,则此属性的返回值为 Long.MaxValue

tombstoneRetentionTimeInHours

integer (int32)

保留压缩事件中心的逻辑删除标记的小时数。 仅当 cleanupPolicy 为 Compact 时,才使用此值。 使用者必须在此指定的时间范围内完成读取墓碑标记(如果使用者从起始偏移开始)以确保它们获取压缩事件中心内逻辑删除标记所描述的特定键的有效快照

systemData

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

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

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

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

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