Partager via


ContainerServiceManagedClusterResource.RunCommandAsync Méthode

Définition

AKS crée un pod pour exécuter la commande. Cela est principalement utile pour les clusters privés. Pour plus d’informations, consultez Commande d’exécution AKS.

  • Chemin/abonnements de la demande/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand
  • IdManagedClusters_RunCommand d’opération
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))

Paramètres

waitUntil
WaitUntil

Completed si la méthode doit attendre la fin de l’opération de longue durée sur le service ; Started s’il doit retourner après le démarrage de l’opération. Pour plus d’informations sur les opérations de longue durée, consultez Exemples d’opérations Azure.Core Long-Running.

content
ManagedClusterRunCommandContent

Demande de commande d’exécution.

cancellationToken
CancellationToken

Jeton d’annulation à utiliser.

Retours

Exceptions

content a la valeur null.

S’applique à