共用方式為


ServiceBusQueueCollection.CreateOrUpdate 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: 2024-01-01
  • Resource: ServiceBusQueueResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ServiceBus.ServiceBusQueueResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string queueName, Azure.ResourceManager.ServiceBus.ServiceBusQueueData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ServiceBus.ServiceBusQueueData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ServiceBus.ServiceBusQueueResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ServiceBus.ServiceBusQueueData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ServiceBus.ServiceBusQueueResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, queueName As String, data As ServiceBusQueueData, Optional cancellationToken As CancellationToken = Nothing) As 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