Compartilhar via


DevTestLabEnvironmentCollection.CreateOrUpdateAsync Método

Definição

Criar ou substituir um ambiente existente. Essa operação pode demorar um pouco para ser concluída.

  • Caminho da Solicitação/assinaturas/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}
  • IdEnvironments_CreateOrUpdate de operação
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, name As String, data As DevTestLabEnvironmentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of DevTestLabEnvironmentResource))

Parâmetros

waitUntil
WaitUntil

Completed se o método deve aguardar para retornar até que a operação de execução prolongada seja concluída no serviço; Started se ele deve retornar depois de iniciar a operação. Para obter mais informações sobre operações de longa execução, consulte Exemplos de operação de Long-Running do Azure.Core.

name
String

O nome do ambiente.

data
DevTestLabEnvironmentData

Um ambiente, que é essencialmente uma implantação de modelo do ARM.

cancellationToken
CancellationToken

O token de cancelamento a ser usado.

Retornos

Exceções

name é uma cadeia de caracteres vazia e era esperado que não estivesse vazio.

name ou data é nulo.

Aplica-se a