/// <summary> /// List snapshot policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <SnapshotPolicy> > ListAsync(this ISnapshotPoliciesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Patch a snapshot policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// Snapshot policy object supplied in the body of the operation. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='snapshotPolicyName'> /// The name of the snapshot policy target /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SnapshotPolicy> UpdateAsync(this ISnapshotPoliciesOperations operations, SnapshotPolicyPatch body, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(body, resourceGroupName, accountName, snapshotPolicyName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get a snapshot Policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='snapshotPolicyName'> /// The name of the snapshot policy target /// </param> public static SnapshotPolicy Get(this ISnapshotPoliciesOperations operations, string resourceGroupName, string accountName, string snapshotPolicyName) { return(operations.GetAsync(resourceGroupName, accountName, snapshotPolicyName).GetAwaiter().GetResult()); }
/// <summary> /// List snapshot policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> public static IEnumerable <SnapshotPolicy> List(this ISnapshotPoliciesOperations operations, string resourceGroupName, string accountName) { return(operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Delete snapshot policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='snapshotPolicyName'> /// The name of the snapshot policy target /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this ISnapshotPoliciesOperations operations, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, snapshotPolicyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete snapshot policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='snapshotPolicyName'> /// The name of the snapshot policy target /// </param> public static void BeginDelete(this ISnapshotPoliciesOperations operations, string resourceGroupName, string accountName, string snapshotPolicyName) { operations.BeginDeleteAsync(resourceGroupName, accountName, snapshotPolicyName).GetAwaiter().GetResult(); }
/// <summary> /// Patch a snapshot policy /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// Snapshot policy object supplied in the body of the operation. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='snapshotPolicyName'> /// The name of the snapshot policy target /// </param> public static SnapshotPolicy Update(this ISnapshotPoliciesOperations operations, SnapshotPolicyPatch body, string resourceGroupName, string accountName, string snapshotPolicyName) { return(operations.UpdateAsync(body, resourceGroupName, accountName, snapshotPolicyName).GetAwaiter().GetResult()); }