Communication Service - Link Notification Hub
Bağlantı Bildirim Hub'ı
Azure Notification Hub'ı bu iletişim hizmetine bağlar.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub?api-version=2020-08-20
URI Parametreleri
| Name | İçinde | Gerekli | Tür | Description |
|---|---|---|---|---|
|
communication
|
path | True |
string minLength: 1maxLength: 63 pattern: ^[-\w]+$ |
CommunicationService kaynağının adı. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız. |
|
subscription
|
path | True |
string minLength: 1 |
Hedef aboneliğin kimliği. |
|
api-version
|
query | True |
string minLength: 1 |
Bu işlem için kullanılacak API sürümü. |
İstek Gövdesi
| Name | Gerekli | Tür | Description |
|---|---|---|---|
| connectionString | True |
string |
Bildirim hub'ı için bağlantı dizesi |
| resourceId | True |
string |
Bildirim hub'ının kaynak kimliği |
Yanıtlar
| Name | Tür | Description |
|---|---|---|
| 200 OK |
Başarı. Bildirim hub'ı bağlandı. |
|
| Other Status Codes |
İşlemin neden başarısız olduğunu açıklayan hata yanıtı. |
Örnekler
Link notification hub
Örnek isteği
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"
}
Örnek yanıt
{
"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"
}
}
Tanımlar
| Name | Description |
|---|---|
|
Error |
Kaynak yönetimi hatası ek bilgileri. |
|
Error |
Hata ayrıntısı. |
|
Error |
Hata yanıtı |
|
Linked |
İletişim hizmetine bağlı bir bildirim hub'ı |
|
Link |
İletişim hizmetine bağlanmak için Azure Notification Hub açıklaması |
ErrorAdditionalInfo
Kaynak yönetimi hatası ek bilgileri.
| Name | Tür | Description |
|---|---|---|
| info |
object |
Ek bilgiler. |
| type |
string |
Ek bilgi türü. |
ErrorDetail
Hata ayrıntısı.
| Name | Tür | Description |
|---|---|---|
| additionalInfo |
Hata ek bilgileri. |
|
| code |
string |
Hata kodu. |
| details |
Hata ayrıntıları. |
|
| message |
string |
Hata iletisi. |
| target |
string |
Hata hedefi. |
ErrorResponse
Hata yanıtı
| Name | Tür | Description |
|---|---|---|
| error |
Hata nesnesi. |
LinkedNotificationHub
İletişim hizmetine bağlı bir bildirim hub'ı
| Name | Tür | Description |
|---|---|---|
| resourceId |
string |
Bildirim hub'ının kaynak kimliği |
LinkNotificationHubParameters
İletişim hizmetine bağlanmak için Azure Notification Hub açıklaması
| Name | Tür | Description |
|---|---|---|
| connectionString |
string |
Bildirim hub'ı için bağlantı dizesi |
| resourceId |
string |
Bildirim hub'ının kaynak kimliği |