Udostępnij za pośrednictwem


ProtectionPoliciesOperationsExtensions.CreateOrUpdateAsync Method

Definition

Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API.

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.RecoveryServices.Backup.Models.ProtectionPolicyResource> CreateOrUpdateAsync (this Microsoft.Azure.Management.RecoveryServices.Backup.IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, Microsoft.Azure.Management.RecoveryServices.Backup.Models.ProtectionPolicyResource parameters, System.Threading.CancellationToken cancellationToken = default);
static member CreateOrUpdateAsync : Microsoft.Azure.Management.RecoveryServices.Backup.IProtectionPoliciesOperations * string * string * string * Microsoft.Azure.Management.RecoveryServices.Backup.Models.ProtectionPolicyResource * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.RecoveryServices.Backup.Models.ProtectionPolicyResource>
<Extension()>
Public Function CreateOrUpdateAsync (operations As IProtectionPoliciesOperations, vaultName As String, resourceGroupName As String, policyName As String, parameters As ProtectionPolicyResource, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ProtectionPolicyResource)

Parameters

operations
IProtectionPoliciesOperations

The operations group for this extension method.

vaultName
String

The name of the recovery services vault.

resourceGroupName
String

The name of the resource group where the recovery services vault is present.

policyName
String

Backup policy to be created.

parameters
ProtectionPolicyResource

resource backup policy

cancellationToken
CancellationToken

The cancellation token.

Returns

Applies to