diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IMySQLManagementClient.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IMySQLManagementClient.cs
index ea43fcdeef2a..f36dc75ea313 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IMySQLManagementClient.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IMySQLManagementClient.cs
@@ -101,6 +101,11 @@ public partial interface IMySQLManagementClient : System.IDisposable
///
IConfigurationsOperations Configurations { get; }
+ ///
+ /// Gets the IServerParametersOperations.
+ ///
+ IServerParametersOperations ServerParameters { get; }
+
///
/// Gets the ILogFilesOperations.
///
@@ -111,6 +116,16 @@ public partial interface IMySQLManagementClient : System.IDisposable
///
IServerAdministratorsOperations ServerAdministrators { get; }
+ ///
+ /// Gets the IRecoverableServersOperations.
+ ///
+ IRecoverableServersOperations RecoverableServers { get; }
+
+ ///
+ /// Gets the IServerBasedPerformanceTierOperations.
+ ///
+ IServerBasedPerformanceTierOperations ServerBasedPerformanceTier { get; }
+
///
/// Gets the ILocationBasedPerformanceTierOperations.
///
@@ -181,6 +196,23 @@ public partial interface IMySQLManagementClient : System.IDisposable
///
IServerKeysOperations ServerKeys { get; }
+ ///
+ /// Reset data for Query Performance Insight.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ Task> ResetQueryPerformanceInsightDataWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+
///
/// Create recommendation action session for the advisor.
///
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IRecoverableServersOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IRecoverableServersOperations.cs
new file mode 100644
index 000000000000..e2fbae7e6a3c
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IRecoverableServersOperations.cs
@@ -0,0 +1,52 @@
+//
+// 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.MySQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RecoverableServersOperations operations.
+ ///
+ public partial interface IRecoverableServersOperations
+ {
+ ///
+ /// Gets a recoverable MySQL Server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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 serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerBasedPerformanceTierOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerBasedPerformanceTierOperations.cs
new file mode 100644
index 000000000000..3531e3d3f7e1
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerBasedPerformanceTierOperations.cs
@@ -0,0 +1,52 @@
+//
+// 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.MySQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ServerBasedPerformanceTierOperations operations.
+ ///
+ public partial interface IServerBasedPerformanceTierOperations
+ {
+ ///
+ /// List all the performance tiers for a MySQL server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerParametersOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerParametersOperations.cs
new file mode 100644
index 000000000000..3637624d5625
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerParametersOperations.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.MySQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ServerParametersOperations operations.
+ ///
+ public partial interface IServerParametersOperations
+ {
+ ///
+ /// Update a list of configurations in a given server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The parameters for updating a list of server configuration.
+ ///
+ ///
+ /// 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> ListUpdateConfigurationsWithHttpMessagesAsync(string resourceGroupName, string serverName, ConfigurationListResult value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update a list of configurations in a given server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The parameters for updating a list of server configuration.
+ ///
+ ///
+ /// 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> BeginListUpdateConfigurationsWithHttpMessagesAsync(string resourceGroupName, string serverName, ConfigurationListResult value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerSecurityAlertPoliciesOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerSecurityAlertPoliciesOperations.cs
index e233bddf4ac4..d52ccbbe0202 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerSecurityAlertPoliciesOperations.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/IServerSecurityAlertPoliciesOperations.cs
@@ -77,6 +77,31 @@ public partial interface IServerSecurityAlertPoliciesOperations
///
Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerSecurityAlertPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Get the server's threat detection policies.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Creates or updates a threat detection policy.
///
///
@@ -104,5 +129,27 @@ public partial interface IServerSecurityAlertPoliciesOperations
/// Thrown when a required parameter is null
///
Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerSecurityAlertPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get the server's threat detection policies.
+ ///
+ ///
+ /// 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>> ListByServerNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Advisor.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Advisor.cs
index 071c8bfb8240..e8c14d36b83e 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Advisor.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Advisor.cs
@@ -29,12 +29,12 @@ public Advisor()
///
/// Initializes a new instance of the Advisor class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// The properties of a recommendation action
/// advisor.
public Advisor(string id = default(string), string name = default(string), string type = default(string), object properties = default(object))
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/AzureEntityResource.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/AzureEntityResource.cs
index ba6e09549ef2..8ab7f0d6941b 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/AzureEntityResource.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/AzureEntityResource.cs
@@ -14,9 +14,12 @@ namespace Microsoft.Azure.Management.MySQL.Models
using System.Linq;
///
- /// The resource model definition for a Azure Resource Manager resource
- /// with an etag.
+ /// Entity Resource
///
+ ///
+ /// The resource model definition for an Azure Resource Manager resource
+ /// with an etag.
+ ///
public partial class AzureEntityResource : Resource
{
///
@@ -30,12 +33,12 @@ public AzureEntityResource()
///
/// Initializes a new instance of the AzureEntityResource class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Resource Etag.
public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string))
: base(id, name, type)
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Configuration.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Configuration.cs
index 2036b43ea74f..3aeac5befd93 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Configuration.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Configuration.cs
@@ -32,12 +32,12 @@ public Configuration()
///
/// Initializes a new instance of the Configuration class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Value of the configuration.
/// Description of the configuration.
/// Default value of the
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ConfigurationListResult.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ConfigurationListResult.cs
new file mode 100644
index 000000000000..dc2aa65a642f
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ConfigurationListResult.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.MySQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A list of server configurations.
+ ///
+ public partial class ConfigurationListResult
+ {
+ ///
+ /// Initializes a new instance of the ConfigurationListResult class.
+ ///
+ public ConfigurationListResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConfigurationListResult class.
+ ///
+ /// The list of server configurations.
+ public ConfigurationListResult(IList value = default(IList))
+ {
+ Value = value;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the list of server configurations.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Database.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Database.cs
index b069bbd62750..1cccdfdad72f 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Database.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Database.cs
@@ -32,12 +32,12 @@ public Database()
///
/// Initializes a new instance of the Database class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// The charset of the database.
/// The collation of the database.
public Database(string id = default(string), string name = default(string), string type = default(string), string charset = default(string), string collation = default(string))
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ErrorResponse.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ErrorResponse.cs
index 2c001449ca73..b7bed6b77371 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ErrorResponse.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ErrorResponse.cs
@@ -16,8 +16,13 @@ namespace Microsoft.Azure.Management.MySQL.Models
using System.Linq;
///
- /// The resource management 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.)
+ ///
public partial class ErrorResponse
{
///
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/FirewallRule.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/FirewallRule.cs
index 77088a18cca4..1cae4073869e 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/FirewallRule.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/FirewallRule.cs
@@ -36,12 +36,12 @@ public FirewallRule()
/// firewall rule. Must be IPv4 format.
/// The end IP address of the server
/// firewall rule. Must be IPv4 format.
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
public FirewallRule(string startIpAddress, string endIpAddress, string id = default(string), string name = default(string), string type = default(string))
: base(id, name, type)
{
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/LogFile.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/LogFile.cs
index 651fe80ce51f..4e9c8abbe295 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/LogFile.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/LogFile.cs
@@ -32,12 +32,12 @@ public LogFile()
///
/// Initializes a new instance of the LogFile class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Size of the log file.
/// Creation timestamp of the log
/// file.
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PerformanceTierProperties.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PerformanceTierProperties.cs
index 5381e92dc630..8b1eadb1f264 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PerformanceTierProperties.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PerformanceTierProperties.cs
@@ -32,11 +32,29 @@ public PerformanceTierProperties()
/// Initializes a new instance of the PerformanceTierProperties class.
///
/// ID of the performance tier.
+ /// Maximum Backup retention in
+ /// days for the performance tier edition
+ /// Minimum Backup retention in
+ /// days for the performance tier edition
+ /// Max storage allowed for a
+ /// server.
+ /// Max storage allowed for a
+ /// server.
+ /// Max storage allowed for a
+ /// server.
+ /// Max storage allowed for a
+ /// server.
/// Service level objectives
/// associated with the performance tier
- public PerformanceTierProperties(string id = default(string), IList serviceLevelObjectives = default(IList))
+ public PerformanceTierProperties(string id = default(string), int? maxBackupRetentionDays = default(int?), int? minBackupRetentionDays = default(int?), int? maxStorageMB = default(int?), int? minLargeStorageMB = default(int?), int? maxLargeStorageMB = default(int?), int? minStorageMB = default(int?), IList serviceLevelObjectives = default(IList))
{
Id = id;
+ MaxBackupRetentionDays = maxBackupRetentionDays;
+ MinBackupRetentionDays = minBackupRetentionDays;
+ MaxStorageMB = maxStorageMB;
+ MinLargeStorageMB = minLargeStorageMB;
+ MaxLargeStorageMB = maxLargeStorageMB;
+ MinStorageMB = minStorageMB;
ServiceLevelObjectives = serviceLevelObjectives;
CustomInit();
}
@@ -52,6 +70,44 @@ public PerformanceTierProperties()
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
+ ///
+ /// Gets or sets maximum Backup retention in days for the performance
+ /// tier edition
+ ///
+ [JsonProperty(PropertyName = "maxBackupRetentionDays")]
+ public int? MaxBackupRetentionDays { get; set; }
+
+ ///
+ /// Gets or sets minimum Backup retention in days for the performance
+ /// tier edition
+ ///
+ [JsonProperty(PropertyName = "minBackupRetentionDays")]
+ public int? MinBackupRetentionDays { get; set; }
+
+ ///
+ /// Gets or sets max storage allowed for a server.
+ ///
+ [JsonProperty(PropertyName = "maxStorageMB")]
+ public int? MaxStorageMB { get; set; }
+
+ ///
+ /// Gets or sets max storage allowed for a server.
+ ///
+ [JsonProperty(PropertyName = "minLargeStorageMB")]
+ public int? MinLargeStorageMB { get; set; }
+
+ ///
+ /// Gets or sets max storage allowed for a server.
+ ///
+ [JsonProperty(PropertyName = "maxLargeStorageMB")]
+ public int? MaxLargeStorageMB { get; set; }
+
+ ///
+ /// Gets or sets max storage allowed for a server.
+ ///
+ [JsonProperty(PropertyName = "minStorageMB")]
+ public int? MinStorageMB { get; set; }
+
///
/// Gets or sets service level objectives associated with the
/// performance tier
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PrivateEndpointConnection.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PrivateEndpointConnection.cs
index bf2fc1b5ea60..abe8755a53ec 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PrivateEndpointConnection.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PrivateEndpointConnection.cs
@@ -32,12 +32,12 @@ public PrivateEndpointConnection()
///
/// Initializes a new instance of the PrivateEndpointConnection class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Private endpoint which the connection
/// belongs to.
/// Connection state of
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PrivateLinkResource.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PrivateLinkResource.cs
index 6296f6dfd989..43a670f2273d 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PrivateLinkResource.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/PrivateLinkResource.cs
@@ -29,12 +29,12 @@ public PrivateLinkResource()
///
/// Initializes a new instance of the PrivateLinkResource class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// The private link resource group
/// id.
public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), PrivateLinkResourceProperties properties = default(PrivateLinkResourceProperties))
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ProxyResource.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ProxyResource.cs
index 5eadc4cc9fc0..ac252937c25b 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ProxyResource.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ProxyResource.cs
@@ -13,9 +13,12 @@ namespace Microsoft.Azure.Management.MySQL.Models
using System.Linq;
///
- /// The resource model definition for a ARM proxy resource. It will have
- /// everything other than required location and tags
+ /// Proxy Resource
///
+ ///
+ /// The resource model definition for a Azure Resource Manager proxy
+ /// resource. It will not have tags and a location
+ ///
public partial class ProxyResource : Resource
{
///
@@ -29,12 +32,12 @@ public ProxyResource()
///
/// Initializes a new instance of the ProxyResource class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
public ProxyResource(string id = default(string), string name = default(string), string type = default(string))
: base(id, name, type)
{
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryPerformanceInsightResetDataResult.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryPerformanceInsightResetDataResult.cs
new file mode 100644
index 000000000000..5e25314691bc
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryPerformanceInsightResetDataResult.cs
@@ -0,0 +1,63 @@
+//
+// 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.MySQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Result of Query Performance Insight data reset.
+ ///
+ public partial class QueryPerformanceInsightResetDataResult
+ {
+ ///
+ /// Initializes a new instance of the
+ /// QueryPerformanceInsightResetDataResult class.
+ ///
+ public QueryPerformanceInsightResetDataResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// QueryPerformanceInsightResetDataResult class.
+ ///
+ /// Indicates result of the operation. Possible
+ /// values include: 'Succeeded', 'Failed'
+ /// operation message.
+ public QueryPerformanceInsightResetDataResult(string status = default(string), string message = default(string))
+ {
+ Status = status;
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets indicates result of the operation. Possible values
+ /// include: 'Succeeded', 'Failed'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets operation message.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryPerformanceInsightResetDataResultState.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryPerformanceInsightResetDataResultState.cs
new file mode 100644
index 000000000000..e6bbe7120477
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryPerformanceInsightResetDataResultState.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.MySQL.Models
+{
+
+ ///
+ /// Defines values for QueryPerformanceInsightResetDataResultState.
+ ///
+ public static class QueryPerformanceInsightResetDataResultState
+ {
+ public const string Succeeded = "Succeeded";
+ public const string Failed = "Failed";
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryStatistic.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryStatistic.cs
index 4b4d91393e6a..fdd05ef74c7e 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryStatistic.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryStatistic.cs
@@ -34,12 +34,12 @@ public QueryStatistic()
///
/// Initializes a new instance of the QueryStatistic class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Database query identifier.
/// Observation start time.
/// Observation end time.
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryText.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryText.cs
index e962901f930c..3e765107c330 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryText.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/QueryText.cs
@@ -32,12 +32,12 @@ public QueryText()
///
/// Initializes a new instance of the QueryText class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Query identifier unique to the
/// server.
/// Query text.
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/RecommendationAction.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/RecommendationAction.cs
index 86337e87f670..cffed60a4a9e 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/RecommendationAction.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/RecommendationAction.cs
@@ -34,12 +34,12 @@ public RecommendationAction()
///
/// Initializes a new instance of the RecommendationAction class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Advisor name.
/// Recommendation action session
/// identifier.
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/RecoverableServerResource.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/RecoverableServerResource.cs
new file mode 100644
index 000000000000..34c9dfdecc36
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/RecoverableServerResource.cs
@@ -0,0 +1,106 @@
+//
+// 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.MySQL.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A recoverable server resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RecoverableServerResource : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the RecoverableServerResource class.
+ ///
+ public RecoverableServerResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RecoverableServerResource 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"
+ /// The last available backup
+ /// date time.
+ /// The service level
+ /// objective
+ /// Edition of the performance tier.
+ /// vCore associated with the service level
+ /// objective
+ /// Hardware generation associated
+ /// with the service level objective
+ /// The MySQL version
+ public RecoverableServerResource(string id = default(string), string name = default(string), string type = default(string), string lastAvailableBackupDateTime = default(string), string serviceLevelObjective = default(string), string edition = default(string), int? vCore = default(int?), string hardwareGeneration = default(string), string version = default(string))
+ : base(id, name, type)
+ {
+ LastAvailableBackupDateTime = lastAvailableBackupDateTime;
+ ServiceLevelObjective = serviceLevelObjective;
+ Edition = edition;
+ VCore = vCore;
+ HardwareGeneration = hardwareGeneration;
+ Version = version;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the last available backup date time.
+ ///
+ [JsonProperty(PropertyName = "properties.lastAvailableBackupDateTime")]
+ public string LastAvailableBackupDateTime { get; private set; }
+
+ ///
+ /// Gets the service level objective
+ ///
+ [JsonProperty(PropertyName = "properties.serviceLevelObjective")]
+ public string ServiceLevelObjective { get; private set; }
+
+ ///
+ /// Gets edition of the performance tier.
+ ///
+ [JsonProperty(PropertyName = "properties.edition")]
+ public string Edition { get; private set; }
+
+ ///
+ /// Gets vCore associated with the service level objective
+ ///
+ [JsonProperty(PropertyName = "properties.vCore")]
+ public int? VCore { get; private set; }
+
+ ///
+ /// Gets hardware generation associated with the service level
+ /// objective
+ ///
+ [JsonProperty(PropertyName = "properties.hardwareGeneration")]
+ public string HardwareGeneration { get; private set; }
+
+ ///
+ /// Gets the MySQL version
+ ///
+ [JsonProperty(PropertyName = "properties.version")]
+ public string Version { get; private set; }
+
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Resource.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Resource.cs
index 8e7b7551af33..f52e693d285a 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Resource.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Resource.cs
@@ -15,6 +15,13 @@ namespace Microsoft.Azure.Management.MySQL.Models
using Newtonsoft.Json;
using System.Linq;
+ ///
+ /// Resource
+ ///
+ ///
+ /// Common fields that are returned in the response for all Azure Resource
+ /// Manager resources
+ ///
public partial class Resource : IResource
{
///
@@ -28,12 +35,12 @@ public Resource()
///
/// Initializes a new instance of the Resource class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
public Resource(string id = default(string), string name = default(string), string type = default(string))
{
Id = id;
@@ -48,7 +55,7 @@ public Resource()
partial void CustomInit();
///
- /// Gets fully qualified resource Id for the resource. Ex -
+ /// Gets fully qualified resource ID for the resource. Ex -
/// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
///
[JsonProperty(PropertyName = "id")]
@@ -61,9 +68,9 @@ public Resource()
public string Name { get; private set; }
///
- /// Gets the type of the resource. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// Gets the type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
///
[JsonProperty(PropertyName = "type")]
public string Type { get; private set; }
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Server.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Server.cs
index c8a8dc76f4b3..01c9ebd92cad 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Server.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/Server.cs
@@ -36,12 +36,12 @@ public Server()
///
/// The geo-location where the resource
/// lives
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Resource tags.
/// The Azure Active Directory identity of the
/// server.
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerAdministratorResource.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerAdministratorResource.cs
index 914a9b87f50a..f0eb67f3e496 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerAdministratorResource.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerAdministratorResource.cs
@@ -39,12 +39,12 @@ public ServerAdministratorResource()
/// The server administrator Sid (Secure ID).
/// The server Active Directory Administrator
/// tenant id.
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
public ServerAdministratorResource(string login, System.Guid sid, System.Guid tenantId, string id = default(string), string name = default(string), string type = default(string))
: base(id, name, type)
{
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerKey.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerKey.cs
index 36fdfeac518e..22b6c33ba42a 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerKey.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerKey.cs
@@ -32,12 +32,12 @@ public ServerKey()
///
/// Initializes a new instance of the ServerKey class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Kind of encryption protector used to protect the
/// key.
/// The URI of the key.
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerSecurityAlertPolicy.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerSecurityAlertPolicy.cs
index 594e3e95db63..f718d4895b51 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerSecurityAlertPolicy.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/ServerSecurityAlertPolicy.cs
@@ -37,12 +37,12 @@ public ServerSecurityAlertPolicy()
/// Specifies the state of the policy, whether it
/// is enabled or disabled. Possible values include: 'Enabled',
/// 'Disabled'
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Specifies an array of alerts that are
/// disabled. Allowed values are: Sql_Injection,
/// Sql_Injection_Vulnerability, Access_Anomaly
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/TrackedResource.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/TrackedResource.cs
index acda19538196..68be1e1e7d91 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/TrackedResource.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/TrackedResource.cs
@@ -17,8 +17,12 @@ namespace Microsoft.Azure.Management.MySQL.Models
using System.Linq;
///
- /// The resource model definition for a ARM tracked top level resource
+ /// Tracked Resource
///
+ ///
+ /// The resource model definition for an Azure Resource Manager tracked top
+ /// level resource which has 'tags' and a 'location'
+ ///
public partial class TrackedResource : Resource
{
///
@@ -34,12 +38,12 @@ public TrackedResource()
///
/// The geo-location where the resource
/// lives
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Resource tags.
public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
: base(id, name, type)
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/VirtualNetworkRule.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/VirtualNetworkRule.cs
index 8a039c8aad42..8190be2fd56b 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/VirtualNetworkRule.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/VirtualNetworkRule.cs
@@ -34,12 +34,12 @@ public VirtualNetworkRule()
///
/// The ARM resource id of the
/// virtual network subnet.
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Create firewall rule
/// before the virtual network has vnet service endpoint
/// enabled.
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/WaitStatistic.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/WaitStatistic.cs
index 4fb4ba5eadfd..61311dd74e15 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/WaitStatistic.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/Models/WaitStatistic.cs
@@ -32,12 +32,12 @@ public WaitStatistic()
///
/// Initializes a new instance of the WaitStatistic class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Observation start time.
/// Observation end time.
/// Wait event name.
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/MySQLManagementClient.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/MySQLManagementClient.cs
index d4a2530d2a71..cbb1bf48c9e7 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/MySQLManagementClient.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/MySQLManagementClient.cs
@@ -104,6 +104,11 @@ public partial class MySQLManagementClient : ServiceClient
public virtual IConfigurationsOperations Configurations { get; private set; }
+ ///
+ /// Gets the IServerParametersOperations.
+ ///
+ public virtual IServerParametersOperations ServerParameters { get; private set; }
+
///
/// Gets the ILogFilesOperations.
///
@@ -114,6 +119,16 @@ public partial class MySQLManagementClient : ServiceClient
public virtual IServerAdministratorsOperations ServerAdministrators { get; private set; }
+ ///
+ /// Gets the IRecoverableServersOperations.
+ ///
+ public virtual IRecoverableServersOperations RecoverableServers { get; private set; }
+
+ ///
+ /// Gets the IServerBasedPerformanceTierOperations.
+ ///
+ public virtual IServerBasedPerformanceTierOperations ServerBasedPerformanceTier { get; private set; }
+
///
/// Gets the ILocationBasedPerformanceTierOperations.
///
@@ -431,8 +446,11 @@ private void Initialize()
VirtualNetworkRules = new VirtualNetworkRulesOperations(this);
Databases = new DatabasesOperations(this);
Configurations = new ConfigurationsOperations(this);
+ ServerParameters = new ServerParametersOperations(this);
LogFiles = new LogFilesOperations(this);
ServerAdministrators = new ServerAdministratorsOperations(this);
+ RecoverableServers = new RecoverableServersOperations(this);
+ ServerBasedPerformanceTier = new ServerBasedPerformanceTierOperations(this);
LocationBasedPerformanceTier = new LocationBasedPerformanceTierOperations(this);
CheckNameAvailability = new CheckNameAvailabilityOperations(this);
Operations = new Operations(this);
@@ -483,6 +501,222 @@ private void Initialize()
DeserializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
}
+ ///
+ /// Reset data for Query Performance Insight.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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> ResetQueryPerformanceInsightDataWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
+ }
+ if (SubscriptionId != null)
+ {
+ if (SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "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 (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ string apiVersion = "2018-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ResetQueryPerformanceInsightData", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/resetQueryPerformanceInsightData").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (GenerateClientRequestId != null && GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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;
+ }
+
///
/// Create recommendation action session for the advisor.
///
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/MySQLManagementClientExtensions.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/MySQLManagementClientExtensions.cs
index 89dc9ddee89f..a3c4f2360543 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/MySQLManagementClientExtensions.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/MySQLManagementClientExtensions.cs
@@ -21,6 +21,46 @@ namespace Microsoft.Azure.Management.MySQL
///
public static partial class MySQLManagementClientExtensions
{
+ ///
+ /// Reset data for Query Performance Insight.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ public static QueryPerformanceInsightResetDataResult ResetQueryPerformanceInsightData(this IMySQLManagementClient operations, string resourceGroupName, string serverName)
+ {
+ return operations.ResetQueryPerformanceInsightDataAsync(resourceGroupName, serverName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Reset data for Query Performance Insight.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ResetQueryPerformanceInsightDataAsync(this IMySQLManagementClient operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ResetQueryPerformanceInsightDataWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Create recommendation action session for the advisor.
///
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/RecoverableServersOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/RecoverableServersOperations.cs
new file mode 100644
index 000000000000..cb31f94e06d2
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/RecoverableServersOperations.cs
@@ -0,0 +1,270 @@
+//
+// 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.MySQL
+{
+ 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;
+
+ ///
+ /// RecoverableServersOperations operations.
+ ///
+ internal partial class RecoverableServersOperations : IServiceOperations, IRecoverableServersOperations
+ {
+ ///
+ /// Initializes a new instance of the RecoverableServersOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal RecoverableServersOperations(MySQLManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MySQLManagementClient
+ ///
+ public MySQLManagementClient Client { get; private set; }
+
+ ///
+ /// Gets a recoverable MySQL Server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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 serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ 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 (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ string apiVersion = "2017-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ 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.DBForMySQL/servers/{serverName}/recoverableServers").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/RecoverableServersOperationsExtensions.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/RecoverableServersOperationsExtensions.cs
new file mode 100644
index 000000000000..2aca0190acfa
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/RecoverableServersOperationsExtensions.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.MySQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for RecoverableServersOperations.
+ ///
+ public static partial class RecoverableServersOperationsExtensions
+ {
+ ///
+ /// Gets a recoverable MySQL Server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ public static RecoverableServerResource Get(this IRecoverableServersOperations operations, string resourceGroupName, string serverName)
+ {
+ return operations.GetAsync(resourceGroupName, serverName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a recoverable MySQL Server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IRecoverableServersOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/SdkInfo_MySQLManagementClient.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/SdkInfo_MySQLManagementClient.cs
index 291a4962765a..5c5549bdefab 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/SdkInfo_MySQLManagementClient.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/SdkInfo_MySQLManagementClient.cs
@@ -26,8 +26,11 @@ public static IEnumerable> ApiInfo_MySQLManagement
new Tuple("DBForMySQL", "LocationBasedPerformanceTier", "2017-12-01"),
new Tuple("DBForMySQL", "LogFiles", "2017-12-01"),
new Tuple("DBForMySQL", "Operations", "2017-12-01"),
+ new Tuple("DBForMySQL", "RecoverableServers", "2017-12-01"),
new Tuple("DBForMySQL", "Replicas", "2017-12-01"),
new Tuple("DBForMySQL", "ServerAdministrators", "2017-12-01"),
+ new Tuple("DBForMySQL", "ServerBasedPerformanceTier", "2017-12-01"),
+ new Tuple("DBForMySQL", "ServerParameters", "2017-12-01"),
new Tuple("DBForMySQL", "Servers", "2017-12-01"),
new Tuple("DBForMySQL", "VirtualNetworkRules", "2017-12-01"),
new Tuple("DBforMySQL", "Advisors", "2018-06-01"),
@@ -38,6 +41,7 @@ public static IEnumerable> ApiInfo_MySQLManagement
new Tuple("DBforMySQL", "PrivateLinkResources", "2018-06-01"),
new Tuple("DBforMySQL", "QueryTexts", "2018-06-01"),
new Tuple("DBforMySQL", "RecommendedActions", "2018-06-01"),
+ new Tuple("DBforMySQL", "ResetQueryPerformanceInsightData", "2018-06-01"),
new Tuple("DBforMySQL", "ServerKeys", "2020-01-01"),
new Tuple("DBforMySQL", "ServerSecurityAlertPolicies", "2017-12-01"),
new Tuple("DBforMySQL", "Servers", "2020-01-01"),
@@ -46,16 +50,5 @@ public static IEnumerable> ApiInfo_MySQLManagement
}.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/mysql/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.output-folder=C:\\z\\azure-sdk-for-net\\sdk\\mysql\\Microsoft.Azure.Management.MySQL\\src\\mysql\\Generated";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "faf8e1c19e3b36e6d16622bf168369a838b04a7f";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerAdministratorsOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerAdministratorsOperations.cs
index 6fbec3ecd3a4..dff921b0f285 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerAdministratorsOperations.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerAdministratorsOperations.cs
@@ -132,7 +132,7 @@ internal ServerAdministratorsOperations(MySQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/Administrators/activeDirectory").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/administrators/activeDirectory").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
@@ -627,7 +627,7 @@ internal ServerAdministratorsOperations(MySQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/Administrators/activeDirectory").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/administrators/activeDirectory").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
@@ -864,7 +864,7 @@ internal ServerAdministratorsOperations(MySQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/Administrators/activeDirectory").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/administrators/activeDirectory").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerBasedPerformanceTierOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerBasedPerformanceTierOperations.cs
new file mode 100644
index 000000000000..94d3109d082b
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerBasedPerformanceTierOperations.cs
@@ -0,0 +1,270 @@
+//
+// 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.MySQL
+{
+ 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;
+
+ ///
+ /// ServerBasedPerformanceTierOperations operations.
+ ///
+ internal partial class ServerBasedPerformanceTierOperations : IServiceOperations, IServerBasedPerformanceTierOperations
+ {
+ ///
+ /// Initializes a new instance of the ServerBasedPerformanceTierOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal ServerBasedPerformanceTierOperations(MySQLManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MySQLManagementClient
+ ///
+ public MySQLManagementClient Client { get; private set; }
+
+ ///
+ /// List all the performance tiers for a MySQL server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ 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 (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ string apiVersion = "2017-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/performanceTiers").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerBasedPerformanceTierOperationsExtensions.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerBasedPerformanceTierOperationsExtensions.cs
new file mode 100644
index 000000000000..efa69d5ba44b
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerBasedPerformanceTierOperationsExtensions.cs
@@ -0,0 +1,67 @@
+//
+// 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.MySQL
+{
+ 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 ServerBasedPerformanceTierOperations.
+ ///
+ public static partial class ServerBasedPerformanceTierOperationsExtensions
+ {
+ ///
+ /// List all the performance tiers for a MySQL server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ public static IEnumerable List(this IServerBasedPerformanceTierOperations operations, string resourceGroupName, string serverName)
+ {
+ return operations.ListAsync(resourceGroupName, serverName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all the performance tiers for a MySQL server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IServerBasedPerformanceTierOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerParametersOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerParametersOperations.cs
new file mode 100644
index 000000000000..9840d590212e
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerParametersOperations.cs
@@ -0,0 +1,309 @@
+//
+// 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.MySQL
+{
+ 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;
+
+ ///
+ /// ServerParametersOperations operations.
+ ///
+ internal partial class ServerParametersOperations : IServiceOperations, IServerParametersOperations
+ {
+ ///
+ /// Initializes a new instance of the ServerParametersOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal ServerParametersOperations(MySQLManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MySQLManagementClient
+ ///
+ public MySQLManagementClient Client { get; private set; }
+
+ ///
+ /// Update a list of configurations in a given server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The parameters for updating a list of server configuration.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> ListUpdateConfigurationsWithHttpMessagesAsync(string resourceGroupName, string serverName, ConfigurationListResult value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginListUpdateConfigurationsWithHttpMessagesAsync(resourceGroupName, serverName, value, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Update a list of configurations in a given server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The parameters for updating a list of server configuration.
+ ///
+ ///
+ /// 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> BeginListUpdateConfigurationsWithHttpMessagesAsync(string resourceGroupName, string serverName, ConfigurationListResult value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ 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 (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ if (value == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "value");
+ }
+ string apiVersion = "2017-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("value", value);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginListUpdateConfigurations", 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.DBForMySQL/servers/{serverName}/updateConfigurations").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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(value != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(value, 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 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/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerParametersOperationsExtensions.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerParametersOperationsExtensions.cs
new file mode 100644
index 000000000000..ed15237ba9a3
--- /dev/null
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerParametersOperationsExtensions.cs
@@ -0,0 +1,117 @@
+//
+// 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.MySQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for ServerParametersOperations.
+ ///
+ public static partial class ServerParametersOperationsExtensions
+ {
+ ///
+ /// Update a list of configurations in a given server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The parameters for updating a list of server configuration.
+ ///
+ public static ConfigurationListResult ListUpdateConfigurations(this IServerParametersOperations operations, string resourceGroupName, string serverName, ConfigurationListResult value)
+ {
+ return operations.ListUpdateConfigurationsAsync(resourceGroupName, serverName, value).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Update a list of configurations in a given server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The parameters for updating a list of server configuration.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListUpdateConfigurationsAsync(this IServerParametersOperations operations, string resourceGroupName, string serverName, ConfigurationListResult value, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListUpdateConfigurationsWithHttpMessagesAsync(resourceGroupName, serverName, value, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Update a list of configurations in a given server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The parameters for updating a list of server configuration.
+ ///
+ public static ConfigurationListResult BeginListUpdateConfigurations(this IServerParametersOperations operations, string resourceGroupName, string serverName, ConfigurationListResult value)
+ {
+ return operations.BeginListUpdateConfigurationsAsync(resourceGroupName, serverName, value).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Update a list of configurations in a given server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The parameters for updating a list of server configuration.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginListUpdateConfigurationsAsync(this IServerParametersOperations operations, string resourceGroupName, string serverName, ConfigurationListResult value, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginListUpdateConfigurationsWithHttpMessagesAsync(resourceGroupName, serverName, value, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerSecurityAlertPoliciesOperations.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerSecurityAlertPoliciesOperations.cs
index e4d3b5c34fb5..d5ced3b0798a 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerSecurityAlertPoliciesOperations.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerSecurityAlertPoliciesOperations.cs
@@ -294,6 +294,222 @@ internal ServerSecurityAlertPoliciesOperations(MySQLManagementClient client)
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
+ ///
+ /// Get the server's threat detection policies.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, 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 (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ 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);
+ }
+ }
+ string apiVersion = "2017-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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;
+ }
+
///
/// Creates or updates a threat detection policy.
///
@@ -531,5 +747,178 @@ internal ServerSecurityAlertPoliciesOperations(MySQLManagementClient client)
return _result;
}
+ ///
+ /// Get the server's threat detection policies.
+ ///
+ ///
+ /// 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>> ListByServerNextWithHttpMessagesAsync(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, "ListByServerNext", 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 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/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerSecurityAlertPoliciesOperationsExtensions.cs b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerSecurityAlertPoliciesOperationsExtensions.cs
index 77642e865d84..5540e344ef61 100644
--- a/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerSecurityAlertPoliciesOperationsExtensions.cs
+++ b/sdk/mysql/Microsoft.Azure.Management.MySQL/src/mysql/Generated/ServerSecurityAlertPoliciesOperationsExtensions.cs
@@ -107,6 +107,46 @@ public static ServerSecurityAlertPolicy CreateOrUpdate(this IServerSecurityAlert
}
}
+ ///
+ /// Get the server's threat detection policies.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ public static IPage ListByServer(this IServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string serverName)
+ {
+ return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get the server's threat detection policies.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByServerAsync(this IServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Creates or updates a threat detection policy.
///
@@ -153,5 +193,39 @@ public static ServerSecurityAlertPolicy BeginCreateOrUpdate(this IServerSecurity
}
}
+ ///
+ /// Get the server's threat detection policies.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListByServerNext(this IServerSecurityAlertPoliciesOperations operations, string nextPageLink)
+ {
+ return operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get the server's threat detection policies.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByServerNextAsync(this IServerSecurityAlertPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}