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 be59cc99b7bc..e26cac97ec6b 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/IManagedInstancesOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedInstancesOperations.cs
index 36420cc7522b..7a2b94ed6705 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedInstancesOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IManagedInstancesOperations.cs
@@ -24,16 +24,8 @@ namespace Microsoft.Azure.Management.Sql
public partial interface IManagedInstancesOperations
{
///
- /// Gets a list of all managed instances in an instance pool.
+ /// Gets a list of all managed instances in the subscription.
///
- ///
- /// 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 instance pool name.
- ///
///
/// The child resources to include in the response.
///
@@ -52,10 +44,18 @@ public partial interface IManagedInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListByInstancePoolWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of all managed instances in the subscription.
+ /// Gets a list of all managed instances in an instance pool.
///
+ ///
+ /// 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 instance pool name.
+ ///
///
/// The child resources to include in the response.
///
@@ -74,7 +74,7 @@ public partial interface IManagedInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListByInstancePoolWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of managed instances in a resource group.
///
@@ -217,6 +217,62 @@ public partial interface IManagedInstancesOperations
///
Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, ManagedInstanceUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Failovers a managed instance.
+ ///
+ ///
+ /// 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 to failover.
+ ///
+ ///
+ /// The type of replica to be failed over. Possible values include:
+ /// 'Primary', 'ReadableSecondary'
+ ///
+ ///
+ /// 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 FailoverWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string replicaType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the collection of outbound network dependencies for the given
+ /// managed instance.
+ ///
+ ///
+ /// 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>> ListOutboundNetworkDependenciesByManagedInstanceWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Get top resource consuming queries of a managed instance.
///
///
@@ -269,34 +325,6 @@ public partial interface IManagedInstancesOperations
///
Task>> ListByManagedInstanceWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, int? numberOfQueries = default(int?), string databases = default(string), string startTime = default(string), string endTime = default(string), string interval = default(string), string aggregationFunction = default(string), string observationMetric = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Failovers a managed instance.
- ///
- ///
- /// 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 to failover.
- ///
- ///
- /// The type of replica to be failed over. Possible values include:
- /// 'Primary', 'ReadableSecondary'
- ///
- ///
- /// 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 FailoverWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string replicaType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Creates or updates a managed instance.
///
///
@@ -409,7 +437,7 @@ public partial interface IManagedInstancesOperations
///
Task BeginFailoverWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string replicaType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of all managed instances in an instance pool.
+ /// Gets a list of all managed instances in the subscription.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -429,9 +457,9 @@ public partial interface IManagedInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListByInstancePoolNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of all managed instances in the subscription.
+ /// Gets a list of all managed instances in an instance pool.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -451,7 +479,7 @@ public partial interface IManagedInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListByInstancePoolNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of managed instances in a resource group.
///
@@ -475,6 +503,29 @@ public partial interface IManagedInstancesOperations
///
Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Gets the collection of outbound network dependencies for the given
+ /// managed instance.
+ ///
+ ///
+ /// 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>> ListOutboundNetworkDependenciesByManagedInstanceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Get top resource consuming queries of a managed instance.
///
///
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 000000000000..fc03aa062c0d
--- /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/IReplicationLinksOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IReplicationLinksOperations.cs
index 8e46eb06c69a..f7b71ae0811b 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 ad73f817a983..9eabc21a7070 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/IServersOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IServersOperations.cs
index af2e8ec99076..d254ca3c78a9 100644
--- a/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IServersOperations.cs
+++ b/sdk/sqlmanagement/Microsoft.Azure.Management.Sql/src/Generated/IServersOperations.cs
@@ -24,15 +24,11 @@ namespace Microsoft.Azure.Management.Sql
public partial interface IServersOperations
{
///
- /// Gets a list of servers in a resource groups.
+ /// Determines whether a resource can be created with the specified
+ /// 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 child resources to include in the response.
+ ///
+ /// The name availability request parameters.
///
///
/// The headers that will be added to request.
@@ -49,18 +45,10 @@ public partial interface IServersOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CheckNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a server.
+ /// Gets a list of all servers in the subscription.
///
- ///
- /// 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 child resources to include in the response.
///
@@ -79,20 +67,17 @@ public partial interface IServersOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates a server.
+ /// Gets a list of servers in a resource groups.
///
///
/// 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 requested server resource state.
+ ///
+ /// The child resources to include in the response.
///
///
/// The headers that will be added to request.
@@ -109,9 +94,9 @@ public partial interface IServersOperations
///
/// Thrown when a required parameter is null
///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, Server parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes a server.
+ /// Gets a server.
///
///
/// The name of the resource group that contains the resource. You can
@@ -121,6 +106,9 @@ public partial interface IServersOperations
///
/// The name of the server.
///
+ ///
+ /// The child resources to include in the response.
+ ///
///
/// The headers that will be added to request.
///
@@ -130,12 +118,15 @@ public partial interface IServersOperations
///
/// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Updates a server.
+ /// Creates or updates a server.
///
///
/// The name of the resource group that contains the resource. You can
@@ -163,12 +154,17 @@ public partial interface IServersOperations
///
/// Thrown when a required parameter is null
///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, Server parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of all servers in the subscription.
+ /// Deletes a server.
///
- ///
- /// The child resources to include in the response.
+ ///
+ /// 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 headers that will be added to request.
@@ -179,15 +175,12 @@ public partial interface IServersOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
- Task>> ListWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Imports a bacpac into a new database.
+ /// Updates a server.
///
///
/// The name of the resource group that contains the resource. You can
@@ -198,7 +191,7 @@ public partial interface IServersOperations
/// The name of the server.
///
///
- /// The database import request parameters.
+ /// The requested server resource state.
///
///
/// The headers that will be added to request.
@@ -215,13 +208,20 @@ public partial interface IServersOperations
///
/// Thrown when a required parameter is null
///
- Task> ImportDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportNewDatabaseDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Determines whether a resource can be created with the specified
- /// name.
+ /// Imports a bacpac into a new 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 availability request parameters.
+ /// The database import request parameters.
///
///
/// The headers that will be added to request.
@@ -238,7 +238,7 @@ public partial interface IServersOperations
///
/// Thrown when a required parameter is null
///
- Task> CheckNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ImportDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportNewDatabaseDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Creates or updates a server.
///
@@ -354,7 +354,7 @@ public partial interface IServersOperations
///
Task> BeginImportDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, ImportNewDatabaseDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of servers in a resource groups.
+ /// Gets a list of all servers in the subscription.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -374,9 +374,9 @@ public partial interface IServersOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Gets a list of all servers in the subscription.
+ /// Gets a list of servers in a resource groups.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -396,6 +396,6 @@ public partial interface IServersOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(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 3b58b88bad90..6e0b25df8886 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.
///
@@ -617,11 +592,6 @@ public partial interface ISqlManagementClient : System.IDisposable
///
IOutboundFirewallRulesOperations OutboundFirewallRules { get; }
- ///
- /// Gets the IServersOperations.
- ///
- IServersOperations Servers { get; }
-
///
/// Gets the IUsagesOperations.
///
@@ -637,11 +607,6 @@ public partial interface ISqlManagementClient : System.IDisposable
///
ILongTermRetentionManagedInstanceBackupsOperations LongTermRetentionManagedInstanceBackups { get; }
- ///
- /// Gets the IManagedInstancesOperations.
- ///
- IManagedInstancesOperations ManagedInstances { get; }
-
///
/// Gets the IRestorableDroppedDatabasesOperations.
///
@@ -672,5 +637,45 @@ 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 IManagedInstancesOperations.
+ ///
+ IManagedInstancesOperations ManagedInstances { get; }
+
+ ///
+ /// Gets the IManagedServerDnsAliasesOperations.
+ ///
+ IManagedServerDnsAliasesOperations ManagedServerDnsAliases { get; }
+
+ ///
+ /// Gets the ISensitivityLabelsOperations.
+ ///
+ ISensitivityLabelsOperations SensitivityLabels { get; }
+
+ ///
+ /// Gets the IRecommendedSensitivityLabelsOperations.
+ ///
+ IRecommendedSensitivityLabelsOperations RecommendedSensitivityLabels { get; }
+
+ ///
+ /// Gets the IServersOperations.
+ ///
+ IServersOperations Servers { 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 83420a3c4ec1..6f91a482fea0 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 2ad06b5467fb..d33105436921 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