Communication Service - Link Notification Hub
Notification Hub koppelen
Hiermee koppelt u een Azure Notification Hub aan deze communicatieservice.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub?api-version=2020-08-20
URI-parameters
Name | In | Vereist | Type | Description |
---|---|---|---|---|
communication
|
path | True |
string |
De naam van de CommunicationService-resource. Regex-patroon: |
resource
|
path | True |
string |
De naam van de resourcegroep. De naam is niet hoofdlettergevoelig. |
subscription
|
path | True |
string |
De id van het doelabonnement. |
api-version
|
query | True |
string |
De API-versie die voor deze bewerking moet worden gebruikt. |
Aanvraagbody
Name | Vereist | Type | Description |
---|---|---|---|
connectionString | True |
string |
Verbindingsreeks voor de Notification Hub |
resourceId | True |
string |
De resource-id van de Notification Hub |
Antwoorden
Name | Type | Description |
---|---|---|
200 OK |
Succes. De Notification Hub is gekoppeld. |
|
Other Status Codes |
Foutreactie waarin wordt beschreven waarom de bewerking is mislukt. |
Voorbeelden
Link notification hub
Voorbeeldaanvraag
POST https://management.azure.com/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource/linkNotificationHub?api-version=2020-08-20
{
"resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub",
"connectionString": "Endpoint=sb://MyNamespace.servicebus.windows.net/;SharedAccessKey=abcd1234"
}
Voorbeeldrespons
{
"resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub"
}
{
"error": {
"code": "WrongSubscription",
"message": "The notification hub must be in the same subscription as the communication service"
}
}
Definities
Name | Description |
---|---|
Error |
Aanvullende informatie over de resourcebeheerfout. |
Error |
De foutdetails. |
Error |
Foutreactie |
Linked |
Een Notification Hub die is gekoppeld aan de communicatieservice |
Link |
Beschrijving van een Azure Notification Hub die moet worden gekoppeld aan de communicatieservice |
ErrorAdditionalInfo
Aanvullende informatie over de resourcebeheerfout.
Name | Type | Description |
---|---|---|
info |
object |
De aanvullende informatie. |
type |
string |
Het extra informatietype. |
ErrorDetail
De foutdetails.
Name | Type | Description |
---|---|---|
additionalInfo |
De fout bevat aanvullende informatie. |
|
code |
string |
De foutcode. |
details |
De foutdetails. |
|
message |
string |
Het foutbericht. |
target |
string |
Het foutdoel. |
ErrorResponse
Foutreactie
Name | Type | Description |
---|---|---|
error |
Het foutobject. |
LinkedNotificationHub
Een Notification Hub die is gekoppeld aan de communicatieservice
Name | Type | Description |
---|---|---|
resourceId |
string |
De resource-id van de Notification Hub |
LinkNotificationHubParameters
Beschrijving van een Azure Notification Hub die moet worden gekoppeld aan de communicatieservice
Name | Type | Description |
---|---|---|
connectionString |
string |
Verbindingsreeks voor de Notification Hub |
resourceId |
string |
De resource-id van de Notification Hub |