تعريف مورد Bicep
يمكن نشر نوع مورد namespaces/notificationHubs مع العمليات التي تستهدف:
-
مجموعات الموارد - راجع أوامر نشر مجموعة الموارد
للحصول على قائمة بالخصائص التي تم تغييرها في كل إصدار من إصدارات واجهة برمجة التطبيقات، راجع سجل التغيير .
أمثلة الاستخدام
عينات Bicep
مثال أساسي لنشر مركز الإشعارات داخل مساحة اسم مركز الإشعارات.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource namespace 'Microsoft.NotificationHubs/namespaces@2017-04-01' = {
name: resourceName
location: location
sku: {
name: 'Free'
}
properties: {
enabled: true
namespaceType: 'NotificationHub'
region: 'westeurope'
}
}
resource notificationHub 'Microsoft.NotificationHubs/namespaces/notificationHubs@2017-04-01' = {
name: resourceName
location: location
parent: namespace
properties: {}
}
نماذج Azure Quickstart
تحتوي قوالب Azure Quickstart التالية على نماذج Bicep لنشر نوع المورد هذا.
| ملف Bicep |
وصف |
|
إنشاء Azure Notification Hub |
إنشاء Azure Notification Hub، القالب الذي تم تأليفه في الأصل بواسطة John Downs. |
لإنشاء مورد Microsoft.NotificationHubs/namespaces/notificationHubs، أضف Bicep التالي إلى القالب الخاص بك.
resource symbolicname 'Microsoft.NotificationHubs/namespaces/notificationHubs@2016-03-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: [
{
rights: [
'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'
}
}
}
sku: {
capacity: int
family: 'string'
name: 'string'
size: 'string'
tier: 'string'
}
tags: {
{customized property}: 'string'
}
}
قيم الخصائص
Microsoft.NotificationHubs/مساحات الاسم/notificationHubs
| اسم |
وصف |
قيمة |
| مكان |
موقع المورد |
سلسلة (مطلوب) |
| اسم |
اسم المورد |
سلسلة (مطلوب) |
| الوالد |
في Bicep، يمكنك تحديد المورد الأصل لمورد تابع. تحتاج فقط إلى إضافة هذه الخاصية عند الإعلان عن المورد التابع خارج المورد الأصل.
لمزيد من المعلومات، راجع مورد تابع خارج المورد الأصل. |
الاسم الرمزي للمورد من النوع: مساحات أسماء |
| خصائص |
خصائص NotificationHub. |
NotificationHubProperties (مطلوب) |
| سكو |
sku لمساحة الاسم التي تم إنشاؤها |
Sku |
| العلامات |
علامات الموارد |
قاموس أسماء العلامات والقيم. راجع العلامات في القوالب |
AdmCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub AdmCredential. |
AdmCredentialProperties |
خصائص AdmCredential
| اسم |
وصف |
قيمة |
| authTokenUrl |
عنوان URL للرمز المميز للتخويل. |
خيط |
| معرف العميل |
معرف العميل. |
خيط |
| clientSecret |
مفتاح الوصول السري لبيانات الاعتماد. |
خيط |
ApnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub ApnsCredential. |
ApnsCredentialProperties |
خصائص ApnsCredential
| اسم |
وصف |
قيمة |
| شهادة apnsCertificate |
شهادة APNS. |
خيط |
| مفتاح الشهادة |
مفتاح الشهادة. |
خيط |
| نقطه النهايه |
نقطة نهاية بيانات الاعتماد هذه. |
خيط |
| بصمه الابهام |
بصمة إبهام شهادة APNS |
خيط |
BaiduCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub BaiduCredential. |
BaiduCredentialProperties |
خصائص BaiduCredential
| اسم |
وصف |
قيمة |
| بايدو أبي كي |
مفتاح Baidu Api. |
خيط |
| بايدو إند بوينت |
نقطة نهاية Baidu. |
خيط |
| بايدو سيكريت كي |
مفتاح Baidu السري |
خيط |
شهادة جي سي إم
خصائص GcmCredential
| اسم |
وصف |
قيمة |
| نقطة نهاية gcm |
نقطة نهاية GCM. |
خيط |
| googleApiKey |
مفتاح واجهة برمجة تطبيقات Google. |
خيط |
MpnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub MpnsCredential. |
MpnsCredentialProperties |
خصائص MpnsCredential
| اسم |
وصف |
قيمة |
| مفتاح الشهادة |
مفتاح الشهادة لبيانات الاعتماد هذه. |
خيط |
| شهادة mpnsCertificate |
شهادة MPNS. |
خيط |
| بصمه الابهام |
بصمة إبهام شهادة MPNS |
خيط |
خصائص NotificationHub
| اسم |
وصف |
قيمة |
| admCredential |
AdmCredential الخاص ب NotificationHub الذي تم إنشاؤه |
AdmCredential |
| apnsCredential |
ApnsCredential الخاص ب NotificationHub الذي تم إنشاؤه |
ApnsCredential |
| قواعد التخويل |
قواعد التخويل الخاصة ب NotificationHub الذي تم إنشاؤه |
SharedAccessAuthorizationRuleProperties[] |
| بايدو |
BaiduCredential ل NotificationHub الذي تم إنشاؤه |
BaiduCredential |
| gcmCredential |
GcmCredential ل NotificationHub الذي تم إنشاؤه |
GcmCredential |
| mpnsCredential |
MpnsCredential ل NotificationHub الذي تم إنشاؤه |
MpnsCredential |
| اسم |
اسم NotificationHub. |
خيط |
| تسجيلTtl |
RegistrationTtl ل NotificationHub الذي تم إنشاؤه |
خيط |
| wnsCredential |
WnsCredential ل NotificationHub الذي تم إنشاؤه |
WnsCredential |
SharedAccessAuthorizationRuleProperties
| اسم |
وصف |
قيمة |
| حقوق |
الحقوق المقترنة بالقاعدة. |
صفيف سلسلة يحتوي على أي من: "الاستماع" "إدارة" "إرسال" |
سكو
| اسم |
وصف |
قيمة |
| سعة |
سعة المورد |
الباحث |
| أسرة |
عائلة Sku |
خيط |
| اسم |
اسم وحدة sku لمركز الإعلامات |
"أساسي" "مجاني" 'قياسي' (مطلوب) |
| حجم |
حجم Sku |
خيط |
| المستوي |
مستوى وحدة sku معينة |
خيط |
WnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub WnsCredential. |
WnsCredentialProperties |
خصائص WnsCredential
| اسم |
وصف |
قيمة |
| packageSid |
معرف الحزمة لبيانات الاعتماد هذه. |
خيط |
| مفتاح سري |
المفتاح السري. |
خيط |
| windowsLiveنقطة النهاية |
نقطة نهاية Windows Live. |
خيط |
تعريف مورد قالب ARM
يمكن نشر نوع مورد namespaces/notificationHubs مع العمليات التي تستهدف:
أمثلة الاستخدام
قوالب Azure Quickstart
قوالب Azure Quickstart التالية توزيع نوع المورد هذا.
| قالب |
وصف |
إنشاء Azure Notification Hub
|
إنشاء Azure Notification Hub، القالب الذي تم تأليفه في الأصل بواسطة John Downs. |
توفير تطبيق الأجهزة المحمولة باستخدام قاعدة بيانات SQL
|
يقوم هذا القالب بتوفير تطبيق الأجهزة المحمولة وقاعدة بيانات SQL ومركز الإعلامات. يقوم بتكوين سلسلة اتصال في تطبيق الأجهزة المحمولة لقاعدة البيانات ومركز الإعلامات. |
لإنشاء مورد Microsoft.NotificationHubs/namespaces/notificationHubs، أضف JSON التالي إلى القالب الخاص بك.
{
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs",
"apiVersion": "2016-03-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": [
{
"rights": [ "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"
}
}
},
"sku": {
"capacity": "int",
"family": "string",
"name": "string",
"size": "string",
"tier": "string"
},
"tags": {
"{customized property}": "string"
}
}
قيم الخصائص
Microsoft.NotificationHubs/مساحات الاسم/notificationHubs
| اسم |
وصف |
قيمة |
| apiVersion |
إصدار واجهة برمجة التطبيقات |
'2016-03-01' |
| مكان |
موقع المورد |
سلسلة (مطلوب) |
| اسم |
اسم المورد |
سلسلة (مطلوب) |
| خصائص |
خصائص NotificationHub. |
NotificationHubProperties (مطلوب) |
| سكو |
sku لمساحة الاسم التي تم إنشاؤها |
Sku |
| العلامات |
علامات الموارد |
قاموس أسماء العلامات والقيم. راجع العلامات في القوالب |
| نوع |
نوع المورد |
"Microsoft.NotificationHubs/namespaces/notificationHubs" |
AdmCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub AdmCredential. |
AdmCredentialProperties |
خصائص AdmCredential
| اسم |
وصف |
قيمة |
| authTokenUrl |
عنوان URL للرمز المميز للتخويل. |
خيط |
| معرف العميل |
معرف العميل. |
خيط |
| clientSecret |
مفتاح الوصول السري لبيانات الاعتماد. |
خيط |
ApnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub ApnsCredential. |
ApnsCredentialProperties |
خصائص ApnsCredential
| اسم |
وصف |
قيمة |
| شهادة apnsCertificate |
شهادة APNS. |
خيط |
| مفتاح الشهادة |
مفتاح الشهادة. |
خيط |
| نقطه النهايه |
نقطة نهاية بيانات الاعتماد هذه. |
خيط |
| بصمه الابهام |
بصمة إبهام شهادة APNS |
خيط |
BaiduCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub BaiduCredential. |
BaiduCredentialProperties |
خصائص BaiduCredential
| اسم |
وصف |
قيمة |
| بايدو أبي كي |
مفتاح Baidu Api. |
خيط |
| بايدو إند بوينت |
نقطة نهاية Baidu. |
خيط |
| بايدو سيكريت كي |
مفتاح Baidu السري |
خيط |
شهادة جي سي إم
خصائص GcmCredential
| اسم |
وصف |
قيمة |
| نقطة نهاية gcm |
نقطة نهاية GCM. |
خيط |
| googleApiKey |
مفتاح واجهة برمجة تطبيقات Google. |
خيط |
MpnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub MpnsCredential. |
MpnsCredentialProperties |
خصائص MpnsCredential
| اسم |
وصف |
قيمة |
| مفتاح الشهادة |
مفتاح الشهادة لبيانات الاعتماد هذه. |
خيط |
| شهادة mpnsCertificate |
شهادة MPNS. |
خيط |
| بصمه الابهام |
بصمة إبهام شهادة MPNS |
خيط |
خصائص NotificationHub
| اسم |
وصف |
قيمة |
| admCredential |
AdmCredential الخاص ب NotificationHub الذي تم إنشاؤه |
AdmCredential |
| apnsCredential |
ApnsCredential الخاص ب NotificationHub الذي تم إنشاؤه |
ApnsCredential |
| قواعد التخويل |
قواعد التخويل الخاصة ب NotificationHub الذي تم إنشاؤه |
SharedAccessAuthorizationRuleProperties[] |
| بايدو |
BaiduCredential ل NotificationHub الذي تم إنشاؤه |
BaiduCredential |
| gcmCredential |
GcmCredential ل NotificationHub الذي تم إنشاؤه |
GcmCredential |
| mpnsCredential |
MpnsCredential ل NotificationHub الذي تم إنشاؤه |
MpnsCredential |
| اسم |
اسم NotificationHub. |
خيط |
| تسجيلTtl |
RegistrationTtl ل NotificationHub الذي تم إنشاؤه |
خيط |
| wnsCredential |
WnsCredential ل NotificationHub الذي تم إنشاؤه |
WnsCredential |
SharedAccessAuthorizationRuleProperties
| اسم |
وصف |
قيمة |
| حقوق |
الحقوق المقترنة بالقاعدة. |
صفيف سلسلة يحتوي على أي من: "الاستماع" "إدارة" "إرسال" |
سكو
| اسم |
وصف |
قيمة |
| سعة |
سعة المورد |
الباحث |
| أسرة |
عائلة Sku |
خيط |
| اسم |
اسم وحدة sku لمركز الإعلامات |
"أساسي" "مجاني" 'قياسي' (مطلوب) |
| حجم |
حجم Sku |
خيط |
| المستوي |
مستوى وحدة sku معينة |
خيط |
WnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub WnsCredential. |
WnsCredentialProperties |
خصائص WnsCredential
| اسم |
وصف |
قيمة |
| packageSid |
معرف الحزمة لبيانات الاعتماد هذه. |
خيط |
| مفتاح سري |
المفتاح السري. |
خيط |
| windowsLiveنقطة النهاية |
نقطة نهاية Windows Live. |
خيط |
يمكن نشر نوع مورد namespaces/notificationHubs مع العمليات التي تستهدف:
-
مجموعات الموارد للحصول على قائمة بالخصائص المتغيرة في كل إصدار من واجهة برمجة التطبيقات، انظر سجل التغيير.
أمثلة الاستخدام
مثال أساسي لنشر مركز الإشعارات داخل مساحة اسم مركز الإشعارات.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "namespace" {
type = "Microsoft.NotificationHubs/namespaces@2017-04-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
enabled = true
namespaceType = "NotificationHub"
region = "westeurope"
}
sku = {
name = "Free"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "notificationHub" {
type = "Microsoft.NotificationHubs/namespaces/notificationHubs@2017-04-01"
parent_id = azapi_resource.namespace.id
name = var.resource_name
location = var.location
body = {
properties = {
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
لإنشاء مورد Microsoft.NotificationHubs/namespaces/notificationHubs، أضف Terraform التالي إلى القالب الخاص بك.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.NotificationHubs/namespaces/notificationHubs@2016-03-01"
name = "string"
parent_id = "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 = [
{
rights = [
"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"
}
}
}
sku = {
capacity = int
family = "string"
name = "string"
size = "string"
tier = "string"
}
}
}
قيم الخصائص
Microsoft.NotificationHubs/مساحات الاسم/notificationHubs
| اسم |
وصف |
قيمة |
| مكان |
موقع المورد |
سلسلة (مطلوب) |
| اسم |
اسم المورد |
سلسلة (مطلوب) |
| parent_id |
معرف المورد الأصل لهذا المورد. |
معرف المورد من النوع: مساحات الأسماء |
| خصائص |
خصائص NotificationHub. |
NotificationHubProperties (مطلوب) |
| سكو |
sku لمساحة الاسم التي تم إنشاؤها |
Sku |
| العلامات |
علامات الموارد |
قاموس أسماء العلامات والقيم. |
| نوع |
نوع المورد |
"Microsoft.NotificationHubs/namespaces/notificationHubs@2016-03-01" |
AdmCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub AdmCredential. |
AdmCredentialProperties |
خصائص AdmCredential
| اسم |
وصف |
قيمة |
| authTokenUrl |
عنوان URL للرمز المميز للتخويل. |
خيط |
| معرف العميل |
معرف العميل. |
خيط |
| clientSecret |
مفتاح الوصول السري لبيانات الاعتماد. |
خيط |
ApnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub ApnsCredential. |
ApnsCredentialProperties |
خصائص ApnsCredential
| اسم |
وصف |
قيمة |
| شهادة apnsCertificate |
شهادة APNS. |
خيط |
| مفتاح الشهادة |
مفتاح الشهادة. |
خيط |
| نقطه النهايه |
نقطة نهاية بيانات الاعتماد هذه. |
خيط |
| بصمه الابهام |
بصمة إبهام شهادة APNS |
خيط |
BaiduCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub BaiduCredential. |
BaiduCredentialProperties |
خصائص BaiduCredential
| اسم |
وصف |
قيمة |
| بايدو أبي كي |
مفتاح Baidu Api. |
خيط |
| بايدو إند بوينت |
نقطة نهاية Baidu. |
خيط |
| بايدو سيكريت كي |
مفتاح Baidu السري |
خيط |
شهادة جي سي إم
خصائص GcmCredential
| اسم |
وصف |
قيمة |
| نقطة نهاية gcm |
نقطة نهاية GCM. |
خيط |
| googleApiKey |
مفتاح واجهة برمجة تطبيقات Google. |
خيط |
MpnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub MpnsCredential. |
MpnsCredentialProperties |
خصائص MpnsCredential
| اسم |
وصف |
قيمة |
| مفتاح الشهادة |
مفتاح الشهادة لبيانات الاعتماد هذه. |
خيط |
| شهادة mpnsCertificate |
شهادة MPNS. |
خيط |
| بصمه الابهام |
بصمة إبهام شهادة MPNS |
خيط |
خصائص NotificationHub
| اسم |
وصف |
قيمة |
| admCredential |
AdmCredential الخاص ب NotificationHub الذي تم إنشاؤه |
AdmCredential |
| apnsCredential |
ApnsCredential الخاص ب NotificationHub الذي تم إنشاؤه |
ApnsCredential |
| قواعد التخويل |
قواعد التخويل الخاصة ب NotificationHub الذي تم إنشاؤه |
SharedAccessAuthorizationRuleProperties[] |
| بايدو |
BaiduCredential ل NotificationHub الذي تم إنشاؤه |
BaiduCredential |
| gcmCredential |
GcmCredential ل NotificationHub الذي تم إنشاؤه |
GcmCredential |
| mpnsCredential |
MpnsCredential ل NotificationHub الذي تم إنشاؤه |
MpnsCredential |
| اسم |
اسم NotificationHub. |
خيط |
| تسجيلTtl |
RegistrationTtl ل NotificationHub الذي تم إنشاؤه |
خيط |
| wnsCredential |
WnsCredential ل NotificationHub الذي تم إنشاؤه |
WnsCredential |
SharedAccessAuthorizationRuleProperties
| اسم |
وصف |
قيمة |
| حقوق |
الحقوق المقترنة بالقاعدة. |
صفيف سلسلة يحتوي على أي من: "الاستماع" "إدارة" "إرسال" |
سكو
| اسم |
وصف |
قيمة |
| سعة |
سعة المورد |
الباحث |
| أسرة |
عائلة Sku |
خيط |
| اسم |
اسم وحدة sku لمركز الإعلامات |
"أساسي" "مجاني" 'قياسي' (مطلوب) |
| حجم |
حجم Sku |
خيط |
| المستوي |
مستوى وحدة sku معينة |
خيط |
WnsCredential
| اسم |
وصف |
قيمة |
| خصائص |
خصائص NotificationHub WnsCredential. |
WnsCredentialProperties |
خصائص WnsCredential
| اسم |
وصف |
قيمة |
| packageSid |
معرف الحزمة لبيانات الاعتماد هذه. |
خيط |
| مفتاح سري |
المفتاح السري. |
خيط |
| windowsLiveنقطة النهاية |
نقطة نهاية Windows Live. |
خيط |