Freigeben über


NotificationHubCollection.CreateOrUpdateAsync Methode

Definition

Erstellt/aktualisiert einen NotificationHub in einem Namespace.

  • Anforderungspfad/abonnements/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}
  • Vorgangs-IdNotificationHubs_CreateOrUpdate
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.NotificationHubs.NotificationHubResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string notificationHubName, Azure.ResourceManager.NotificationHubs.Models.NotificationHubCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.NotificationHubs.Models.NotificationHubCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.NotificationHubs.NotificationHubResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.NotificationHubs.Models.NotificationHubCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.NotificationHubs.NotificationHubResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, notificationHubName As String, content As NotificationHubCreateOrUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of NotificationHubResource))

Parameter

waitUntil
WaitUntil

Completed , wenn die Methode auf die Rückgabe warten soll, bis der zeitintensive Vorgang für den Dienst abgeschlossen ist; Started , wenn sie nach dem Starten des Vorgangs zurückgegeben werden soll. Weitere Informationen zu Vorgängen mit langer Ausführungszeit finden Sie unter Beispiele für Azure.Core-Long-Running-Vorgänge.

notificationHubName
String

Der Name des Notification Hubs.

content
NotificationHubCreateOrUpdateContent

Parameter, die für das Erstellen/Aktualisieren einer NotificationHub-Ressource bereitgestellt werden.

cancellationToken
CancellationToken

Das zu verwendende Abbruchtoken.

Gibt zurück

Ausnahmen

notificationHubName ist eine leere Zeichenfolge und wurde erwartet, dass sie nicht leer ist.

notificationHubName oder content ist NULL.

Gilt für: