Share via


ServiceBusQueueCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a Service Bus queue. This operation is idempotent.

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

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.

queueName
String

The queue name.

data
ServiceBusQueueData

Parameters supplied to create or update a queue resource.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

queueName or data is null.

Applies to