/// <summary>
 /// Gets an extended database'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='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ExtendedDatabaseBlobAuditingPolicyInner> GetAsync(this IExtendedDatabaseBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
        public bool SetExtendedAuditingPolicy(string resourceGroupName, string serverName,
                                              string databaseName, ExtendedDatabaseBlobAuditingPolicy policy)
        {
            IExtendedDatabaseBlobAuditingPoliciesOperations operations = GetCurrentSqlClient().ExtendedDatabaseBlobAuditingPolicies;

            return(operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName,
                                                                  serverName, databaseName, policy).Result.Response.IsSuccessStatusCode);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets an extended database'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='databaseName'>
 /// The name of the database.
 /// </param>
 public static ExtendedDatabaseBlobAuditingPolicy Get(this IExtendedDatabaseBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     return(operations.GetAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult());
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Lists extended auditing settings of a database.
 /// </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 <ExtendedDatabaseBlobAuditingPolicy> > ListByDatabaseNextAsync(this IExtendedDatabaseBlobAuditingPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Lists extended auditing settings of a database.
 /// </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 <ExtendedDatabaseBlobAuditingPolicy> ListByDatabaseNext(this IExtendedDatabaseBlobAuditingPoliciesOperations operations, string nextPageLink)
 {
     return(operations.ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates or updates an extended database'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='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='parameters'>
 /// The extended database blob auditing policy.
 /// </param>
 public static ExtendedDatabaseBlobAuditingPolicy CreateOrUpdate(this IExtendedDatabaseBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ExtendedDatabaseBlobAuditingPolicy parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult());
 }