你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

MachineRunCommandCollection.CreateOrUpdate Method

Definition

The operation to create or update a run command.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}
  • Operation Id: MachineRunCommands_CreateOrUpdate
  • Default Api Version: 2024-07-31-preview
  • Resource: MachineRunCommandResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.HybridCompute.MachineRunCommandResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string runCommandName, Azure.ResourceManager.HybridCompute.MachineRunCommandData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.HybridCompute.MachineRunCommandData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.HybridCompute.MachineRunCommandResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.HybridCompute.MachineRunCommandData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.HybridCompute.MachineRunCommandResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, runCommandName As String, data As MachineRunCommandData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of MachineRunCommandResource)

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.

runCommandName
String

The name of the run command.

data
MachineRunCommandData

Parameters supplied to the Create Run Command.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

runCommandName or data is null.

Applies to