Dela via


AutoscaleSettingCollection.CreateOrUpdateAsync Method

Definition

Creates or updates an autoscale setting.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}
  • Operation Id: AutoscaleSettings_CreateOrUpdate
  • Default Api Version: 2022-10-01
  • Resource: AutoscaleSettingResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.AutoscaleSettingResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string autoscaleSettingName, Azure.ResourceManager.Monitor.AutoscaleSettingData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Monitor.AutoscaleSettingData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.AutoscaleSettingResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Monitor.AutoscaleSettingData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.AutoscaleSettingResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, autoscaleSettingName As String, data As AutoscaleSettingData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of AutoscaleSettingResource))

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.

autoscaleSettingName
String

The autoscale setting name.

data
AutoscaleSettingData

Parameters supplied to the operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

autoscaleSettingName or data is null.

Applies to