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

Notification Hubs - Debug Send

测试发送推送通知。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/debugsend?api-version=2023-10-01-preview

URI 参数

名称 必需 类型 说明
namespaceName
path True

string

命名空间名称

Regex pattern: ^[a-zA-Z][a-zA-Z0-9-]*$

notificationHubName
path True

string

通知中心名称

Regex pattern: ^[a-zA-Z][a-zA-Z0-9-./_]*$

resourceGroupName
path True

string

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string

uuid

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

api-version
query True

string

要用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

DebugSendResponse

成功

Other Status Codes

ErrorResponse

带有原因的错误代码。

安全性

azure_auth

Azure Active Directory OAuth2 流

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

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

NotificationHubs_DebugSend

Sample Request

POST https://management.azure.com/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub/debugsend?api-version=2023-10-01-preview

Sample Response

{
  "properties": {
    "success": 0,
    "failure": 0,
    "results": []
  },
  "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test",
  "name": "test",
  "type": "Microsoft.NotificationHubs/namespaces/notificationHubs/debugSend"
}

定义

名称 说明
createdByType

创建资源的标识类型。

DebugSendResponse

NotificationHub 资源的说明。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

RegistrationResult

单个注册的通知结果。

systemData

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

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

DebugSendResponse

NotificationHub 资源的说明。

名称 类型 说明
id

string

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

location

string

已弃用 - 仅用于兼容性。

name

string

资源的名称

properties.failure

integer

获取或设置发送失败

properties.results

RegistrationResult[]

获取或设置实际的失败说明

properties.success

integer

获取或设置成功发送

systemData

systemData

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

tags

object

已弃用 - 仅用于兼容性。

type

string

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

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

RegistrationResult

单个注册的通知结果。

名称 类型 说明
applicationPlatform

string

PNS 类型。

outcome

string

通知结果。

pnsHandle

string

PNS 句柄。

registrationId

string

注册 id。

systemData

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

名称 类型 说明
createdAt

string

资源创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

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

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

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