Communication Service - Link Notification Hub
Länkmeddelandehubb
Länkar en Azure Notification Hub till den här kommunikationstjänsten.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub?api-version=2020-08-20
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
communication
|
path | True |
string |
Namnet på CommunicationService-resursen. Reguljärt uttrycksmönster: |
resource
|
path | True |
string |
Namnet på resursgruppen. Namnet är skiftlägesokänsligt. |
subscription
|
path | True |
string |
ID för målprenumerationen. |
api-version
|
query | True |
string |
DEN API-version som ska användas för den här åtgärden. |
Begärandetext
Name | Obligatorisk | Typ | Description |
---|---|---|---|
connectionString | True |
string |
Anslutningssträng för meddelandehubben |
resourceId | True |
string |
Resurs-ID för meddelandehubben |
Svar
Name | Typ | Description |
---|---|---|
200 OK |
Framgång. Meddelandehubben har länkats. |
|
Other Status Codes |
Felsvar som beskriver varför åtgärden misslyckades. |
Exempel
Link notification hub
Exempelbegäran
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"
}
Exempelsvar
{
"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"
}
}
Definitioner
Name | Description |
---|---|
Error |
Ytterligare information om resurshanteringsfelet. |
Error |
Felinformationen. |
Error |
Felsvar |
Linked |
En meddelandehubb som har länkats till kommunikationstjänsten |
Link |
Beskrivning av en Azure Notification Hub som ska länkas till kommunikationstjänsten |
ErrorAdditionalInfo
Ytterligare information om resurshanteringsfelet.
Name | Typ | Description |
---|---|---|
info |
object |
Ytterligare information. |
type |
string |
Ytterligare informationstyp. |
ErrorDetail
Felinformationen.
Name | Typ | Description |
---|---|---|
additionalInfo |
Ytterligare information om felet. |
|
code |
string |
Felkoden. |
details |
Felinformationen. |
|
message |
string |
Felmeddelandet. |
target |
string |
Felmålet. |
ErrorResponse
Felsvar
Name | Typ | Description |
---|---|---|
error |
Felobjektet. |
LinkedNotificationHub
En meddelandehubb som har länkats till kommunikationstjänsten
Name | Typ | Description |
---|---|---|
resourceId |
string |
Resurs-ID för meddelandehubben |
LinkNotificationHubParameters
Beskrivning av en Azure Notification Hub som ska länkas till kommunikationstjänsten
Name | Typ | Description |
---|---|---|
connectionString |
string |
Anslutningssträng för meddelandehubben |
resourceId |
string |
Resurs-ID för meddelandehubben |