共用方式為


ContainerServiceManagedClusterResource.RunCommandAsync Method

Definition

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see AKS Run Command.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand
  • Operation Id: ManagedClusters_RunCommand
  • Default Api Version: 2023-10-01
  • Resource: ContainerServiceManagedClusterResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.Models.ManagedClusterRunCommandResult>> RunCommandAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerService.Models.ManagedClusterRunCommandContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member RunCommandAsync : Azure.WaitUntil * Azure.ResourceManager.ContainerService.Models.ManagedClusterRunCommandContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.Models.ManagedClusterRunCommandResult>>
override this.RunCommandAsync : Azure.WaitUntil * Azure.ResourceManager.ContainerService.Models.ManagedClusterRunCommandContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.Models.ManagedClusterRunCommandResult>>
Public Overridable Function RunCommandAsync (waitUntil As WaitUntil, content As ManagedClusterRunCommandContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ManagedClusterRunCommandResult))

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.

content
ManagedClusterRunCommandContent

The run command request.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

content is null.

Applies to