Compartilhar via


ManagedInstanceLongTermRetentionPolicyCollection.CreateOrUpdate 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}
  • IdManagedInstanceLongTermRetentionPolicies_CreateOrUpdate de operação
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyResource> CreateOrUpdate (Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.ManagedInstanceLongTermRetentionPolicyName policyName, Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * Azure.ResourceManager.Sql.Models.ManagedInstanceLongTermRetentionPolicyName * Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyResource>
override this.CreateOrUpdate : Azure.WaitUntil * Azure.ResourceManager.Sql.Models.ManagedInstanceLongTermRetentionPolicyName * Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.ManagedInstanceLongTermRetentionPolicyResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, policyName As ManagedInstanceLongTermRetentionPolicyName, data As ManagedInstanceLongTermRetentionPolicyData, Optional cancellationToken As CancellationToken = Nothing) As 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 longa execução, 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