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

Namespaces - List All

列出订阅中的所有可用命名空间。

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces?api-version=2023-09-01
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces?$skipToken={$skipToken}&$top={$top}&api-version=2023-09-01

URI 参数

名称 必需 类型 说明
subscriptionId
path True

string (uuid)

目标订阅的 ID。 该值必须是 UUID。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

$skipToken
query

string

跳过后续请求的令牌。

$top
query

integer (int32)

要返回的最大结果数。

响应

名称 类型 说明
200 OK

NamespaceListResult

成功

Other Status Codes

ErrorResponse

带原因的错误代码。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

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

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Namespaces_ListAll

示例请求

GET https://management.azure.com/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/providers/Microsoft.NotificationHubs/namespaces?api-version=2023-09-01

示例响应

{
  "value": [
    {
      "location": "East US",
      "sku": {
        "name": "Standard"
      },
      "properties": {
        "name": "namespace-1",
        "provisioningState": "Succeeded",
        "status": "Created",
        "enabled": true,
        "critical": false,
        "subscriptionId": "29cfa613-cbbc-4512-b1d6-1b3a92c7fa40",
        "createdAt": "2023-04-26T06:10:44.01+00:00",
        "updatedAt": "2023-04-26T06:10:44.03+00:00",
        "namespaceType": "NotificationHub",
        "publicNetworkAccess": "Enabled",
        "networkAcls": {
          "ipRules": [
            {
              "ipMask": "185.48.100.00/24",
              "rights": [
                "Manage",
                "Send",
                "Listen"
              ]
            }
          ],
          "publicNetworkRule": {
            "rights": [
              "Listen"
            ]
          }
        },
        "serviceBusEndpoint": "https://namespace-1.servicebus.windows.net:443/",
        "privateEndpointConnections": []
      },
      "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/namespace-1",
      "name": "namespace-2",
      "type": "Microsoft.NotificationHubs/namespaces",
      "tags": {}
    },
    {
      "location": "East US",
      "sku": {
        "name": "Standard"
      },
      "properties": {
        "name": "namespace-2",
        "provisioningState": "Succeeded",
        "status": "Created",
        "enabled": true,
        "critical": false,
        "subscriptionId": "29cfa613-cbbc-4512-b1d6-1b3a92c7fa40",
        "createdAt": "2023-04-26T06:10:44.01+00:00",
        "updatedAt": "2023-04-26T06:10:44.03+00:00",
        "namespaceType": "NotificationHub",
        "publicNetworkAccess": "Enabled",
        "networkAcls": {
          "ipRules": [],
          "publicNetworkRule": {
            "rights": [
              "Manage",
              "Listen",
              "Send"
            ]
          }
        },
        "serviceBusEndpoint": "https://namespace-2.servicebus.windows.net:443/",
        "privateEndpointConnections": []
      },
      "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/namespace-2",
      "name": "namespace-2",
      "type": "Microsoft.NotificationHubs/namespaces",
      "tags": {
        "tag1": "value1",
        "tag2": "value2"
      }
    }
  ],
  "nextLink": "https://management.azure.com/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/providers/Microsoft.NotificationHubs/namespaces?api-version=2023-09-01&$count=2&$skipToken=##################"
}

定义

名称 说明
AccessRights

定义 AccessRights 的值。

AdmCredential

NotificationHub AdmCredential 的说明。

AdmCredentialProperties

NotificationHub AdmCredential 的说明。

ApnsCredential

NotificationHub ApnsCredential 的说明。

ApnsCredentialProperties

NotificationHub ApnsCredential 的说明。

BaiduCredential

NotificationHub BaiduCredential 的说明。

BaiduCredentialProperties

NotificationHub BaiduCredential 的说明。

BrowserCredential

NotificationHub BrowserCredential 的说明。

BrowserCredentialProperties

NotificationHub BrowserCredential 的说明。

createdByType

创建资源的标识的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

GcmCredential

NotificationHub GcmCredential 的说明。

GcmCredentialProperties

NotificationHub GcmCredential 的说明。

IpRule

基于 IP 地址筛选流量的网络授权规则。

MpnsCredential

NotificationHub MpnsCredential 的说明。

MpnsCredentialProperties

NotificationHub MpnsCredential 的说明。

NamespaceListResult

列表命名空间作的响应。

NamespaceProperties

表示命名空间属性。

NamespaceResource

通知中心命名空间资源。

NamespaceStatus

命名空间状态。

NamespaceType

定义 NamespaceType 的值。

NetworkAcls

网络授权规则的集合。

OperationProvisioningState

定义 OperationProvisioningState 的值。

PnsCredentials

通知中心或通知中心命名空间 PNS 凭据的集合。

PrivateEndpointConnectionProperties

专用终结点连接属性。

PrivateEndpointConnectionProvisioningState

专用终结点连接的状态。

PrivateEndpointConnectionResource

表示专用终结点连接 ARM 资源 - 通知中心命名空间的子资源。

PrivateLinkConnectionStatus

专用链接连接的状态。

PublicInternetAuthorizationRule

默认(公共 Internet)网络授权规则,如果没有其他网络规则匹配,则包含权限。

PublicNetworkAccess

公共网络访问的类型。

RemotePrivateEndpointConnection

表示使用专用终结点连接连接到通知中心命名空间的专用终结点。

RemotePrivateLinkServiceConnectionState

专用链接服务连接的状态。

ReplicationRegion

允许的复制区域

Sku

命名空间的 SKU 说明

SkuName

命名空间 SKU 名称。

systemData

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

WnsCredential

NotificationHub WnsCredential 的说明。

WnsCredentialProperties

NotificationHub WnsCredential 的说明。

XiaomiCredential

NotificationHub XiaomiCredential 的说明。

XiaomiCredentialProperties

NotificationHub XiaomiCredentialProperties 的说明。

ZoneRedundancyPreference

命名空间 SKU 名称。

AccessRights

定义 AccessRights 的值。

说明
Listen
Manage
Send

AdmCredential

NotificationHub AdmCredential 的说明。

名称 类型 说明
properties

AdmCredentialProperties

NotificationHub AdmCredential 的说明。

AdmCredentialProperties

NotificationHub AdmCredential 的说明。

名称 类型 说明
authTokenUrl

string

minLength: 1

获取或设置授权令牌的 URL。

clientId

string

minLength: 1

获取或设置客户端标识符。

clientSecret

string

minLength: 1

获取或设置凭据机密访问密钥。

ApnsCredential

NotificationHub ApnsCredential 的说明。

名称 类型 说明
properties

ApnsCredentialProperties

NotificationHub ApnsCredential 的说明。

ApnsCredentialProperties

NotificationHub ApnsCredential 的说明。

名称 类型 说明
apnsCertificate

string

获取或设置 APNS 证书。

appId

string

获取或设置从开发人员帐户获取的颁发者(iss)注册的声明密钥,其值为 10 个字符的团队 ID

appName

string

获取或设置应用程序的名称

certificateKey

string

获取或设置证书密钥。

endpoint

string

minLength: 1

获取或设置此凭据的终结点。

keyId

string

获取或设置从开发人员帐户获取的 10 个字符密钥标识符(儿童)密钥

thumbprint

string

获取或设置 APNS 证书指纹

token

string

获取或设置通过开发人员帐户获取的提供程序身份验证令牌

BaiduCredential

NotificationHub BaiduCredential 的说明。

名称 类型 说明
properties

BaiduCredentialProperties

NotificationHub BaiduCredential 的说明。

BaiduCredentialProperties

NotificationHub BaiduCredential 的说明。

名称 类型 说明
baiduApiKey

string

minLength: 1

获取或设置百度 API 密钥。

baiduEndPoint

string

minLength: 1

获取或设置百度终结点。

baiduSecretKey

string

minLength: 1

获取或设置百度密钥

BrowserCredential

NotificationHub BrowserCredential 的说明。

名称 类型 说明
properties

BrowserCredentialProperties

NotificationHub BrowserCredential 的说明。

BrowserCredentialProperties

NotificationHub BrowserCredential 的说明。

名称 类型 说明
subject

string

minLength: 1

获取或设置 Web 推送主题。

vapidPrivateKey

string

minLength: 1

获取或设置 VAPID 私钥。

vapidPublicKey

string

minLength: 1

获取或设置 VAPID 公钥。

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

GcmCredential

NotificationHub GcmCredential 的说明。

名称 类型 说明
properties

GcmCredentialProperties

NotificationHub GcmCredential 的说明。

GcmCredentialProperties

NotificationHub GcmCredential 的说明。

名称 类型 说明
gcmEndpoint

string

获取或设置 GCM 终结点。

googleApiKey

string

minLength: 1

获取或设置 Google API 密钥。

IpRule

基于 IP 地址筛选流量的网络授权规则。

名称 类型 说明
ipMask

string

minLength: 1

IP 掩码。

rights

AccessRights[]

访问权限列表。

MpnsCredential

NotificationHub MpnsCredential 的说明。

名称 类型 说明
properties

MpnsCredentialProperties

NotificationHub MpnsCredential 的说明。

MpnsCredentialProperties

NotificationHub MpnsCredential 的说明。

名称 类型 说明
certificateKey

string

minLength: 1

获取或设置此凭据的证书密钥。

mpnsCertificate

string

minLength: 1

获取或设置 MPNS 证书。

thumbprint

string

minLength: 1

获取或设置 MPNS 证书指纹

NamespaceListResult

列表命名空间作的响应。

名称 类型 说明
nextLink

string

获取或设置指向下一组结果的链接。

value

NamespaceResource[]

获取或设置 List AuthorizationRules作的结果。

NamespaceProperties

表示命名空间属性。

名称 类型 默认值 说明
createdAt

string (date-time)

创建命名空间的时间。

critical

boolean

获取或设置命名空间是否设置为“严重”。

dataCenter

string

已弃用。

enabled

boolean

获取或设置命名空间当前是否已启用。

metricId

string

Azure Insights 指标 ID。

name

string

通知中心命名空间的名称。 这是不可变属性,在创建命名空间时由服务自动设置。

namespaceType

NamespaceType

定义 NamespaceType 的值。

networkAcls

NetworkAcls

网络授权规则的集合。

pnsCredentials

PnsCredentials

通知中心或通知中心命名空间 PNS 凭据的集合。

privateEndpointConnections

PrivateEndpointConnectionResource[]

命名空间的专用终结点连接

provisioningState

OperationProvisioningState

定义 OperationProvisioningState 的值。

publicNetworkAccess

PublicNetworkAccess

Enabled

公共网络访问的类型。

region

string

地区。 该值始终设置为与 Namespace.Location 相同的值,因此我们弃用此属性。

replicationRegion

ReplicationRegion

允许的复制区域

scaleUnit

string

获取或设置在其中创建命名空间的 scaleUnit

serviceBusEndpoint

string

获取或设置可用于执行 NotificationHub作的终结点。

status

NamespaceStatus

命名空间状态。

subscriptionId

string

命名空间订阅 ID。

updatedAt

string (date-time)

更新命名空间的时间。

zoneRedundancy

ZoneRedundancyPreference

Disabled

命名空间 SKU 名称。

NamespaceResource

通知中心命名空间资源。

名称 类型 说明
id

string (arm-id)

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

location

string

资源所在的地理位置

name

string

资源的名称

properties

NamespaceProperties

表示命名空间属性。

sku

Sku

命名空间的 SKU 说明

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

object

资源标记。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

NamespaceStatus

命名空间状态。

说明
Created
Creating
Deleting
Suspended

NamespaceType

定义 NamespaceType 的值。

说明
Messaging
NotificationHub

NetworkAcls

网络授权规则的集合。

名称 类型 说明
ipRules

IpRule[]

IP 规则列表。

publicNetworkRule

PublicInternetAuthorizationRule

默认(公共 Internet)网络授权规则,如果没有其他网络规则匹配,则包含权限。

OperationProvisioningState

定义 OperationProvisioningState 的值。

说明
Canceled
Disabled
Failed
InProgress
Pending
Succeeded
Unknown

PnsCredentials

通知中心或通知中心命名空间 PNS 凭据的集合。

名称 类型 说明
admCredential

AdmCredential

NotificationHub AdmCredential 的说明。

apnsCredential

ApnsCredential

NotificationHub ApnsCredential 的说明。

baiduCredential

BaiduCredential

NotificationHub BaiduCredential 的说明。

browserCredential

BrowserCredential

NotificationHub BrowserCredential 的说明。

gcmCredential

GcmCredential

NotificationHub GcmCredential 的说明。

mpnsCredential

MpnsCredential

NotificationHub MpnsCredential 的说明。

wnsCredential

WnsCredential

NotificationHub WnsCredential 的说明。

xiaomiCredential

XiaomiCredential

NotificationHub XiaomiCredential 的说明。

PrivateEndpointConnectionProperties

专用终结点连接属性。

名称 类型 说明
groupIds

string[]

组 ID 列表。 对于通知中心,它始终包含单个“namespace”元素。

privateEndpoint

RemotePrivateEndpointConnection

表示使用专用终结点连接连接到通知中心命名空间的专用终结点。

privateLinkServiceConnectionState

RemotePrivateLinkServiceConnectionState

专用链接服务连接的状态。

provisioningState

PrivateEndpointConnectionProvisioningState

专用终结点连接的状态。

PrivateEndpointConnectionProvisioningState

专用终结点连接的状态。

说明
Creating
Deleted
Deleting
DeletingByProxy
Succeeded
Unknown
Updating
UpdatingByProxy

PrivateEndpointConnectionResource

表示专用终结点连接 ARM 资源 - 通知中心命名空间的子资源。

名称 类型 说明
id

string (arm-id)

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

name

string

资源的名称

properties

PrivateEndpointConnectionProperties

专用终结点连接属性。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

PrivateLinkConnectionStatus

专用链接连接的状态。

说明
Approved
Disconnected
Pending
Rejected

PublicInternetAuthorizationRule

默认(公共 Internet)网络授权规则,如果没有其他网络规则匹配,则包含权限。

名称 类型 说明
rights

AccessRights[]

访问权限列表。

PublicNetworkAccess

公共网络访问的类型。

说明
Disabled
Enabled

RemotePrivateEndpointConnection

表示使用专用终结点连接连接到通知中心命名空间的专用终结点。

名称 类型 说明
id

string

专用终结点的 ARM 资源 ID。 这可能属于与通知中心命名空间不同的订阅和资源组。

RemotePrivateLinkServiceConnectionState

专用链接服务连接的状态。

名称 类型 说明
actionsRequired

string

对所需作的友好描述。

description

string

人类友好的描述。

status

PrivateLinkConnectionStatus

专用链接连接的状态。

ReplicationRegion

允许的复制区域

说明
AustraliaEast
BrazilSouth
Default
None
NorthEurope
SouthAfricaNorth
SouthEastAsia
WestUs2

Sku

命名空间的 SKU 说明

名称 类型 说明
capacity

integer (int32)

获取或设置资源的容量

family

string

获取或设置 Sku 系列

name

SkuName

命名空间 SKU 名称。

size

string

获取或设置 SKU 大小

tier

string

获取或设置特定 SKU 的层

SkuName

命名空间 SKU 名称。

说明
Basic
Free
Standard

systemData

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

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

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

WnsCredential

NotificationHub WnsCredential 的说明。

名称 类型 说明
properties

WnsCredentialProperties

NotificationHub WnsCredential 的说明。

WnsCredentialProperties

NotificationHub WnsCredential 的说明。

名称 类型 说明
certificateKey

string

Ges 或设置 WNS 证书密钥。

packageSid

string

获取或设置此凭据的包 ID。

secretKey

string

获取或设置密钥。

windowsLiveEndpoint

string

获取或设置 Windows Live 终结点。

wnsCertificate

string

获取或设置 WNS 证书。

XiaomiCredential

NotificationHub XiaomiCredential 的说明。

名称 类型 说明
properties

XiaomiCredentialProperties

NotificationHub XiaomiCredentialProperties 的说明。

XiaomiCredentialProperties

NotificationHub XiaomiCredentialProperties 的说明。

名称 类型 说明
appSecret

string

获取或设置应用机密。

endpoint

string

获取或设置小米服务终结点。

ZoneRedundancyPreference

命名空间 SKU 名称。

说明
Disabled
Enabled