Compartilhar via


ManagedInstanceLongTermRetentionPolicyCollection.CreateOrUpdateAsync Método

Definição

Define a política de retenção de longo prazo de um banco de dados gerenciado.

  • Caminho da Solicitação/assinaturas/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}
  • Operação IdManagedInstanceLongTermRetentionPolicies_CreateOrUpdate
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.ManagedInstanceLongTermRetentionPolicyName policyName, Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * Azure.ResourceManager.Sql.Models.ManagedInstanceLongTermRetentionPolicyName * Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * Azure.ResourceManager.Sql.Models.ManagedInstanceLongTermRetentionPolicyName * Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, policyName As ManagedInstanceLongTermRetentionPolicyName, data As ManagedInstanceLongTermRetentionPolicyData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ManagedInstanceLongTermRetentionPolicyResource))

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.

policyName
ManagedInstanceLongTermRetentionPolicyName

O nome da política. Deve ser sempre Padrão.

data
ManagedInstanceLongTermRetentionPolicyData

As informações da política de retenção de longo prazo.

cancellationToken
CancellationToken

O token de cancelamento a ser usado.

Retornos

Exceções

data é nulo.

Aplica-se a