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
communicationServiceName
path True

string

minLength: 1
maxLength: 63
pattern: ^[-\w]+$

CommunicationService kaynağının adı.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız.

subscriptionId
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

LinkedNotificationHub

Başarı. Bildirim hub'ı bağlandı.

Other Status Codes

ErrorResponse

İşlemin neden başarısız olduğunu açıklayan hata yanıtı.

Örnekler

Ö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
ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

LinkedNotificationHub

İletişim hizmetine bağlı bir bildirim hub'ı

LinkNotificationHubParameters

İ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

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorDetail[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi.

ErrorResponse

Hata yanıtı

Name Tür Description
error

ErrorDetail

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