Taylohtio/MobileBackend/PowerShell/NotificationHubTemplate.json

82 lines
2.6 KiB
JSON

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"hubName": {
"type": "string"
},
"namespaceName": {
"type": "string"
},
"googleApiKey": {
"type": "string"
},
"appleAppId": {
"type": "string"
},
"appleAppName": {
"type": "string"
},
"appleKeyId": {
"type": "string"
},
"appleToken": {
"type": "string"
},
},
"variables": {},
"resources": [
{
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs",
"apiVersion": "2017-04-01",
"name": "[concat(parameters('namespaceName'), '/', parameters('hubName'))]",
"location": "North Europe",
"properties": {
"authorizationRules": [],
"GcmCredential": {
"properties": {
"googleApiKey": "[parameters('googleApiKey')]",
"gcmEndpoint": "https://android.googleapis.com/gcm/send"
}
},
"ApnsCredential": {
"properties": {
"appId": "[parameters('appleAppId')]",
"appName": "[parameters('appleAppName')]",
"keyId": "[parameters('appleKeyId')]",
"token": "[parameters('appleToken')]",
"endpoint": "https://api.push.apple.com:443/3/device"
}
}
}
},
{
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules",
"apiVersion": "2017-04-01",
"name": "[concat(parameters('namespaceName'), '/', parameters('hubName'), '/DefaultFullSharedAccessSignature')]",
"dependsOn": [
"[resourceId('Microsoft.NotificationHubs/namespaces/notificationHubs', parameters('namespaceName'), parameters('hubName'))]"
],
"properties": {
"rights": [
"Listen",
"Manage",
"Send"
]
}
},
{
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules",
"apiVersion": "2017-04-01",
"name": "[concat(parameters('namespaceName'), '/', parameters('hubName'), '/DefaultListenSharedAccessSignature')]",
"dependsOn": [
"[resourceId('Microsoft.NotificationHubs/namespaces/notificationHubs', parameters('namespaceName'), parameters('hubName'))]"
],
"properties": {
"rights": [
"Listen"
]
}
}
]
}