Share via


NotificationHubCollection.CreateOrUpdateAsync Method

Definition

Creates/Update a NotificationHub in a namespace.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}
  • Operation Id: NotificationHubs_CreateOrUpdate
  • Default Api Version: 2023-10-01-preview
  • Resource: NotificationHubResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.NotificationHubs.NotificationHubResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string notificationHubName, Azure.ResourceManager.NotificationHubs.NotificationHubData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.NotificationHubs.NotificationHubData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.NotificationHubs.NotificationHubResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.NotificationHubs.NotificationHubData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.NotificationHubs.NotificationHubResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, notificationHubName As String, data As NotificationHubData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of NotificationHubResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

notificationHubName
String

Notification Hub name.

data
NotificationHubData

Request content.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

notificationHubName is an empty string, and was expected to be non-empty.

notificationHubName or data is null.

Applies to