diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IIPv6FirewallRulesOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IIPv6FirewallRulesOperations.cs
index b083f7fbd36b2..67df5526acafe 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IIPv6FirewallRulesOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IIPv6FirewallRulesOperations.cs
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Sql
public partial interface IIPv6FirewallRulesOperations
{
///
- /// Gets an IPv6 firewall rule.
+ /// Gets a list of IPv6 firewall rules.
///
///
/// The name of the resource group that contains the resource. You can
@@ -34,9 +34,6 @@ public partial interface IIPv6FirewallRulesOperations
///
/// The name of the server.
///
- ///
- /// The name of the firewall rule.
- ///
///
/// The headers that will be added to request.
///
@@ -52,9 +49,9 @@ public partial interface IIPv6FirewallRulesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates an IPv6 firewall rule.
+ /// Gets an IPv6 firewall rule.
///
///
/// The name of the resource group that contains the resource. You can
@@ -67,10 +64,6 @@ public partial interface IIPv6FirewallRulesOperations
///
/// The name of the firewall rule.
///
- ///
- /// The required parameters for creating or updating an IPv6 firewall
- /// rule.
- ///
///
/// The headers that will be added to request.
///
@@ -86,9 +79,9 @@ public partial interface IIPv6FirewallRulesOperations
///
/// Thrown when a required parameter is null
///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, IPv6FirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes an IPv6 firewall rule.
+ /// Creates or updates an IPv6 firewall rule.
///
///
/// The name of the resource group that contains the resource. You can
@@ -101,6 +94,10 @@ public partial interface IIPv6FirewallRulesOperations
///
/// The name of the firewall rule.
///
+ ///
+ /// The required parameters for creating or updating an IPv6 firewall
+ /// rule.
+ ///
///
/// The headers that will be added to request.
///
@@ -110,12 +107,15 @@ public partial interface IIPv6FirewallRulesOperations
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, IPv6FirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of IPv6 firewall rules.
+ /// Deletes an IPv6 firewall rule.
///
///
/// The name of the resource group that contains the resource. You can
@@ -125,6 +125,9 @@ public partial interface IIPv6FirewallRulesOperations
///
/// The name of the server.
///
+ ///
+ /// The name of the firewall rule.
+ ///
///
/// The headers that will be added to request.
///
@@ -134,13 +137,10 @@ public partial interface IIPv6FirewallRulesOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
- Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of IPv6 firewall rules.
///
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedDatabaseSensitivityLabelsOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedDatabaseSensitivityLabelsOperations.cs
index be59cc99b7bc7..e26cac97ec6bf 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedDatabaseSensitivityLabelsOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedDatabaseSensitivityLabelsOperations.cs
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.Sql
public partial interface IManagedDatabaseSensitivityLabelsOperations
{
///
- /// Gets the sensitivity label of a given column
+ /// Gets the sensitivity labels of a given database
///
///
/// The name of the resource group that contains the resource. You can
@@ -38,18 +38,12 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// The name of the database.
///
- ///
- /// The name of the schema.
- ///
- ///
- /// The name of the table.
+ ///
+ /// OData parameters to apply to the operation.
///
- ///
- /// The name of the column.
+ ///
///
- ///
- /// The source of the sensitivity label. Possible values include:
- /// 'current', 'recommended'
+ ///
///
///
/// The headers that will be added to request.
@@ -66,9 +60,10 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListCurrentByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? count = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates the sensitivity label of a given column
+ /// Update sensitivity labels of a given database using an operations
+ /// batch.
///
///
/// The name of the resource group that contains the resource. You can
@@ -81,17 +76,42 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// The name of the database.
///
- ///
- /// The name of the schema.
+ ///
///
- ///
- /// The name of the table.
+ ///
+ /// The headers that will be added to request.
///
- ///
- /// The name of the column.
+ ///
+ /// The cancellation token.
///
- ///
- /// The column sensitivity label resource.
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task UpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, SensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the sensitivity labels of a given database
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ ///
+ ///
+ /// Specifies whether to include disabled recommendations or not.
///
///
/// The headers that will be added to request.
@@ -108,9 +128,9 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// Thrown when a required parameter is null
///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListRecommendedByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? includeDisabledRecommendations = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes the sensitivity label of a given column
+ /// Gets the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can
@@ -132,6 +152,10 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// The name of the column.
///
+ ///
+ /// The source of the sensitivity label. Possible values include:
+ /// 'current', 'recommended'
+ ///
///
/// The headers that will be added to request.
///
@@ -141,12 +165,15 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Disables sensitivity recommendations on a given column
+ /// Creates or updates the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can
@@ -168,6 +195,9 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// The name of the column.
///
+ ///
+ /// The column sensitivity label resource.
+ ///
///
/// The headers that will be added to request.
///
@@ -177,13 +207,15 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
- Task DisableRecommendationWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Enables sensitivity recommendations on a given column
- /// (recommendations are enabled by default on all columns)
+ /// Deletes the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can
@@ -217,9 +249,9 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// Thrown when a required parameter is null
///
- Task EnableRecommendationWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets the sensitivity labels of a given database
+ /// Disables sensitivity recommendations on a given column
///
///
/// The name of the resource group that contains the resource. You can
@@ -232,12 +264,14 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// The name of the database.
///
- ///
- /// OData parameters to apply to the operation.
+ ///
+ /// The name of the schema.
///
- ///
+ ///
+ /// The name of the table.
///
- ///
+ ///
+ /// The name of the column.
///
///
/// The headers that will be added to request.
@@ -248,16 +282,13 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
- Task>> ListCurrentByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? count = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DisableRecommendationWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Update sensitivity labels of a given database using an operations
- /// batch.
+ /// Enables sensitivity recommendations on a given column
+ /// (recommendations are enabled by default on all columns)
///
///
/// The name of the resource group that contains the resource. You can
@@ -270,7 +301,14 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// The name of the database.
///
- ///
+ ///
+ /// The name of the schema.
+ ///
+ ///
+ /// The name of the table.
+ ///
+ ///
+ /// The name of the column.
///
///
/// The headers that will be added to request.
@@ -284,7 +322,7 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// Thrown when a required parameter is null
///
- Task UpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, SensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task EnableRecommendationWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the sensitivity labels of a given database
///
@@ -302,11 +340,6 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// OData parameters to apply to the operation.
///
- ///
- ///
- ///
- /// Specifies whether to include disabled recommendations or not.
- ///
///
/// The headers that will be added to request.
///
@@ -322,7 +355,7 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListRecommendedByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? includeDisabledRecommendations = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the sensitivity labels of a given database
///
@@ -367,5 +400,27 @@ public partial interface IManagedDatabaseSensitivityLabelsOperations
/// Thrown when a required parameter is null
///
Task>> ListRecommendedByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the sensitivity labels of a given database
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedServerDnsAliasesOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedServerDnsAliasesOperations.cs
new file mode 100644
index 0000000000000..fc03aa062c0de
--- /dev/null
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedServerDnsAliasesOperations.cs
@@ -0,0 +1,281 @@
+//
+// 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.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Sql
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ManagedServerDnsAliasesOperations operations.
+ ///
+ public partial interface IManagedServerDnsAliasesOperations
+ {
+ ///
+ /// Gets a list of managed server DNS aliases for a managed server.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByManagedInstanceWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a server DNS alias.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string dnsAliasName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a managed server DNS alias.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string dnsAliasName, ManagedServerDnsAliasCreation parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the managed server DNS alias with the given name.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string dnsAliasName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Acquires managed server DNS alias from another managed server.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> AcquireWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string dnsAliasName, ManagedServerDnsAliasAcquisition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a managed server DNS alias.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string dnsAliasName, ManagedServerDnsAliasCreation parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the managed server DNS alias with the given name.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string dnsAliasName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Acquires managed server DNS alias from another managed server.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginAcquireWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string dnsAliasName, ManagedServerDnsAliasAcquisition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of managed server DNS aliases for a managed server.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByManagedInstanceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IPv6FirewallRulesOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IPv6FirewallRulesOperations.cs
index a11276bd290da..796a2a063278d 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IPv6FirewallRulesOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IPv6FirewallRulesOperations.cs
@@ -51,7 +51,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
public SqlManagementClient Client { get; private set; }
///
- /// Gets an IPv6 firewall rule.
+ /// Gets a list of IPv6 firewall rules.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -60,9 +60,6 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// The name of the server.
///
- ///
- /// The name of the firewall rule.
- ///
///
/// Headers that will be added to request.
///
@@ -84,7 +81,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -94,15 +91,11 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
}
- if (firewallRuleName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName");
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-08-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -112,17 +105,15 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
- tracingParameters.Add("firewallRuleName", firewallRuleName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
- _url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (apiVersion != null)
@@ -222,7 +213,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -235,7 +226,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -255,7 +246,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
}
///
- /// Creates or updates an IPv6 firewall rule.
+ /// Gets an IPv6 firewall rule.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -267,9 +258,6 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// The name of the firewall rule.
///
- ///
- /// The required parameters for creating or updating an IPv6 firewall rule.
- ///
///
/// Headers that will be added to request.
///
@@ -291,7 +279,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, IPv6FirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -305,15 +293,11 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName");
}
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-08-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -324,10 +308,9 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("firewallRuleName", firewallRuleName);
- tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -348,7 +331,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -379,12 +362,6 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
// Serialize Request
string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (Client.Credentials != null)
{
@@ -405,7 +382,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ if ((int)_statusCode != 200)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -465,24 +442,6 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -491,7 +450,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
}
///
- /// Deletes an IPv6 firewall rule.
+ /// Creates or updates an IPv6 firewall rule.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -503,6 +462,9 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// The name of the firewall rule.
///
+ ///
+ /// The required parameters for creating or updating an IPv6 firewall rule.
+ ///
///
/// Headers that will be added to request.
///
@@ -512,6 +474,9 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
@@ -521,7 +486,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, IPv6FirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -535,11 +500,15 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName");
}
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-08-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -550,9 +519,10 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("firewallRuleName", firewallRuleName);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -573,7 +543,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -604,6 +574,12 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (Client.Credentials != null)
{
@@ -624,7 +600,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 204)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -659,13 +635,49 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -674,7 +686,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
}
///
- /// Gets a list of IPv6 firewall rules.
+ /// Deletes an IPv6 firewall rule.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -683,6 +695,9 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// The name of the server.
///
+ ///
+ /// The name of the firewall rule.
+ ///
///
/// Headers that will be added to request.
///
@@ -692,9 +707,6 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -704,7 +716,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -714,11 +726,15 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
}
+ if (firewallRuleName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-08-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -728,15 +744,17 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("firewallRuleName", firewallRuleName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (apiVersion != null)
@@ -750,7 +768,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -801,7 +819,7 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -836,31 +854,13 @@ internal IPv6FirewallRulesOperations(SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IPv6FirewallRulesOperationsExtensions.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IPv6FirewallRulesOperationsExtensions.cs
index e632d77599d74..487adb33c94e4 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IPv6FirewallRulesOperationsExtensions.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IPv6FirewallRulesOperationsExtensions.cs
@@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.Sql
public static partial class IPv6FirewallRulesOperationsExtensions
{
///
- /// Gets an IPv6 firewall rule.
+ /// Gets a list of IPv6 firewall rules.
///
///
/// The operations group for this extension method.
@@ -34,16 +34,13 @@ public static partial class IPv6FirewallRulesOperationsExtensions
///
/// The name of the server.
///
- ///
- /// The name of the firewall rule.
- ///
- public static IPv6FirewallRule Get(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName)
+ public static IPage ListByServer(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName)
{
- return operations.GetAsync(resourceGroupName, serverName, firewallRuleName).GetAwaiter().GetResult();
+ return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult();
}
///
- /// Gets an IPv6 firewall rule.
+ /// Gets a list of IPv6 firewall rules.
///
///
/// The operations group for this extension method.
@@ -55,22 +52,19 @@ public static IPv6FirewallRule Get(this IIPv6FirewallRulesOperations operations,
///
/// The name of the server.
///
- ///
- /// The name of the firewall rule.
- ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListByServerAsync(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Creates or updates an IPv6 firewall rule.
+ /// Gets an IPv6 firewall rule.
///
///
/// The operations group for this extension method.
@@ -85,16 +79,13 @@ public static IPv6FirewallRule Get(this IIPv6FirewallRulesOperations operations,
///
/// The name of the firewall rule.
///
- ///
- /// The required parameters for creating or updating an IPv6 firewall rule.
- ///
- public static IPv6FirewallRule CreateOrUpdate(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, IPv6FirewallRule parameters)
+ public static IPv6FirewallRule Get(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName)
{
- return operations.CreateOrUpdateAsync(resourceGroupName, serverName, firewallRuleName, parameters).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, serverName, firewallRuleName).GetAwaiter().GetResult();
}
///
- /// Creates or updates an IPv6 firewall rule.
+ /// Gets an IPv6 firewall rule.
///
///
/// The operations group for this extension method.
@@ -109,22 +100,19 @@ public static IPv6FirewallRule CreateOrUpdate(this IIPv6FirewallRulesOperations
///
/// The name of the firewall rule.
///
- ///
- /// The required parameters for creating or updating an IPv6 firewall rule.
- ///
///
/// The cancellation token.
///
- public static async Task CreateOrUpdateAsync(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, IPv6FirewallRule parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Deletes an IPv6 firewall rule.
+ /// Creates or updates an IPv6 firewall rule.
///
///
/// The operations group for this extension method.
@@ -139,13 +127,16 @@ public static IPv6FirewallRule CreateOrUpdate(this IIPv6FirewallRulesOperations
///
/// The name of the firewall rule.
///
- public static void Delete(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName)
+ ///
+ /// The required parameters for creating or updating an IPv6 firewall rule.
+ ///
+ public static IPv6FirewallRule CreateOrUpdate(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, IPv6FirewallRule parameters)
{
- operations.DeleteAsync(resourceGroupName, serverName, firewallRuleName).GetAwaiter().GetResult();
+ return operations.CreateOrUpdateAsync(resourceGroupName, serverName, firewallRuleName, parameters).GetAwaiter().GetResult();
}
///
- /// Deletes an IPv6 firewall rule.
+ /// Creates or updates an IPv6 firewall rule.
///
///
/// The operations group for this extension method.
@@ -160,16 +151,22 @@ public static void Delete(this IIPv6FirewallRulesOperations operations, string r
///
/// The name of the firewall rule.
///
+ ///
+ /// The required parameters for creating or updating an IPv6 firewall rule.
+ ///
///
/// The cancellation token.
///
- public static async Task DeleteAsync(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task CreateOrUpdateAsync(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, IPv6FirewallRule parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
}
///
- /// Gets a list of IPv6 firewall rules.
+ /// Deletes an IPv6 firewall rule.
///
///
/// The operations group for this extension method.
@@ -181,13 +178,16 @@ public static void Delete(this IIPv6FirewallRulesOperations operations, string r
///
/// The name of the server.
///
- public static IPage ListByServer(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName)
+ ///
+ /// The name of the firewall rule.
+ ///
+ public static void Delete(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName)
{
- return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult();
+ operations.DeleteAsync(resourceGroupName, serverName, firewallRuleName).GetAwaiter().GetResult();
}
///
- /// Gets a list of IPv6 firewall rules.
+ /// Deletes an IPv6 firewall rule.
///
///
/// The operations group for this extension method.
@@ -199,15 +199,15 @@ public static IPage ListByServer(this IIPv6FirewallRulesOperat
///
/// The name of the server.
///
+ ///
+ /// The name of the firewall rule.
+ ///
///
/// The cancellation token.
///
- public static async Task> ListByServerAsync(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DeleteAsync(this IIPv6FirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IReplicationLinksOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IReplicationLinksOperations.cs
index 8e46eb06c69a7..f7b71ae0811b4 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IReplicationLinksOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IReplicationLinksOperations.cs
@@ -24,8 +24,7 @@ namespace Microsoft.Azure.Management.Sql
public partial interface IReplicationLinksOperations
{
///
- /// Deletes a database replication link. Cannot be done during
- /// failover.
+ /// Gets a list of replication links on database.
///
///
/// The name of the resource group that contains the resource. You can
@@ -36,11 +35,7 @@ public partial interface IReplicationLinksOperations
/// The name of the server.
///
///
- /// The name of the database that has the replication link to be
- /// dropped.
- ///
- ///
- /// The ID of the replication link to be deleted.
+ /// The name of the database.
///
///
/// The headers that will be added to request.
@@ -51,10 +46,13 @@ public partial interface IReplicationLinksOperations
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a replication link.
///
@@ -89,8 +87,7 @@ public partial interface IReplicationLinksOperations
///
Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Sets which replica database is primary by failing over from the
- /// current primary replica database.
+ /// Deletes the replication link.
///
///
/// The name of the resource group that contains the resource. You can
@@ -101,11 +98,9 @@ public partial interface IReplicationLinksOperations
/// The name of the server.
///
///
- /// The name of the database that has the replication link to be failed
- /// over.
+ /// The name of the database.
///
///
- /// The ID of the replication link to be failed over.
///
///
/// The headers that will be added to request.
@@ -119,11 +114,9 @@ public partial interface IReplicationLinksOperations
///
/// Thrown when a required parameter is null
///
- Task FailoverWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Sets which replica database is primary by failing over from the
- /// current primary replica database. This operation might result in
- /// data loss.
+ /// Fails over from the current primary server to this server.
///
///
/// The name of the resource group that contains the resource. You can
@@ -134,11 +127,10 @@ public partial interface IReplicationLinksOperations
/// The name of the server.
///
///
- /// The name of the database that has the replication link to be failed
- /// over.
+ /// The name of the database.
///
///
- /// The ID of the replication link to be failed over.
+ /// The name of the replication link.
///
///
/// The headers that will be added to request.
@@ -149,46 +141,16 @@ public partial interface IReplicationLinksOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when a required parameter is null
- ///
- Task FailoverAllowDataLossWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes a database replication link in forced or friendly way.
- ///
- ///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
- ///
- ///
- /// The name of the server.
- ///
- ///
- /// The name of the database that has the replication link to be failed
- /// over.
- ///
- ///
- /// The ID of the replication link to be failed over.
- ///
- ///
- /// The required parameters for unlinking replication link.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
+ ///
+ /// Thrown when unable to deserialize the response
///
///
/// Thrown when a required parameter is null
///
- Task UnlinkWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, UnlinkParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> FailoverWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of replication links on database.
+ /// Fails over from the current primary server to this server allowing
+ /// data loss.
///
///
/// The name of the resource group that contains the resource. You can
@@ -201,6 +163,9 @@ public partial interface IReplicationLinksOperations
///
/// The name of the database.
///
+ ///
+ /// The name of the replication link.
+ ///
///
/// The headers that will be added to request.
///
@@ -216,7 +181,7 @@ public partial interface IReplicationLinksOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> FailoverAllowDataLossWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of replication links.
///
@@ -245,8 +210,7 @@ public partial interface IReplicationLinksOperations
///
Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Sets which replica database is primary by failing over from the
- /// current primary replica database.
+ /// Fails over from the current primary server to this server.
///
///
/// The name of the resource group that contains the resource. You can
@@ -257,11 +221,10 @@ public partial interface IReplicationLinksOperations
/// The name of the server.
///
///
- /// The name of the database that has the replication link to be failed
- /// over.
+ /// The name of the database.
///
///
- /// The ID of the replication link to be failed over.
+ /// The name of the replication link.
///
///
/// The headers that will be added to request.
@@ -272,13 +235,15 @@ public partial interface IReplicationLinksOperations
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
- Task BeginFailoverWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginFailoverWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Sets which replica database is primary by failing over from the
- /// current primary replica database. This operation might result in
+ /// Fails over from the current primary server to this server allowing
/// data loss.
///
///
@@ -290,11 +255,10 @@ public partial interface IReplicationLinksOperations
/// The name of the server.
///
///
- /// The name of the database that has the replication link to be failed
- /// over.
+ /// The name of the database.
///
///
- /// The ID of the replication link to be failed over.
+ /// The name of the replication link.
///
///
/// The headers that will be added to request.
@@ -305,44 +269,13 @@ public partial interface IReplicationLinksOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when a required parameter is null
- ///
- Task BeginFailoverAllowDataLossWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes a database replication link in forced or friendly way.
- ///
- ///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
- ///
- ///
- /// The name of the server.
- ///
- ///
- /// The name of the database that has the replication link to be failed
- /// over.
- ///
- ///
- /// The ID of the replication link to be failed over.
- ///
- ///
- /// The required parameters for unlinking replication link.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
+ ///
+ /// Thrown when unable to deserialize the response
///
///
/// Thrown when a required parameter is null
///
- Task BeginUnlinkWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, UnlinkParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginFailoverAllowDataLossWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string linkId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of replication links on database.
///
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ISensitivityLabelsOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ISensitivityLabelsOperations.cs
index ad73f817a9835..9eabc21a70706 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ISensitivityLabelsOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ISensitivityLabelsOperations.cs
@@ -130,8 +130,7 @@ public partial interface ISensitivityLabelsOperations
///
Task>> ListRecommendedByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? includeDisabledRecommendations = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Enables sensitivity recommendations on a given column
- /// (recommendations are enabled by default on all columns)
+ /// Gets the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can
@@ -153,6 +152,10 @@ public partial interface ISensitivityLabelsOperations
///
/// The name of the column.
///
+ ///
+ /// The source of the sensitivity label. Possible values include:
+ /// 'current', 'recommended'
+ ///
///
/// The headers that will be added to request.
///
@@ -162,12 +165,15 @@ public partial interface ISensitivityLabelsOperations
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
- Task EnableRecommendationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Disables sensitivity recommendations on a given column
+ /// Creates or updates the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can
@@ -189,6 +195,9 @@ public partial interface ISensitivityLabelsOperations
///
/// The name of the column.
///
+ ///
+ /// The column sensitivity label resource.
+ ///
///
/// The headers that will be added to request.
///
@@ -198,12 +207,15 @@ public partial interface ISensitivityLabelsOperations
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
- Task DisableRecommendationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets the sensitivity label of a given column
+ /// Deletes the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can
@@ -225,10 +237,6 @@ public partial interface ISensitivityLabelsOperations
///
/// The name of the column.
///
- ///
- /// The source of the sensitivity label. Possible values include:
- /// 'current', 'recommended'
- ///
///
/// The headers that will be added to request.
///
@@ -238,15 +246,12 @@ public partial interface ISensitivityLabelsOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates the sensitivity label of a given column
+ /// Disables sensitivity recommendations on a given column
///
///
/// The name of the resource group that contains the resource. You can
@@ -268,9 +273,6 @@ public partial interface ISensitivityLabelsOperations
///
/// The name of the column.
///
- ///
- /// The column sensitivity label resource.
- ///
///
/// The headers that will be added to request.
///
@@ -280,15 +282,13 @@ public partial interface ISensitivityLabelsOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DisableRecommendationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes the sensitivity label of a given column
+ /// Enables sensitivity recommendations on a given column
+ /// (recommendations are enabled by default on all columns)
///
///
/// The name of the resource group that contains the resource. You can
@@ -322,7 +322,40 @@ public partial interface ISensitivityLabelsOperations
///
/// Thrown when a required parameter is null
///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task EnableRecommendationWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the sensitivity labels of a given database
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the sensitivity labels of a given database
///
@@ -367,5 +400,27 @@ public partial interface ISensitivityLabelsOperations
/// Thrown when a required parameter is null
///
Task>> ListRecommendedByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the sensitivity labels of a given database
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ISqlManagementClient.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ISqlManagementClient.cs
index 3b58b88bad90d..ef2925063bbb3 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ISqlManagementClient.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ISqlManagementClient.cs
@@ -97,11 +97,6 @@ public partial interface ISqlManagementClient : System.IDisposable
///
IElasticPoolsOperations ElasticPools { get; }
- ///
- /// Gets the IReplicationLinksOperations.
- ///
- IReplicationLinksOperations ReplicationLinks { get; }
-
///
/// Gets the IServerCommunicationLinksOperations.
///
@@ -342,16 +337,6 @@ public partial interface ISqlManagementClient : System.IDisposable
///
IManagedDatabaseSecurityEventsOperations ManagedDatabaseSecurityEvents { get; }
- ///
- /// Gets the IManagedDatabaseSensitivityLabelsOperations.
- ///
- IManagedDatabaseSensitivityLabelsOperations ManagedDatabaseSensitivityLabels { get; }
-
- ///
- /// Gets the IManagedDatabaseRecommendedSensitivityLabelsOperations.
- ///
- IManagedDatabaseRecommendedSensitivityLabelsOperations ManagedDatabaseRecommendedSensitivityLabels { get; }
-
///
/// Gets the IManagedDatabaseTablesOperations.
///
@@ -462,16 +447,6 @@ public partial interface ISqlManagementClient : System.IDisposable
///
IRestorePointsOperations RestorePoints { get; }
- ///
- /// Gets the ISensitivityLabelsOperations.
- ///
- ISensitivityLabelsOperations SensitivityLabels { get; }
-
- ///
- /// Gets the IRecommendedSensitivityLabelsOperations.
- ///
- IRecommendedSensitivityLabelsOperations RecommendedSensitivityLabels { get; }
-
///
/// Gets the IServerAdvisorsOperations.
///
@@ -672,5 +647,35 @@ public partial interface ISqlManagementClient : System.IDisposable
///
IIPv6FirewallRulesOperations IPv6FirewallRules { get; }
+ ///
+ /// Gets the IReplicationLinksOperations.
+ ///
+ IReplicationLinksOperations ReplicationLinks { get; }
+
+ ///
+ /// Gets the IManagedDatabaseSensitivityLabelsOperations.
+ ///
+ IManagedDatabaseSensitivityLabelsOperations ManagedDatabaseSensitivityLabels { get; }
+
+ ///
+ /// Gets the IManagedDatabaseRecommendedSensitivityLabelsOperations.
+ ///
+ IManagedDatabaseRecommendedSensitivityLabelsOperations ManagedDatabaseRecommendedSensitivityLabels { get; }
+
+ ///
+ /// Gets the IManagedServerDnsAliasesOperations.
+ ///
+ IManagedServerDnsAliasesOperations ManagedServerDnsAliases { get; }
+
+ ///
+ /// Gets the ISensitivityLabelsOperations.
+ ///
+ ISensitivityLabelsOperations SensitivityLabels { get; }
+
+ ///
+ /// Gets the IRecommendedSensitivityLabelsOperations.
+ ///
+ IRecommendedSensitivityLabelsOperations RecommendedSensitivityLabels { get; }
+
}
}
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseRecommendedSensitivityLabelsOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseRecommendedSensitivityLabelsOperations.cs
index 83420a3c4ec1c..6f91a482fea0a 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseRecommendedSensitivityLabelsOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseRecommendedSensitivityLabelsOperations.cs
@@ -106,7 +106,7 @@ internal ManagedDatabaseRecommendedSensitivityLabelsOperations(SqlManagementClie
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseSensitivityLabelsOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseSensitivityLabelsOperations.cs
index 2ad06b5467fb3..d331054369216 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseSensitivityLabelsOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseSensitivityLabelsOperations.cs
@@ -52,7 +52,433 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
public SqlManagementClient Client { get; private set; }
///
- /// Gets the sensitivity label of a given column
+ /// Gets the sensitivity labels of a given database
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListCurrentByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? count = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (managedInstanceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "managedInstanceName");
+ }
+ if (databaseName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ string apiVersion = "2021-11-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("odataQuery", odataQuery);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("managedInstanceName", managedInstanceName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("skipToken", skipToken);
+ tracingParameters.Add("count", count);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListCurrentByDatabase", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{managedInstanceName}", System.Uri.EscapeDataString(managedInstanceName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (odataQuery != null)
+ {
+ var _odataFilter = odataQuery.ToString();
+ if (!string.IsNullOrEmpty(_odataFilter))
+ {
+ _queryParameters.Add(_odataFilter);
+ }
+ }
+ if (skipToken != null)
+ {
+ _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
+ }
+ if (count != null)
+ {
+ _queryParameters.Add(string.Format("$count={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(count, Client.SerializationSettings).Trim('"'))));
+ }
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Update sensitivity labels of a given database using an operations batch.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task UpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, SensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (managedInstanceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "managedInstanceName");
+ }
+ if (databaseName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ string apiVersion = "2021-11-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("managedInstanceName", managedInstanceName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{managedInstanceName}", System.Uri.EscapeDataString(managedInstanceName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the sensitivity labels of a given database
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -64,18 +490,13 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// The name of the database.
///
- ///
- /// The name of the schema.
- ///
- ///
- /// The name of the table.
+ ///
+ /// OData parameters to apply to the operation.
///
- ///
- /// The name of the column.
+ ///
///
- ///
- /// The source of the sensitivity label. Possible values include: 'current',
- /// 'recommended'
+ ///
+ /// Specifies whether to include disabled recommendations or not.
///
///
/// Headers that will be added to request.
@@ -98,7 +519,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListRecommendedByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? includeDisabledRecommendations = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -112,23 +533,11 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
- if (schemaName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "schemaName");
- }
- if (tableName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
- }
- if (columnName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "columnName");
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -136,29 +545,40 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("odataQuery", odataQuery);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("managedInstanceName", managedInstanceName);
tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("schemaName", schemaName);
- tracingParameters.Add("tableName", tableName);
- tracingParameters.Add("columnName", columnName);
- tracingParameters.Add("sensitivityLabelSource", sensitivityLabelSource);
+ tracingParameters.Add("skipToken", skipToken);
+ tracingParameters.Add("includeDisabledRecommendations", includeDisabledRecommendations);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListRecommendedByDatabase", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{managedInstanceName}", System.Uri.EscapeDataString(managedInstanceName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
- _url = _url.Replace("{schemaName}", System.Uri.EscapeDataString(schemaName));
- _url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
- _url = _url.Replace("{columnName}", System.Uri.EscapeDataString(columnName));
- _url = _url.Replace("{sensitivityLabelSource}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(sensitivityLabelSource, Client.SerializationSettings).Trim('"')));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
+ if (odataQuery != null)
+ {
+ var _odataFilter = odataQuery.ToString();
+ if (!string.IsNullOrEmpty(_odataFilter))
+ {
+ _queryParameters.Add(_odataFilter);
+ }
+ }
+ if (skipToken != null)
+ {
+ _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
+ }
+ if (includeDisabledRecommendations != null)
+ {
+ _queryParameters.Add(string.Format("includeDisabledRecommendations={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(includeDisabledRecommendations, Client.SerializationSettings).Trim('"'))));
+ }
if (apiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
@@ -256,7 +676,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -269,7 +689,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -289,7 +709,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
}
///
- /// Creates or updates the sensitivity label of a given column
+ /// Gets the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -310,8 +730,9 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// The name of the column.
///
- ///
- /// The column sensitivity label resource.
+ ///
+ /// The source of the sensitivity label. Possible values include: 'current',
+ /// 'recommended'
///
///
/// Headers that will be added to request.
@@ -334,7 +755,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -360,16 +781,11 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "columnName");
}
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string sensitivityLabelSource = "current";
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -384,10 +800,9 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
tracingParameters.Add("tableName", tableName);
tracingParameters.Add("columnName", columnName);
tracingParameters.Add("sensitivityLabelSource", sensitivityLabelSource);
- tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -398,7 +813,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
_url = _url.Replace("{schemaName}", System.Uri.EscapeDataString(schemaName));
_url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
_url = _url.Replace("{columnName}", System.Uri.EscapeDataString(columnName));
- _url = _url.Replace("{sensitivityLabelSource}", System.Uri.EscapeDataString(sensitivityLabelSource));
+ _url = _url.Replace("{sensitivityLabelSource}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(sensitivityLabelSource, Client.SerializationSettings).Trim('"')));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (apiVersion != null)
@@ -412,7 +827,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -443,12 +858,6 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
// Serialize Request
string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (Client.Credentials != null)
{
@@ -469,7 +878,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ if ((int)_statusCode != 200)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -529,24 +938,6 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -555,7 +946,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
}
///
- /// Deletes the sensitivity label of a given column
+ /// Creates or updates the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -576,6 +967,9 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// The name of the column.
///
+ ///
+ /// The column sensitivity label resource.
+ ///
///
/// Headers that will be added to request.
///
@@ -585,6 +979,9 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
@@ -594,7 +991,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -620,12 +1017,16 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "columnName");
}
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string sensitivityLabelSource = "current";
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -640,9 +1041,10 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
tracingParameters.Add("tableName", tableName);
tracingParameters.Add("columnName", columnName);
tracingParameters.Add("sensitivityLabelSource", sensitivityLabelSource);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -667,7 +1069,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -698,6 +1100,12 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (Client.Credentials != null)
{
@@ -718,7 +1126,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -748,17 +1156,53 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
_httpRequest.Dispose();
if (_httpResponse != null)
{
- _httpResponse.Dispose();
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
@@ -768,7 +1212,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
}
///
- /// Disables sensitivity recommendations on a given column
+ /// Deletes the sensitivity label of a given column
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -807,7 +1251,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task DisableRecommendationWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -837,8 +1281,8 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string sensitivityLabelSource = "recommended";
- string apiVersion = "2020-11-01-preview";
+ string sensitivityLabelSource = "current";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -855,11 +1299,11 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
tracingParameters.Add("sensitivityLabelSource", sensitivityLabelSource);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "DisableRecommendation", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{managedInstanceName}", System.Uri.EscapeDataString(managedInstanceName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
@@ -880,7 +1324,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -981,8 +1425,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
}
///
- /// Enables sensitivity recommendations on a given column (recommendations are
- /// enabled by default on all columns)
+ /// Disables sensitivity recommendations on a given column
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1021,7 +1464,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task EnableRecommendationWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task DisableRecommendationWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -1052,7 +1495,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string sensitivityLabelSource = "recommended";
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1069,11 +1512,11 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
tracingParameters.Add("sensitivityLabelSource", sensitivityLabelSource);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "EnableRecommendation", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "DisableRecommendation", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{managedInstanceName}", System.Uri.EscapeDataString(managedInstanceName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
@@ -1195,7 +1638,8 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
}
///
- /// Gets the sensitivity labels of a given database
+ /// Enables sensitivity recommendations on a given column (recommendations are
+ /// enabled by default on all columns)
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1207,12 +1651,14 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// The name of the database.
///
- ///
- /// OData parameters to apply to the operation.
+ ///
+ /// The name of the schema.
///
- ///
+ ///
+ /// The name of the table.
///
- ///
+ ///
+ /// The name of the column.
///
///
/// Headers that will be added to request.
@@ -1223,9 +1669,6 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -1235,7 +1678,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListCurrentByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? count = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task EnableRecommendationWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -1249,11 +1692,24 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
+ if (schemaName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "schemaName");
+ }
+ if (tableName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
+ }
+ if (columnName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "columnName");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string sensitivityLabelSource = "recommended";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1261,40 +1717,29 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("odataQuery", odataQuery);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("managedInstanceName", managedInstanceName);
tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("skipToken", skipToken);
- tracingParameters.Add("count", count);
+ tracingParameters.Add("schemaName", schemaName);
+ tracingParameters.Add("tableName", tableName);
+ tracingParameters.Add("columnName", columnName);
+ tracingParameters.Add("sensitivityLabelSource", sensitivityLabelSource);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListCurrentByDatabase", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "EnableRecommendation", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{managedInstanceName}", System.Uri.EscapeDataString(managedInstanceName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{schemaName}", System.Uri.EscapeDataString(schemaName));
+ _url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
+ _url = _url.Replace("{columnName}", System.Uri.EscapeDataString(columnName));
+ _url = _url.Replace("{sensitivityLabelSource}", System.Uri.EscapeDataString(sensitivityLabelSource));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
- if (odataQuery != null)
- {
- var _odataFilter = odataQuery.ToString();
- if (!string.IsNullOrEmpty(_odataFilter))
- {
- _queryParameters.Add(_odataFilter);
- }
- }
- if (skipToken != null)
- {
- _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
- }
- if (count != null)
- {
- _queryParameters.Add(string.Format("$count={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(count, Client.SerializationSettings).Trim('"'))));
- }
if (apiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
@@ -1306,7 +1751,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1392,31 +1837,13 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -1425,7 +1852,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
}
///
- /// Update sensitivity labels of a given database using an operations batch.
+ /// Gets the sensitivity labels of a given database
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1437,7 +1864,8 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// The name of the database.
///
- ///
+ ///
+ /// OData parameters to apply to the operation.
///
///
/// Headers that will be added to request.
@@ -1448,6 +1876,9 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
@@ -1457,7 +1888,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, SensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -1471,15 +1902,11 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2021-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1487,22 +1914,30 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("odataQuery", odataQuery);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("managedInstanceName", managedInstanceName);
tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{managedInstanceName}", System.Uri.EscapeDataString(managedInstanceName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
+ if (odataQuery != null)
+ {
+ var _odataFilter = odataQuery.ToString();
+ if (!string.IsNullOrEmpty(_odataFilter))
+ {
+ _queryParameters.Add(_odataFilter);
+ }
+ }
if (apiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
@@ -1514,7 +1949,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1545,12 +1980,6 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
// Serialize Request
string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (Client.Credentials != null)
{
@@ -1606,13 +2035,31 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -1623,23 +2070,8 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// Gets the sensitivity labels of a given database
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// The name of the managed instance.
- ///
- ///
- /// The name of the database.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- ///
- ///
- ///
- /// Specifies whether to include disabled recommendations or not.
+ ///
+ /// The NextLink from the previous successful call to List operation.
///
///
/// Headers that will be added to request.
@@ -1662,25 +2094,12 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListRecommendedByDatabaseWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? includeDisabledRecommendations = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListCurrentByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (managedInstanceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "managedInstanceName");
- }
- if (databaseName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
- }
- if (Client.SubscriptionId == null)
+ if (nextPageLink == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
}
- string apiVersion = "2020-11-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1688,44 +2107,14 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("odataQuery", odataQuery);
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("managedInstanceName", managedInstanceName);
- tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("skipToken", skipToken);
- tracingParameters.Add("includeDisabledRecommendations", includeDisabledRecommendations);
- tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListRecommendedByDatabase", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListCurrentByDatabaseNext", tracingParameters);
}
// Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{managedInstanceName}", System.Uri.EscapeDataString(managedInstanceName));
- _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
List _queryParameters = new List();
- if (odataQuery != null)
- {
- var _odataFilter = odataQuery.ToString();
- if (!string.IsNullOrEmpty(_odataFilter))
- {
- _queryParameters.Add(_odataFilter);
- }
- }
- if (skipToken != null)
- {
- _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
- }
- if (includeDisabledRecommendations != null)
- {
- _queryParameters.Add(string.Format("includeDisabledRecommendations={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(includeDisabledRecommendations, Client.SerializationSettings).Trim('"'))));
- }
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
@@ -1878,7 +2267,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListCurrentByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListRecommendedByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
@@ -1893,7 +2282,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListCurrentByDatabaseNext", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListRecommendedByDatabaseNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
@@ -2051,7 +2440,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListRecommendedByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
@@ -2066,7 +2455,7 @@ internal ManagedDatabaseSensitivityLabelsOperations(SqlManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListRecommendedByDatabaseNext", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByDatabaseNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseSensitivityLabelsOperationsExtensions.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseSensitivityLabelsOperationsExtensions.cs
index c69fc7581d307..2eb5b2e95234d 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseSensitivityLabelsOperationsExtensions.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/ManagedDatabaseSensitivityLabelsOperationsExtensions.cs
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Management.Sql
public static partial class ManagedDatabaseSensitivityLabelsOperationsExtensions
{
///
- /// Gets the sensitivity label of a given column
+ /// Gets the sensitivity labels of a given database
///
///
/// The operations group for this extension method.
@@ -38,26 +38,20 @@ public static partial class ManagedDatabaseSensitivityLabelsOperationsExtensions
///
/// The name of the database.
///
- ///
- /// The name of the schema.
- ///
- ///
- /// The name of the table.
+ ///
+ /// OData parameters to apply to the operation.
///
- ///
- /// The name of the column.
+ ///
///
- ///
- /// The source of the sensitivity label. Possible values include: 'current',
- /// 'recommended'
+ ///
///
- public static SensitivityLabel Get(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource)
+ public static IPage ListCurrentByDatabase(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? count = default(bool?))
{
- return operations.GetAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource).GetAwaiter().GetResult();
+ return operations.ListCurrentByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, odataQuery, skipToken, count).GetAwaiter().GetResult();
}
///
- /// Gets the sensitivity label of a given column
+ /// Gets the sensitivity labels of a given database
///
///
/// The operations group for this extension method.
@@ -72,32 +66,26 @@ public static SensitivityLabel Get(this IManagedDatabaseSensitivityLabelsOperati
///
/// The name of the database.
///
- ///
- /// The name of the schema.
- ///
- ///
- /// The name of the table.
+ ///
+ /// OData parameters to apply to the operation.
///
- ///
- /// The name of the column.
+ ///
///
- ///
- /// The source of the sensitivity label. Possible values include: 'current',
- /// 'recommended'
+ ///
///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListCurrentByDatabaseAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? count = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListCurrentByDatabaseWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, odataQuery, skipToken, count, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Creates or updates the sensitivity label of a given column
+ /// Update sensitivity labels of a given database using an operations batch.
///
///
/// The operations group for this extension method.
@@ -112,25 +100,41 @@ public static SensitivityLabel Get(this IManagedDatabaseSensitivityLabelsOperati
///
/// The name of the database.
///
- ///
- /// The name of the schema.
+ ///
///
- ///
- /// The name of the table.
+ public static void Update(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, SensitivityLabelUpdateList parameters)
+ {
+ operations.UpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Update sensitivity labels of a given database using an operations batch.
+ ///
+ ///
+ /// The operations group for this extension method.
///
- ///
- /// The name of the column.
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ /// The name of the database.
///
///
- /// The column sensitivity label resource.
///
- public static SensitivityLabel CreateOrUpdate(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters)
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, SensitivityLabelUpdateList parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- return operations.CreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters).GetAwaiter().GetResult();
+ (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
- /// Creates or updates the sensitivity label of a given column
+ /// Gets the sensitivity labels of a given database
///
///
/// The operations group for this extension method.
@@ -145,31 +149,56 @@ public static SensitivityLabel CreateOrUpdate(this IManagedDatabaseSensitivityLa
///
/// The name of the database.
///
- ///
- /// The name of the schema.
+ ///
+ /// OData parameters to apply to the operation.
///
- ///
- /// The name of the table.
+ ///
///
- ///
- /// The name of the column.
+ ///
+ /// Specifies whether to include disabled recommendations or not.
///
- ///
- /// The column sensitivity label resource.
+ public static IPage ListRecommendedByDatabase(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? includeDisabledRecommendations = default(bool?))
+ {
+ return operations.ListRecommendedByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, odataQuery, skipToken, includeDisabledRecommendations).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the sensitivity labels of a given database
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the managed instance.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ ///
+ ///
+ /// Specifies whether to include disabled recommendations or not.
///
///
/// The cancellation token.
///
- public static async Task CreateOrUpdateAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListRecommendedByDatabaseAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? includeDisabledRecommendations = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListRecommendedByDatabaseWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, odataQuery, skipToken, includeDisabledRecommendations, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Deletes the sensitivity label of a given column
+ /// Gets the sensitivity label of a given column
///
///
/// The operations group for this extension method.
@@ -193,13 +222,17 @@ public static SensitivityLabel CreateOrUpdate(this IManagedDatabaseSensitivityLa
///
/// The name of the column.
///
- public static void Delete(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName)
+ ///
+ /// The source of the sensitivity label. Possible values include: 'current',
+ /// 'recommended'
+ ///
+ public static SensitivityLabel Get(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource)
{
- operations.DeleteAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource).GetAwaiter().GetResult();
}
///
- /// Deletes the sensitivity label of a given column
+ /// Gets the sensitivity label of a given column
///
///
/// The operations group for this extension method.
@@ -223,16 +256,23 @@ public static void Delete(this IManagedDatabaseSensitivityLabelsOperations opera
///
/// The name of the column.
///
+ ///
+ /// The source of the sensitivity label. Possible values include: 'current',
+ /// 'recommended'
+ ///
///
/// The cancellation token.
///
- public static async Task DeleteAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabelSource sensitivityLabelSource, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
}
///
- /// Disables sensitivity recommendations on a given column
+ /// Creates or updates the sensitivity label of a given column
///
///
/// The operations group for this extension method.
@@ -256,13 +296,16 @@ public static void Delete(this IManagedDatabaseSensitivityLabelsOperations opera
///
/// The name of the column.
///
- public static void DisableRecommendation(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName)
+ ///
+ /// The column sensitivity label resource.
+ ///
+ public static SensitivityLabel CreateOrUpdate(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters)
{
- operations.DisableRecommendationAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName).GetAwaiter().GetResult();
+ return operations.CreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters).GetAwaiter().GetResult();
}
///
- /// Disables sensitivity recommendations on a given column
+ /// Creates or updates the sensitivity label of a given column
///
///
/// The operations group for this extension method.
@@ -286,17 +329,22 @@ public static void DisableRecommendation(this IManagedDatabaseSensitivityLabelsO
///
/// The name of the column.
///
+ ///
+ /// The column sensitivity label resource.
+ ///
///
/// The cancellation token.
///
- public static async Task DisableRecommendationAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task CreateOrUpdateAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, SensitivityLabel parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.DisableRecommendationWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
}
///
- /// Enables sensitivity recommendations on a given column (recommendations are
- /// enabled by default on all columns)
+ /// Deletes the sensitivity label of a given column
///
///
/// The operations group for this extension method.
@@ -320,14 +368,13 @@ public static void DisableRecommendation(this IManagedDatabaseSensitivityLabelsO
///
/// The name of the column.
///
- public static void EnableRecommendation(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName)
+ public static void Delete(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName)
{
- operations.EnableRecommendationAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName).GetAwaiter().GetResult();
+ operations.DeleteAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName).GetAwaiter().GetResult();
}
///
- /// Enables sensitivity recommendations on a given column (recommendations are
- /// enabled by default on all columns)
+ /// Deletes the sensitivity label of a given column
///
///
/// The operations group for this extension method.
@@ -354,13 +401,13 @@ public static void EnableRecommendation(this IManagedDatabaseSensitivityLabelsOp
///
/// The cancellation token.
///
- public static async Task EnableRecommendationAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DeleteAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.EnableRecommendationWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
- /// Gets the sensitivity labels of a given database
+ /// Disables sensitivity recommendations on a given column
///
///
/// The operations group for this extension method.
@@ -375,20 +422,22 @@ public static void EnableRecommendation(this IManagedDatabaseSensitivityLabelsOp
///
/// The name of the database.
///
- ///
- /// OData parameters to apply to the operation.
+ ///
+ /// The name of the schema.
///
- ///
+ ///
+ /// The name of the table.
///
- ///
+ ///
+ /// The name of the column.
///
- public static IPage ListCurrentByDatabase(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? count = default(bool?))
+ public static void DisableRecommendation(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName)
{
- return operations.ListCurrentByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, odataQuery, skipToken, count).GetAwaiter().GetResult();
+ operations.DisableRecommendationAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName).GetAwaiter().GetResult();
}
///
- /// Gets the sensitivity labels of a given database
+ /// Disables sensitivity recommendations on a given column
///
///
/// The operations group for this extension method.
@@ -403,26 +452,26 @@ public static void EnableRecommendation(this IManagedDatabaseSensitivityLabelsOp
///
/// The name of the database.
///
- ///
- /// OData parameters to apply to the operation.
+ ///
+ /// The name of the schema.
///
- ///
+ ///
+ /// The name of the table.
///
- ///
+ ///
+ /// The name of the column.
///
///
/// The cancellation token.
///
- public static async Task> ListCurrentByDatabaseAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? count = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DisableRecommendationAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListCurrentByDatabaseWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, odataQuery, skipToken, count, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
+ (await operations.DisableRecommendationWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
- /// Update sensitivity labels of a given database using an operations batch.
+ /// Enables sensitivity recommendations on a given column (recommendations are
+ /// enabled by default on all columns)
///
///
/// The operations group for this extension method.
@@ -437,15 +486,23 @@ public static void EnableRecommendation(this IManagedDatabaseSensitivityLabelsOp
///
/// The name of the database.
///
- ///
+ ///
+ /// The name of the schema.
///
- public static void Update(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, SensitivityLabelUpdateList parameters)
+ ///
+ /// The name of the table.
+ ///
+ ///
+ /// The name of the column.
+ ///
+ public static void EnableRecommendation(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName)
{
- operations.UpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).GetAwaiter().GetResult();
+ operations.EnableRecommendationAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName).GetAwaiter().GetResult();
}
///
- /// Update sensitivity labels of a given database using an operations batch.
+ /// Enables sensitivity recommendations on a given column (recommendations are
+ /// enabled by default on all columns)
///
///
/// The operations group for this extension method.
@@ -460,14 +517,21 @@ public static void Update(this IManagedDatabaseSensitivityLabelsOperations opera
///
/// The name of the database.
///
- ///
+ ///
+ /// The name of the schema.
+ ///
+ ///
+ /// The name of the table.
+ ///
+ ///
+ /// The name of the column.
///
///
/// The cancellation token.
///
- public static async Task UpdateAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, SensitivityLabelUpdateList parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task EnableRecommendationAsync(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string schemaName, string tableName, string columnName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.EnableRecommendationWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -489,14 +553,9 @@ public static void Update(this IManagedDatabaseSensitivityLabelsOperations opera
///
/// OData parameters to apply to the operation.
///
- ///
- ///
- ///
- /// Specifies whether to include disabled recommendations or not.
- ///
- public static IPage ListRecommendedByDatabase(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), bool? includeDisabledRecommendations = default(bool?))
+ public static IPage ListByDatabase(this IManagedDatabaseSensitivityLabelsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ODataQuery odataQuery = default(ODataQuery))
{
- return operations.ListRecommendedByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, odataQuery, skipToken, includeDisabledRecommendations).GetAwaiter().GetResult();
+ return operations.ListByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, odataQuery).GetAwaiter().GetResult();
}
///