/// <summary> /// Gets a server's blob auditing policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerBlobAuditingPolicy> GetAsync(this IServerBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates a server's blob auditing policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='parameters'> /// Properties of blob auditing policy /// </param> public static ServerBlobAuditingPolicy CreateOrUpdate(this IServerBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, ServerBlobAuditingPolicy parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets a server's blob auditing policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> public static ServerBlobAuditingPolicy Get(this IServerBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName) { return(operations.GetAsync(resourceGroupName, serverName).GetAwaiter().GetResult()); }
/// <summary> /// Lists auditing settings of a server. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ServerBlobAuditingPolicy> > ListByServerNextAsync(this IServerBlobAuditingPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists auditing settings of a server. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <ServerBlobAuditingPolicy> ListByServerNext(this IServerBlobAuditingPoliciesOperations operations, string nextPageLink) { return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a server's blob auditing policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='parameters'> /// Properties of blob auditing policy /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerBlobAuditingPolicyInner> BeginCreateOrUpdateAsync(this IServerBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, ServerBlobAuditingPolicyInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }