MaintenanceWindowCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a maintenance window.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}.
  • Operation Id. : MaintenanceWindows_CreateOrUpdate.
  • Default Api Version. : 2026-04-02-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.MaintenanceWindowResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string maintenanceWindowName, Azure.ResourceManager.ContainerService.MaintenanceWindowData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ContainerService.MaintenanceWindowData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.MaintenanceWindowResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ContainerService.MaintenanceWindowData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.MaintenanceWindowResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, maintenanceWindowName As String, data As MaintenanceWindowData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of MaintenanceWindowResource))

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.

maintenanceWindowName
String

The name of the maintenance window.

data
MaintenanceWindowData

The maintenance window to create or update.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

maintenanceWindowName or data is null.

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

Applies to