Skip to content
Closed
5 changes: 4 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
"src/ResourceManagement/Insights/Microsoft.Azure.Insights",
"src/ResourceManagement/AnalysisServices/Microsoft.Azure.Management.Analysis",
"src/ResourceManagement/Monitor/Microsoft.Azure.Monitor"
]
],
"sdk": {
"version": "1.0.0-preview2-003121"
}
}
5 changes: 4 additions & 1 deletion src/ClientRuntime/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"projects": [ "Microsoft.Rest.ClientRuntime", "Microsoft.Rest.ClientRuntime.Azure.Authentication", "Microsoft.Rest.ClientRuntime.Etw",
"Microsoft.Rest.ClientRuntime.Tests", "Microsoft.Rest.ClientRuntime.Azure", "Microsoft.Rest.ClientRuntime.Azure.Tests",
"Microsoft.Rest.ClientRuntime.Log4Net", "Microsoft.Rest.ClientRuntime.Tracing.Tests" ]
"Microsoft.Rest.ClientRuntime.Log4Net", "Microsoft.Rest.ClientRuntime.Tracing.Tests" ],
"sdk": {
"version": "1.0.0-preview2-003121"
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Sql
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for DatabaseBlobAuditingPoliciesOperations.
/// </summary>
public static partial class DatabaseBlobAuditingPoliciesOperationsExtensions
{
/// <summary>
/// Gets a blob auditing policy associated with a database.
/// </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 for which database blob audit policy is defined.
/// </param>
public static DatabaseBlobAuditingPolicy Get(this IDatabaseBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName)
{
return operations.GetAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
}

/// <summary>
/// Gets a blob auditing policy associated with a database.
/// </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 for which database blob audit policy is defined.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<DatabaseBlobAuditingPolicy> GetAsync(this IDatabaseBlobAuditingPoliciesOperations 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;
}
}

/// <summary>
/// Creates or updates a blob auditing policy for a database.
/// </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 for which database blob audit policy will be
/// defined.
/// </param>
/// <param name='databaseBlobAuditingPolicy'>
/// The name of the database blob auditing policy.
/// </param>
public static DatabaseBlobAuditingPolicy CreateOrUpdate(this IDatabaseBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseBlobAuditingPolicy databaseBlobAuditingPolicy)
{
return operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, databaseBlobAuditingPolicy).GetAwaiter().GetResult();
}

/// <summary>
/// Creates or updates a blob auditing policy for a database.
/// </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 for which database blob audit policy will be
/// defined.
/// </param>
/// <param name='databaseBlobAuditingPolicy'>
/// The name of the database blob auditing policy.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<DatabaseBlobAuditingPolicy> CreateOrUpdateAsync(this IDatabaseBlobAuditingPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseBlobAuditingPolicy databaseBlobAuditingPolicy, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, databaseBlobAuditingPolicy, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
Loading