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

Microsoft.NotificationHubs 命名空间/notificationHubs 2014-09-01

Bicep 资源定义

可以使用目标操作部署命名空间/notificationHubs 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.NotificationHubs/namespaces/notificationHubs 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.NotificationHubs/namespaces/notificationHubs@2014-09-01' = {
  parent: resourceSymbolicName
  location: 'string'
  name: 'string'
  properties: {
    admCredential: {
      properties: {
        authTokenUrl: 'string'
        clientId: 'string'
        clientSecret: 'string'
      }
    }
    apnsCredential: {
      properties: {
        apnsCertificate: 'string'
        certificateKey: 'string'
        endpoint: 'string'
        thumbprint: 'string'
      }
    }
    authorizationRules: [
      {
        claimType: 'string'
        claimValue: 'string'
        createdTime: 'string'
        keyName: 'string'
        modifiedTime: 'string'
        primaryKey: 'string'
        revision: int
        rights: [
          'string'
        ]
        secondaryKey: 'string'
      }
    ]
    baiduCredential: {
      properties: {
        baiduApiKey: 'string'
        baiduEndPoint: 'string'
        baiduSecretKey: 'string'
      }
    }
    gcmCredential: {
      properties: {
        gcmEndpoint: 'string'
        googleApiKey: 'string'
      }
    }
    mpnsCredential: {
      properties: {
        certificateKey: 'string'
        mpnsCertificate: 'string'
        thumbprint: 'string'
      }
    }
    name: 'string'
    registrationTtl: 'string'
    wnsCredential: {
      properties: {
        packageSid: 'string'
        secretKey: 'string'
        windowsLiveEndpoint: 'string'
      }
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

AdmCredential

名字 描述 价值
性能 获取或设置 NotificationHub AdmCredential 的属性。 AdmCredentialProperties

AdmCredentialProperties

名字 描述 价值
authTokenUrl 获取或设置授权令牌的 URL。 字符串
clientId 获取或设置客户端标识符。 字符串
clientSecret 获取或设置凭据机密访问密钥。 字符串

ApnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub ApnsCredential 的属性。 ApnsCredentialProperties

ApnsCredentialProperties

名字 描述 价值
apnsCertificate 获取或设置 APNS 证书。 字符串
certificateKey 获取或设置证书密钥。 字符串
端点 获取或设置此凭据的终结点。 字符串
指纹 获取或设置 Apns 证书指纹 字符串

百度Credential

名字 描述 价值
性能 获取或设置 NotificationHub BaiduCredential 的属性。 百度CredentialProperties

BaiduCredentialProperties

名字 描述 价值
baiduApiKey 获取或设置百度 API 密钥。 字符串
baiduEndPoint 获取或设置百度终结点。 字符串
baiduSecretKey 获取或设置百度密钥 字符串

GcmCredential

名字 描述 价值
性能 获取或设置 NotificationHub GcmCredential 的属性。 GcmCredentialProperties

GcmCredentialProperties

名字 描述 价值
gcmEndpoint 获取或设置 GCM 终结点。 字符串
googleApiKey 获取或设置 Google API 密钥。 字符串

Microsoft.NotificationHubs/namespaces/notificationHubs

名字 描述 价值
位置 获取或设置 NotificationHub 数据中心位置。 string (必需)
名字 资源名称 string (必需)
父母 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源
类型资源的符号名称:命名空间
性能 获取或设置 NotificationHub 的属性。 NotificationHubProperties (必需)
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

MpnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub MpnsCredential 的属性。 MpnsCredentialProperties

MpnsCredentialProperties

名字 描述 价值
certificateKey 获取或设置此凭据的证书密钥。 字符串
mpnsCertificate 获取或设置 MPNS 证书。 字符串
指纹 获取或设置 Mpns 证书指纹 字符串

NotificationHubCreateOrUpdateParametersTags

名字 描述 价值

NotificationHubProperties

名字 描述 价值
admCredential 创建的 NotificationHub 的 AdmCredential AdmCredential
apnsCredential 创建的 NotificationHub 的 ApnsCredential ApnsCredential
authorizationRules 创建的 NotificationHub 的 AuthorizationRules SharedAccessAuthorizationRuleProperties[]
baiduCredential 创建的 NotificationHub 的百度Credential 百度Credential
gcmCredential 创建的 NotificationHub 的 GcmCredential GcmCredential
mpnsCredential 创建的 NotificationHub 的 MpnsCredential MpnsCredential
名字 NotificationHub 名称。 字符串
registrationTtl 创建的 NotificationHub 的 RegistrationTtl 字符串
wnsCredential 创建的 NotificationHub 的 WnsCredential WnsCredential

SharedAccessAuthorizationRuleProperties

名字 描述 价值
claimType 声明的类型。 字符串
claimValue 声明的值。 字符串
createdTime 创建授权规则的时间。 字符串
keyName 使用的密钥的名称。 字符串
modifiedTime 更新规则的最近时间。 字符串
primaryKey 使用的主键。 字符串
校订 规则的修订号。 int
权利 与规则关联的权限。 包含任一项的字符串数组:
“Listen”
“管理”
“Send”
secondaryKey 使用的辅助密钥。 字符串

WnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub WnsCredential 的属性。 WnsCredentialProperties

WnsCredentialProperties

名字 描述 价值
packageSid 获取或设置此凭据的包 ID。 字符串
secretKey 获取或设置密钥。 字符串
windowsLiveEndpoint 获取或设置 Windows Live 终结点。 字符串

用法示例

Azure 快速入门示例

以下 Azure 快速入门模板 包含用于部署此资源类型的 Bicep 示例。

Bicep 文件 描述
创建 Azure 通知中心 创建最初由 John Downs 创作的 Azure 通知中心模板。

ARM 模板资源定义

可以使用目标操作部署命名空间/notificationHubs 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.NotificationHubs/namespaces/notificationHubs 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.NotificationHubs/namespaces/notificationHubs",
  "apiVersion": "2014-09-01",
  "name": "string",
  "location": "string",
  "properties": {
    "admCredential": {
      "properties": {
        "authTokenUrl": "string",
        "clientId": "string",
        "clientSecret": "string"
      }
    },
    "apnsCredential": {
      "properties": {
        "apnsCertificate": "string",
        "certificateKey": "string",
        "endpoint": "string",
        "thumbprint": "string"
      }
    },
    "authorizationRules": [
      {
        "claimType": "string",
        "claimValue": "string",
        "createdTime": "string",
        "keyName": "string",
        "modifiedTime": "string",
        "primaryKey": "string",
        "revision": "int",
        "rights": [ "string" ],
        "secondaryKey": "string"
      }
    ],
    "baiduCredential": {
      "properties": {
        "baiduApiKey": "string",
        "baiduEndPoint": "string",
        "baiduSecretKey": "string"
      }
    },
    "gcmCredential": {
      "properties": {
        "gcmEndpoint": "string",
        "googleApiKey": "string"
      }
    },
    "mpnsCredential": {
      "properties": {
        "certificateKey": "string",
        "mpnsCertificate": "string",
        "thumbprint": "string"
      }
    },
    "name": "string",
    "registrationTtl": "string",
    "wnsCredential": {
      "properties": {
        "packageSid": "string",
        "secretKey": "string",
        "windowsLiveEndpoint": "string"
      }
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

AdmCredential

名字 描述 价值
性能 获取或设置 NotificationHub AdmCredential 的属性。 AdmCredentialProperties

AdmCredentialProperties

名字 描述 价值
authTokenUrl 获取或设置授权令牌的 URL。 字符串
clientId 获取或设置客户端标识符。 字符串
clientSecret 获取或设置凭据机密访问密钥。 字符串

ApnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub ApnsCredential 的属性。 ApnsCredentialProperties

ApnsCredentialProperties

名字 描述 价值
apnsCertificate 获取或设置 APNS 证书。 字符串
certificateKey 获取或设置证书密钥。 字符串
端点 获取或设置此凭据的终结点。 字符串
指纹 获取或设置 Apns 证书指纹 字符串

百度Credential

名字 描述 价值
性能 获取或设置 NotificationHub BaiduCredential 的属性。 百度CredentialProperties

BaiduCredentialProperties

名字 描述 价值
baiduApiKey 获取或设置百度 API 密钥。 字符串
baiduEndPoint 获取或设置百度终结点。 字符串
baiduSecretKey 获取或设置百度密钥 字符串

GcmCredential

名字 描述 价值
性能 获取或设置 NotificationHub GcmCredential 的属性。 GcmCredentialProperties

GcmCredentialProperties

名字 描述 价值
gcmEndpoint 获取或设置 GCM 终结点。 字符串
googleApiKey 获取或设置 Google API 密钥。 字符串

Microsoft.NotificationHubs/namespaces/notificationHubs

名字 描述 价值
apiVersion API 版本 '2014-09-01'
位置 获取或设置 NotificationHub 数据中心位置。 string (必需)
名字 资源名称 string (必需)
性能 获取或设置 NotificationHub 的属性。 NotificationHubProperties (必需)
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 “Microsoft.NotificationHubs/namespaces/notificationHubs”

MpnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub MpnsCredential 的属性。 MpnsCredentialProperties

MpnsCredentialProperties

名字 描述 价值
certificateKey 获取或设置此凭据的证书密钥。 字符串
mpnsCertificate 获取或设置 MPNS 证书。 字符串
指纹 获取或设置 Mpns 证书指纹 字符串

NotificationHubCreateOrUpdateParametersTags

名字 描述 价值

NotificationHubProperties

名字 描述 价值
admCredential 创建的 NotificationHub 的 AdmCredential AdmCredential
apnsCredential 创建的 NotificationHub 的 ApnsCredential ApnsCredential
authorizationRules 创建的 NotificationHub 的 AuthorizationRules SharedAccessAuthorizationRuleProperties[]
baiduCredential 创建的 NotificationHub 的百度Credential 百度Credential
gcmCredential 创建的 NotificationHub 的 GcmCredential GcmCredential
mpnsCredential 创建的 NotificationHub 的 MpnsCredential MpnsCredential
名字 NotificationHub 名称。 字符串
registrationTtl 创建的 NotificationHub 的 RegistrationTtl 字符串
wnsCredential 创建的 NotificationHub 的 WnsCredential WnsCredential

SharedAccessAuthorizationRuleProperties

名字 描述 价值
claimType 声明的类型。 字符串
claimValue 声明的值。 字符串
createdTime 创建授权规则的时间。 字符串
keyName 使用的密钥的名称。 字符串
modifiedTime 更新规则的最近时间。 字符串
primaryKey 使用的主键。 字符串
校订 规则的修订号。 int
权利 与规则关联的权限。 包含任一项的字符串数组:
“Listen”
“管理”
“Send”
secondaryKey 使用的辅助密钥。 字符串

WnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub WnsCredential 的属性。 WnsCredentialProperties

WnsCredentialProperties

名字 描述 价值
packageSid 获取或设置此凭据的包 ID。 字符串
secretKey 获取或设置密钥。 字符串
windowsLiveEndpoint 获取或设置 Windows Live 终结点。 字符串

用法示例

Azure 快速入门模板

以下 Azure 快速入门模板 部署此资源类型。

模板 描述
创建 Azure 通知中心

部署到 Azure
创建最初由 John Downs 创作的 Azure 通知中心模板。
使用 SQL 数据库 预配移动应用

部署到 Azure
此模板预配移动应用、SQL 数据库和通知中心。 它在移动应用中为数据库和通知中心配置连接字符串。

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署命名空间/notificationHubs 资源类型:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.NotificationHubs/namespaces/notificationHubs 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.NotificationHubs/namespaces/notificationHubs@2014-09-01"
  name = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      admCredential = {
        properties = {
          authTokenUrl = "string"
          clientId = "string"
          clientSecret = "string"
        }
      }
      apnsCredential = {
        properties = {
          apnsCertificate = "string"
          certificateKey = "string"
          endpoint = "string"
          thumbprint = "string"
        }
      }
      authorizationRules = [
        {
          claimType = "string"
          claimValue = "string"
          createdTime = "string"
          keyName = "string"
          modifiedTime = "string"
          primaryKey = "string"
          revision = int
          rights = [
            "string"
          ]
          secondaryKey = "string"
        }
      ]
      baiduCredential = {
        properties = {
          baiduApiKey = "string"
          baiduEndPoint = "string"
          baiduSecretKey = "string"
        }
      }
      gcmCredential = {
        properties = {
          gcmEndpoint = "string"
          googleApiKey = "string"
        }
      }
      mpnsCredential = {
        properties = {
          certificateKey = "string"
          mpnsCertificate = "string"
          thumbprint = "string"
        }
      }
      name = "string"
      registrationTtl = "string"
      wnsCredential = {
        properties = {
          packageSid = "string"
          secretKey = "string"
          windowsLiveEndpoint = "string"
        }
      }
    }
  }
}

属性值

AdmCredential

名字 描述 价值
性能 获取或设置 NotificationHub AdmCredential 的属性。 AdmCredentialProperties

AdmCredentialProperties

名字 描述 价值
authTokenUrl 获取或设置授权令牌的 URL。 字符串
clientId 获取或设置客户端标识符。 字符串
clientSecret 获取或设置凭据机密访问密钥。 字符串

ApnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub ApnsCredential 的属性。 ApnsCredentialProperties

ApnsCredentialProperties

名字 描述 价值
apnsCertificate 获取或设置 APNS 证书。 字符串
certificateKey 获取或设置证书密钥。 字符串
端点 获取或设置此凭据的终结点。 字符串
指纹 获取或设置 Apns 证书指纹 字符串

百度Credential

名字 描述 价值
性能 获取或设置 NotificationHub BaiduCredential 的属性。 百度CredentialProperties

BaiduCredentialProperties

名字 描述 价值
baiduApiKey 获取或设置百度 API 密钥。 字符串
baiduEndPoint 获取或设置百度终结点。 字符串
baiduSecretKey 获取或设置百度密钥 字符串

GcmCredential

名字 描述 价值
性能 获取或设置 NotificationHub GcmCredential 的属性。 GcmCredentialProperties

GcmCredentialProperties

名字 描述 价值
gcmEndpoint 获取或设置 GCM 终结点。 字符串
googleApiKey 获取或设置 Google API 密钥。 字符串

Microsoft.NotificationHubs/namespaces/notificationHubs

名字 描述 价值
位置 获取或设置 NotificationHub 数据中心位置。 string (必需)
名字 资源名称 string (必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:命名空间
性能 获取或设置 NotificationHub 的属性。 NotificationHubProperties (必需)
标签 资源标记 标记名称和值的字典。
类型 资源类型 “Microsoft.NotificationHubs/namespaces/notificationHubs@2014-09-01”

MpnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub MpnsCredential 的属性。 MpnsCredentialProperties

MpnsCredentialProperties

名字 描述 价值
certificateKey 获取或设置此凭据的证书密钥。 字符串
mpnsCertificate 获取或设置 MPNS 证书。 字符串
指纹 获取或设置 Mpns 证书指纹 字符串

NotificationHubCreateOrUpdateParametersTags

名字 描述 价值

NotificationHubProperties

名字 描述 价值
admCredential 创建的 NotificationHub 的 AdmCredential AdmCredential
apnsCredential 创建的 NotificationHub 的 ApnsCredential ApnsCredential
authorizationRules 创建的 NotificationHub 的 AuthorizationRules SharedAccessAuthorizationRuleProperties[]
baiduCredential 创建的 NotificationHub 的百度Credential 百度Credential
gcmCredential 创建的 NotificationHub 的 GcmCredential GcmCredential
mpnsCredential 创建的 NotificationHub 的 MpnsCredential MpnsCredential
名字 NotificationHub 名称。 字符串
registrationTtl 创建的 NotificationHub 的 RegistrationTtl 字符串
wnsCredential 创建的 NotificationHub 的 WnsCredential WnsCredential

SharedAccessAuthorizationRuleProperties

名字 描述 价值
claimType 声明的类型。 字符串
claimValue 声明的值。 字符串
createdTime 创建授权规则的时间。 字符串
keyName 使用的密钥的名称。 字符串
modifiedTime 更新规则的最近时间。 字符串
primaryKey 使用的主键。 字符串
校订 规则的修订号。 int
权利 与规则关联的权限。 包含任一项的字符串数组:
“Listen”
“管理”
“Send”
secondaryKey 使用的辅助密钥。 字符串

WnsCredential

名字 描述 价值
性能 获取或设置 NotificationHub WnsCredential 的属性。 WnsCredentialProperties

WnsCredentialProperties

名字 描述 价值
packageSid 获取或设置此凭据的包 ID。 字符串
secretKey 获取或设置密钥。 字符串
windowsLiveEndpoint 获取或设置 Windows Live 终结点。 字符串