Compartilhar via


DevTestLabPolicyCollection.CreateOrUpdate Método

Definição

Criar ou substituir uma política existente.

  • Caminho da Solicitação/assinaturas/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}
  • Operação IdPolicies_CreateOrUpdate
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DevTestLabs.DevTestLabPolicyResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.DevTestLabs.DevTestLabPolicyData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.DevTestLabs.DevTestLabPolicyData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DevTestLabs.DevTestLabPolicyResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.DevTestLabs.DevTestLabPolicyData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DevTestLabs.DevTestLabPolicyResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, name As String, data As DevTestLabPolicyData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of DevTestLabPolicyResource)

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 execução prolongada, consulte Exemplos de operação de Long-Running do Azure.Core.

name
String

O nome da política.

data
DevTestLabPolicyData

Uma política.

cancellationToken
CancellationToken

O token de cancelamento a ser usado.

Retornos

Exceções

name é uma cadeia de caracteres vazia e esperava-se que não estivesse vazia.

name ou data é nulo.

Aplica-se a