diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/BigDataPoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/BigDataPoolsOperations.cs index e2d7936f5072..0a791798af42 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/BigDataPoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/BigDataPoolsOperations.cs @@ -71,7 +71,7 @@ internal BigDataPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,11 +222,11 @@ internal BigDataPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -306,7 +306,7 @@ internal BigDataPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -468,11 +468,11 @@ internal BigDataPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -608,7 +608,7 @@ internal BigDataPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -753,11 +753,11 @@ internal BigDataPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -840,7 +840,7 @@ internal BigDataPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1011,11 +1011,11 @@ internal BigDataPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1110,7 +1110,7 @@ internal BigDataPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1261,11 +1261,11 @@ internal BigDataPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1354,7 +1354,7 @@ internal BigDataPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1450,11 +1450,11 @@ internal BigDataPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingPoliciesOperations.cs index b1d2487e1189..b13a422f1f95 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingPoliciesOperations.cs @@ -71,7 +71,7 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -240,14 +240,13 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -257,10 +256,6 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) } 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); @@ -323,7 +318,7 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -477,14 +472,13 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -494,10 +488,6 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperations.cs index 6b4f917ac6c9..c931c9557068 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperations.cs @@ -74,7 +74,7 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -249,14 +249,13 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -266,10 +265,6 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) } 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); @@ -332,6 +327,247 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) return _result; } + /// + /// Gets the specific Sql pool data masking rule. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The name of the data masking rule. + /// + /// + /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string dataMaskingRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (dataMaskingRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataMaskingRuleName"); + } + string dataMaskingPolicyName = "Default"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("dataMaskingPolicyName", dataMaskingPolicyName); + tracingParameters.Add("dataMaskingRuleName", dataMaskingRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + _url = _url.Replace("{dataMaskingPolicyName}", System.Uri.EscapeDataString(dataMaskingPolicyName)); + _url = _url.Replace("{dataMaskingRuleName}", System.Uri.EscapeDataString(dataMaskingRuleName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + /// /// Gets a list of Sql pool data masking rules. /// @@ -350,7 +586,7 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -504,14 +740,13 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -521,10 +756,6 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperationsExtensions.cs index 61cc5702cd93..b538337ae72b 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperationsExtensions.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperationsExtensions.cs @@ -81,6 +81,58 @@ public static DataMaskingRule CreateOrUpdate(this IDataMaskingRulesOperations op } } + /// + /// Gets the specific Sql pool data masking rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The name of the data masking rule. + /// + public static DataMaskingRule Get(this IDataMaskingRulesOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string dataMaskingRuleName) + { + return operations.GetAsync(resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName).GetAwaiter().GetResult(); + } + + /// + /// Gets the specific Sql pool data masking rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The name of the data masking rule. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDataMaskingRulesOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string dataMaskingRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets a list of Sql pool data masking rules. /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IBigDataPoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IBigDataPoolsOperations.cs index 0b59dafd46a6..51b4dd846c24 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IBigDataPoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IBigDataPoolsOperations.cs @@ -44,7 +44,7 @@ public partial interface IBigDataPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -78,7 +78,7 @@ public partial interface IBigDataPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -115,7 +115,7 @@ public partial interface IBigDataPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -146,7 +146,7 @@ public partial interface IBigDataPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -174,7 +174,7 @@ public partial interface IBigDataPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -211,7 +211,7 @@ public partial interface IBigDataPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -242,7 +242,7 @@ public partial interface IBigDataPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -267,7 +267,7 @@ public partial interface IBigDataPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingPoliciesOperations.cs index b14881d8cb53..215420a5e704 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingPoliciesOperations.cs @@ -44,7 +44,7 @@ public partial interface IDataMaskingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -72,7 +72,7 @@ public partial interface IDataMaskingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingRulesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingRulesOperations.cs index d1188c41bc4f..ef08d13f33d6 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingRulesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingRulesOperations.cs @@ -48,7 +48,7 @@ public partial interface IDataMaskingRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -59,6 +59,37 @@ public partial interface IDataMaskingRulesOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string dataMaskingRuleName, DataMaskingRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the specific Sql pool data masking rule. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The name of the data masking rule. + /// + /// + /// 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 workspaceName, string sqlPoolName, string dataMaskingRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets a list of Sql pool data masking rules. /// /// @@ -76,7 +107,7 @@ public partial interface IDataMaskingRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeAuthKeysOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeAuthKeysOperations.cs index 6731624be084..97f90ac2851e 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeAuthKeysOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeAuthKeysOperations.cs @@ -48,7 +48,7 @@ public partial interface IIntegrationRuntimeAuthKeysOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -79,7 +79,7 @@ public partial interface IIntegrationRuntimeAuthKeysOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeConnectionInfosOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeConnectionInfosOperations.cs index a7c6ff7dd9f5..53cba72956fe 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeConnectionInfosOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeConnectionInfosOperations.cs @@ -44,7 +44,7 @@ public partial interface IIntegrationRuntimeConnectionInfosOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeCredentialsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeCredentialsOperations.cs index 590bd5b22047..39685d0a3124 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeCredentialsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeCredentialsOperations.cs @@ -49,7 +49,7 @@ public partial interface IIntegrationRuntimeCredentialsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeMonitoringDataOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeMonitoringDataOperations.cs index 5697718afa9a..8d47828b7813 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeMonitoringDataOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeMonitoringDataOperations.cs @@ -44,7 +44,7 @@ public partial interface IIntegrationRuntimeMonitoringDataOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodeIpAddressOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodeIpAddressOperations.cs index 224e72de96b3..63f0d509c251 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodeIpAddressOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodeIpAddressOperations.cs @@ -47,7 +47,7 @@ public partial interface IIntegrationRuntimeNodeIpAddressOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodesOperations.cs index efab8118aba0..089f39462df1 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodesOperations.cs @@ -47,7 +47,7 @@ public partial interface IIntegrationRuntimeNodesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -84,7 +84,7 @@ public partial interface IIntegrationRuntimeNodesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -118,7 +118,7 @@ public partial interface IIntegrationRuntimeNodesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs index ccd51423dd22..d5a8719d98b0 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs @@ -47,7 +47,7 @@ public partial interface IIntegrationRuntimeObjectMetadataOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -78,7 +78,7 @@ public partial interface IIntegrationRuntimeObjectMetadataOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -109,7 +109,7 @@ public partial interface IIntegrationRuntimeObjectMetadataOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeStatusOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeStatusOperations.cs index 5fd56bda6b87..abb9897b5112 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeStatusOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeStatusOperations.cs @@ -44,7 +44,7 @@ public partial interface IIntegrationRuntimeStatusOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimesOperations.cs index 4156f2110521..3d3029778d72 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimesOperations.cs @@ -47,7 +47,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -83,7 +83,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -122,7 +122,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -153,7 +153,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -181,7 +181,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -206,7 +206,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -237,7 +237,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -268,7 +268,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -293,7 +293,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -318,7 +318,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -354,7 +354,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -385,7 +385,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -413,7 +413,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -444,7 +444,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -469,7 +469,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -494,7 +494,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -516,7 +516,7 @@ public partial interface IIntegrationRuntimesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIpFirewallRulesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIpFirewallRulesOperations.cs index edadd74abc8e..ad9382eb610b 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIpFirewallRulesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIpFirewallRulesOperations.cs @@ -38,7 +38,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -69,7 +69,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -125,7 +125,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -153,7 +153,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -184,7 +184,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -212,7 +212,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -240,7 +240,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -262,7 +262,7 @@ public partial interface IIpFirewallRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IKeysOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IKeysOperations.cs index d20315083d01..61931488d480 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IKeysOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IKeysOperations.cs @@ -38,7 +38,7 @@ public partial interface IKeysOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -66,7 +66,7 @@ public partial interface IKeysOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,7 @@ public partial interface IKeysOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -125,7 +125,7 @@ public partial interface IKeysOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -147,7 +147,7 @@ public partial interface IKeysOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IOperations.cs index 594707771ccf..17314092d7a6 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IOperations.cs @@ -38,7 +38,7 @@ public partial interface IOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -60,7 +60,7 @@ public partial interface IOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -88,7 +88,7 @@ public partial interface IOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -116,7 +116,7 @@ public partial interface IOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateEndpointConnectionsOperations.cs index 69b2684a7153..27a229534fcb 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateEndpointConnectionsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateEndpointConnectionsOperations.cs @@ -41,7 +41,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -72,7 +72,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -100,7 +100,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -125,7 +125,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -156,7 +156,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -184,7 +184,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -206,7 +206,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateEndpointConnectionsPrivateLinkHubOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateEndpointConnectionsPrivateLinkHubOperations.cs index 4dcae683349a..fa3cb48f2fb3 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateEndpointConnectionsPrivateLinkHubOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateEndpointConnectionsPrivateLinkHubOperations.cs @@ -38,7 +38,7 @@ public partial interface IPrivateEndpointConnectionsPrivateLinkHubOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -60,7 +60,7 @@ public partial interface IPrivateEndpointConnectionsPrivateLinkHubOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlV3Operations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubPrivateLinkResourcesOperations.cs similarity index 57% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlV3Operations.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubPrivateLinkResourcesOperations.cs index 78f887fd2fb5..89f8b01e2235 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlV3Operations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubPrivateLinkResourcesOperations.cs @@ -19,43 +19,52 @@ namespace Microsoft.Azure.Management.Synapse using System.Threading.Tasks; /// - /// SqlV3Operations operations. + /// PrivateLinkHubPrivateLinkResourcesOperations operations. /// - public partial interface ISqlV3Operations + public partial interface IPrivateLinkHubPrivateLinkResourcesOperations { /// - /// All operations + /// Private Link Resources /// /// - /// Get all available operations + /// Get all private link resources for a private link hub /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// /// /// 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 /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string privateLinkHubName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get operation result + /// Get Private Link Hub Private Link Resource /// /// - /// Get the result of an operation + /// Get private link resource in private link hub /// /// /// The name of the resource group. The name is case insensitive. /// - /// - /// The name of the workspace. + /// + /// The name of the private link hub /// - /// - /// Operation ID + /// + /// The name of the private link resource /// /// /// The headers that will be added to request. @@ -63,27 +72,24 @@ public partial interface ISqlV3Operations /// /// 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 GetLocationHeaderResultWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string privateLinkHubName, string privateLinkResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get operation status + /// Private Link Resources /// /// - /// Get the status of an operation + /// Get all private link resources for a private link hub /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Operation ID + /// + /// The NextLink from the previous successful call to List operation. /// /// /// The headers that will be added to request. @@ -91,7 +97,7 @@ public partial interface ISqlV3Operations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -100,6 +106,6 @@ public partial interface ISqlV3Operations /// /// Thrown when a required parameter is null /// - Task> GetAzureAsyncHeaderResultWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubsOperations.cs index 3635a47b3f4b..910836da8e35 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubsOperations.cs @@ -35,7 +35,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -60,7 +60,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -88,7 +88,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -116,7 +116,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -141,7 +141,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -157,7 +157,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -182,7 +182,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -201,7 +201,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -223,7 +223,7 @@ public partial interface IPrivateLinkHubsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkResourcesOperations.cs index f4b9c1a32fde..5c391b680aa3 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkResourcesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkResourcesOperations.cs @@ -41,7 +41,7 @@ public partial interface IPrivateLinkResourcesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -72,7 +72,7 @@ public partial interface IPrivateLinkResourcesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,7 @@ public partial interface IPrivateLinkResourcesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IRestorableDroppedSqlPoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IRestorableDroppedSqlPoolsOperations.cs index c2a86b326fc1..a78499d38d7f 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IRestorableDroppedSqlPoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IRestorableDroppedSqlPoolsOperations.cs @@ -42,7 +42,7 @@ public partial interface IRestorableDroppedSqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -67,7 +67,7 @@ public partial interface IRestorableDroppedSqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlDatabasesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlDatabasesOperations.cs deleted file mode 100644 index 17710d6e8c4a..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlDatabasesOperations.cs +++ /dev/null @@ -1,276 +0,0 @@ -// -// 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.Synapse -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// SqlDatabasesOperations operations. - /// - public partial interface ISqlDatabasesOperations - { - /// - /// Gets a SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// 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 workspaceName, string sqlDatabaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new SqlDatabase or updates an existing SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// 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 workspaceName, string sqlDatabaseName, SqlDatabase parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// 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 workspaceName, string sqlDatabaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates an existing database. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of sql databases. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// 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>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new SqlDatabase or updates an existing SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// 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 workspaceName, string sqlDatabaseName, SqlDatabase parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// 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 workspaceName, string sqlDatabaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates an existing database. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of sql databases. - /// - /// - /// 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>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolConnectionPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolConnectionPoliciesOperations.cs index 636a38cc6f3c..bdebdc89a0b8 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolConnectionPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolConnectionPoliciesOperations.cs @@ -46,7 +46,7 @@ public partial interface ISqlPoolConnectionPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolGeoBackupPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolGeoBackupPoliciesOperations.cs index 5a02bf0b79e8..e92fd23f9a0b 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolGeoBackupPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolGeoBackupPoliciesOperations.cs @@ -44,7 +44,7 @@ public partial interface ISqlPoolGeoBackupPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -55,6 +55,38 @@ public partial interface ISqlPoolGeoBackupPoliciesOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Updates a SQL Pool geo backup policy. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The required parameters for creating or updating the geo backup + /// policy. + /// + /// + /// 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 workspaceName, string sqlPoolName, GeoBackupPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get a SQL pool geo backup policy /// /// @@ -75,7 +107,7 @@ public partial interface ISqlPoolGeoBackupPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowOptionsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowOptionsOperations.cs new file mode 100644 index 000000000000..2c712e6e8528 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowOptionsOperations.cs @@ -0,0 +1,61 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolMaintenanceWindowOptionsOperations operations. + /// + public partial interface ISqlPoolMaintenanceWindowOptionsOperations + { + /// + /// SQL pool's available maintenance windows. + /// + /// + /// Get list of SQL pool's available maintenance windows. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window options name. + /// + /// + /// 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 workspaceName, string sqlPoolName, string maintenanceWindowOptionsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowsOperations.cs new file mode 100644 index 000000000000..09b237c7d4f2 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowsOperations.cs @@ -0,0 +1,96 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolMaintenanceWindowsOperations operations. + /// + public partial interface ISqlPoolMaintenanceWindowsOperations + { + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// 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 workspaceName, string sqlPoolName, string maintenanceWindowName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The required parameters for creating or updating Maintenance + /// Windows settings + /// + /// + /// 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 CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, MaintenanceWindows parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMetadataSyncConfigsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMetadataSyncConfigsOperations.cs index bb7acd3a608f..bec9f1bc678d 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMetadataSyncConfigsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMetadataSyncConfigsOperations.cs @@ -44,7 +44,7 @@ public partial interface ISqlPoolMetadataSyncConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -78,7 +78,7 @@ public partial interface ISqlPoolMetadataSyncConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolOperationResultsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolOperationResultsOperations.cs index 8550634127af..5744aabdabcc 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolOperationResultsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolOperationResultsOperations.cs @@ -47,7 +47,7 @@ public partial interface ISqlPoolOperationResultsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRecommendedSensitivityLabelsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRecommendedSensitivityLabelsOperations.cs new file mode 100644 index 000000000000..6c1cd3140493 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRecommendedSensitivityLabelsOperations.cs @@ -0,0 +1,55 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolRecommendedSensitivityLabelsOperations operations. + /// + public partial interface ISqlPoolRecommendedSensitivityLabelsOperations + { + /// + /// Update recommended sensitivity labels states of a given SQL Pool + /// using an operations batch. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, RecommendedSensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolReplicationLinksOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolReplicationLinksOperations.cs index 40a20fd2f7bb..63c797e9eb07 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolReplicationLinksOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolReplicationLinksOperations.cs @@ -44,7 +44,7 @@ public partial interface ISqlPoolReplicationLinksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -78,7 +78,7 @@ public partial interface ISqlPoolReplicationLinksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -103,7 +103,7 @@ public partial interface ISqlPoolReplicationLinksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRestorePointsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRestorePointsOperations.cs index a844295c8fc0..b4e2f23a234f 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRestorePointsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRestorePointsOperations.cs @@ -44,7 +44,7 @@ public partial interface ISqlPoolRestorePointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -190,7 +190,7 @@ public partial interface ISqlPoolRestorePointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolSensitivityLabelsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolSensitivityLabelsOperations.cs index d1f175782675..892386f6c9f5 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolSensitivityLabelsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolSensitivityLabelsOperations.cs @@ -48,7 +48,7 @@ public partial interface ISqlPoolSensitivityLabelsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -59,6 +59,34 @@ public partial interface ISqlPoolSensitivityLabelsOperations /// Task>> ListCurrentWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Update sensitivity labels of a given SQL Pool using an operations + /// batch. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets sensitivity labels of a given SQL pool /// /// @@ -299,7 +327,7 @@ public partial interface ISqlPoolSensitivityLabelsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolTransparentDataEncryptionsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolTransparentDataEncryptionsOperations.cs index 75c218952712..e802ef49db77 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolTransparentDataEncryptionsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolTransparentDataEncryptionsOperations.cs @@ -44,7 +44,7 @@ public partial interface ISqlPoolTransparentDataEncryptionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -81,7 +81,7 @@ public partial interface ISqlPoolTransparentDataEncryptionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolUsagesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolUsagesOperations.cs index 14c12a3f2307..3039d4a62921 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolUsagesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolUsagesOperations.cs @@ -44,7 +44,7 @@ public partial interface ISqlPoolUsagesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -69,7 +69,7 @@ public partial interface ISqlPoolUsagesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolsOperations.cs index 2516660a6b95..73cbc6c7e32e 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolsOperations.cs @@ -44,7 +44,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -78,7 +78,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -112,7 +112,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -143,7 +143,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -171,7 +171,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -202,7 +202,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -233,7 +233,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -244,6 +244,37 @@ public partial interface ISqlPoolsOperations /// Task> ResumeWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Rename a SQL pool + /// + /// + /// Rename a SQL pool. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The resource move definition for renaming this Sql pool. + /// + /// + /// 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 RenameWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, ResourceMoveDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Create SQL pool /// /// @@ -267,7 +298,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -298,7 +329,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -329,7 +360,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -360,7 +391,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -385,7 +416,7 @@ public partial interface ISqlPoolsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs index b8609f7c7917..0656edaeffde 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs @@ -119,6 +119,16 @@ public partial interface ISynapseManagementClient : System.IDisposable /// ISqlPoolReplicationLinksOperations SqlPoolReplicationLinks { get; } + /// + /// Gets the ISqlPoolMaintenanceWindowsOperations. + /// + ISqlPoolMaintenanceWindowsOperations SqlPoolMaintenanceWindows { get; } + + /// + /// Gets the ISqlPoolMaintenanceWindowOptionsOperations. + /// + ISqlPoolMaintenanceWindowOptionsOperations SqlPoolMaintenanceWindowOptions { get; } + /// /// Gets the ISqlPoolTransparentDataEncryptionsOperations. /// @@ -144,6 +154,11 @@ public partial interface ISynapseManagementClient : System.IDisposable /// ISqlPoolSensitivityLabelsOperations SqlPoolSensitivityLabels { get; } + /// + /// Gets the ISqlPoolRecommendedSensitivityLabelsOperations. + /// + ISqlPoolRecommendedSensitivityLabelsOperations SqlPoolRecommendedSensitivityLabels { get; } + /// /// Gets the ISqlPoolSchemasOperations. /// @@ -289,6 +304,11 @@ public partial interface ISynapseManagementClient : System.IDisposable /// IPrivateLinkResourcesOperations PrivateLinkResources { get; } + /// + /// Gets the IPrivateLinkHubPrivateLinkResourcesOperations. + /// + IPrivateLinkHubPrivateLinkResourcesOperations PrivateLinkHubPrivateLinkResources { get; } + /// /// Gets the IPrivateEndpointConnectionsOperations. /// @@ -324,15 +344,20 @@ public partial interface ISynapseManagementClient : System.IDisposable /// IWorkspaceManagedSqlServerVulnerabilityAssessmentsOperations WorkspaceManagedSqlServerVulnerabilityAssessments { get; } + /// + /// Gets the IWorkspaceManagedSqlServerEncryptionProtectorOperations. + /// + IWorkspaceManagedSqlServerEncryptionProtectorOperations WorkspaceManagedSqlServerEncryptionProtector { get; } + /// /// Gets the IWorkspaceManagedSqlServerUsagesOperations. /// IWorkspaceManagedSqlServerUsagesOperations WorkspaceManagedSqlServerUsages { get; } /// - /// Gets the IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations. + /// Gets the IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations. /// - IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations WorkspaceManagedSqlServerRecoverableSqlpools { get; } + IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations WorkspaceManagedSqlServerRecoverableSqlPools { get; } /// /// Gets the IKeysOperations. diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseSqlV3ManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseSqlV3ManagementClient.cs deleted file mode 100644 index 38c92d6ad41c..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseSqlV3ManagementClient.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// 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.Synapse -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - - /// - /// Azure Synapse Analytics Management Client - /// - public partial interface ISynapseSqlV3ManagementClient : System.IDisposable - { - /// - /// The base URI of the service. - /// - System.Uri BaseUri { get; set; } - - /// - /// Gets or sets json serialization settings. - /// - JsonSerializerSettings SerializationSettings { get; } - - /// - /// Gets or sets json deserialization settings. - /// - JsonSerializerSettings DeserializationSettings { get; } - - /// - /// Credentials needed for the client to connect to Azure. - /// - ServiceClientCredentials Credentials { get; } - - /// - /// The ID of the target subscription. - /// - string SubscriptionId { get; set; } - - /// - /// The API version to use for this operation. - /// - string ApiVersion { get; } - - /// - /// The preferred language for the response. - /// - string AcceptLanguage { get; set; } - - /// - /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. - /// - int? LongRunningOperationRetryTimeout { get; set; } - - /// - /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. - /// - bool? GenerateClientRequestId { get; set; } - - - /// - /// Gets the ISqlV3Operations. - /// - ISqlV3Operations SqlV3Operations { get; } - - /// - /// Gets the ISqlPoolsV3Operations. - /// - ISqlPoolsV3Operations SqlPoolsV3 { get; } - - /// - /// Gets the ISqlDatabasesOperations. - /// - ISqlDatabasesOperations SqlDatabases { get; } - - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceAadAdminsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceAadAdminsOperations.cs index 29e2607c2c25..58b142514156 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceAadAdminsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceAadAdminsOperations.cs @@ -38,7 +38,7 @@ public partial interface IWorkspaceAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -66,7 +66,7 @@ public partial interface IWorkspaceAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -91,7 +91,7 @@ public partial interface IWorkspaceAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -116,7 +116,7 @@ public partial interface IWorkspaceAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -141,7 +141,7 @@ public partial interface IWorkspaceAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedIdentitySqlControlSettingsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedIdentitySqlControlSettingsOperations.cs index 18e2d1a7d554..7839bf813a7d 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedIdentitySqlControlSettingsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedIdentitySqlControlSettingsOperations.cs @@ -38,7 +38,7 @@ public partial interface IWorkspaceManagedIdentitySqlControlSettingsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -66,7 +66,7 @@ public partial interface IWorkspaceManagedIdentitySqlControlSettingsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -94,7 +94,7 @@ public partial interface IWorkspaceManagedIdentitySqlControlSettingsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolsV3Operations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerEncryptionProtectorOperations.cs similarity index 52% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolsV3Operations.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerEncryptionProtectorOperations.cs index 23c5679b7f47..337250f580a7 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolsV3Operations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerEncryptionProtectorOperations.cs @@ -19,21 +19,21 @@ namespace Microsoft.Azure.Management.Synapse using System.Threading.Tasks; /// - /// SqlPoolsV3Operations operations. + /// WorkspaceManagedSqlServerEncryptionProtectorOperations operations. /// - public partial interface ISqlPoolsV3Operations + public partial interface IWorkspaceManagedSqlServerEncryptionProtectorOperations { /// - /// Gets a SqlPool. + /// Get workspace server's encryption protector. /// + /// + /// Get workspace managed sql server's encryption protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. + /// The name of the workspace /// /// /// The headers that will be added to request. @@ -41,7 +41,7 @@ public partial interface ISqlPoolsV3Operations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -50,21 +50,21 @@ public partial interface ISqlPoolsV3Operations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates a new SqlPool or updates an existing SqlPool. + /// Updates workspace server's encryption protector. /// + /// + /// Updates workspace managed sql server's encryption protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. + /// The name of the workspace /// /// - /// The requested SqlPool resource state. + /// The requested encryption protector resource state. /// /// /// The headers that will be added to request. @@ -72,7 +72,7 @@ public partial interface ISqlPoolsV3Operations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -81,18 +81,18 @@ public partial interface ISqlPoolsV3Operations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolV3 parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, EncryptionProtector parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Deletes the SqlPool. + /// Get list of encryption protectors for the server. /// + /// + /// Get list of encryption protectors for workspace managed sql server. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. + /// The name of the workspace /// /// /// The headers that will be added to request. @@ -100,35 +100,7 @@ public partial interface ISqlPoolsV3Operations /// /// The cancellation token. /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates an existing sqlpool. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -137,15 +109,19 @@ public partial interface ISqlPoolsV3Operations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a list of sql pools. + /// Revalidates server's existing encryption protector. /// + /// + /// Revalidates workspace managed sql server's existing encryption + /// protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. + /// The name of the workspace /// /// /// The headers that will be added to request. @@ -153,30 +129,27 @@ public partial interface ISqlPoolsV3Operations /// /// 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>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task RevalidateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates a new SqlPool or updates an existing SqlPool. + /// Updates workspace server's encryption protector. /// + /// + /// Updates workspace managed sql server's encryption protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. + /// The name of the workspace /// /// - /// The requested SqlPool resource state. + /// The requested encryption protector resource state. /// /// /// The headers that will be added to request. @@ -184,7 +157,7 @@ public partial interface ISqlPoolsV3Operations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -193,46 +166,19 @@ public partial interface ISqlPoolsV3Operations /// /// Thrown when a required parameter is null /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolV3 parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the SqlPool. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// 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 workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, EncryptionProtector parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Updates an existing sqlpool. + /// Revalidates server's existing encryption protector. /// + /// + /// Revalidates workspace managed sql server's existing encryption + /// protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. + /// The name of the workspace /// /// /// The headers that will be added to request. @@ -240,19 +186,19 @@ public partial interface ISqlPoolsV3Operations /// /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginRevalidateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a list of sql pools. + /// Get list of encryption protectors for the server. /// + /// + /// Get list of encryption protectors for workspace managed sql server. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -262,7 +208,7 @@ public partial interface ISqlPoolsV3Operations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -271,6 +217,6 @@ public partial interface ISqlPoolsV3Operations /// /// Thrown when a required parameter is null /// - Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations.cs similarity index 93% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations.cs index 35c3dc3895a5..3fc7411d5112 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations.cs @@ -19,9 +19,9 @@ namespace Microsoft.Azure.Management.Synapse using System.Threading.Tasks; /// - /// WorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations. + /// WorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations. /// - public partial interface IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations + public partial interface IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations { /// /// Get list of recoverable sql pools for the server. @@ -63,8 +63,8 @@ public partial interface IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations /// /// The name of the workspace /// - /// - /// The name of the sql compute + /// + /// The name of the sql pool /// /// /// The headers that will be added to request. @@ -81,7 +81,7 @@ public partial interface IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlComputeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get list of recoverable sql pools for the server. /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceSqlAadAdminsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceSqlAadAdminsOperations.cs index 98d5d13ec06f..4ab2c9e1944c 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceSqlAadAdminsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspaceSqlAadAdminsOperations.cs @@ -38,7 +38,7 @@ public partial interface IWorkspaceSqlAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -66,7 +66,7 @@ public partial interface IWorkspaceSqlAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -91,7 +91,7 @@ public partial interface IWorkspaceSqlAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -116,7 +116,7 @@ public partial interface IWorkspaceSqlAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -141,7 +141,7 @@ public partial interface IWorkspaceSqlAadAdminsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspacesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspacesOperations.cs index 52dd537f92b9..84282881c78a 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspacesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IWorkspacesOperations.cs @@ -35,7 +35,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -60,7 +60,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -88,7 +88,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -116,7 +116,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -141,7 +141,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -160,7 +160,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -188,7 +188,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -216,7 +216,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -241,7 +241,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -263,7 +263,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -285,7 +285,7 @@ public partial interface IWorkspacesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperations.cs index f2694f253e7d..a8402ffeb711 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperations.cs @@ -74,7 +74,7 @@ internal IntegrationRuntimeAuthKeysOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -236,14 +236,13 @@ internal IntegrationRuntimeAuthKeysOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -253,10 +252,6 @@ internal IntegrationRuntimeAuthKeysOperations(SynapseManagementClient client) } 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); @@ -322,7 +317,7 @@ internal IntegrationRuntimeAuthKeysOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -473,14 +468,13 @@ internal IntegrationRuntimeAuthKeysOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -490,10 +484,6 @@ internal IntegrationRuntimeAuthKeysOperations(SynapseManagementClient client) } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperations.cs index ed709c4022c8..7dc892425931 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperations.cs @@ -71,7 +71,7 @@ internal IntegrationRuntimeConnectionInfosOperations(SynapseManagementClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,14 +222,13 @@ internal IntegrationRuntimeConnectionInfosOperations(SynapseManagementClient cli string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -239,10 +238,6 @@ internal IntegrationRuntimeConnectionInfosOperations(SynapseManagementClient cli } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperations.cs index 241c28eb76b3..2790d7d1d208 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperations.cs @@ -75,7 +75,7 @@ internal IntegrationRuntimeCredentialsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -223,14 +223,13 @@ internal IntegrationRuntimeCredentialsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -240,10 +239,6 @@ internal IntegrationRuntimeCredentialsOperations(SynapseManagementClient client) } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperations.cs index eacc5aae195e..266827883f98 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperations.cs @@ -71,7 +71,7 @@ internal IntegrationRuntimeMonitoringDataOperations(SynapseManagementClient clie /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,14 +222,13 @@ internal IntegrationRuntimeMonitoringDataOperations(SynapseManagementClient clie string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -239,10 +238,6 @@ internal IntegrationRuntimeMonitoringDataOperations(SynapseManagementClient clie } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperations.cs index 78365e2284d2..cf07fc30e563 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperations.cs @@ -74,7 +74,7 @@ internal IntegrationRuntimeNodeIpAddressOperations(SynapseManagementClient clien /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -231,14 +231,13 @@ internal IntegrationRuntimeNodeIpAddressOperations(SynapseManagementClient clien string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -248,10 +247,6 @@ internal IntegrationRuntimeNodeIpAddressOperations(SynapseManagementClient clien } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperations.cs index 7c75394cb2cb..331e154c6353 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperations.cs @@ -74,7 +74,7 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -231,14 +231,13 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -248,10 +247,6 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) } 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); @@ -323,7 +318,7 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -491,14 +486,13 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -508,10 +502,6 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) } 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); @@ -580,7 +570,7 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -734,14 +724,13 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -751,10 +740,6 @@ internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs index 96ba2671ffc6..fdcaff385fc0 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs @@ -74,7 +74,7 @@ internal IntegrationRuntimeObjectMetadataOperations(SynapseManagementClient clie /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -232,14 +232,13 @@ internal IntegrationRuntimeObjectMetadataOperations(SynapseManagementClient clie string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -249,10 +248,6 @@ internal IntegrationRuntimeObjectMetadataOperations(SynapseManagementClient clie } 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); @@ -346,7 +341,7 @@ internal IntegrationRuntimeObjectMetadataOperations(SynapseManagementClient clie /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -497,14 +492,13 @@ internal IntegrationRuntimeObjectMetadataOperations(SynapseManagementClient clie string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -514,10 +508,6 @@ internal IntegrationRuntimeObjectMetadataOperations(SynapseManagementClient clie } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperations.cs index 12900fa54ae2..9f48f1f11bde 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperations.cs @@ -71,7 +71,7 @@ internal IntegrationRuntimeStatusOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,14 +222,13 @@ internal IntegrationRuntimeStatusOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -239,10 +238,6 @@ internal IntegrationRuntimeStatusOperations(SynapseManagementClient client) } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperations.cs index e39d2e763016..7781b05ae602 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperations.cs @@ -74,7 +74,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -236,14 +236,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -253,10 +252,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -327,7 +322,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -487,14 +482,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 304) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -504,10 +498,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -637,7 +627,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -785,14 +775,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -802,10 +791,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -850,7 +835,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -995,14 +980,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1012,10 +996,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -1195,7 +1175,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1370,14 +1350,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1387,10 +1366,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -1456,7 +1431,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1604,14 +1579,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1621,10 +1595,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -1672,7 +1642,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1823,14 +1793,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1840,10 +1809,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -1909,7 +1874,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2057,14 +2022,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2074,10 +2038,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -2122,7 +2082,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2270,14 +2230,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2287,10 +2246,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -2335,7 +2290,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2483,14 +2438,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2500,10 +2454,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); @@ -2545,7 +2495,7 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2641,14 +2591,13 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2658,10 +2607,6 @@ internal IntegrationRuntimesOperations(SynapseManagementClient client) } 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); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IpFirewallRulesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IpFirewallRulesOperations.cs index c9b7bed8e96d..e82aad578d37 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IpFirewallRulesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IpFirewallRulesOperations.cs @@ -65,7 +65,7 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -210,11 +210,11 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -341,7 +341,7 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -492,11 +492,11 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -598,7 +598,7 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -760,11 +760,11 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -856,7 +856,7 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1007,11 +1007,11 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1085,7 +1085,7 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1241,11 +1241,11 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1313,7 +1313,7 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1409,11 +1409,11 @@ internal IpFirewallRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/KeysOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/KeysOperations.cs index eefa82f0f6f3..d5fb735ba7f0 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/KeysOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/KeysOperations.cs @@ -65,7 +65,7 @@ internal KeysOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -210,11 +210,11 @@ internal KeysOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -288,7 +288,7 @@ internal KeysOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -439,11 +439,11 @@ internal KeysOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -520,7 +520,7 @@ internal KeysOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -682,11 +682,11 @@ internal KeysOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -760,7 +760,7 @@ internal KeysOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -911,11 +911,11 @@ internal KeysOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -983,7 +983,7 @@ internal KeysOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1079,11 +1079,11 @@ internal KeysOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/BigDataPoolResourceInfo.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/BigDataPoolResourceInfo.cs index 46b083205a9c..13c0f7d0d19d 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/BigDataPoolResourceInfo.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/BigDataPoolResourceInfo.cs @@ -54,15 +54,18 @@ public BigDataPoolResourceInfo() /// Auto-pausing properties /// Whether compute isolation /// is required or not. - /// Whether library - /// requirements changed. /// Whether session level /// packages enabled. + /// The cache size + /// Dynamic Executor + /// Allocation /// The Spark events folder /// The number of nodes in the Big Data /// pool. /// Library version /// requirements + /// List of custom libraries/packages + /// associated with the spark pool. /// Spark configuration file to /// specify additional properties /// The Apache Spark version. @@ -74,7 +77,9 @@ public BigDataPoolResourceInfo() /// The kind of nodes that the Big Data /// pool provides. Possible values include: 'None', /// 'MemoryOptimized' - public BigDataPoolResourceInfo(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), AutoScaleProperties autoScale = default(AutoScaleProperties), System.DateTime? creationDate = default(System.DateTime?), AutoPauseProperties autoPause = default(AutoPauseProperties), bool? isComputeIsolationEnabled = default(bool?), bool? haveLibraryRequirementsChanged = default(bool?), bool? sessionLevelPackagesEnabled = default(bool?), string sparkEventsFolder = default(string), int? nodeCount = default(int?), LibraryRequirements libraryRequirements = default(LibraryRequirements), LibraryRequirements sparkConfigProperties = default(LibraryRequirements), string sparkVersion = default(string), string defaultSparkLogFolder = default(string), string nodeSize = default(string), string nodeSizeFamily = default(string)) + /// The time when the Big Data + /// pool was updated successfully. + public BigDataPoolResourceInfo(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), AutoScaleProperties autoScale = default(AutoScaleProperties), System.DateTime? creationDate = default(System.DateTime?), AutoPauseProperties autoPause = default(AutoPauseProperties), bool? isComputeIsolationEnabled = default(bool?), bool? sessionLevelPackagesEnabled = default(bool?), int? cacheSize = default(int?), DynamicExecutorAllocation dynamicExecutorAllocation = default(DynamicExecutorAllocation), string sparkEventsFolder = default(string), int? nodeCount = default(int?), LibraryRequirements libraryRequirements = default(LibraryRequirements), IList customLibraries = default(IList), LibraryRequirements sparkConfigProperties = default(LibraryRequirements), string sparkVersion = default(string), string defaultSparkLogFolder = default(string), string nodeSize = default(string), string nodeSizeFamily = default(string), System.DateTime? lastSucceededTimestamp = default(System.DateTime?)) : base(location, id, name, type, tags) { ProvisioningState = provisioningState; @@ -82,16 +87,19 @@ public BigDataPoolResourceInfo() CreationDate = creationDate; AutoPause = autoPause; IsComputeIsolationEnabled = isComputeIsolationEnabled; - HaveLibraryRequirementsChanged = haveLibraryRequirementsChanged; SessionLevelPackagesEnabled = sessionLevelPackagesEnabled; + CacheSize = cacheSize; + DynamicExecutorAllocation = dynamicExecutorAllocation; SparkEventsFolder = sparkEventsFolder; NodeCount = nodeCount; LibraryRequirements = libraryRequirements; + CustomLibraries = customLibraries; SparkConfigProperties = sparkConfigProperties; SparkVersion = sparkVersion; DefaultSparkLogFolder = defaultSparkLogFolder; NodeSize = nodeSize; NodeSizeFamily = nodeSizeFamily; + LastSucceededTimestamp = lastSucceededTimestamp; CustomInit(); } @@ -130,18 +138,24 @@ public BigDataPoolResourceInfo() [JsonProperty(PropertyName = "properties.isComputeIsolationEnabled")] public bool? IsComputeIsolationEnabled { get; set; } - /// - /// Gets or sets whether library requirements changed. - /// - [JsonProperty(PropertyName = "properties.haveLibraryRequirementsChanged")] - public bool? HaveLibraryRequirementsChanged { get; set; } - /// /// Gets or sets whether session level packages enabled. /// [JsonProperty(PropertyName = "properties.sessionLevelPackagesEnabled")] public bool? SessionLevelPackagesEnabled { get; set; } + /// + /// Gets or sets the cache size + /// + [JsonProperty(PropertyName = "properties.cacheSize")] + public int? CacheSize { get; set; } + + /// + /// Gets or sets dynamic Executor Allocation + /// + [JsonProperty(PropertyName = "properties.dynamicExecutorAllocation")] + public DynamicExecutorAllocation DynamicExecutorAllocation { get; set; } + /// /// Gets or sets the Spark events folder /// @@ -160,6 +174,13 @@ public BigDataPoolResourceInfo() [JsonProperty(PropertyName = "properties.libraryRequirements")] public LibraryRequirements LibraryRequirements { get; set; } + /// + /// Gets or sets list of custom libraries/packages associated with the + /// spark pool. + /// + [JsonProperty(PropertyName = "properties.customLibraries")] + public IList CustomLibraries { get; set; } + /// /// Gets or sets spark configuration file to specify additional /// properties @@ -194,6 +215,12 @@ public BigDataPoolResourceInfo() [JsonProperty(PropertyName = "properties.nodeSizeFamily")] public string NodeSizeFamily { get; set; } + /// + /// Gets the time when the Big Data pool was updated successfully. + /// + [JsonProperty(PropertyName = "properties.lastSucceededTimestamp")] + public System.DateTime? LastSucceededTimestamp { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DayOfWeek.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DayOfWeek.cs new file mode 100644 index 000000000000..3915d376d9cd --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DayOfWeek.cs @@ -0,0 +1,27 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for DayOfWeek. + /// + public static class DayOfWeek + { + public const string Sunday = "Sunday"; + public const string Monday = "Monday"; + public const string Tuesday = "Tuesday"; + public const string Wednesday = "Wednesday"; + public const string Thursday = "Thursday"; + public const string Friday = "Friday"; + public const string Saturday = "Saturday"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DynamicExecutorAllocation.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DynamicExecutorAllocation.cs new file mode 100644 index 000000000000..7fe223752c39 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DynamicExecutorAllocation.cs @@ -0,0 +1,53 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Dynamic Executor Allocation Properties + /// + public partial class DynamicExecutorAllocation + { + /// + /// Initializes a new instance of the DynamicExecutorAllocation class. + /// + public DynamicExecutorAllocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicExecutorAllocation class. + /// + /// Indicates whether Dynamic Executor Allocation + /// is enabled or not. + public DynamicExecutorAllocation(bool? enabled = default(bool?)) + { + Enabled = enabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates whether Dynamic Executor Allocation is + /// enabled or not. + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EncryptionProtector.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EncryptionProtector.cs new file mode 100644 index 000000000000..ba3f479dde88 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EncryptionProtector.cs @@ -0,0 +1,129 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The server encryption protector. + /// + [Rest.Serialization.JsonTransformation] + public partial class EncryptionProtector : ProxyResource + { + /// + /// Initializes a new instance of the EncryptionProtector class. + /// + public EncryptionProtector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EncryptionProtector class. + /// + /// The encryption protector type like + /// 'ServiceManaged', 'AzureKeyVault'. Possible values include: + /// 'ServiceManaged', 'AzureKeyVault' + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Kind of encryption protector. This is metadata + /// used for the Azure portal experience. + /// Resource location. + /// Subregion of the encryption + /// protector. + /// The name of the server key. + /// The URI of the server key. + /// Thumbprint of the server key. + public EncryptionProtector(string serverKeyType, string id = default(string), string name = default(string), string type = default(string), string kind = default(string), string location = default(string), string subregion = default(string), string serverKeyName = default(string), string uri = default(string), string thumbprint = default(string)) + : base(id, name, type) + { + Kind = kind; + Location = location; + Subregion = subregion; + ServerKeyName = serverKeyName; + ServerKeyType = serverKeyType; + Uri = uri; + Thumbprint = thumbprint; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets kind of encryption protector. This is metadata used for the + /// Azure portal experience. + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; private set; } + + /// + /// Gets resource location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; private set; } + + /// + /// Gets subregion of the encryption protector. + /// + [JsonProperty(PropertyName = "properties.subregion")] + public string Subregion { get; private set; } + + /// + /// Gets or sets the name of the server key. + /// + [JsonProperty(PropertyName = "properties.serverKeyName")] + public string ServerKeyName { get; set; } + + /// + /// Gets or sets the encryption protector type like 'ServiceManaged', + /// 'AzureKeyVault'. Possible values include: 'ServiceManaged', + /// 'AzureKeyVault' + /// + [JsonProperty(PropertyName = "properties.serverKeyType")] + public string ServerKeyType { get; set; } + + /// + /// Gets the URI of the server key. + /// + [JsonProperty(PropertyName = "properties.uri")] + public string Uri { get; private set; } + + /// + /// Gets thumbprint of the server key. + /// + [JsonProperty(PropertyName = "properties.thumbprint")] + public string Thumbprint { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ServerKeyType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServerKeyType"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorDetail.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorDetail.cs index 3e096daa8efc..d0e59aae76f5 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorDetail.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorDetail.cs @@ -11,10 +11,12 @@ namespace Microsoft.Azure.Management.Synapse.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// - /// Error details + /// The error detail. /// public partial class ErrorDetail { @@ -29,14 +31,18 @@ public ErrorDetail() /// /// Initializes a new instance of the ErrorDetail class. /// - /// Error message - /// Error code - /// Error target - public ErrorDetail(string message = default(string), string code = default(string), string target = default(string)) + /// The error code. + /// The error message. + /// The error target. + /// The error details. + /// The error additional info. + public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) { - Message = message; Code = code; + Message = message; Target = target; + Details = details; + AdditionalInfo = additionalInfo; CustomInit(); } @@ -46,22 +52,34 @@ public ErrorDetail() partial void CustomInit(); /// - /// Gets or sets error message + /// Gets the error code. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } /// - /// Gets or sets error code + /// Gets the error message. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } /// - /// Gets or sets error target + /// Gets the error target. /// [JsonProperty(PropertyName = "target")] - public string Target { get; set; } + public string Target { get; private set; } + + /// + /// Gets the error details. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; private set; } + + /// + /// Gets the error additional info. + /// + [JsonProperty(PropertyName = "additionalInfo")] + public IList AdditionalInfo { get; private set; } } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorResponse.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorResponse.cs index 9dcadd9275a2..8cc0f7581023 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorResponse.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorResponse.cs @@ -11,17 +11,15 @@ namespace Microsoft.Azure.Management.Synapse.Models { using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Error Response + /// Error response /// /// /// Common error response for all Azure Resource Manager APIs to return /// error details for failed operations. (This also follows the OData error - /// response format.) + /// response format.). /// public partial class ErrorResponse { @@ -36,18 +34,10 @@ public ErrorResponse() /// /// Initializes a new instance of the ErrorResponse class. /// - /// The error code. - /// The error message. - /// The error target. - /// The error details. - /// The error additional info. - public ErrorResponse(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) + /// The error object. + public ErrorResponse(ErrorDetail error = default(ErrorDetail)) { - Code = code; - Message = message; - Target = target; - Details = details; - AdditionalInfo = additionalInfo; + Error = error; CustomInit(); } @@ -57,34 +47,10 @@ public ErrorResponse() partial void CustomInit(); /// - /// Gets the error code. + /// Gets or sets the error object. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } - - /// - /// Gets the error message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } - - /// - /// Gets the error target. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } - - /// - /// Gets the error details. - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; private set; } - - /// - /// Gets the error additional info. - /// - [JsonProperty(PropertyName = "additionalInfo")] - public IList AdditionalInfo { get; private set; } + [JsonProperty(PropertyName = "error")] + public ErrorDetail Error { get; set; } } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorContractException.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorResponseException.cs similarity index 73% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorContractException.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorResponseException.cs index 3e834982c41c..27a92588f349 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorContractException.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorResponseException.cs @@ -13,10 +13,10 @@ namespace Microsoft.Azure.Management.Synapse.Models using Microsoft.Rest; /// - /// Exception thrown for an invalid response with ErrorContract + /// Exception thrown for an invalid response with ErrorResponse /// information. /// - public partial class ErrorContractException : RestException + public partial class ErrorResponseException : RestException { /// /// Gets information about the associated HTTP request. @@ -31,30 +31,30 @@ public partial class ErrorContractException : RestException /// /// Gets or sets the body object. /// - public ErrorContract Body { get; set; } + public ErrorResponse Body { get; set; } /// - /// Initializes a new instance of the ErrorContractException class. + /// Initializes a new instance of the ErrorResponseException class. /// - public ErrorContractException() + public ErrorResponseException() { } /// - /// Initializes a new instance of the ErrorContractException class. + /// Initializes a new instance of the ErrorResponseException class. /// /// The exception message. - public ErrorContractException(string message) + public ErrorResponseException(string message) : this(message, null) { } /// - /// Initializes a new instance of the ErrorContractException class. + /// Initializes a new instance of the ErrorResponseException class. /// /// The exception message. /// Inner exception. - public ErrorContractException(string message, System.Exception innerException) + public ErrorResponseException(string message, System.Exception innerException) : base(message, innerException) { } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LibraryInfo.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LibraryInfo.cs new file mode 100644 index 000000000000..63bddd291dc3 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LibraryInfo.cs @@ -0,0 +1,104 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Information about a library/package created at the workspace level. + /// + /// + /// Library/package information of a Big Data pool powered by Apache Spark + /// + public partial class LibraryInfo + { + /// + /// Initializes a new instance of the LibraryInfo class. + /// + public LibraryInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LibraryInfo class. + /// + /// Name of the library. + /// Storage blob path of library. + /// Storage blob container name. + /// The last update time of the + /// library. + /// Type of the library. + /// Provisioning status of the + /// library/package. + /// Creator Id of the library/package. + public LibraryInfo(string name = default(string), string path = default(string), string containerName = default(string), System.DateTime? uploadedTimestamp = default(System.DateTime?), string type = default(string), string provisioningStatus = default(string), string creatorId = default(string)) + { + Name = name; + Path = path; + ContainerName = containerName; + UploadedTimestamp = uploadedTimestamp; + Type = type; + ProvisioningStatus = provisioningStatus; + CreatorId = creatorId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the library. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets storage blob path of library. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets storage blob container name. + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets the last update time of the library. + /// + [JsonProperty(PropertyName = "uploadedTimestamp")] + public System.DateTime? UploadedTimestamp { get; private set; } + + /// + /// Gets or sets type of the library. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets provisioning status of the library/package. + /// + [JsonProperty(PropertyName = "provisioningStatus")] + public string ProvisioningStatus { get; private set; } + + /// + /// Gets creator Id of the library/package. + /// + [JsonProperty(PropertyName = "creatorId")] + public string CreatorId { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowOptions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowOptions.cs new file mode 100644 index 000000000000..d0b03ccfdda6 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowOptions.cs @@ -0,0 +1,122 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Maintenance window options. + /// + [Rest.Serialization.JsonTransformation] + public partial class MaintenanceWindowOptions : ProxyResource + { + /// + /// Initializes a new instance of the MaintenanceWindowOptions class. + /// + public MaintenanceWindowOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaintenanceWindowOptions class. + /// + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Whether maintenance windows are enabled for + /// the database. + /// Available maintenance cycles + /// e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. + /// Minimum duration of maintenance + /// window. + /// Default duration for + /// maintenance window. + /// Minimum number of maintenance windows + /// cycles to be set on the database. + /// Time granularity in minutes + /// for maintenance windows. + /// Whether we + /// allow multiple maintenance windows per cycle. + public MaintenanceWindowOptions(string id = default(string), string name = default(string), string type = default(string), bool? isEnabled = default(bool?), IList maintenanceWindowCycles = default(IList), int? minDurationInMinutes = default(int?), int? defaultDurationInMinutes = default(int?), int? minCycles = default(int?), int? timeGranularityInMinutes = default(int?), bool? allowMultipleMaintenanceWindowsPerCycle = default(bool?)) + : base(id, name, type) + { + IsEnabled = isEnabled; + MaintenanceWindowCycles = maintenanceWindowCycles; + MinDurationInMinutes = minDurationInMinutes; + DefaultDurationInMinutes = defaultDurationInMinutes; + MinCycles = minCycles; + TimeGranularityInMinutes = timeGranularityInMinutes; + AllowMultipleMaintenanceWindowsPerCycle = allowMultipleMaintenanceWindowsPerCycle; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether maintenance windows are enabled for the + /// database. + /// + [JsonProperty(PropertyName = "properties.isEnabled")] + public bool? IsEnabled { get; set; } + + /// + /// Gets or sets available maintenance cycles e.g. {Saturday, 0, + /// 48*60}, {Wednesday, 0, 24*60}. + /// + [JsonProperty(PropertyName = "properties.maintenanceWindowCycles")] + public IList MaintenanceWindowCycles { get; set; } + + /// + /// Gets or sets minimum duration of maintenance window. + /// + [JsonProperty(PropertyName = "properties.minDurationInMinutes")] + public int? MinDurationInMinutes { get; set; } + + /// + /// Gets or sets default duration for maintenance window. + /// + [JsonProperty(PropertyName = "properties.defaultDurationInMinutes")] + public int? DefaultDurationInMinutes { get; set; } + + /// + /// Gets or sets minimum number of maintenance windows cycles to be set + /// on the database. + /// + [JsonProperty(PropertyName = "properties.minCycles")] + public int? MinCycles { get; set; } + + /// + /// Gets or sets time granularity in minutes for maintenance windows. + /// + [JsonProperty(PropertyName = "properties.timeGranularityInMinutes")] + public int? TimeGranularityInMinutes { get; set; } + + /// + /// Gets or sets whether we allow multiple maintenance windows per + /// cycle. + /// + [JsonProperty(PropertyName = "properties.allowMultipleMaintenanceWindowsPerCycle")] + public bool? AllowMultipleMaintenanceWindowsPerCycle { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowTimeRange.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowTimeRange.cs new file mode 100644 index 000000000000..09c49aa28433 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowTimeRange.cs @@ -0,0 +1,73 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Maintenance window time range. + /// + public partial class MaintenanceWindowTimeRange + { + /// + /// Initializes a new instance of the MaintenanceWindowTimeRange class. + /// + public MaintenanceWindowTimeRange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaintenanceWindowTimeRange class. + /// + /// Day of maintenance window. Possible values + /// include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', + /// 'Friday', 'Saturday' + /// Start time minutes offset from + /// 12am. + /// Duration of maintenance window in + /// minutes. + public MaintenanceWindowTimeRange(string dayOfWeek = default(string), string startTime = default(string), string duration = default(string)) + { + DayOfWeek = dayOfWeek; + StartTime = startTime; + Duration = duration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets day of maintenance window. Possible values include: + /// 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + /// 'Saturday' + /// + [JsonProperty(PropertyName = "dayOfWeek")] + public string DayOfWeek { get; set; } + + /// + /// Gets or sets start time minutes offset from 12am. + /// + [JsonProperty(PropertyName = "startTime")] + public string StartTime { get; set; } + + /// + /// Gets or sets duration of maintenance window in minutes. + /// + [JsonProperty(PropertyName = "duration")] + public string Duration { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindows.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindows.cs new file mode 100644 index 000000000000..3b6e2e7fed36 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindows.cs @@ -0,0 +1,61 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Maintenance windows. + /// + [Rest.Serialization.JsonTransformation] + public partial class MaintenanceWindows : ProxyResource + { + /// + /// Initializes a new instance of the MaintenanceWindows class. + /// + public MaintenanceWindows() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaintenanceWindows class. + /// + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + public MaintenanceWindows(string id = default(string), string name = default(string), string type = default(string), IList timeRanges = default(IList)) + : base(id, name, type) + { + TimeRanges = timeRanges; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties.timeRanges")] + public IList TimeRanges { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/OperationResource.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/OperationResource.cs index 09934811f4ec..d29748425941 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/OperationResource.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/OperationResource.cs @@ -39,7 +39,7 @@ public OperationResource() /// Operation start time /// Completion percentage of the /// operation - public OperationResource(string id = default(string), string name = default(string), string status = default(string), object properties = default(object), ErrorResponse error = default(ErrorResponse), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), double? percentComplete = default(double?)) + public OperationResource(string id = default(string), string name = default(string), string status = default(string), object properties = default(object), ErrorDetail error = default(ErrorDetail), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), double? percentComplete = default(double?)) { Id = id; Name = name; @@ -86,7 +86,7 @@ public OperationResource() /// Gets or sets errors from the operation /// [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } + public ErrorDetail Error { get; set; } /// /// Gets or sets operation start time diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdate.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdate.cs new file mode 100644 index 000000000000..e23ccf416e85 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdate.cs @@ -0,0 +1,109 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A recommended sensitivity label update operation. + /// + [Rest.Serialization.JsonTransformation] + public partial class RecommendedSensitivityLabelUpdate : ProxyResource + { + /// + /// Initializes a new instance of the RecommendedSensitivityLabelUpdate + /// class. + /// + public RecommendedSensitivityLabelUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecommendedSensitivityLabelUpdate + /// class. + /// + /// Possible values include: 'enable', + /// 'disable' + /// Schema name of the column to update. + /// Table name of the column to update. + /// Column name to update. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + public RecommendedSensitivityLabelUpdate(RecommendedSensitivityLabelUpdateKind op, string schema, string table, string column, string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + Op = op; + Schema = schema; + Table = table; + Column = column; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'enable', 'disable' + /// + [JsonProperty(PropertyName = "properties.op")] + public RecommendedSensitivityLabelUpdateKind Op { get; set; } + + /// + /// Gets or sets schema name of the column to update. + /// + [JsonProperty(PropertyName = "properties.schema")] + public string Schema { get; set; } + + /// + /// Gets or sets table name of the column to update. + /// + [JsonProperty(PropertyName = "properties.table")] + public string Table { get; set; } + + /// + /// Gets or sets column name to update. + /// + [JsonProperty(PropertyName = "properties.column")] + public string Column { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Schema == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Schema"); + } + if (Table == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Table"); + } + if (Column == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Column"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateKind.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateKind.cs new file mode 100644 index 000000000000..349e2a1112ed --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateKind.cs @@ -0,0 +1,60 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for RecommendedSensitivityLabelUpdateKind. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RecommendedSensitivityLabelUpdateKind + { + [EnumMember(Value = "enable")] + Enable, + [EnumMember(Value = "disable")] + Disable + } + internal static class RecommendedSensitivityLabelUpdateKindEnumExtension + { + internal static string ToSerializedValue(this RecommendedSensitivityLabelUpdateKind? value) + { + return value == null ? null : ((RecommendedSensitivityLabelUpdateKind)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this RecommendedSensitivityLabelUpdateKind value) + { + switch( value ) + { + case RecommendedSensitivityLabelUpdateKind.Enable: + return "enable"; + case RecommendedSensitivityLabelUpdateKind.Disable: + return "disable"; + } + return null; + } + + internal static RecommendedSensitivityLabelUpdateKind? ParseRecommendedSensitivityLabelUpdateKind(this string value) + { + switch( value ) + { + case "enable": + return RecommendedSensitivityLabelUpdateKind.Enable; + case "disable": + return RecommendedSensitivityLabelUpdateKind.Disable; + } + return null; + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateList.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateList.cs new file mode 100644 index 000000000000..b9d8f961ffce --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateList.cs @@ -0,0 +1,53 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of recommended sensitivity label update operations. + /// + public partial class RecommendedSensitivityLabelUpdateList + { + /// + /// Initializes a new instance of the + /// RecommendedSensitivityLabelUpdateList class. + /// + public RecommendedSensitivityLabelUpdateList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecommendedSensitivityLabelUpdateList class. + /// + public RecommendedSensitivityLabelUpdateList(IList operations = default(IList)) + { + Operations = operations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "operations")] + public IList Operations { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ResourceMoveDefinition.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ResourceMoveDefinition.cs new file mode 100644 index 000000000000..d1f2f9f97eed --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ResourceMoveDefinition.cs @@ -0,0 +1,65 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Contains the information necessary to perform a resource move (rename). + /// + public partial class ResourceMoveDefinition + { + /// + /// Initializes a new instance of the ResourceMoveDefinition class. + /// + public ResourceMoveDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceMoveDefinition class. + /// + /// The target ID for the resource + public ResourceMoveDefinition(string id) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the target ID for the resource + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Id"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabel.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabel.cs index f96208c5ea6a..435afbf1f368 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabel.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabel.cs @@ -38,6 +38,9 @@ public SensitivityLabel() /// The type of the resource. E.g. /// "Microsoft.Compute/virtualMachines" or /// "Microsoft.Storage/storageAccounts" + /// The schema name. + /// The table name. + /// The column name. /// The label name. /// The label ID. /// The information type. @@ -46,14 +49,22 @@ public SensitivityLabel() /// Applicable for recommended sensitivity label only. Specifies /// whether the sensitivity recommendation on this column is disabled /// (dismissed) or not. - public SensitivityLabel(string id = default(string), string name = default(string), string type = default(string), string labelName = default(string), string labelId = default(string), string informationType = default(string), string informationTypeId = default(string), bool? isDisabled = default(bool?)) + /// Possible values include: 'None', 'Low', + /// 'Medium', 'High', 'Critical' + /// managed by + public SensitivityLabel(string id = default(string), string name = default(string), string type = default(string), string schemaName = default(string), string tableName = default(string), string columnName = default(string), string labelName = default(string), string labelId = default(string), string informationType = default(string), string informationTypeId = default(string), bool? isDisabled = default(bool?), SensitivityLabelRank? rank = default(SensitivityLabelRank?), string managedBy = default(string)) : base(id, name, type) { + SchemaName = schemaName; + TableName = tableName; + ColumnName = columnName; LabelName = labelName; LabelId = labelId; InformationType = informationType; InformationTypeId = informationTypeId; IsDisabled = isDisabled; + Rank = rank; + ManagedBy = managedBy; CustomInit(); } @@ -62,6 +73,24 @@ public SensitivityLabel() /// partial void CustomInit(); + /// + /// Gets the schema name. + /// + [JsonProperty(PropertyName = "properties.schemaName")] + public string SchemaName { get; private set; } + + /// + /// Gets the table name. + /// + [JsonProperty(PropertyName = "properties.tableName")] + public string TableName { get; private set; } + + /// + /// Gets the column name. + /// + [JsonProperty(PropertyName = "properties.columnName")] + public string ColumnName { get; private set; } + /// /// Gets or sets the label name. /// @@ -95,5 +124,18 @@ public SensitivityLabel() [JsonProperty(PropertyName = "properties.isDisabled")] public bool? IsDisabled { get; private set; } + /// + /// Gets or sets possible values include: 'None', 'Low', 'Medium', + /// 'High', 'Critical' + /// + [JsonProperty(PropertyName = "properties.rank")] + public SensitivityLabelRank? Rank { get; set; } + + /// + /// Gets managed by + /// + [JsonProperty(PropertyName = "managedBy")] + public string ManagedBy { get; private set; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelRank.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelRank.cs new file mode 100644 index 000000000000..19cf2b61aa28 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelRank.cs @@ -0,0 +1,78 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SensitivityLabelRank. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SensitivityLabelRank + { + [EnumMember(Value = "None")] + None, + [EnumMember(Value = "Low")] + Low, + [EnumMember(Value = "Medium")] + Medium, + [EnumMember(Value = "High")] + High, + [EnumMember(Value = "Critical")] + Critical + } + internal static class SensitivityLabelRankEnumExtension + { + internal static string ToSerializedValue(this SensitivityLabelRank? value) + { + return value == null ? null : ((SensitivityLabelRank)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this SensitivityLabelRank value) + { + switch( value ) + { + case SensitivityLabelRank.None: + return "None"; + case SensitivityLabelRank.Low: + return "Low"; + case SensitivityLabelRank.Medium: + return "Medium"; + case SensitivityLabelRank.High: + return "High"; + case SensitivityLabelRank.Critical: + return "Critical"; + } + return null; + } + + internal static SensitivityLabelRank? ParseSensitivityLabelRank(this string value) + { + switch( value ) + { + case "None": + return SensitivityLabelRank.None; + case "Low": + return SensitivityLabelRank.Low; + case "Medium": + return SensitivityLabelRank.Medium; + case "High": + return SensitivityLabelRank.High; + case "Critical": + return SensitivityLabelRank.Critical; + } + return null; + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdate.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdate.cs new file mode 100644 index 000000000000..85167c5ac776 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdate.cs @@ -0,0 +1,116 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A sensitivity label update operation. + /// + [Rest.Serialization.JsonTransformation] + public partial class SensitivityLabelUpdate : ProxyResource + { + /// + /// Initializes a new instance of the SensitivityLabelUpdate class. + /// + public SensitivityLabelUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SensitivityLabelUpdate class. + /// + /// Possible values include: 'set', 'remove' + /// Schema name of the column to update. + /// Table name of the column to update. + /// Column name to update. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// The sensitivity label information to + /// apply on a column. + public SensitivityLabelUpdate(SensitivityLabelUpdateKind op, string schema, string table, string column, string id = default(string), string name = default(string), string type = default(string), SensitivityLabel sensitivityLabel = default(SensitivityLabel)) + : base(id, name, type) + { + Op = op; + Schema = schema; + Table = table; + Column = column; + SensitivityLabel = sensitivityLabel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'set', 'remove' + /// + [JsonProperty(PropertyName = "properties.op")] + public SensitivityLabelUpdateKind Op { get; set; } + + /// + /// Gets or sets schema name of the column to update. + /// + [JsonProperty(PropertyName = "properties.schema")] + public string Schema { get; set; } + + /// + /// Gets or sets table name of the column to update. + /// + [JsonProperty(PropertyName = "properties.table")] + public string Table { get; set; } + + /// + /// Gets or sets column name to update. + /// + [JsonProperty(PropertyName = "properties.column")] + public string Column { get; set; } + + /// + /// Gets or sets the sensitivity label information to apply on a + /// column. + /// + [JsonProperty(PropertyName = "properties.sensitivityLabel")] + public SensitivityLabel SensitivityLabel { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Schema == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Schema"); + } + if (Table == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Table"); + } + if (Column == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Column"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateKind.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateKind.cs new file mode 100644 index 000000000000..614543a4c762 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateKind.cs @@ -0,0 +1,60 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SensitivityLabelUpdateKind. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SensitivityLabelUpdateKind + { + [EnumMember(Value = "set")] + Set, + [EnumMember(Value = "remove")] + Remove + } + internal static class SensitivityLabelUpdateKindEnumExtension + { + internal static string ToSerializedValue(this SensitivityLabelUpdateKind? value) + { + return value == null ? null : ((SensitivityLabelUpdateKind)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this SensitivityLabelUpdateKind value) + { + switch( value ) + { + case SensitivityLabelUpdateKind.Set: + return "set"; + case SensitivityLabelUpdateKind.Remove: + return "remove"; + } + return null; + } + + internal static SensitivityLabelUpdateKind? ParseSensitivityLabelUpdateKind(this string value) + { + switch( value ) + { + case "set": + return SensitivityLabelUpdateKind.Set; + case "remove": + return SensitivityLabelUpdateKind.Remove; + } + return null; + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorContract.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateList.cs similarity index 57% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorContract.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateList.cs index 8bc001a77f8e..ab265f2aa725 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ErrorContract.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateList.cs @@ -11,31 +11,29 @@ namespace Microsoft.Azure.Management.Synapse.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// - /// Error details. + /// A list of sensitivity label update operations. /// - /// - /// Contains details when the response code indicates an error. - /// - public partial class ErrorContract + public partial class SensitivityLabelUpdateList { /// - /// Initializes a new instance of the ErrorContract class. + /// Initializes a new instance of the SensitivityLabelUpdateList class. /// - public ErrorContract() + public SensitivityLabelUpdateList() { CustomInit(); } /// - /// Initializes a new instance of the ErrorContract class. + /// Initializes a new instance of the SensitivityLabelUpdateList class. /// - /// The error details. - public ErrorContract(ErrorResponse error = default(ErrorResponse)) + public SensitivityLabelUpdateList(IList operations = default(IList)) { - Error = error; + Operations = operations; CustomInit(); } @@ -45,10 +43,9 @@ public ErrorContract() partial void CustomInit(); /// - /// Gets or sets the error details. /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } + [JsonProperty(PropertyName = "operations")] + public IList Operations { get; set; } } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ServerKeyType.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ServerKeyType.cs new file mode 100644 index 000000000000..156fb428b3f1 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ServerKeyType.cs @@ -0,0 +1,22 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for ServerKeyType. + /// + public static class ServerKeyType + { + public const string ServiceManaged = "ServiceManaged"; + public const string AzureKeyVault = "AzureKeyVault"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Sku.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Sku.cs index 6f5452788f7c..46daf39eb759 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Sku.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Sku.cs @@ -10,13 +10,15 @@ namespace Microsoft.Azure.Management.Synapse.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; /// - /// An ARM Resource SKU. + /// Sku /// + /// + /// SQL pool SKU + /// public partial class Sku { /// @@ -30,14 +32,16 @@ public Sku() /// /// Initializes a new instance of the Sku class. /// - /// The name of the SKU, typically, a letter + - /// Number code, e.g. P3. - /// The tier or edition of the particular SKU, e.g. - /// Basic, Premium. - public Sku(string name, string tier = default(string)) + /// The service tier + /// The SKU name + /// If the SKU supports scale out/in then the + /// capacity integer should be included. If scale out/in is not + /// possible for the resource this may be omitted. + public Sku(string tier = default(string), string name = default(string), int? capacity = default(int?)) { - Name = name; Tier = tier; + Name = name; + Capacity = capacity; CustomInit(); } @@ -47,31 +51,24 @@ public Sku() partial void CustomInit(); /// - /// Gets or sets the name of the SKU, typically, a letter + Number - /// code, e.g. P3. + /// Gets or sets the service tier /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [JsonProperty(PropertyName = "tier")] + public string Tier { get; set; } /// - /// Gets or sets the tier or edition of the particular SKU, e.g. Basic, - /// Premium. + /// Gets or sets the SKU name /// - [JsonProperty(PropertyName = "tier")] - public string Tier { get; set; } + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } /// - /// Validate the object. + /// Gets or sets if the SKU supports scale out/in then the capacity + /// integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - } + [JsonProperty(PropertyName = "capacity")] + public int? Capacity { get; set; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlDatabase.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlDatabase.cs deleted file mode 100644 index b451e64c02e4..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlDatabase.cs +++ /dev/null @@ -1,109 +0,0 @@ -// -// 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.Synapse.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A sql database resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class SqlDatabase : TrackedResource - { - /// - /// Initializes a new instance of the SqlDatabase class. - /// - public SqlDatabase() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SqlDatabase class. - /// - /// The geo-location where the resource - /// lives - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Resource tags. - /// SystemData of SqlDatabase. - /// The collation of the database. - /// The max size of the database expressed - /// in bytes. - /// The Guid of the database. - /// Status of the database. - public SqlDatabase(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), string collation = default(string), long? maxSizeBytes = default(long?), System.Guid? databaseGuid = default(System.Guid?), string status = default(string)) - : base(location, id, name, type, tags) - { - SystemData = systemData; - Collation = collation; - MaxSizeBytes = maxSizeBytes; - DatabaseGuid = databaseGuid; - Status = status; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets systemData of SqlDatabase. - /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; private set; } - - /// - /// Gets or sets the collation of the database. - /// - [JsonProperty(PropertyName = "properties.collation")] - public string Collation { get; set; } - - /// - /// Gets or sets the max size of the database expressed in bytes. - /// - [JsonProperty(PropertyName = "properties.maxSizeBytes")] - public long? MaxSizeBytes { get; set; } - - /// - /// Gets the Guid of the database. - /// - [JsonProperty(PropertyName = "properties.databaseGuid")] - public System.Guid? DatabaseGuid { get; private set; } - - /// - /// Gets status of the database. - /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlDatabaseUpdate.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlDatabaseUpdate.cs deleted file mode 100644 index ae300852dc52..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlDatabaseUpdate.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// 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.Synapse.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A sql database resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class SqlDatabaseUpdate - { - /// - /// Initializes a new instance of the SqlDatabaseUpdate class. - /// - public SqlDatabaseUpdate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SqlDatabaseUpdate class. - /// - /// The collation of the database. - /// The max size of the database expressed - /// in bytes. - /// The Guid of the database. - /// Status of the database. - /// Resource tags. - public SqlDatabaseUpdate(string collation = default(string), long? maxSizeBytes = default(long?), System.Guid? databaseGuid = default(System.Guid?), string status = default(string), IDictionary tags = default(IDictionary)) - { - Collation = collation; - MaxSizeBytes = maxSizeBytes; - DatabaseGuid = databaseGuid; - Status = status; - Tags = tags; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the collation of the database. - /// - [JsonProperty(PropertyName = "properties.collation")] - public string Collation { get; set; } - - /// - /// Gets or sets the max size of the database expressed in bytes. - /// - [JsonProperty(PropertyName = "properties.maxSizeBytes")] - public long? MaxSizeBytes { get; set; } - - /// - /// Gets the Guid of the database. - /// - [JsonProperty(PropertyName = "properties.databaseGuid")] - public System.Guid? DatabaseGuid { get; private set; } - - /// - /// Gets status of the database. - /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; private set; } - - /// - /// Gets or sets resource tags. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPool.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPool.cs index ffaf842f4e4c..2c0070770f04 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPool.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPool.cs @@ -58,7 +58,10 @@ public SqlPool() /// Snapshot time to restore /// What is this? /// Date the SQL pool was created - public SqlPool(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), long? maxSizeBytes = default(long?), string collation = default(string), string sourceDatabaseId = default(string), string recoverableDatabaseId = default(string), string provisioningState = default(string), string status = default(string), string restorePointInTime = default(string), string createMode = default(string), System.DateTime? creationDate = default(System.DateTime?)) + /// The storage account type used to + /// store backups for this sql pool. Possible values include: 'GRS', + /// 'LRS', 'ZRS' + public SqlPool(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), long? maxSizeBytes = default(long?), string collation = default(string), string sourceDatabaseId = default(string), string recoverableDatabaseId = default(string), string provisioningState = default(string), string status = default(string), string restorePointInTime = default(string), string createMode = default(string), System.DateTime? creationDate = default(System.DateTime?), string storageAccountType = default(string)) : base(location, id, name, type, tags) { Sku = sku; @@ -71,6 +74,7 @@ public SqlPool() RestorePointInTime = restorePointInTime; CreateMode = createMode; CreationDate = creationDate; + StorageAccountType = storageAccountType; CustomInit(); } @@ -139,6 +143,13 @@ public SqlPool() [JsonProperty(PropertyName = "properties.creationDate")] public System.DateTime? CreationDate { get; set; } + /// + /// Gets or sets the storage account type used to store backups for + /// this sql pool. Possible values include: 'GRS', 'LRS', 'ZRS' + /// + [JsonProperty(PropertyName = "properties.storageAccountType")] + public string StorageAccountType { get; set; } + /// /// Validate the object. /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolColumn.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolColumn.cs index d6855d12700c..d27df5410cc6 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolColumn.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolColumn.cs @@ -46,10 +46,13 @@ public SqlPoolColumn() /// 'bigint', 'hierarchyid', 'geometry', 'geography', 'varbinary', /// 'varchar', 'binary', 'char', 'timestamp', 'nvarchar', 'nchar', /// 'xml', 'sysname' - public SqlPoolColumn(string id = default(string), string name = default(string), string type = default(string), string columnType = default(string)) + /// Indicates whether column value is computed + /// or not + public SqlPoolColumn(string id = default(string), string name = default(string), string type = default(string), string columnType = default(string), bool? isComputed = default(bool?)) : base(id, name, type) { ColumnType = columnType; + IsComputed = isComputed; CustomInit(); } @@ -70,5 +73,11 @@ public SqlPoolColumn() [JsonProperty(PropertyName = "properties.columnType")] public string ColumnType { get; set; } + /// + /// Gets indicates whether column value is computed or not + /// + [JsonProperty(PropertyName = "properties.isComputed")] + public bool? IsComputed { get; private set; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolPatchInfo.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolPatchInfo.cs index e7548e4647d7..eb08db0c243d 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolPatchInfo.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolPatchInfo.cs @@ -52,7 +52,10 @@ public SqlPoolPatchInfo() /// Snapshot time to restore /// What is this? /// Date the SQL pool was created - public SqlPoolPatchInfo(IDictionary tags = default(IDictionary), string location = default(string), Sku sku = default(Sku), long? maxSizeBytes = default(long?), string collation = default(string), string sourceDatabaseId = default(string), string recoverableDatabaseId = default(string), string provisioningState = default(string), string status = default(string), string restorePointInTime = default(string), string createMode = default(string), System.DateTime? creationDate = default(System.DateTime?)) + /// The storage account type used to + /// store backups for this sql pool. Possible values include: 'GRS', + /// 'LRS', 'ZRS' + public SqlPoolPatchInfo(IDictionary tags = default(IDictionary), string location = default(string), Sku sku = default(Sku), long? maxSizeBytes = default(long?), string collation = default(string), string sourceDatabaseId = default(string), string recoverableDatabaseId = default(string), string provisioningState = default(string), string status = default(string), string restorePointInTime = default(string), string createMode = default(string), System.DateTime? creationDate = default(System.DateTime?), string storageAccountType = default(string)) { Tags = tags; Location = location; @@ -66,6 +69,7 @@ public SqlPoolPatchInfo() RestorePointInTime = restorePointInTime; CreateMode = createMode; CreationDate = creationDate; + StorageAccountType = storageAccountType; CustomInit(); } @@ -146,5 +150,12 @@ public SqlPoolPatchInfo() [JsonProperty(PropertyName = "properties.creationDate")] public System.DateTime? CreationDate { get; set; } + /// + /// Gets or sets the storage account type used to store backups for + /// this sql pool. Possible values include: 'GRS', 'LRS', 'ZRS' + /// + [JsonProperty(PropertyName = "properties.storageAccountType")] + public string StorageAccountType { get; set; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolStatus.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolStatus.cs deleted file mode 100644 index 11ae239a50c9..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolStatus.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// 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.Synapse.Models -{ - - /// - /// Defines values for SqlPoolStatus. - /// - public static class SqlPoolStatus - { - public const string Invisible = "Invisible"; - public const string Online = "Online"; - public const string Offline = "Offline"; - public const string Creating = "Creating"; - public const string Inaccessible = "Inaccessible"; - public const string Pausing = "Pausing"; - public const string Paused = "Paused"; - public const string Resuming = "Resuming"; - public const string Scaling = "Scaling"; - public const string Dropping = "Dropping"; - public const string Error = "Error"; - public const string Unknown = "Unknown"; - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolUpdate.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolUpdate.cs deleted file mode 100644 index 11fd076fab78..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolUpdate.cs +++ /dev/null @@ -1,117 +0,0 @@ -// -// 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.Synapse.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A sql pool resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class SqlPoolUpdate - { - /// - /// Initializes a new instance of the SqlPoolUpdate class. - /// - public SqlPoolUpdate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SqlPoolUpdate class. - /// - /// The name and tier of the SKU. - /// The status of the sql pool. Possible values - /// include: 'Invisible', 'Online', 'Offline', 'Creating', - /// 'Inaccessible', 'Pausing', 'Paused', 'Resuming', 'Scaling', - /// 'Dropping', 'Error', 'Unknown' - /// The Guid of the sql pool. - /// The current service level - /// objective name of the sql pool. - /// The requested service - /// level objective name of the sql pool. - /// Resource tags. - public SqlPoolUpdate(Sku sku = default(Sku), string status = default(string), System.Guid? sqlPoolGuid = default(System.Guid?), string currentServiceObjectiveName = default(string), string requestedServiceObjectiveName = default(string), IDictionary tags = default(IDictionary)) - { - Sku = sku; - Status = status; - SqlPoolGuid = sqlPoolGuid; - CurrentServiceObjectiveName = currentServiceObjectiveName; - RequestedServiceObjectiveName = requestedServiceObjectiveName; - Tags = tags; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name and tier of the SKU. - /// - [JsonProperty(PropertyName = "sku")] - public Sku Sku { get; set; } - - /// - /// Gets the status of the sql pool. Possible values include: - /// 'Invisible', 'Online', 'Offline', 'Creating', 'Inaccessible', - /// 'Pausing', 'Paused', 'Resuming', 'Scaling', 'Dropping', 'Error', - /// 'Unknown' - /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; private set; } - - /// - /// Gets the Guid of the sql pool. - /// - [JsonProperty(PropertyName = "properties.sqlPoolGuid")] - public System.Guid? SqlPoolGuid { get; private set; } - - /// - /// Gets the current service level objective name of the sql pool. - /// - [JsonProperty(PropertyName = "properties.currentServiceObjectiveName")] - public string CurrentServiceObjectiveName { get; private set; } - - /// - /// Gets the requested service level objective name of the sql pool. - /// - [JsonProperty(PropertyName = "properties.requestedServiceObjectiveName")] - public string RequestedServiceObjectiveName { get; private set; } - - /// - /// Gets or sets resource tags. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Sku != null) - { - Sku.Validate(); - } - } - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolV3.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolV3.cs deleted file mode 100644 index 7711c394d48e..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolV3.cs +++ /dev/null @@ -1,138 +0,0 @@ -// -// 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.Synapse.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A sql pool resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class SqlPoolV3 : TrackedResource - { - /// - /// Initializes a new instance of the SqlPoolV3 class. - /// - public SqlPoolV3() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SqlPoolV3 class. - /// - /// The geo-location where the resource - /// lives - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Resource tags. - /// The sql pool SKU. The list of SKUs may vary by - /// region and support offer. - /// Kind of SqlPool. - /// SystemData of SqlPool. - /// The status of the sql pool. Possible values - /// include: 'Invisible', 'Online', 'Offline', 'Creating', - /// 'Inaccessible', 'Pausing', 'Paused', 'Resuming', 'Scaling', - /// 'Dropping', 'Error', 'Unknown' - /// The Guid of the sql pool. - /// The current service level - /// objective name of the sql pool. - /// The requested service - /// level objective name of the sql pool. - public SqlPoolV3(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string kind = default(string), SystemData systemData = default(SystemData), string status = default(string), System.Guid? sqlPoolGuid = default(System.Guid?), string currentServiceObjectiveName = default(string), string requestedServiceObjectiveName = default(string)) - : base(location, id, name, type, tags) - { - Sku = sku; - Kind = kind; - SystemData = systemData; - Status = status; - SqlPoolGuid = sqlPoolGuid; - CurrentServiceObjectiveName = currentServiceObjectiveName; - RequestedServiceObjectiveName = requestedServiceObjectiveName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the sql pool SKU. The list of SKUs may vary by region - /// and support offer. - /// - [JsonProperty(PropertyName = "sku")] - public Sku Sku { get; set; } - - /// - /// Gets kind of SqlPool. - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; private set; } - - /// - /// Gets systemData of SqlPool. - /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; private set; } - - /// - /// Gets the status of the sql pool. Possible values include: - /// 'Invisible', 'Online', 'Offline', 'Creating', 'Inaccessible', - /// 'Pausing', 'Paused', 'Resuming', 'Scaling', 'Dropping', 'Error', - /// 'Unknown' - /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; private set; } - - /// - /// Gets the Guid of the sql pool. - /// - [JsonProperty(PropertyName = "properties.sqlPoolGuid")] - public System.Guid? SqlPoolGuid { get; private set; } - - /// - /// Gets the current service level objective name of the sql pool. - /// - [JsonProperty(PropertyName = "properties.currentServiceObjectiveName")] - public string CurrentServiceObjectiveName { get; private set; } - - /// - /// Gets the requested service level objective name of the sql pool. - /// - [JsonProperty(PropertyName = "properties.requestedServiceObjectiveName")] - public string RequestedServiceObjectiveName { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (Sku != null) - { - Sku.Validate(); - } - } - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/StorageAccountType.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/StorageAccountType.cs new file mode 100644 index 000000000000..8f3102a51a6a --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/StorageAccountType.cs @@ -0,0 +1,23 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for StorageAccountType. + /// + public static class StorageAccountType + { + public const string GRS = "GRS"; + public const string LRS = "LRS"; + public const string ZRS = "ZRS"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SystemData.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SystemData.cs deleted file mode 100644 index 46993a5f4925..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SystemData.cs +++ /dev/null @@ -1,109 +0,0 @@ -// -// 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.Synapse.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Linq; - - /// - /// ARM System Data. - /// - public partial class SystemData : IResource - { - /// - /// Initializes a new instance of the SystemData class. - /// - public SystemData() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SystemData class. - /// - /// A string identifier for the identity that - /// created the resource. - /// The type of identity that created the - /// resource: <User|Application|ManagedIdentity|Key>. Possible - /// values include: 'User', 'Application', 'ManagedIdentity', - /// 'Key' - /// The timestamp of resource creation - /// (UTC). - /// A string identifier for the identity - /// that last modified the resource. - /// The type of identity that last - /// modified the resource: - /// <User|Application|ManagedIdentity|Key>. Possible values - /// include: 'User', 'Application', 'ManagedIdentity', 'Key' - /// The timestamp of last modification - /// (UTC). - public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) - { - CreatedBy = createdBy; - CreatedByType = createdByType; - CreatedAt = createdAt; - LastModifiedBy = lastModifiedBy; - LastModifiedByType = lastModifiedByType; - LastModifiedAt = lastModifiedAt; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets a string identifier for the identity that created the - /// resource. - /// - [JsonProperty(PropertyName = "createdBy")] - public string CreatedBy { get; private set; } - - /// - /// Gets the type of identity that created the resource: - /// &lt;User|Application|ManagedIdentity|Key&gt;. Possible - /// values include: 'User', 'Application', 'ManagedIdentity', 'Key' - /// - [JsonProperty(PropertyName = "createdByType")] - public string CreatedByType { get; private set; } - - /// - /// Gets the timestamp of resource creation (UTC). - /// - [JsonProperty(PropertyName = "createdAt")] - public System.DateTime? CreatedAt { get; private set; } - - /// - /// Gets a string identifier for the identity that last modified the - /// resource. - /// - [JsonProperty(PropertyName = "lastModifiedBy")] - public string LastModifiedBy { get; private set; } - - /// - /// Gets the type of identity that last modified the resource: - /// &lt;User|Application|ManagedIdentity|Key&gt;. Possible - /// values include: 'User', 'Application', 'ManagedIdentity', 'Key' - /// - [JsonProperty(PropertyName = "lastModifiedByType")] - public string LastModifiedByType { get; private set; } - - /// - /// Gets the timestamp of last modification (UTC). - /// - [JsonProperty(PropertyName = "lastModifiedAt")] - public System.DateTime? LastModifiedAt { get; private set; } - - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Workspace.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Workspace.cs index 957c8e2e343d..668cc527a3cf 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Workspace.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Workspace.cs @@ -73,8 +73,9 @@ public Workspace() /// Git integration /// settings /// Purview Configuration + /// The ADLA resource ID. /// Identity of the workspace - public Workspace(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), DataLakeStorageAccountDetails defaultDataLakeStorage = default(DataLakeStorageAccountDetails), string sqlAdministratorLoginPassword = default(string), string managedResourceGroupName = default(string), string provisioningState = default(string), string sqlAdministratorLogin = default(string), VirtualNetworkProfile virtualNetworkProfile = default(VirtualNetworkProfile), IDictionary connectivityEndpoints = default(IDictionary), string managedVirtualNetwork = default(string), IList privateEndpointConnections = default(IList), EncryptionDetails encryption = default(EncryptionDetails), System.Guid? workspaceUID = default(System.Guid?), IDictionary extraProperties = default(IDictionary), ManagedVirtualNetworkSettings managedVirtualNetworkSettings = default(ManagedVirtualNetworkSettings), WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration = default(WorkspaceRepositoryConfiguration), PurviewConfiguration purviewConfiguration = default(PurviewConfiguration), ManagedIdentity identity = default(ManagedIdentity)) + public Workspace(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), DataLakeStorageAccountDetails defaultDataLakeStorage = default(DataLakeStorageAccountDetails), string sqlAdministratorLoginPassword = default(string), string managedResourceGroupName = default(string), string provisioningState = default(string), string sqlAdministratorLogin = default(string), VirtualNetworkProfile virtualNetworkProfile = default(VirtualNetworkProfile), IDictionary connectivityEndpoints = default(IDictionary), string managedVirtualNetwork = default(string), IList privateEndpointConnections = default(IList), EncryptionDetails encryption = default(EncryptionDetails), System.Guid? workspaceUID = default(System.Guid?), IDictionary extraProperties = default(IDictionary), ManagedVirtualNetworkSettings managedVirtualNetworkSettings = default(ManagedVirtualNetworkSettings), WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration = default(WorkspaceRepositoryConfiguration), PurviewConfiguration purviewConfiguration = default(PurviewConfiguration), string adlaResourceId = default(string), ManagedIdentity identity = default(ManagedIdentity)) : base(location, id, name, type, tags) { DefaultDataLakeStorage = defaultDataLakeStorage; @@ -92,6 +93,7 @@ public Workspace() ManagedVirtualNetworkSettings = managedVirtualNetworkSettings; WorkspaceRepositoryConfiguration = workspaceRepositoryConfiguration; PurviewConfiguration = purviewConfiguration; + AdlaResourceId = adlaResourceId; Identity = identity; CustomInit(); } @@ -198,6 +200,12 @@ public Workspace() [JsonProperty(PropertyName = "properties.purviewConfiguration")] public PurviewConfiguration PurviewConfiguration { get; set; } + /// + /// Gets the ADLA resource ID. + /// + [JsonProperty(PropertyName = "properties.adlaResourceId")] + public string AdlaResourceId { get; private set; } + /// /// Gets or sets identity of the workspace /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/WorkspaceRepositoryConfiguration.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/WorkspaceRepositoryConfiguration.cs index ab97da560b46..1e5aafbeb51b 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/WorkspaceRepositoryConfiguration.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/WorkspaceRepositoryConfiguration.cs @@ -42,7 +42,9 @@ public WorkspaceRepositoryConfiguration() /// Collaboration branch /// Root folder to use in the /// repository - public WorkspaceRepositoryConfiguration(string type = default(string), string hostName = default(string), string accountName = default(string), string projectName = default(string), string repositoryName = default(string), string collaborationBranch = default(string), string rootFolder = default(string)) + /// The last commit ID + /// The VSTS tenant ID + public WorkspaceRepositoryConfiguration(string type = default(string), string hostName = default(string), string accountName = default(string), string projectName = default(string), string repositoryName = default(string), string collaborationBranch = default(string), string rootFolder = default(string), string lastCommitId = default(string), System.Guid? tenantId = default(System.Guid?)) { Type = type; HostName = hostName; @@ -51,6 +53,8 @@ public WorkspaceRepositoryConfiguration() RepositoryName = repositoryName; CollaborationBranch = collaborationBranch; RootFolder = rootFolder; + LastCommitId = lastCommitId; + TenantId = tenantId; CustomInit(); } @@ -103,5 +107,17 @@ public WorkspaceRepositoryConfiguration() [JsonProperty(PropertyName = "rootFolder")] public string RootFolder { get; set; } + /// + /// Gets or sets the last commit ID + /// + [JsonProperty(PropertyName = "lastCommitId")] + public string LastCommitId { get; set; } + + /// + /// Gets or sets the VSTS tenant ID + /// + [JsonProperty(PropertyName = "tenantId")] + public System.Guid? TenantId { get; set; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Operations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Operations.cs index f791880cefa0..973190da2d18 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Operations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Operations.cs @@ -65,7 +65,7 @@ internal Operations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -194,11 +194,11 @@ internal Operations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -266,7 +266,7 @@ internal Operations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -351,11 +351,11 @@ internal Operations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -432,7 +432,7 @@ internal Operations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -580,11 +580,11 @@ internal Operations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -643,7 +643,7 @@ internal Operations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -794,11 +794,11 @@ internal Operations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 404) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateEndpointConnectionsOperations.cs index 85b69fafe152..e18fa98c4612 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateEndpointConnectionsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateEndpointConnectionsOperations.cs @@ -68,7 +68,7 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -219,11 +219,11 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -347,7 +347,7 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -492,11 +492,11 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -573,7 +573,7 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -735,11 +735,11 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -831,7 +831,7 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -982,11 +982,11 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1054,7 +1054,7 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1150,11 +1150,11 @@ internal PrivateEndpointConnectionsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateEndpointConnectionsPrivateLinkHubOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateEndpointConnectionsPrivateLinkHubOperations.cs index c1087524c909..67386f60459d 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateEndpointConnectionsPrivateLinkHubOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateEndpointConnectionsPrivateLinkHubOperations.cs @@ -65,7 +65,7 @@ internal PrivateEndpointConnectionsPrivateLinkHubOperations(SynapseManagementCli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -210,11 +210,11 @@ internal PrivateEndpointConnectionsPrivateLinkHubOperations(SynapseManagementCli string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -282,7 +282,7 @@ internal PrivateEndpointConnectionsPrivateLinkHubOperations(SynapseManagementCli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -378,11 +378,11 @@ internal PrivateEndpointConnectionsPrivateLinkHubOperations(SynapseManagementCli string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlV3Operations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperations.cs similarity index 81% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlV3Operations.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperations.cs index 40607db2e4a3..de43bc7b73a9 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlV3Operations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Synapse using System.Threading.Tasks; /// - /// SqlV3Operations operations. + /// PrivateLinkHubPrivateLinkResourcesOperations operations. /// - internal partial class SqlV3Operations : IServiceOperations, ISqlV3Operations + internal partial class PrivateLinkHubPrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkHubPrivateLinkResourcesOperations { /// - /// Initializes a new instance of the SqlV3Operations class. + /// Initializes a new instance of the PrivateLinkHubPrivateLinkResourcesOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class SqlV3Operations : IServiceOperations /// Thrown when a required parameter is null /// - internal SqlV3Operations(SynapseSqlV3ManagementClient client) + internal PrivateLinkHubPrivateLinkResourcesOperations(SynapseManagementClient client) { if (client == null) { @@ -46,33 +46,90 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) } /// - /// Gets a reference to the SynapseSqlV3ManagementClient + /// Gets a reference to the SynapseManagementClient /// - public SynapseSqlV3ManagementClient Client { get; private set; } + public SynapseManagementClient Client { get; private set; } /// - /// All operations + /// Private Link Resources /// /// - /// Get all available operations + /// Get all private link resources for a private link hub /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// /// /// 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>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string privateLinkHubName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (privateLinkHubName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkHubName"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -80,13 +137,22 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("privateLinkHubName", privateLinkHubName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Synapse/operations").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{privateLinkHubName}", System.Uri.EscapeDataString(privateLinkHubName)); List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -147,11 +213,11 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -175,7 +241,7 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient 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")) @@ -188,7 +254,7 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient 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) { @@ -208,19 +274,19 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) } /// - /// Get operation result + /// Get Private Link Hub Private Link Resource /// /// - /// Get the result of an operation + /// Get private link resource in private link hub /// /// /// The name of the resource group. The name is case insensitive. /// - /// - /// The name of the workspace. + /// + /// The name of the private link hub /// - /// - /// Operation ID + /// + /// The name of the private link resource /// /// /// Headers that will be added to request. @@ -228,9 +294,12 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) /// /// 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 /// @@ -240,7 +309,7 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task GetLocationHeaderResultWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string privateLinkHubName, string privateLinkResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -283,13 +352,13 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (workspaceName == null) + if (privateLinkHubName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkHubName"); } - if (operationId == null) + if (privateLinkResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkResourceName"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -299,18 +368,18 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("privateLinkHubName", privateLinkHubName); + tracingParameters.Add("privateLinkResourceName", privateLinkResourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetLocationHeaderResult", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", 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.Synapse/workspaces/{workspaceName}/operationResults/{operationId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources/{privateLinkResourceName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{privateLinkHubName}", System.Uri.EscapeDataString(privateLinkHubName)); + _url = _url.Replace("{privateLinkResourceName}", System.Uri.EscapeDataString(privateLinkResourceName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -374,13 +443,13 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -404,13 +473,31 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -419,19 +506,13 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) } /// - /// Get operation status + /// Private Link Resources /// /// - /// Get the status of an operation + /// Get all private link resources for a private link hub /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Operation ID + /// + /// The NextLink from the previous successful call to List operation. /// /// /// Headers that will be added to request. @@ -439,7 +520,7 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -454,56 +535,11 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAzureAsyncHeaderResultWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (operationId == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -512,24 +548,14 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("operationId", operationId); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAzureAsyncHeaderResult", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", 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.Synapse/workspaces/{workspaceName}/operationStatuses/{operationId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -590,11 +616,11 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -618,7 +644,7 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient 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")) @@ -631,7 +657,7 @@ internal SqlV3Operations(SynapseSqlV3ManagementClient 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) { diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperationsExtensions.cs new file mode 100644 index 000000000000..506c8c1fa553 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperationsExtensions.cs @@ -0,0 +1,163 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateLinkHubPrivateLinkResourcesOperations. + /// + public static partial class PrivateLinkHubPrivateLinkResourcesOperationsExtensions + { + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + public static IPage List(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string resourceGroupName, string privateLinkHubName) + { + return operations.ListAsync(resourceGroupName, privateLinkHubName).GetAwaiter().GetResult(); + } + + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string resourceGroupName, string privateLinkHubName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, privateLinkHubName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get Private Link Hub Private Link Resource + /// + /// + /// Get private link resource in private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// The name of the private link resource + /// + public static PrivateLinkResource Get(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string resourceGroupName, string privateLinkHubName, string privateLinkResourceName) + { + return operations.GetAsync(resourceGroupName, privateLinkHubName, privateLinkResourceName).GetAwaiter().GetResult(); + } + + /// + /// Get Private Link Hub Private Link Resource + /// + /// + /// Get private link resource in private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// The name of the private link resource + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string resourceGroupName, string privateLinkHubName, string privateLinkResourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, privateLinkHubName, privateLinkResourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubsOperations.cs index e341efd48b7f..9b6d0ee588af 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubsOperations.cs @@ -62,7 +62,7 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -201,11 +201,11 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -276,7 +276,7 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -421,11 +421,11 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -499,7 +499,7 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -655,11 +655,11 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -751,7 +751,7 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -911,11 +911,11 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1020,7 +1020,7 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1138,11 +1138,11 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1213,7 +1213,7 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1355,11 +1355,11 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1409,7 +1409,7 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1505,11 +1505,11 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1577,7 +1577,7 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1673,11 +1673,11 @@ internal PrivateLinkHubsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkResourcesOperations.cs index 0fd1306c42d5..91d34ab9dabb 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkResourcesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkResourcesOperations.cs @@ -68,7 +68,7 @@ internal PrivateLinkResourcesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -213,11 +213,11 @@ internal PrivateLinkResourcesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -294,7 +294,7 @@ internal PrivateLinkResourcesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -445,11 +445,11 @@ internal PrivateLinkResourcesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -520,7 +520,7 @@ internal PrivateLinkResourcesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -616,11 +616,11 @@ internal PrivateLinkResourcesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/RestorableDroppedSqlPoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/RestorableDroppedSqlPoolsOperations.cs index 57d2c93a6a76..11ab34384d3a 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/RestorableDroppedSqlPoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/RestorableDroppedSqlPoolsOperations.cs @@ -69,7 +69,7 @@ internal RestorableDroppedSqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -220,11 +220,11 @@ internal RestorableDroppedSqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -295,7 +295,7 @@ internal RestorableDroppedSqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -440,11 +440,11 @@ internal RestorableDroppedSqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs index 325b80826114..a51405019d04 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs @@ -19,73 +19,67 @@ public static IEnumerable> ApiInfo_SynapseManageme { return new Tuple[] { - new Tuple("Synapse", "BigDataPools", "2019-06-01-preview"), - new Tuple("Synapse", "DataMaskingPolicies", "2019-06-01-preview"), - new Tuple("Synapse", "DataMaskingRules", "2019-06-01-preview"), - new Tuple("Synapse", "ExtendedSqlPoolBlobAuditingPolicies", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimeAuthKeys", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimeConnectionInfos", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimeCredentials", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimeMonitoringData", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimeNodeIpAddress", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimeNodes", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimeObjectMetadata", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimeStatus", "2019-06-01-preview"), - new Tuple("Synapse", "IntegrationRuntimes", "2019-06-01-preview"), - new Tuple("Synapse", "IpFirewallRules", "2019-06-01-preview"), - new Tuple("Synapse", "Keys", "2019-06-01-preview"), - new Tuple("Synapse", "Operations", "2019-06-01-preview"), - new Tuple("Synapse", "PrivateEndpointConnections", "2019-06-01-preview"), - new Tuple("Synapse", "PrivateEndpointConnectionsPrivateLinkHub", "2019-06-01-preview"), - new Tuple("Synapse", "PrivateLinkHubs", "2019-06-01-preview"), - new Tuple("Synapse", "PrivateLinkResources", "2019-06-01-preview"), - new Tuple("Synapse", "RestorableDroppedSqlPools", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolBlobAuditingPolicies", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolColumns", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolConnectionPolicies", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolDataWarehouseUserActivities", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolGeoBackupPolicies", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolMetadataSyncConfigs", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolOperationResults", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolOperations", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolReplicationLinks", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolRestorePoints", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolSchemas", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolSecurityAlertPolicies", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolSensitivityLabels", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolTableColumns", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolTables", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolTransparentDataEncryptions", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolUsages", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolVulnerabilityAssessmentRuleBaselines", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolVulnerabilityAssessmentScans", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolVulnerabilityAssessments", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolWorkloadClassifier", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPoolWorkloadGroup", "2019-06-01-preview"), - new Tuple("Synapse", "SqlPools", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceAadAdmins", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceManagedIdentitySqlControlSettings", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceManagedSqlServerBlobAuditingPolicies", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceManagedSqlServerExtendedBlobAuditingPolicies", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceManagedSqlServerRecoverableSqlPools", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceManagedSqlServerRecoverableSqlpools", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceManagedSqlServerSecurityAlertPolicy", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceManagedSqlServerUsages", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceManagedSqlServerVulnerabilityAssessments", "2019-06-01-preview"), - new Tuple("Synapse", "WorkspaceSqlAadAdmins", "2019-06-01-preview"), - new Tuple("Synapse", "Workspaces", "2019-06-01-preview"), + new Tuple("Synapse", "BigDataPools", "2020-12-01"), + new Tuple("Synapse", "DataMaskingPolicies", "2020-12-01"), + new Tuple("Synapse", "DataMaskingRules", "2020-12-01"), + new Tuple("Synapse", "ExtendedSqlPoolBlobAuditingPolicies", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimeAuthKeys", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimeConnectionInfos", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimeCredentials", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimeMonitoringData", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimeNodeIpAddress", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimeNodes", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimeObjectMetadata", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimeStatus", "2020-12-01"), + new Tuple("Synapse", "IntegrationRuntimes", "2020-12-01"), + new Tuple("Synapse", "IpFirewallRules", "2020-12-01"), + new Tuple("Synapse", "Keys", "2020-12-01"), + new Tuple("Synapse", "Operations", "2020-12-01"), + new Tuple("Synapse", "PrivateEndpointConnections", "2020-12-01"), + new Tuple("Synapse", "PrivateEndpointConnectionsPrivateLinkHub", "2020-12-01"), + new Tuple("Synapse", "PrivateLinkHubPrivateLinkResources", "2020-12-01"), + new Tuple("Synapse", "PrivateLinkHubs", "2020-12-01"), + new Tuple("Synapse", "PrivateLinkResources", "2020-12-01"), + new Tuple("Synapse", "RestorableDroppedSqlPools", "2020-12-01"), + new Tuple("Synapse", "SqlPoolBlobAuditingPolicies", "2020-12-01"), + new Tuple("Synapse", "SqlPoolColumns", "2020-12-01"), + new Tuple("Synapse", "SqlPoolConnectionPolicies", "2020-12-01"), + new Tuple("Synapse", "SqlPoolDataWarehouseUserActivities", "2020-12-01"), + new Tuple("Synapse", "SqlPoolGeoBackupPolicies", "2020-12-01"), + new Tuple("Synapse", "SqlPoolMaintenanceWindowOptions", "2020-12-01"), + new Tuple("Synapse", "SqlPoolMaintenanceWindows", "2020-12-01"), + new Tuple("Synapse", "SqlPoolMetadataSyncConfigs", "2020-12-01"), + new Tuple("Synapse", "SqlPoolOperationResults", "2020-12-01"), + new Tuple("Synapse", "SqlPoolOperations", "2020-12-01"), + new Tuple("Synapse", "SqlPoolRecommendedSensitivityLabels", "2020-12-01"), + new Tuple("Synapse", "SqlPoolReplicationLinks", "2020-12-01"), + new Tuple("Synapse", "SqlPoolRestorePoints", "2020-12-01"), + new Tuple("Synapse", "SqlPoolSchemas", "2020-12-01"), + new Tuple("Synapse", "SqlPoolSecurityAlertPolicies", "2020-12-01"), + new Tuple("Synapse", "SqlPoolSensitivityLabels", "2020-12-01"), + new Tuple("Synapse", "SqlPoolTableColumns", "2020-12-01"), + new Tuple("Synapse", "SqlPoolTables", "2020-12-01"), + new Tuple("Synapse", "SqlPoolTransparentDataEncryptions", "2020-12-01"), + new Tuple("Synapse", "SqlPoolUsages", "2020-12-01"), + new Tuple("Synapse", "SqlPoolVulnerabilityAssessmentRuleBaselines", "2020-12-01"), + new Tuple("Synapse", "SqlPoolVulnerabilityAssessmentScans", "2020-12-01"), + new Tuple("Synapse", "SqlPoolVulnerabilityAssessments", "2020-12-01"), + new Tuple("Synapse", "SqlPoolWorkloadClassifier", "2020-12-01"), + new Tuple("Synapse", "SqlPoolWorkloadGroup", "2020-12-01"), + new Tuple("Synapse", "SqlPools", "2020-12-01"), + new Tuple("Synapse", "WorkspaceAadAdmins", "2020-12-01"), + new Tuple("Synapse", "WorkspaceManagedIdentitySqlControlSettings", "2020-12-01"), + new Tuple("Synapse", "WorkspaceManagedSqlServerBlobAuditingPolicies", "2020-12-01"), + new Tuple("Synapse", "WorkspaceManagedSqlServerEncryptionProtector", "2020-12-01"), + new Tuple("Synapse", "WorkspaceManagedSqlServerExtendedBlobAuditingPolicies", "2020-12-01"), + new Tuple("Synapse", "WorkspaceManagedSqlServerRecoverableSqlPools", "2020-12-01"), + new Tuple("Synapse", "WorkspaceManagedSqlServerSecurityAlertPolicy", "2020-12-01"), + new Tuple("Synapse", "WorkspaceManagedSqlServerUsages", "2020-12-01"), + new Tuple("Synapse", "WorkspaceManagedSqlServerVulnerabilityAssessments", "2020-12-01"), + new Tuple("Synapse", "WorkspaceSqlAadAdmins", "2020-12-01"), + new Tuple("Synapse", "Workspaces", "2020-12-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/synapse/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=D:\\code\\AzureSDK\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "dbb0a6fd623196f0db6b461b0f3f54e284e3a9e4"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseSqlVManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseSqlVManagementClient.cs deleted file mode 100644 index 55467ab958c7..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseSqlVManagementClient.cs +++ /dev/null @@ -1,30 +0,0 @@ - -// -// 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.Synapse -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_SynapseSqlVManagementClient - { - get - { - return new Tuple[] - { - new Tuple("Synapse", "SqlDatabases", "2020-04-01-preview"), - new Tuple("Synapse", "SqlPoolsV3", "2020-04-01-preview"), - new Tuple("Synapse", "SqlV3Operations", "2020-04-01-preview"), - }.AsEnumerable(); - } - } - } -} - diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlDatabasesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlDatabasesOperations.cs deleted file mode 100644 index c43b6c90158e..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlDatabasesOperations.cs +++ /dev/null @@ -1,1468 +0,0 @@ -// -// 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.Synapse -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// SqlDatabasesOperations operations. - /// - internal partial class SqlDatabasesOperations : IServiceOperations, ISqlDatabasesOperations - { - /// - /// Initializes a new instance of the SqlDatabasesOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal SqlDatabasesOperations(SynapseSqlV3ManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SynapseSqlV3ManagementClient - /// - public SynapseSqlV3ManagementClient Client { get; private set; } - - /// - /// Gets a SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (sqlDatabaseName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlDatabaseName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlDatabaseName", sqlDatabaseName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", 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.Synapse/workspaces/{workspaceName}/sqlDatabases/{sqlDatabaseName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlDatabaseName}", System.Uri.EscapeDataString(sqlDatabaseName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - 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; - } - - /// - /// Creates a new SqlDatabase or updates an existing SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabase parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates an existing database. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a list of sql databases. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// 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>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspace", 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.Synapse/workspaces/{workspaceName}/sqlDatabases").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - 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; - } - - /// - /// Creates a new SqlDatabase or updates an existing SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabase parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (sqlDatabaseName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlDatabaseName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlDatabaseName", sqlDatabaseName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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.Synapse/workspaces/{workspaceName}/sqlDatabases/{sqlDatabaseName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlDatabaseName}", System.Uri.EscapeDataString(sqlDatabaseName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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("PUT"); - _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 && (int)_statusCode != 201 && (int)_statusCode != 202) - { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - 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); - } - } - // 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); - } - return _result; - } - - /// - /// Deletes the SqlDatabase. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql 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 BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (sqlDatabaseName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlDatabaseName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlDatabaseName", sqlDatabaseName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", 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.Synapse/workspaces/{workspaceName}/sqlDatabases/{sqlDatabaseName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlDatabaseName}", System.Uri.EscapeDataString(sqlDatabaseName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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("DELETE"); - _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 && (int)_statusCode != 202 && (int)_statusCode != 204) - { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - 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; - } - - /// - /// Updates an existing database. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabaseUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (sqlDatabaseName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlDatabaseName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlDatabaseName", sqlDatabaseName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", 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.Synapse/workspaces/{workspaceName}/sqlDatabases/{sqlDatabaseName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlDatabaseName}", System.Uri.EscapeDataString(sqlDatabaseName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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 && (int)_statusCode != 202) - { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - 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; - } - - /// - /// Gets a list of sql databases. - /// - /// - /// The NextLink from the previous successful call to List 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>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspaceNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - 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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - 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; - } - - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlDatabasesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlDatabasesOperationsExtensions.cs deleted file mode 100644 index 816f18b53e72..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlDatabasesOperationsExtensions.cs +++ /dev/null @@ -1,439 +0,0 @@ -// -// 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.Synapse -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for SqlDatabasesOperations. - /// - public static partial class SqlDatabasesOperationsExtensions - { - /// - /// Gets a SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - public static SqlDatabase Get(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName) - { - return operations.GetAsync(resourceGroupName, workspaceName, sqlDatabaseName).GetAwaiter().GetResult(); - } - - /// - /// Gets a SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new SqlDatabase or updates an existing SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - public static SqlDatabase CreateOrUpdate(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabase parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates a new SqlDatabase or updates an existing SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabase parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - public static void Delete(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName) - { - operations.DeleteAsync(resourceGroupName, workspaceName, sqlDatabaseName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates an existing database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - public static SqlDatabase Update(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabaseUpdate parameters) - { - return operations.UpdateAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates an existing database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabaseUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of sql databases. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - public static IPage ListByWorkspace(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName) - { - return operations.ListByWorkspaceAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of sql databases. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByWorkspaceAsync(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByWorkspaceWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new SqlDatabase or updates an existing SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - public static SqlDatabase BeginCreateOrUpdate(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabase parameters) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates a new SqlDatabase or updates an existing SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabase parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - public static void BeginDelete(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName) - { - operations.BeginDeleteAsync(resourceGroupName, workspaceName, sqlDatabaseName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the SqlDatabase. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates an existing database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - public static SqlDatabase BeginUpdate(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabaseUpdate parameters) - { - return operations.BeginUpdateAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates an existing database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql database. - /// - /// - /// The requested SqlDatabase resource state. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this ISqlDatabasesOperations operations, string resourceGroupName, string workspaceName, string sqlDatabaseName, SqlDatabaseUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlDatabaseName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of sql databases. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByWorkspaceNext(this ISqlDatabasesOperations operations, string nextPageLink) - { - return operations.ListByWorkspaceNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of sql databases. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByWorkspaceNextAsync(this ISqlDatabasesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByWorkspaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolConnectionPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolConnectionPoliciesOperations.cs index f243c105e192..1f3954623233 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolConnectionPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolConnectionPoliciesOperations.cs @@ -71,7 +71,7 @@ internal SqlPoolConnectionPoliciesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -226,11 +226,11 @@ internal SqlPoolConnectionPoliciesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperations.cs index 441e1b922063..dfe8557cafb8 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperations.cs @@ -71,7 +71,7 @@ internal SqlPoolGeoBackupPoliciesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,11 +222,11 @@ internal SqlPoolGeoBackupPoliciesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -282,6 +282,274 @@ internal SqlPoolGeoBackupPoliciesOperations(SynapseManagementClient client) return _result; } + /// + /// Updates a SQL Pool geo backup policy. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The required parameters for creating or updating the geo backup policy. + /// + /// + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, GeoBackupPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + string geoBackupPolicyName = "Default"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("geoBackupPolicyName", geoBackupPolicyName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + _url = _url.Replace("{geoBackupPolicyName}", System.Uri.EscapeDataString(geoBackupPolicyName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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("PUT"); + _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 && (int)_statusCode != 201) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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); + } + } + // 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); + } + return _result; + } + /// /// Get a SQL pool geo backup policy /// @@ -303,7 +571,7 @@ internal SqlPoolGeoBackupPoliciesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -457,11 +725,11 @@ internal SqlPoolGeoBackupPoliciesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperationsExtensions.cs index 26d3f2758008..0222a006120e 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperationsExtensions.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperationsExtensions.cs @@ -75,6 +75,58 @@ public static IEnumerable List(this ISqlPoolGeoBackupPoliciesOp } } + /// + /// Updates a SQL Pool geo backup policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The required parameters for creating or updating the geo backup policy. + /// + public static GeoBackupPolicy CreateOrUpdate(this ISqlPoolGeoBackupPoliciesOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, GeoBackupPolicy parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a SQL Pool geo backup policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The required parameters for creating or updating the geo backup policy. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ISqlPoolGeoBackupPoliciesOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, GeoBackupPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get a SQL pool geo backup policy /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperations.cs new file mode 100644 index 000000000000..f961829a6730 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperations.cs @@ -0,0 +1,303 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolMaintenanceWindowOptionsOperations operations. + /// + internal partial class SqlPoolMaintenanceWindowOptionsOperations : IServiceOperations, ISqlPoolMaintenanceWindowOptionsOperations + { + /// + /// Initializes a new instance of the SqlPoolMaintenanceWindowOptionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SqlPoolMaintenanceWindowOptionsOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// SQL pool's available maintenance windows. + /// + /// + /// Get list of SQL pool's available maintenance windows. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window options name. + /// + /// + /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowOptionsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (maintenanceWindowOptionsName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "maintenanceWindowOptionsName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("maintenanceWindowOptionsName", maintenanceWindowOptionsName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenanceWindowOptions/current").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (maintenanceWindowOptionsName != null) + { + _queryParameters.Add(string.Format("maintenanceWindowOptionsName={0}", System.Uri.EscapeDataString(maintenanceWindowOptionsName))); + } + 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; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperationsExtensions.cs new file mode 100644 index 000000000000..fe79f67be898 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperationsExtensions.cs @@ -0,0 +1,83 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SqlPoolMaintenanceWindowOptionsOperations. + /// + public static partial class SqlPoolMaintenanceWindowOptionsOperationsExtensions + { + /// + /// SQL pool's available maintenance windows. + /// + /// + /// Get list of SQL pool's available maintenance windows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window options name. + /// + public static MaintenanceWindowOptions Get(this ISqlPoolMaintenanceWindowOptionsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowOptionsName) + { + return operations.GetAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowOptionsName).GetAwaiter().GetResult(); + } + + /// + /// SQL pool's available maintenance windows. + /// + /// + /// Get list of SQL pool's available maintenance windows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window options name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISqlPoolMaintenanceWindowOptionsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowOptionsName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowOptionsName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperations.cs new file mode 100644 index 000000000000..bc92b314dd18 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperations.cs @@ -0,0 +1,541 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolMaintenanceWindowsOperations operations. + /// + internal partial class SqlPoolMaintenanceWindowsOperations : IServiceOperations, ISqlPoolMaintenanceWindowsOperations + { + /// + /// Initializes a new instance of the SqlPoolMaintenanceWindowsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SqlPoolMaintenanceWindowsOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (maintenanceWindowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "maintenanceWindowName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("maintenanceWindowName", maintenanceWindowName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (maintenanceWindowName != null) + { + _queryParameters.Add(string.Format("maintenanceWindowName={0}", System.Uri.EscapeDataString(maintenanceWindowName))); + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The required parameters for creating or updating Maintenance Windows + /// settings + /// + /// + /// 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 CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, MaintenanceWindows parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (maintenanceWindowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "maintenanceWindowName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("maintenanceWindowName", maintenanceWindowName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (maintenanceWindowName != null) + { + _queryParameters.Add(string.Format("maintenanceWindowName={0}", System.Uri.EscapeDataString(maintenanceWindowName))); + } + 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("PUT"); + _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; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperationsExtensions.cs new file mode 100644 index 000000000000..408208734f79 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperationsExtensions.cs @@ -0,0 +1,146 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SqlPoolMaintenanceWindowsOperations. + /// + public static partial class SqlPoolMaintenanceWindowsOperationsExtensions + { + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + public static MaintenanceWindows Get(this ISqlPoolMaintenanceWindowsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName) + { + return operations.GetAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName).GetAwaiter().GetResult(); + } + + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISqlPoolMaintenanceWindowsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The required parameters for creating or updating Maintenance Windows + /// settings + /// + public static void CreateOrUpdate(this ISqlPoolMaintenanceWindowsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, MaintenanceWindows parameters) + { + operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The required parameters for creating or updating Maintenance Windows + /// settings + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ISqlPoolMaintenanceWindowsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, MaintenanceWindows parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMetadataSyncConfigsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMetadataSyncConfigsOperations.cs index baf2289ff28a..05ec255e44b7 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMetadataSyncConfigsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMetadataSyncConfigsOperations.cs @@ -71,7 +71,7 @@ internal SqlPoolMetadataSyncConfigsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,11 +222,11 @@ internal SqlPoolMetadataSyncConfigsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 404) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -306,7 +306,7 @@ internal SqlPoolMetadataSyncConfigsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -468,11 +468,11 @@ internal SqlPoolMetadataSyncConfigsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 404) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolOperationResultsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolOperationResultsOperations.cs index f9ef8afbdbb8..269d80c7ab6f 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolOperationResultsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolOperationResultsOperations.cs @@ -74,7 +74,7 @@ internal SqlPoolOperationResultsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -231,11 +231,11 @@ internal SqlPoolOperationResultsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperations.cs new file mode 100644 index 000000000000..efed08972f4d --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperations.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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolRecommendedSensitivityLabelsOperations operations. + /// + internal partial class SqlPoolRecommendedSensitivityLabelsOperations : IServiceOperations, ISqlPoolRecommendedSensitivityLabelsOperations + { + /// + /// Initializes a new instance of the SqlPoolRecommendedSensitivityLabelsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SqlPoolRecommendedSensitivityLabelsOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Update recommended sensitivity labels states of a given SQL Pool using an + /// operations batch. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// 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 workspaceName, string sqlPoolName, RecommendedSensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("parameters", parameters); + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperationsExtensions.cs new file mode 100644 index 000000000000..e9e04eaf22b3 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperationsExtensions.cs @@ -0,0 +1,74 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SqlPoolRecommendedSensitivityLabelsOperations. + /// + public static partial class SqlPoolRecommendedSensitivityLabelsOperationsExtensions + { + /// + /// Update recommended sensitivity labels states of a given SQL Pool using an + /// operations batch. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + public static void Update(this ISqlPoolRecommendedSensitivityLabelsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, RecommendedSensitivityLabelUpdateList parameters) + { + operations.UpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Update recommended sensitivity labels states of a given SQL Pool using an + /// operations batch. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this ISqlPoolRecommendedSensitivityLabelsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, RecommendedSensitivityLabelUpdateList parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolReplicationLinksOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolReplicationLinksOperations.cs index d86833c7bfb0..252175d3ec9f 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolReplicationLinksOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolReplicationLinksOperations.cs @@ -71,7 +71,7 @@ internal SqlPoolReplicationLinksOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,11 +222,11 @@ internal SqlPoolReplicationLinksOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -306,7 +306,7 @@ internal SqlPoolReplicationLinksOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -463,11 +463,11 @@ internal SqlPoolReplicationLinksOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -538,7 +538,7 @@ internal SqlPoolReplicationLinksOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -634,11 +634,11 @@ internal SqlPoolReplicationLinksOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRestorePointsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRestorePointsOperations.cs index 775d94d2734c..28baa908f48c 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRestorePointsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRestorePointsOperations.cs @@ -71,7 +71,7 @@ internal SqlPoolRestorePointsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,11 +222,11 @@ internal SqlPoolRestorePointsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1060,7 +1060,7 @@ internal SqlPoolRestorePointsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1156,11 +1156,11 @@ internal SqlPoolRestorePointsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperations.cs index d04ff4bf2a92..68f5c445e9b0 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperations.cs @@ -75,7 +75,7 @@ internal SqlPoolSensitivityLabelsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -235,11 +235,11 @@ internal SqlPoolSensitivityLabelsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -295,6 +295,232 @@ internal SqlPoolSensitivityLabelsOperations(SynapseManagementClient client) return _result; } + /// + /// Update sensitivity labels of a given SQL Pool using an operations batch. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// 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 workspaceName, string sqlPoolName, SensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("parameters", parameters); + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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 sensitivity labels of a given SQL pool /// @@ -1869,7 +2095,7 @@ internal SqlPoolSensitivityLabelsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1965,11 +2191,11 @@ internal SqlPoolSensitivityLabelsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperationsExtensions.cs index 3a49a32095d8..7337bd4e16de 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperationsExtensions.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperationsExtensions.cs @@ -80,6 +80,53 @@ public static partial class SqlPoolSensitivityLabelsOperationsExtensions } } + /// + /// Update sensitivity labels of a given SQL Pool using an operations batch. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + public static void Update(this ISqlPoolSensitivityLabelsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SensitivityLabelUpdateList parameters) + { + operations.UpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Update sensitivity labels of a given SQL Pool using an operations batch. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this ISqlPoolSensitivityLabelsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SensitivityLabelUpdateList parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Gets sensitivity labels of a given SQL pool /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolTransparentDataEncryptionsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolTransparentDataEncryptionsOperations.cs index 26bf49d27c1b..2ec2557ea9a3 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolTransparentDataEncryptionsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolTransparentDataEncryptionsOperations.cs @@ -71,7 +71,7 @@ internal SqlPoolTransparentDataEncryptionsOperations(SynapseManagementClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -225,11 +225,11 @@ internal SqlPoolTransparentDataEncryptionsOperations(SynapseManagementClient cli string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -310,7 +310,7 @@ internal SqlPoolTransparentDataEncryptionsOperations(SynapseManagementClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -475,11 +475,11 @@ internal SqlPoolTransparentDataEncryptionsOperations(SynapseManagementClient cli string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolUsagesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolUsagesOperations.cs index e54edc2aeeb5..8acd3d0e4d15 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolUsagesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolUsagesOperations.cs @@ -71,7 +71,7 @@ internal SqlPoolUsagesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,11 +222,11 @@ internal SqlPoolUsagesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -297,7 +297,7 @@ internal SqlPoolUsagesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -393,11 +393,11 @@ internal SqlPoolUsagesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperations.cs index 706c4fe82573..9af225c35381 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperations.cs @@ -71,7 +71,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,11 +222,11 @@ internal SqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -306,7 +306,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -468,11 +468,11 @@ internal SqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -605,7 +605,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -750,11 +750,11 @@ internal SqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -866,6 +866,240 @@ internal SqlPoolsOperations(SynapseManagementClient client) return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Rename a SQL pool + /// + /// + /// Rename a SQL pool. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The resource move definition for renaming this Sql pool. + /// + /// + /// 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 RenameWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, ResourceMoveDefinition parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Rename", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/move").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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("POST"); + _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; + } + /// /// Create SQL pool /// @@ -890,7 +1124,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1056,11 +1290,11 @@ internal SqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1137,7 +1371,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1288,11 +1522,11 @@ internal SqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1387,7 +1621,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1538,11 +1772,11 @@ internal SqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1619,7 +1853,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1770,11 +2004,11 @@ internal SqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1845,7 +2079,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1941,11 +2175,11 @@ internal SqlPoolsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperationsExtensions.cs index 7d2964a87e23..9b595f9664fd 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperationsExtensions.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperationsExtensions.cs @@ -391,6 +391,61 @@ public static object Resume(this ISqlPoolsOperations operations, string resource } } + /// + /// Rename a SQL pool + /// + /// + /// Rename a SQL pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The resource move definition for renaming this Sql pool. + /// + public static void Rename(this ISqlPoolsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, ResourceMoveDefinition parameters) + { + operations.RenameAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Rename a SQL pool + /// + /// + /// Rename a SQL pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The resource move definition for renaming this Sql pool. + /// + /// + /// The cancellation token. + /// + public static async Task RenameAsync(this ISqlPoolsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, ResourceMoveDefinition parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RenameWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Create SQL pool /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsV3OperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsV3OperationsExtensions.cs deleted file mode 100644 index df464ca21b9d..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsV3OperationsExtensions.cs +++ /dev/null @@ -1,439 +0,0 @@ -// -// 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.Synapse -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for SqlPoolsV3Operations. - /// - public static partial class SqlPoolsV3OperationsExtensions - { - /// - /// Gets a SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - public static SqlPoolV3 Get(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName) - { - return operations.GetAsync(resourceGroupName, workspaceName, sqlPoolName).GetAwaiter().GetResult(); - } - - /// - /// Gets a SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new SqlPool or updates an existing SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - public static SqlPoolV3 CreateOrUpdate(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolV3 parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates a new SqlPool or updates an existing SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolV3 parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - public static void Delete(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName) - { - operations.DeleteAsync(resourceGroupName, workspaceName, sqlPoolName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates an existing sqlpool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - public static SqlPoolV3 Update(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolUpdate parameters) - { - return operations.UpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates an existing sqlpool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of sql pools. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - public static IPage ListByWorkspace(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName) - { - return operations.ListByWorkspaceAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of sql pools. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByWorkspaceAsync(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByWorkspaceWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new SqlPool or updates an existing SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - public static SqlPoolV3 BeginCreateOrUpdate(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolV3 parameters) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates a new SqlPool or updates an existing SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolV3 parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - public static void BeginDelete(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName) - { - operations.BeginDeleteAsync(resourceGroupName, workspaceName, sqlPoolName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the SqlPool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates an existing sqlpool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - public static SqlPoolV3 BeginUpdate(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolUpdate parameters) - { - return operations.BeginUpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates an existing sqlpool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this ISqlPoolsV3Operations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of sql pools. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByWorkspaceNext(this ISqlPoolsV3Operations operations, string nextPageLink) - { - return operations.ListByWorkspaceNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of sql pools. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByWorkspaceNextAsync(this ISqlPoolsV3Operations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByWorkspaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlV3OperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlV3OperationsExtensions.cs deleted file mode 100644 index 7232cbe0552f..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlV3OperationsExtensions.cs +++ /dev/null @@ -1,162 +0,0 @@ -// -// 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.Synapse -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for SqlV3Operations. - /// - public static partial class SqlV3OperationsExtensions - { - /// - /// All operations - /// - /// - /// Get all available operations - /// - /// - /// The operations group for this extension method. - /// - public static IList List(this ISqlV3Operations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// All operations - /// - /// - /// Get all available operations - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ISqlV3Operations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get operation result - /// - /// - /// Get the result of an operation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Operation ID - /// - public static void GetLocationHeaderResult(this ISqlV3Operations operations, string resourceGroupName, string workspaceName, string operationId) - { - operations.GetLocationHeaderResultAsync(resourceGroupName, workspaceName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Get operation result - /// - /// - /// Get the result of an operation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Operation ID - /// - /// - /// The cancellation token. - /// - public static async Task GetLocationHeaderResultAsync(this ISqlV3Operations operations, string resourceGroupName, string workspaceName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.GetLocationHeaderResultWithHttpMessagesAsync(resourceGroupName, workspaceName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get operation status - /// - /// - /// Get the status of an operation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Operation ID - /// - public static OperationResource GetAzureAsyncHeaderResult(this ISqlV3Operations operations, string resourceGroupName, string workspaceName, string operationId) - { - return operations.GetAzureAsyncHeaderResultAsync(resourceGroupName, workspaceName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Get operation status - /// - /// - /// Get the status of an operation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Operation ID - /// - /// - /// The cancellation token. - /// - public static async Task GetAzureAsyncHeaderResultAsync(this ISqlV3Operations operations, string resourceGroupName, string workspaceName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAzureAsyncHeaderResultWithHttpMessagesAsync(resourceGroupName, workspaceName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs index 02a863ae3bbf..c009d984290b 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs @@ -124,6 +124,16 @@ public partial class SynapseManagementClient : ServiceClient public virtual ISqlPoolReplicationLinksOperations SqlPoolReplicationLinks { get; private set; } + /// + /// Gets the ISqlPoolMaintenanceWindowsOperations. + /// + public virtual ISqlPoolMaintenanceWindowsOperations SqlPoolMaintenanceWindows { get; private set; } + + /// + /// Gets the ISqlPoolMaintenanceWindowOptionsOperations. + /// + public virtual ISqlPoolMaintenanceWindowOptionsOperations SqlPoolMaintenanceWindowOptions { get; private set; } + /// /// Gets the ISqlPoolTransparentDataEncryptionsOperations. /// @@ -149,6 +159,11 @@ public partial class SynapseManagementClient : ServiceClient public virtual ISqlPoolSensitivityLabelsOperations SqlPoolSensitivityLabels { get; private set; } + /// + /// Gets the ISqlPoolRecommendedSensitivityLabelsOperations. + /// + public virtual ISqlPoolRecommendedSensitivityLabelsOperations SqlPoolRecommendedSensitivityLabels { get; private set; } + /// /// Gets the ISqlPoolSchemasOperations. /// @@ -294,6 +309,11 @@ public partial class SynapseManagementClient : ServiceClient public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } + /// + /// Gets the IPrivateLinkHubPrivateLinkResourcesOperations. + /// + public virtual IPrivateLinkHubPrivateLinkResourcesOperations PrivateLinkHubPrivateLinkResources { get; private set; } + /// /// Gets the IPrivateEndpointConnectionsOperations. /// @@ -329,15 +349,20 @@ public partial class SynapseManagementClient : ServiceClient public virtual IWorkspaceManagedSqlServerVulnerabilityAssessmentsOperations WorkspaceManagedSqlServerVulnerabilityAssessments { get; private set; } + /// + /// Gets the IWorkspaceManagedSqlServerEncryptionProtectorOperations. + /// + public virtual IWorkspaceManagedSqlServerEncryptionProtectorOperations WorkspaceManagedSqlServerEncryptionProtector { get; private set; } + /// /// Gets the IWorkspaceManagedSqlServerUsagesOperations. /// public virtual IWorkspaceManagedSqlServerUsagesOperations WorkspaceManagedSqlServerUsages { get; private set; } /// - /// Gets the IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations. + /// Gets the IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations. /// - public virtual IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations WorkspaceManagedSqlServerRecoverableSqlpools { get; private set; } + public virtual IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations WorkspaceManagedSqlServerRecoverableSqlPools { get; private set; } /// /// Gets the IKeysOperations. @@ -595,11 +620,14 @@ private void Initialize() SqlPoolDataWarehouseUserActivities = new SqlPoolDataWarehouseUserActivitiesOperations(this); SqlPoolRestorePoints = new SqlPoolRestorePointsOperations(this); SqlPoolReplicationLinks = new SqlPoolReplicationLinksOperations(this); + SqlPoolMaintenanceWindows = new SqlPoolMaintenanceWindowsOperations(this); + SqlPoolMaintenanceWindowOptions = new SqlPoolMaintenanceWindowOptionsOperations(this); SqlPoolTransparentDataEncryptions = new SqlPoolTransparentDataEncryptionsOperations(this); SqlPoolBlobAuditingPolicies = new SqlPoolBlobAuditingPoliciesOperations(this); SqlPoolOperations = new SqlPoolOperations(this); SqlPoolUsages = new SqlPoolUsagesOperations(this); SqlPoolSensitivityLabels = new SqlPoolSensitivityLabelsOperations(this); + SqlPoolRecommendedSensitivityLabels = new SqlPoolRecommendedSensitivityLabelsOperations(this); SqlPoolSchemas = new SqlPoolSchemasOperations(this); SqlPoolTables = new SqlPoolTablesOperations(this); SqlPoolTableColumns = new SqlPoolTableColumnsOperations(this); @@ -629,6 +657,7 @@ private void Initialize() IntegrationRuntimeMonitoringData = new IntegrationRuntimeMonitoringDataOperations(this); IntegrationRuntimeStatus = new IntegrationRuntimeStatusOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); + PrivateLinkHubPrivateLinkResources = new PrivateLinkHubPrivateLinkResourcesOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); PrivateLinkHubs = new PrivateLinkHubsOperations(this); PrivateEndpointConnectionsPrivateLinkHub = new PrivateEndpointConnectionsPrivateLinkHubOperations(this); @@ -636,11 +665,12 @@ private void Initialize() WorkspaceManagedSqlServerExtendedBlobAuditingPolicies = new WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations(this); WorkspaceManagedSqlServerSecurityAlertPolicy = new WorkspaceManagedSqlServerSecurityAlertPolicyOperations(this); WorkspaceManagedSqlServerVulnerabilityAssessments = new WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations(this); + WorkspaceManagedSqlServerEncryptionProtector = new WorkspaceManagedSqlServerEncryptionProtectorOperations(this); WorkspaceManagedSqlServerUsages = new WorkspaceManagedSqlServerUsagesOperations(this); - WorkspaceManagedSqlServerRecoverableSqlpools = new WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(this); + WorkspaceManagedSqlServerRecoverableSqlPools = new WorkspaceManagedSqlServerRecoverableSqlPoolsOperations(this); Keys = new KeysOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2019-06-01-preview"; + ApiVersion = "2020-12-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseSqlV3ManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseSqlV3ManagementClient.cs deleted file mode 100644 index c1110740e78f..000000000000 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseSqlV3ManagementClient.cs +++ /dev/null @@ -1,372 +0,0 @@ -// -// 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.Synapse -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - - /// - /// Azure Synapse Analytics Management Client - /// - public partial class SynapseSqlV3ManagementClient : ServiceClient, ISynapseSqlV3ManagementClient, IAzureClient - { - /// - /// The base URI of the service. - /// - public System.Uri BaseUri { get; set; } - - /// - /// Gets or sets json serialization settings. - /// - public JsonSerializerSettings SerializationSettings { get; private set; } - - /// - /// Gets or sets json deserialization settings. - /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - - /// - /// Credentials needed for the client to connect to Azure. - /// - public ServiceClientCredentials Credentials { get; private set; } - - /// - /// The ID of the target subscription. - /// - public string SubscriptionId { get; set; } - - /// - /// The API version to use for this operation. - /// - public string ApiVersion { get; private set; } - - /// - /// The preferred language for the response. - /// - public string AcceptLanguage { get; set; } - - /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. - /// - public int? LongRunningOperationRetryTimeout { get; set; } - - /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. - /// - public bool? GenerateClientRequestId { get; set; } - - /// - /// Gets the ISqlV3Operations. - /// - public virtual ISqlV3Operations SqlV3Operations { get; private set; } - - /// - /// Gets the ISqlPoolsV3Operations. - /// - public virtual ISqlPoolsV3Operations SqlPoolsV3 { get; private set; } - - /// - /// Gets the ISqlDatabasesOperations. - /// - public virtual ISqlDatabasesOperations SqlDatabases { get; private set; } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// HttpClient to be used - /// - /// - /// True: will dispose the provided httpClient on calling SynapseSqlV3ManagementClient.Dispose(). False: will not dispose provided httpClient - protected SynapseSqlV3ManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) - { - Initialize(); - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - protected SynapseSqlV3ManagementClient(params DelegatingHandler[] handlers) : base(handlers) - { - Initialize(); - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Optional. The http client handler used to handle http transport. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - protected SynapseSqlV3ManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) - { - Initialize(); - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Optional. The base URI of the service. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - /// - /// Thrown when a required parameter is null - /// - protected SynapseSqlV3ManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) - { - if (baseUri == null) - { - throw new System.ArgumentNullException("baseUri"); - } - BaseUri = baseUri; - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Optional. The base URI of the service. - /// - /// - /// Optional. The http client handler used to handle http transport. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - /// - /// Thrown when a required parameter is null - /// - protected SynapseSqlV3ManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) - { - if (baseUri == null) - { - throw new System.ArgumentNullException("baseUri"); - } - BaseUri = baseUri; - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Required. Credentials needed for the client to connect to Azure. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - /// - /// Thrown when a required parameter is null - /// - public SynapseSqlV3ManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) - { - if (credentials == null) - { - throw new System.ArgumentNullException("credentials"); - } - Credentials = credentials; - if (Credentials != null) - { - Credentials.InitializeServiceClient(this); - } - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Required. Credentials needed for the client to connect to Azure. - /// - /// - /// HttpClient to be used - /// - /// - /// True: will dispose the provided httpClient on calling SynapseSqlV3ManagementClient.Dispose(). False: will not dispose provided httpClient - /// - /// Thrown when a required parameter is null - /// - public SynapseSqlV3ManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) - { - if (credentials == null) - { - throw new System.ArgumentNullException("credentials"); - } - Credentials = credentials; - if (Credentials != null) - { - Credentials.InitializeServiceClient(this); - } - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Required. Credentials needed for the client to connect to Azure. - /// - /// - /// Optional. The http client handler used to handle http transport. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - /// - /// Thrown when a required parameter is null - /// - public SynapseSqlV3ManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) - { - if (credentials == null) - { - throw new System.ArgumentNullException("credentials"); - } - Credentials = credentials; - if (Credentials != null) - { - Credentials.InitializeServiceClient(this); - } - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Optional. The base URI of the service. - /// - /// - /// Required. Credentials needed for the client to connect to Azure. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - /// - /// Thrown when a required parameter is null - /// - public SynapseSqlV3ManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) - { - if (baseUri == null) - { - throw new System.ArgumentNullException("baseUri"); - } - if (credentials == null) - { - throw new System.ArgumentNullException("credentials"); - } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) - { - Credentials.InitializeServiceClient(this); - } - } - - /// - /// Initializes a new instance of the SynapseSqlV3ManagementClient class. - /// - /// - /// Optional. The base URI of the service. - /// - /// - /// Required. Credentials needed for the client to connect to Azure. - /// - /// - /// Optional. The http client handler used to handle http transport. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - /// - /// Thrown when a required parameter is null - /// - public SynapseSqlV3ManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) - { - if (baseUri == null) - { - throw new System.ArgumentNullException("baseUri"); - } - if (credentials == null) - { - throw new System.ArgumentNullException("credentials"); - } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) - { - Credentials.InitializeServiceClient(this); - } - } - - /// - /// An optional partial-method to perform custom initialization. - /// - partial void CustomInitialize(); - /// - /// Initializes client properties. - /// - private void Initialize() - { - SqlV3Operations = new SqlV3Operations(this); - SqlPoolsV3 = new SqlPoolsV3Operations(this); - SqlDatabases = new SqlDatabasesOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-04-01-preview"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings - { - Formatting = Newtonsoft.Json.Formatting.Indented, - DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, - DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, - NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, - ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List - { - new Iso8601TimeSpanConverter() - } - }; - SerializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings = new JsonSerializerSettings - { - DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, - DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, - NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, - ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List - { - new Iso8601TimeSpanConverter() - } - }; - CustomInitialize(); - DeserializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); - } - } -} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceAadAdminsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceAadAdminsOperations.cs index 6bc757c8362f..6ecdfbe7c964 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceAadAdminsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceAadAdminsOperations.cs @@ -65,7 +65,7 @@ internal WorkspaceAadAdminsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -210,11 +210,11 @@ internal WorkspaceAadAdminsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -335,7 +335,7 @@ internal WorkspaceAadAdminsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -491,11 +491,11 @@ internal WorkspaceAadAdminsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -584,7 +584,7 @@ internal WorkspaceAadAdminsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -726,11 +726,11 @@ internal WorkspaceAadAdminsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedIdentitySqlControlSettingsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedIdentitySqlControlSettingsOperations.cs index 4f329e71b014..0a1ca40a32ae 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedIdentitySqlControlSettingsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedIdentitySqlControlSettingsOperations.cs @@ -65,7 +65,7 @@ internal WorkspaceManagedIdentitySqlControlSettingsOperations(SynapseManagementC /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -210,11 +210,11 @@ internal WorkspaceManagedIdentitySqlControlSettingsOperations(SynapseManagementC string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -313,7 +313,7 @@ internal WorkspaceManagedIdentitySqlControlSettingsOperations(SynapseManagementC /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -469,11 +469,11 @@ internal WorkspaceManagedIdentitySqlControlSettingsOperations(SynapseManagementC string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsV3Operations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerEncryptionProtectorOperations.cs similarity index 69% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsV3Operations.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerEncryptionProtectorOperations.cs index 7c61ef7489d9..6b9ed5e3b985 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsV3Operations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerEncryptionProtectorOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Synapse using System.Threading.Tasks; /// - /// SqlPoolsV3Operations operations. + /// WorkspaceManagedSqlServerEncryptionProtectorOperations operations. /// - internal partial class SqlPoolsV3Operations : IServiceOperations, ISqlPoolsV3Operations + internal partial class WorkspaceManagedSqlServerEncryptionProtectorOperations : IServiceOperations, IWorkspaceManagedSqlServerEncryptionProtectorOperations { /// - /// Initializes a new instance of the SqlPoolsV3Operations class. + /// Initializes a new instance of the WorkspaceManagedSqlServerEncryptionProtectorOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class SqlPoolsV3Operations : IServiceOperations /// Thrown when a required parameter is null /// - internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) + internal WorkspaceManagedSqlServerEncryptionProtectorOperations(SynapseManagementClient client) { if (client == null) { @@ -46,21 +46,21 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) } /// - /// Gets a reference to the SynapseSqlV3ManagementClient + /// Gets a reference to the SynapseManagementClient /// - public SynapseSqlV3ManagementClient Client { get; private set; } + public SynapseManagementClient Client { get; private set; } /// - /// Gets a SqlPool. + /// Get workspace server's encryption protector. /// + /// + /// Get workspace managed sql server's encryption protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. + /// The name of the workspace /// /// /// Headers that will be added to request. @@ -68,7 +68,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -83,35 +83,19 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (resourceGroupName == null) + if (Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName != null) + if (Client.ApiVersion != null) { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + if (Client.ApiVersion.Length < 1) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); } } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (sqlPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -123,17 +107,30 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.ApiVersion != null) + if (resourceGroupName != null) { - if (Client.ApiVersion.Length < 1) + if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + string encryptionProtectorName = "current"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -143,17 +140,17 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("encryptionProtectorName", encryptionProtectorName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{encryptionProtectorName}", System.Uri.EscapeDataString(encryptionProtectorName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -219,11 +216,11 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -247,7 +244,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient 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")) @@ -260,7 +257,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient 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) { @@ -280,72 +277,19 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) } /// - /// Creates a new SqlPool or updates an existing SqlPool. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolV3 parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the SqlPool. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates an existing sqlpool. + /// Updates workspace server's encryption protector. /// + /// + /// Updates workspace managed sql server's encryption protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. + /// The name of the workspace /// /// - /// The requested SqlPool resource state. + /// The requested encryption protector resource state. /// /// /// The headers that will be added to request. @@ -353,21 +297,24 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, EncryptionProtector parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets a list of sql pools. + /// Get list of encryption protectors for the server. /// + /// + /// Get list of encryption protectors for workspace managed sql server. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. + /// The name of the workspace /// /// /// Headers that will be added to request. @@ -375,7 +322,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -390,8 +337,19 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -426,17 +384,6 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -447,11 +394,11 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspace", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "List", 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.Synapse/workspaces/{workspaceName}/sqlPools").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); @@ -520,13 +467,14 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -536,6 +484,10 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) } 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); @@ -548,7 +500,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient 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")) @@ -561,7 +513,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient 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) { @@ -581,19 +533,44 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) } /// - /// Creates a new SqlPool or updates an existing SqlPool. + /// Revalidates server's existing encryption protector. /// + /// + /// Revalidates workspace managed sql server's existing encryption protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. + /// The name of the workspace + /// + /// + /// The headers that will be added to request. /// - /// - /// The name of the sql pool. + /// + /// The cancellation token. + /// + public async Task RevalidateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRevalidateWithHttpMessagesAsync(resourceGroupName, workspaceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates workspace server's encryption protector. + /// + /// + /// Updates workspace managed sql server's encryption protector. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace /// /// - /// The requested SqlPool resource state. + /// The requested encryption protector resource state. /// /// /// Headers that will be added to request. @@ -601,7 +578,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -616,8 +593,30 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolV3 parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, EncryptionProtector parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -641,10 +640,6 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); } - if (sqlPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); - } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -653,28 +648,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) { parameters.Validate(); } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } + string encryptionProtectorName = "current"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -684,18 +658,18 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("encryptionProtectorName", encryptionProtectorName); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{encryptionProtectorName}", System.Uri.EscapeDataString(encryptionProtectorName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -765,13 +739,13 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -795,7 +769,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient 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")) @@ -808,25 +782,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) _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); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -846,16 +802,16 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) } /// - /// Deletes the SqlPool. + /// Revalidates server's existing encryption protector. /// + /// + /// Revalidates workspace managed sql server's existing encryption protector. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. + /// The name of the workspace /// /// /// Headers that will be added to request. @@ -863,7 +819,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -875,46 +831,8 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginRevalidateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (sqlPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -926,171 +844,6 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); } } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlPoolName", sqlPoolName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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("DELETE"); - _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 && (int)_statusCode != 202 && (int)_statusCode != 204) - { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - 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; - } - - /// - /// Updates an existing sqlpool. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The name of the sql pool. - /// - /// - /// The requested SqlPool resource state. - /// - /// - /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SqlPoolUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1125,25 +878,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); } - if (sqlPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } + string encryptionProtectorName = "current"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1153,18 +888,17 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlPoolName", sqlPoolName); - tracingParameters.Add("parameters", parameters); + tracingParameters.Add("encryptionProtectorName", encryptionProtectorName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginRevalidate", 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}/revalidate").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + _url = _url.Replace("{encryptionProtectorName}", System.Uri.EscapeDataString(encryptionProtectorName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -1177,7 +911,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1208,12 +942,6 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient 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) { @@ -1236,13 +964,14 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1252,6 +981,10 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) } 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); @@ -1264,31 +997,13 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -1297,8 +1012,11 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) } /// - /// Gets a list of sql pools. + /// Get list of encryption protectors for the server. /// + /// + /// Get list of encryption protectors for workspace managed sql server. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1308,7 +1026,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1323,7 +1041,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1338,7 +1056,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspaceNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -1404,13 +1122,14 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1420,6 +1139,10 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient client) } 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); @@ -1432,7 +1155,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient 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")) @@ -1445,7 +1168,7 @@ internal SqlPoolsV3Operations(SynapseSqlV3ManagementClient 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) { diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerEncryptionProtectorOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerEncryptionProtectorOperationsExtensions.cs new file mode 100644 index 000000000000..3fd6eb98b13f --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerEncryptionProtectorOperationsExtensions.cs @@ -0,0 +1,347 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for WorkspaceManagedSqlServerEncryptionProtectorOperations. + /// + public static partial class WorkspaceManagedSqlServerEncryptionProtectorOperationsExtensions + { + /// + /// Get workspace server's encryption protector. + /// + /// + /// Get workspace managed sql server's encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + public static EncryptionProtector Get(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName) + { + return operations.GetAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); + } + + /// + /// Get workspace server's encryption protector. + /// + /// + /// Get workspace managed sql server's encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates workspace server's encryption protector. + /// + /// + /// Updates workspace managed sql server's encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The requested encryption protector resource state. + /// + public static EncryptionProtector CreateOrUpdate(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName, EncryptionProtector parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates workspace server's encryption protector. + /// + /// + /// Updates workspace managed sql server's encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The requested encryption protector resource state. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName, EncryptionProtector parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get list of encryption protectors for the server. + /// + /// + /// Get list of encryption protectors for workspace managed sql server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + public static IPage List(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName) + { + return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); + } + + /// + /// Get list of encryption protectors for the server. + /// + /// + /// Get list of encryption protectors for workspace managed sql server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Revalidates server's existing encryption protector. + /// + /// + /// Revalidates workspace managed sql server's existing encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + public static void Revalidate(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName) + { + operations.RevalidateAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); + } + + /// + /// Revalidates server's existing encryption protector. + /// + /// + /// Revalidates workspace managed sql server's existing encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The cancellation token. + /// + public static async Task RevalidateAsync(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RevalidateWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates workspace server's encryption protector. + /// + /// + /// Updates workspace managed sql server's encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The requested encryption protector resource state. + /// + public static EncryptionProtector BeginCreateOrUpdate(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName, EncryptionProtector parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates workspace server's encryption protector. + /// + /// + /// Updates workspace managed sql server's encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The requested encryption protector resource state. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName, EncryptionProtector parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Revalidates server's existing encryption protector. + /// + /// + /// Revalidates workspace managed sql server's existing encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + public static void BeginRevalidate(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName) + { + operations.BeginRevalidateAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); + } + + /// + /// Revalidates server's existing encryption protector. + /// + /// + /// Revalidates workspace managed sql server's existing encryption protector. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The cancellation token. + /// + public static async Task BeginRevalidateAsync(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginRevalidateWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get list of encryption protectors for the server. + /// + /// + /// Get list of encryption protectors for workspace managed sql server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get list of encryption protectors for the server. + /// + /// + /// Get list of encryption protectors for workspace managed sql server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IWorkspaceManagedSqlServerEncryptionProtectorOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlpoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlPoolsOperations.cs similarity index 97% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlpoolsOperations.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlPoolsOperations.cs index 269137178a02..6872f02c31b9 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlpoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlPoolsOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Synapse using System.Threading.Tasks; /// - /// WorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations. + /// WorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations. /// - internal partial class WorkspaceManagedSqlServerRecoverableSqlpoolsOperations : IServiceOperations, IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations + internal partial class WorkspaceManagedSqlServerRecoverableSqlPoolsOperations : IServiceOperations, IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations { /// - /// Initializes a new instance of the WorkspaceManagedSqlServerRecoverableSqlpoolsOperations class. + /// Initializes a new instance of the WorkspaceManagedSqlServerRecoverableSqlPoolsOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class WorkspaceManagedSqlServerRecoverableSqlpoolsOperations : /// /// Thrown when a required parameter is null /// - internal WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(SynapseManagementClient client) + internal WorkspaceManagedSqlServerRecoverableSqlPoolsOperations(SynapseManagementClient client) { if (client == null) { @@ -144,7 +144,7 @@ internal WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(SynapseManagemen } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlpools").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlPools").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); @@ -290,8 +290,8 @@ internal WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(SynapseManagemen /// /// The name of the workspace /// - /// - /// The name of the sql compute + /// + /// The name of the sql pool /// /// /// Headers that will be added to request. @@ -314,7 +314,7 @@ internal WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(SynapseManagemen /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlComputeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -361,9 +361,9 @@ internal WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(SynapseManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); } - if (sqlComputeName == null) + if (sqlPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "sqlComputeName"); + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -374,17 +374,17 @@ internal WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(SynapseManagemen Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sqlComputeName", sqlComputeName); + tracingParameters.Add("sqlPoolName", sqlPoolName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", 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.Synapse/workspaces/{workspaceName}/recoverableSqlPools/{sqlComputeName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlPools/{sqlPoolName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sqlComputeName}", System.Uri.EscapeDataString(sqlComputeName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlpoolsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlPoolsOperationsExtensions.cs similarity index 87% rename from sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlpoolsOperationsExtensions.cs rename to sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlPoolsOperationsExtensions.cs index 945a4f4d4e2e..0cc21ea6da25 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlpoolsOperationsExtensions.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceManagedSqlServerRecoverableSqlPoolsOperationsExtensions.cs @@ -17,9 +17,9 @@ namespace Microsoft.Azure.Management.Synapse using System.Threading.Tasks; /// - /// Extension methods for WorkspaceManagedSqlServerRecoverableSqlpoolsOperations. + /// Extension methods for WorkspaceManagedSqlServerRecoverableSqlPoolsOperations. /// - public static partial class WorkspaceManagedSqlServerRecoverableSqlpoolsOperationsExtensions + public static partial class WorkspaceManagedSqlServerRecoverableSqlPoolsOperationsExtensions { /// /// Get list of recoverable sql pools for the server. @@ -36,7 +36,7 @@ public static partial class WorkspaceManagedSqlServerRecoverableSqlpoolsOperatio /// /// The name of the workspace /// - public static IPage List(this IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations, string resourceGroupName, string workspaceName) + public static IPage List(this IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations, string resourceGroupName, string workspaceName) { return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); } @@ -59,7 +59,7 @@ public static IPage List(this IWorkspaceManagedSqlServerReco /// /// The cancellation token. /// - public static async Task> ListAsync(this IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) { @@ -82,12 +82,12 @@ public static IPage List(this IWorkspaceManagedSqlServerReco /// /// The name of the workspace /// - /// - /// The name of the sql compute + /// + /// The name of the sql pool /// - public static RecoverableSqlPool Get(this IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations, string resourceGroupName, string workspaceName, string sqlComputeName) + public static RecoverableSqlPool Get(this IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName) { - return operations.GetAsync(resourceGroupName, workspaceName, sqlComputeName).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, workspaceName, sqlPoolName).GetAwaiter().GetResult(); } /// @@ -105,15 +105,15 @@ public static RecoverableSqlPool Get(this IWorkspaceManagedSqlServerRecoverableS /// /// The name of the workspace /// - /// - /// The name of the sql compute + /// + /// The name of the sql pool /// /// /// The cancellation token. /// - public static async Task GetAsync(this IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations, string resourceGroupName, string workspaceName, string sqlComputeName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlComputeName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -131,7 +131,7 @@ public static RecoverableSqlPool Get(this IWorkspaceManagedSqlServerRecoverableS /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListNext(this IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations, string nextPageLink) + public static IPage ListNext(this IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations, string nextPageLink) { return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); } @@ -151,7 +151,7 @@ public static IPage ListNext(this IWorkspaceManagedSqlServer /// /// The cancellation token. /// - public static async Task> ListNextAsync(this IWorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync(this IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceSqlAadAdminsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceSqlAadAdminsOperations.cs index 9a5dfc0ff2ec..b7dc63362f54 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceSqlAadAdminsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspaceSqlAadAdminsOperations.cs @@ -65,7 +65,7 @@ internal WorkspaceSqlAadAdminsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -210,11 +210,11 @@ internal WorkspaceSqlAadAdminsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -335,7 +335,7 @@ internal WorkspaceSqlAadAdminsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -491,11 +491,11 @@ internal WorkspaceSqlAadAdminsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -584,7 +584,7 @@ internal WorkspaceSqlAadAdminsOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -726,11 +726,11 @@ internal WorkspaceSqlAadAdminsOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspacesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspacesOperations.cs index d532da738d8b..a58ca5422702 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspacesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/WorkspacesOperations.cs @@ -62,7 +62,7 @@ internal WorkspacesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -201,11 +201,11 @@ internal WorkspacesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -276,7 +276,7 @@ internal WorkspacesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -421,11 +421,11 @@ internal WorkspacesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -562,7 +562,7 @@ internal WorkspacesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -680,11 +680,11 @@ internal WorkspacesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -758,7 +758,7 @@ internal WorkspacesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -914,11 +914,11 @@ internal WorkspacesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1010,7 +1010,7 @@ internal WorkspacesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1170,11 +1170,11 @@ internal WorkspacesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1263,7 +1263,7 @@ internal WorkspacesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1408,11 +1408,11 @@ internal WorkspacesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1498,7 +1498,7 @@ internal WorkspacesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1594,11 +1594,11 @@ internal WorkspacesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1666,7 +1666,7 @@ internal WorkspacesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1762,11 +1762,11 @@ internal WorkspacesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody;