Share via


ApiManagementServiceCollection.CreateOrUpdateAsync Method

Definition

Creates or updates an API Management service. This is long running operation and could take several minutes to complete.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}
  • Operation Id: ApiManagementService_CreateOrUpdate
  • Default Api Version: 2021-08-01
  • Resource: ApiManagementServiceResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApiManagement.ApiManagementServiceResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.ApiManagement.ApiManagementServiceData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ApiManagement.ApiManagementServiceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApiManagement.ApiManagementServiceResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ApiManagement.ApiManagementServiceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApiManagement.ApiManagementServiceResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, serviceName As String, data As ApiManagementServiceData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ApiManagementServiceResource))

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.

serviceName
String

The name of the API Management service.

data
ApiManagementServiceData

Parameters supplied to the CreateOrUpdate API Management service operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

serviceName or data is null.

Applies to