diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/AvailabilityGroupListenersOperations.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/AvailabilityGroupListenersOperations.cs
index 40df80637135..dfd40b2d6a8a 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/AvailabilityGroupListenersOperations.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/AvailabilityGroupListenersOperations.cs
@@ -63,6 +63,9 @@ internal AvailabilityGroupListenersOperations(SqlVirtualMachineManagementClient
///
/// Name of the availability group listener.
///
+ ///
+ /// The child resources to include in the response.
+ ///
///
/// Headers that will be added to request.
///
@@ -84,7 +87,7 @@ internal AvailabilityGroupListenersOperations(SqlVirtualMachineManagementClient
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -116,6 +119,7 @@ internal AvailabilityGroupListenersOperations(SqlVirtualMachineManagementClient
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("sqlVirtualMachineGroupName", sqlVirtualMachineGroupName);
tracingParameters.Add("availabilityGroupListenerName", availabilityGroupListenerName);
+ tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -127,6 +131,10 @@ internal AvailabilityGroupListenersOperations(SqlVirtualMachineManagementClient
_url = _url.Replace("{availabilityGroupListenerName}", System.Uri.EscapeDataString(availabilityGroupListenerName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
+ if (expand != null)
+ {
+ _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
+ }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/AvailabilityGroupListenersOperationsExtensions.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/AvailabilityGroupListenersOperationsExtensions.cs
index f81dcd37854f..d702125da8ae 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/AvailabilityGroupListenersOperationsExtensions.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/AvailabilityGroupListenersOperationsExtensions.cs
@@ -37,9 +37,12 @@ public static partial class AvailabilityGroupListenersOperationsExtensions
///
/// Name of the availability group listener.
///
- public static AvailabilityGroupListener Get(this IAvailabilityGroupListenersOperations operations, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName)
+ ///
+ /// The child resources to include in the response.
+ ///
+ public static AvailabilityGroupListener Get(this IAvailabilityGroupListenersOperations operations, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, string expand = default(string))
{
- return operations.GetAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand).GetAwaiter().GetResult();
}
///
@@ -58,12 +61,15 @@ public static AvailabilityGroupListener Get(this IAvailabilityGroupListenersOper
///
/// Name of the availability group listener.
///
+ ///
+ /// The child resources to include in the response.
+ ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IAvailabilityGroupListenersOperations operations, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IAvailabilityGroupListenersOperations operations, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/IAvailabilityGroupListenersOperations.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/IAvailabilityGroupListenersOperations.cs
index 4fb9e321ef43..f2f852cbcbf4 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/IAvailabilityGroupListenersOperations.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/IAvailabilityGroupListenersOperations.cs
@@ -37,6 +37,9 @@ public partial interface IAvailabilityGroupListenersOperations
///
/// Name of the availability group listener.
///
+ ///
+ /// The child resources to include in the response.
+ ///
///
/// The headers that will be added to request.
///
@@ -52,7 +55,7 @@ public partial interface IAvailabilityGroupListenersOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Creates or updates an availability group listener.
///
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/IOperations.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/IOperations.cs
index 977a4904d697..289b7169e8e2 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/IOperations.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/IOperations.cs
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.SqlVirtualMachine
public partial interface IOperations
{
///
- /// Lists all of the available SQL Rest API operations.
+ /// Lists all of the available SQL Virtual Machine Rest API operations.
///
///
/// The headers that will be added to request.
@@ -43,7 +43,7 @@ public partial interface IOperations
///
Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Lists all of the available SQL Rest API operations.
+ /// Lists all of the available SQL Virtual Machine Rest API operations.
///
///
/// The NextLink from the previous successful call to List operation.
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/ISqlVirtualMachinesOperations.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/ISqlVirtualMachinesOperations.cs
index e88b4153da06..f2bb5504eded 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/ISqlVirtualMachinesOperations.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/ISqlVirtualMachinesOperations.cs
@@ -23,6 +23,34 @@ namespace Microsoft.Azure.Management.SqlVirtualMachine
///
public partial interface ISqlVirtualMachinesOperations
{
+ ///
+ /// Gets the list of sql virtual machines in a SQL virtual machine
+ /// group.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine group.
+ ///
+ ///
+ /// 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>> ListBySqlVmGroupWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets all SQL virtual machines in a subscription.
///
@@ -43,6 +71,30 @@ public partial interface ISqlVirtualMachinesOperations
///
Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Uninstalls and reinstalls the SQL Iaas Extension.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task RedeployWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Gets a SQL virtual machine.
///
///
@@ -181,6 +233,54 @@ public partial interface ISqlVirtualMachinesOperations
///
Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Starts Assessment on SQL virtual machine.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task StartAssessmentWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Uninstalls and reinstalls the SQL Iaas Extension.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginRedeployWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Creates or updates a SQL virtual machine.
///
///
@@ -265,6 +365,53 @@ public partial interface ISqlVirtualMachinesOperations
///
Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Starts Assessment on SQL virtual machine.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginStartAssessmentWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the list of sql virtual machines in a SQL virtual machine
+ /// group.
+ ///
+ ///
+ /// 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>> ListBySqlVmGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Gets all SQL virtual machines in a subscription.
///
///
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AgConfiguration.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AgConfiguration.cs
new file mode 100644
index 000000000000..dce8c85da298
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AgConfiguration.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.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Availability group configuration.
+ ///
+ public partial class AgConfiguration
+ {
+ ///
+ /// Initializes a new instance of the AgConfiguration class.
+ ///
+ public AgConfiguration()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AgConfiguration class.
+ ///
+ /// Replica configurations.
+ public AgConfiguration(IList replicas = default(IList))
+ {
+ Replicas = replicas;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets replica configurations.
+ ///
+ [JsonProperty(PropertyName = "replicas")]
+ public IList Replicas { get; private set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AgReplica.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AgReplica.cs
new file mode 100644
index 000000000000..a34d6e9701ee
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AgReplica.cs
@@ -0,0 +1,94 @@
+//
+// 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.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Availability group replica configuration.
+ ///
+ public partial class AgReplica
+ {
+ ///
+ /// Initializes a new instance of the AgReplica class.
+ ///
+ public AgReplica()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AgReplica class.
+ ///
+ /// Sql VirtualMachine
+ /// Instance Id.
+ /// Replica Role in availability group. Possible
+ /// values include: 'PRIMARY', 'SECONDARY'
+ /// Replica commit mode in availability group.
+ /// Possible values include: 'SYNCHRONOUS_COMMIT',
+ /// 'ASYNCHRONOUS_COMMIT'
+ /// Replica failover mode in availability group.
+ /// Possible values include: 'AUTOMATIC', 'MANUAL'
+ /// Replica readable secondary mode in
+ /// availability group. Possible values include: 'NO', 'ALL',
+ /// 'READ_ONLY'
+ public AgReplica(string sqlVirtualMachineInstanceId = default(string), string role = default(string), string commit = default(string), string failover = default(string), string readableSecondary = default(string))
+ {
+ SqlVirtualMachineInstanceId = sqlVirtualMachineInstanceId;
+ Role = role;
+ Commit = commit;
+ Failover = failover;
+ ReadableSecondary = readableSecondary;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets sql VirtualMachine Instance Id.
+ ///
+ [JsonProperty(PropertyName = "sqlVirtualMachineInstanceId")]
+ public string SqlVirtualMachineInstanceId { get; set; }
+
+ ///
+ /// Gets or sets replica Role in availability group. Possible values
+ /// include: 'PRIMARY', 'SECONDARY'
+ ///
+ [JsonProperty(PropertyName = "role")]
+ public string Role { get; set; }
+
+ ///
+ /// Gets or sets replica commit mode in availability group. Possible
+ /// values include: 'SYNCHRONOUS_COMMIT', 'ASYNCHRONOUS_COMMIT'
+ ///
+ [JsonProperty(PropertyName = "commit")]
+ public string Commit { get; set; }
+
+ ///
+ /// Gets or sets replica failover mode in availability group. Possible
+ /// values include: 'AUTOMATIC', 'MANUAL'
+ ///
+ [JsonProperty(PropertyName = "failover")]
+ public string Failover { get; set; }
+
+ ///
+ /// Gets or sets replica readable secondary mode in availability group.
+ /// Possible values include: 'NO', 'ALL', 'READ_ONLY'
+ ///
+ [JsonProperty(PropertyName = "readableSecondary")]
+ public string ReadableSecondary { get; set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AssessmentSettings.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AssessmentSettings.cs
new file mode 100644
index 000000000000..8b368827cfa8
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AssessmentSettings.cs
@@ -0,0 +1,70 @@
+//
+// 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.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Configure assessment for databases in your SQL virtual machine.
+ ///
+ public partial class AssessmentSettings
+ {
+ ///
+ /// Initializes a new instance of the AssessmentSettings class.
+ ///
+ public AssessmentSettings()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AssessmentSettings class.
+ ///
+ /// Enable or disable assessment feature on SQL
+ /// virtual machine.
+ /// Run assessment immediately on SQL
+ /// virtual machine.
+ /// Schedule for Assessment.
+ public AssessmentSettings(bool? enable = default(bool?), bool? runImmediately = default(bool?), Schedule schedule = default(Schedule))
+ {
+ Enable = enable;
+ RunImmediately = runImmediately;
+ Schedule = schedule;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets enable or disable assessment feature on SQL virtual
+ /// machine.
+ ///
+ [JsonProperty(PropertyName = "enable")]
+ public bool? Enable { get; set; }
+
+ ///
+ /// Gets or sets run assessment immediately on SQL virtual machine.
+ ///
+ [JsonProperty(PropertyName = "runImmediately")]
+ public bool? RunImmediately { get; set; }
+
+ ///
+ /// Gets or sets schedule for Assessment.
+ ///
+ [JsonProperty(PropertyName = "schedule")]
+ public Schedule Schedule { get; set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AutoBackupSettings.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AutoBackupSettings.cs
index d79a66c9b72f..85fb5cdad344 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AutoBackupSettings.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AutoBackupSettings.cs
@@ -11,6 +11,8 @@
namespace Microsoft.Azure.Management.SqlVirtualMachine.Models
{
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
@@ -33,10 +35,12 @@ public AutoBackupSettings()
/// machine.
/// Enable or disable encryption for
/// backup on SQL virtual machine.
- /// Retention period of backup: 1-30
+ /// Retention period of backup: 1-90
/// days.
/// Storage account url where backup
/// will be taken to.
+ /// Storage container name where
+ /// backup will be taken to.
/// Storage account key where backup
/// will be taken to.
/// Password for encryption on backup.
@@ -47,6 +51,8 @@ public AutoBackupSettings()
/// Frequency of full backups. In
/// both cases, full backups begin during the next scheduled time
/// window. Possible values include: 'Daily', 'Weekly'
+ /// Days of the week for the backups when
+ /// FullBackupFrequency is set to Weekly.
/// Start time of a given day during
/// which full backups can take place. 0-23 hours.
/// Duration of the time window of
@@ -54,17 +60,19 @@ public AutoBackupSettings()
/// hours.
/// Frequency of log backups. 5-60
/// minutes.
- public AutoBackupSettings(bool? enable = default(bool?), bool? enableEncryption = default(bool?), int? retentionPeriod = default(int?), string storageAccountUrl = default(string), string storageAccessKey = default(string), string password = default(string), bool? backupSystemDbs = default(bool?), string backupScheduleType = default(string), string fullBackupFrequency = default(string), int? fullBackupStartTime = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?))
+ public AutoBackupSettings(bool? enable = default(bool?), bool? enableEncryption = default(bool?), int? retentionPeriod = default(int?), string storageAccountUrl = default(string), string storageContainerName = default(string), string storageAccessKey = default(string), string password = default(string), bool? backupSystemDbs = default(bool?), string backupScheduleType = default(string), string fullBackupFrequency = default(string), IList daysOfWeek = default(IList), int? fullBackupStartTime = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?))
{
Enable = enable;
EnableEncryption = enableEncryption;
RetentionPeriod = retentionPeriod;
StorageAccountUrl = storageAccountUrl;
+ StorageContainerName = storageContainerName;
StorageAccessKey = storageAccessKey;
Password = password;
BackupSystemDbs = backupSystemDbs;
BackupScheduleType = backupScheduleType;
FullBackupFrequency = fullBackupFrequency;
+ DaysOfWeek = daysOfWeek;
FullBackupStartTime = fullBackupStartTime;
FullBackupWindowHours = fullBackupWindowHours;
LogBackupFrequency = logBackupFrequency;
@@ -90,7 +98,7 @@ public AutoBackupSettings()
public bool? EnableEncryption { get; set; }
///
- /// Gets or sets retention period of backup: 1-30 days.
+ /// Gets or sets retention period of backup: 1-90 days.
///
[JsonProperty(PropertyName = "retentionPeriod")]
public int? RetentionPeriod { get; set; }
@@ -101,6 +109,12 @@ public AutoBackupSettings()
[JsonProperty(PropertyName = "storageAccountUrl")]
public string StorageAccountUrl { get; set; }
+ ///
+ /// Gets or sets storage container name where backup will be taken to.
+ ///
+ [JsonProperty(PropertyName = "storageContainerName")]
+ public string StorageContainerName { get; set; }
+
///
/// Gets or sets storage account key where backup will be taken to.
///
@@ -134,6 +148,13 @@ public AutoBackupSettings()
[JsonProperty(PropertyName = "fullBackupFrequency")]
public string FullBackupFrequency { get; set; }
+ ///
+ /// Gets or sets days of the week for the backups when
+ /// FullBackupFrequency is set to Weekly.
+ ///
+ [JsonProperty(PropertyName = "daysOfWeek")]
+ public IList DaysOfWeek { get; set; }
+
///
/// Gets or sets start time of a given day during which full backups
/// can take place. 0-23 hours.
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListener.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListener.cs
index 362162064f63..f5c4dac090b3 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListener.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListener.cs
@@ -46,7 +46,9 @@ public AvailabilityGroupListener()
/// Create a
/// default availability group if it does not exist.
/// Listener port.
- public AvailabilityGroupListener(string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), string availabilityGroupName = default(string), IList loadBalancerConfigurations = default(IList), bool? createDefaultAvailabilityGroupIfNotExist = default(bool?), int? port = default(int?))
+ /// Availability Group
+ /// configuration.
+ public AvailabilityGroupListener(string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), string availabilityGroupName = default(string), IList loadBalancerConfigurations = default(IList), bool? createDefaultAvailabilityGroupIfNotExist = default(bool?), int? port = default(int?), AgConfiguration availabilityGroupConfiguration = default(AgConfiguration), SystemData systemData = default(SystemData))
: base(id, name, type)
{
ProvisioningState = provisioningState;
@@ -54,6 +56,8 @@ public AvailabilityGroupListener()
LoadBalancerConfigurations = loadBalancerConfigurations;
CreateDefaultAvailabilityGroupIfNotExist = createDefaultAvailabilityGroupIfNotExist;
Port = port;
+ AvailabilityGroupConfiguration = availabilityGroupConfiguration;
+ SystemData = systemData;
CustomInit();
}
@@ -94,5 +98,16 @@ public AvailabilityGroupListener()
[JsonProperty(PropertyName = "properties.port")]
public int? Port { get; set; }
+ ///
+ /// Gets or sets availability Group configuration.
+ ///
+ [JsonProperty(PropertyName = "properties.availabilityGroupConfiguration")]
+ public AgConfiguration AvailabilityGroupConfiguration { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
}
}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Commit.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Commit.cs
new file mode 100644
index 000000000000..a8eea24052f8
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Commit.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.SqlVirtualMachine.Models
+{
+
+ ///
+ /// Defines values for Commit.
+ ///
+ public static class Commit
+ {
+ public const string SYNCHRONOUSCOMMIT = "SYNCHRONOUS_COMMIT";
+ public const string ASYNCHRONOUSCOMMIT = "ASYNCHRONOUS_COMMIT";
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/CreatedByType.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 000000000000..140900f2b6a8
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/CreatedByType.cs
@@ -0,0 +1,24 @@
+//
+// 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.SqlVirtualMachine.Models
+{
+
+ ///
+ /// Defines values for CreatedByType.
+ ///
+ public static class CreatedByType
+ {
+ public const string User = "User";
+ public const string Application = "Application";
+ public const string ManagedIdentity = "ManagedIdentity";
+ public const string Key = "Key";
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/DaysOfWeek.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/DaysOfWeek.cs
new file mode 100644
index 000000000000..3ad950b0a803
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/DaysOfWeek.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.SqlVirtualMachine.Models
+{
+
+ ///
+ /// Defines values for DaysOfWeek.
+ ///
+ public static class DaysOfWeek
+ {
+ public const string Monday = "Monday";
+ public const string Tuesday = "Tuesday";
+ public const string Wednesday = "Wednesday";
+ public const string Thursday = "Thursday";
+ public const string Friday = "Friday";
+ public const string Saturday = "Saturday";
+ public const string Sunday = "Sunday";
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Failover.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Failover.cs
new file mode 100644
index 000000000000..d61919e8bb6a
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Failover.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.SqlVirtualMachine.Models
+{
+
+ ///
+ /// Defines values for Failover.
+ ///
+ public static class Failover
+ {
+ public const string AUTOMATIC = "AUTOMATIC";
+ public const string MANUAL = "MANUAL";
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/IdentityType.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/IdentityType.cs
index cf949823b256..42dc37f9f3f3 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/IdentityType.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/IdentityType.cs
@@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.SqlVirtualMachine.Models
///
public static class IdentityType
{
+ public const string None = "None";
public const string SystemAssigned = "SystemAssigned";
}
}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ReadableSecondary.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ReadableSecondary.cs
new file mode 100644
index 000000000000..fcfe461d9128
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ReadableSecondary.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.SqlVirtualMachine.Models
+{
+
+ ///
+ /// Defines values for ReadableSecondary.
+ ///
+ public static class ReadableSecondary
+ {
+ public const string NO = "NO";
+ public const string ALL = "ALL";
+ public const string READONLY = "READ_ONLY";
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ResourceIdentity.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ResourceIdentity.cs
index 102b8c126f88..5a95286814ac 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ResourceIdentity.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ResourceIdentity.cs
@@ -34,7 +34,7 @@ public ResourceIdentity()
/// The identity type. Set this to 'SystemAssigned'
/// in order to automatically create and assign an Azure Active
/// Directory principal for the resource. Possible values include:
- /// 'SystemAssigned'
+ /// 'None', 'SystemAssigned'
/// The Azure Active Directory tenant
/// id.
public ResourceIdentity(System.Guid? principalId = default(System.Guid?), string type = default(string), System.Guid? tenantId = default(System.Guid?))
@@ -59,7 +59,7 @@ public ResourceIdentity()
///
/// Gets or sets the identity type. Set this to 'SystemAssigned' in
/// order to automatically create and assign an Azure Active Directory
- /// principal for the resource. Possible values include:
+ /// principal for the resource. Possible values include: 'None',
/// 'SystemAssigned'
///
[JsonProperty(PropertyName = "type")]
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Role.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Role.cs
new file mode 100644
index 000000000000..8c908918811a
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Role.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.SqlVirtualMachine.Models
+{
+
+ ///
+ /// Defines values for Role.
+ ///
+ public static class Role
+ {
+ public const string PRIMARY = "PRIMARY";
+ public const string SECONDARY = "SECONDARY";
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLInstanceSettings.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLInstanceSettings.cs
new file mode 100644
index 000000000000..6902a1c489f5
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLInstanceSettings.cs
@@ -0,0 +1,84 @@
+//
+// 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.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Set the server/instance-level settings for SQL Server.
+ ///
+ public partial class SQLInstanceSettings
+ {
+ ///
+ /// Initializes a new instance of the SQLInstanceSettings class.
+ ///
+ public SQLInstanceSettings()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SQLInstanceSettings class.
+ ///
+ /// SQL Server Collation.
+ /// SQL Server MAXDOP.
+ /// SQL Server
+ /// Optimize for Adhoc workloads.
+ /// SQL Server minimum memory.
+ /// SQL Server maximum memory.
+ public SQLInstanceSettings(string collation = default(string), int? maxDop = default(int?), bool? isOptimizeForAdHocWorkloadsEnabled = default(bool?), int? minServerMemoryMB = default(int?), int? maxServerMemoryMB = default(int?))
+ {
+ Collation = collation;
+ MaxDop = maxDop;
+ IsOptimizeForAdHocWorkloadsEnabled = isOptimizeForAdHocWorkloadsEnabled;
+ MinServerMemoryMB = minServerMemoryMB;
+ MaxServerMemoryMB = maxServerMemoryMB;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets SQL Server Collation.
+ ///
+ [JsonProperty(PropertyName = "collation")]
+ public string Collation { get; set; }
+
+ ///
+ /// Gets or sets SQL Server MAXDOP.
+ ///
+ [JsonProperty(PropertyName = "maxDop")]
+ public int? MaxDop { get; set; }
+
+ ///
+ /// Gets or sets SQL Server Optimize for Adhoc workloads.
+ ///
+ [JsonProperty(PropertyName = "isOptimizeForAdHocWorkloadsEnabled")]
+ public bool? IsOptimizeForAdHocWorkloadsEnabled { get; set; }
+
+ ///
+ /// Gets or sets SQL Server minimum memory.
+ ///
+ [JsonProperty(PropertyName = "minServerMemoryMB")]
+ public int? MinServerMemoryMB { get; set; }
+
+ ///
+ /// Gets or sets SQL Server maximum memory.
+ ///
+ [JsonProperty(PropertyName = "maxServerMemoryMB")]
+ public int? MaxServerMemoryMB { get; set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLStorageSettings.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLStorageSettings.cs
new file mode 100644
index 000000000000..05e9e551bca1
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLStorageSettings.cs
@@ -0,0 +1,61 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Set disk storage settings for SQL Server.
+ ///
+ public partial class SQLStorageSettings
+ {
+ ///
+ /// Initializes a new instance of the SQLStorageSettings class.
+ ///
+ public SQLStorageSettings()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SQLStorageSettings class.
+ ///
+ /// Logical Unit Numbers for the disks.
+ /// SQL Server default file path
+ public SQLStorageSettings(IList luns = default(IList), string defaultFilePath = default(string))
+ {
+ Luns = luns;
+ DefaultFilePath = defaultFilePath;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets logical Unit Numbers for the disks.
+ ///
+ [JsonProperty(PropertyName = "luns")]
+ public IList Luns { get; set; }
+
+ ///
+ /// Gets or sets SQL Server default file path
+ ///
+ [JsonProperty(PropertyName = "defaultFilePath")]
+ public string DefaultFilePath { get; set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLTempDbSettings.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLTempDbSettings.cs
new file mode 100644
index 000000000000..6468d077ee88
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SQLTempDbSettings.cs
@@ -0,0 +1,100 @@
+//
+// 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.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ public partial class SQLTempDbSettings
+ {
+ ///
+ /// Initializes a new instance of the SQLTempDbSettings class.
+ ///
+ public SQLTempDbSettings()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SQLTempDbSettings class.
+ ///
+ /// SQL Server default file size
+ /// SQL Server default file autoGrowth
+ /// size
+ /// SQL Server default file size
+ /// SQL Server default file autoGrowth
+ /// size
+ /// SQL Server default file count
+ /// Logical Unit Numbers for the disks.
+ /// SQL Server default file path
+ public SQLTempDbSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), IList luns = default(IList), string defaultFilePath = default(string))
+ {
+ DataFileSize = dataFileSize;
+ DataGrowth = dataGrowth;
+ LogFileSize = logFileSize;
+ LogGrowth = logGrowth;
+ DataFileCount = dataFileCount;
+ Luns = luns;
+ DefaultFilePath = defaultFilePath;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets SQL Server default file size
+ ///
+ [JsonProperty(PropertyName = "dataFileSize")]
+ public int? DataFileSize { get; set; }
+
+ ///
+ /// Gets or sets SQL Server default file autoGrowth size
+ ///
+ [JsonProperty(PropertyName = "dataGrowth")]
+ public int? DataGrowth { get; set; }
+
+ ///
+ /// Gets or sets SQL Server default file size
+ ///
+ [JsonProperty(PropertyName = "logFileSize")]
+ public int? LogFileSize { get; set; }
+
+ ///
+ /// Gets or sets SQL Server default file autoGrowth size
+ ///
+ [JsonProperty(PropertyName = "logGrowth")]
+ public int? LogGrowth { get; set; }
+
+ ///
+ /// Gets or sets SQL Server default file count
+ ///
+ [JsonProperty(PropertyName = "dataFileCount")]
+ public int? DataFileCount { get; set; }
+
+ ///
+ /// Gets or sets logical Unit Numbers for the disks.
+ ///
+ [JsonProperty(PropertyName = "luns")]
+ public IList Luns { get; set; }
+
+ ///
+ /// Gets or sets SQL Server default file path
+ ///
+ [JsonProperty(PropertyName = "defaultFilePath")]
+ public string DefaultFilePath { get; set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Schedule.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Schedule.cs
new file mode 100644
index 000000000000..500955e4f2eb
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/Schedule.cs
@@ -0,0 +1,93 @@
+//
+// 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.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class Schedule
+ {
+ ///
+ /// Initializes a new instance of the Schedule class.
+ ///
+ public Schedule()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Schedule class.
+ ///
+ /// Enable or disable assessment schedule on SQL
+ /// virtual machine.
+ /// Number of weeks to schedule between 2
+ /// assessment runs. Takes value from 1-6
+ /// Occurrence of the DayOfWeek day
+ /// within a month to schedule assessment. Takes values: 1,2,3,4 and
+ /// -1. Use -1 for last DayOfWeek day of the month
+ /// Day of the week to run assessment. Possible
+ /// values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
+ /// 'Friday', 'Saturday', 'Sunday'
+ /// Time of the day in HH:mm format. Eg.
+ /// 17:30
+ public Schedule(bool? enable = default(bool?), int? weeklyInterval = default(int?), int? monthlyOccurrence = default(int?), DayOfWeek? dayOfWeek = default(DayOfWeek?), string startTime = default(string))
+ {
+ Enable = enable;
+ WeeklyInterval = weeklyInterval;
+ MonthlyOccurrence = monthlyOccurrence;
+ DayOfWeek = dayOfWeek;
+ StartTime = startTime;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets enable or disable assessment schedule on SQL virtual
+ /// machine.
+ ///
+ [JsonProperty(PropertyName = "enable")]
+ public bool? Enable { get; set; }
+
+ ///
+ /// Gets or sets number of weeks to schedule between 2 assessment runs.
+ /// Takes value from 1-6
+ ///
+ [JsonProperty(PropertyName = "weeklyInterval")]
+ public int? WeeklyInterval { get; set; }
+
+ ///
+ /// Gets or sets occurrence of the DayOfWeek day within a month to
+ /// schedule assessment. Takes values: 1,2,3,4 and -1. Use -1 for last
+ /// DayOfWeek day of the month
+ ///
+ [JsonProperty(PropertyName = "monthlyOccurrence")]
+ public int? MonthlyOccurrence { get; set; }
+
+ ///
+ /// Gets or sets day of the week to run assessment. Possible values
+ /// include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday',
+ /// 'Saturday', 'Sunday'
+ ///
+ [JsonProperty(PropertyName = "dayOfWeek")]
+ public DayOfWeek? DayOfWeek { get; set; }
+
+ ///
+ /// Gets or sets time of the day in HH:mm format. Eg. 17:30
+ ///
+ [JsonProperty(PropertyName = "startTime")]
+ public string StartTime { get; set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.cs
index 3f3d466f1cf4..0e99a4456de4 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.cs
@@ -39,12 +39,14 @@ public ServerConfigurationsManagementSettings()
/// settings.
/// Additional SQL
/// feature settings.
- public ServerConfigurationsManagementSettings(SqlConnectivityUpdateSettings sqlConnectivityUpdateSettings = default(SqlConnectivityUpdateSettings), SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings = default(SqlWorkloadTypeUpdateSettings), SqlStorageUpdateSettings sqlStorageUpdateSettings = default(SqlStorageUpdateSettings), AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations = default(AdditionalFeaturesServerConfigurations))
+ /// SQL Instance settings.
+ public ServerConfigurationsManagementSettings(SqlConnectivityUpdateSettings sqlConnectivityUpdateSettings = default(SqlConnectivityUpdateSettings), SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings = default(SqlWorkloadTypeUpdateSettings), SqlStorageUpdateSettings sqlStorageUpdateSettings = default(SqlStorageUpdateSettings), AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations = default(AdditionalFeaturesServerConfigurations), SQLInstanceSettings sqlInstanceSettings = default(SQLInstanceSettings))
{
SqlConnectivityUpdateSettings = sqlConnectivityUpdateSettings;
SqlWorkloadTypeUpdateSettings = sqlWorkloadTypeUpdateSettings;
SqlStorageUpdateSettings = sqlStorageUpdateSettings;
AdditionalFeaturesServerConfigurations = additionalFeaturesServerConfigurations;
+ SqlInstanceSettings = sqlInstanceSettings;
CustomInit();
}
@@ -77,5 +79,11 @@ public ServerConfigurationsManagementSettings()
[JsonProperty(PropertyName = "additionalFeaturesServerConfigurations")]
public AdditionalFeaturesServerConfigurations AdditionalFeaturesServerConfigurations { get; set; }
+ ///
+ /// Gets or sets SQL Instance settings.
+ ///
+ [JsonProperty(PropertyName = "sqlInstanceSettings")]
+ public SQLInstanceSettings SqlInstanceSettings { get; set; }
+
}
}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroup.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroup.cs
index 9524d5731453..82c0db7bf5d3 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroup.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroup.cs
@@ -54,7 +54,7 @@ public SqlVirtualMachineGroup()
/// include: 'Domainful'
/// Cluster Active Directory domain
/// profile.
- public SqlVirtualMachineGroup(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), string sqlImageOffer = default(string), string sqlImageSku = default(string), string scaleType = default(string), string clusterManagerType = default(string), string clusterConfiguration = default(string), WsfcDomainProfile wsfcDomainProfile = default(WsfcDomainProfile))
+ public SqlVirtualMachineGroup(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), string sqlImageOffer = default(string), string sqlImageSku = default(string), string scaleType = default(string), string clusterManagerType = default(string), string clusterConfiguration = default(string), WsfcDomainProfile wsfcDomainProfile = default(WsfcDomainProfile), SystemData systemData = default(SystemData))
: base(location, id, name, type, tags)
{
ProvisioningState = provisioningState;
@@ -64,6 +64,7 @@ public SqlVirtualMachineGroup()
ClusterManagerType = clusterManagerType;
ClusterConfiguration = clusterConfiguration;
WsfcDomainProfile = wsfcDomainProfile;
+ SystemData = systemData;
CustomInit();
}
@@ -118,6 +119,11 @@ public SqlVirtualMachineGroup()
[JsonProperty(PropertyName = "properties.wsfcDomainProfile")]
public WsfcDomainProfile WsfcDomainProfile { get; set; }
+ ///
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineModel.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineModel.cs
index b2363f3bd787..f4cc838116e7 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineModel.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineModel.cs
@@ -69,7 +69,10 @@ public SqlVirtualMachineModel()
/// settings.
/// SQL Server
/// configuration management settings.
- public SqlVirtualMachineModel(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), ResourceIdentity identity = default(ResourceIdentity), string virtualMachineResourceId = default(string), string provisioningState = default(string), string sqlImageOffer = default(string), string sqlServerLicenseType = default(string), string sqlManagement = default(string), string sqlImageSku = default(string), string sqlVirtualMachineGroupResourceId = default(string), WsfcDomainCredentials wsfcDomainCredentials = default(WsfcDomainCredentials), AutoPatchingSettings autoPatchingSettings = default(AutoPatchingSettings), AutoBackupSettings autoBackupSettings = default(AutoBackupSettings), KeyVaultCredentialSettings keyVaultCredentialSettings = default(KeyVaultCredentialSettings), ServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default(ServerConfigurationsManagementSettings))
+ /// Storage Configuration
+ /// Settings.
+ /// Assessment Settings.
+ public SqlVirtualMachineModel(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), ResourceIdentity identity = default(ResourceIdentity), string virtualMachineResourceId = default(string), string provisioningState = default(string), string sqlImageOffer = default(string), string sqlServerLicenseType = default(string), string sqlManagement = default(string), string sqlImageSku = default(string), string sqlVirtualMachineGroupResourceId = default(string), WsfcDomainCredentials wsfcDomainCredentials = default(WsfcDomainCredentials), AutoPatchingSettings autoPatchingSettings = default(AutoPatchingSettings), AutoBackupSettings autoBackupSettings = default(AutoBackupSettings), KeyVaultCredentialSettings keyVaultCredentialSettings = default(KeyVaultCredentialSettings), ServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default(ServerConfigurationsManagementSettings), StorageConfigurationSettings storageConfigurationSettings = default(StorageConfigurationSettings), AssessmentSettings assessmentSettings = default(AssessmentSettings), SystemData systemData = default(SystemData))
: base(location, id, name, type, tags)
{
Identity = identity;
@@ -85,6 +88,9 @@ public SqlVirtualMachineModel()
AutoBackupSettings = autoBackupSettings;
KeyVaultCredentialSettings = keyVaultCredentialSettings;
ServerConfigurationsManagementSettings = serverConfigurationsManagementSettings;
+ StorageConfigurationSettings = storageConfigurationSettings;
+ AssessmentSettings = assessmentSettings;
+ SystemData = systemData;
CustomInit();
}
@@ -179,6 +185,23 @@ public SqlVirtualMachineModel()
[JsonProperty(PropertyName = "properties.serverConfigurationsManagementSettings")]
public ServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get; set; }
+ ///
+ /// Gets or sets storage Configuration Settings.
+ ///
+ [JsonProperty(PropertyName = "properties.storageConfigurationSettings")]
+ public StorageConfigurationSettings StorageConfigurationSettings { get; set; }
+
+ ///
+ /// Gets or sets assessment Settings.
+ ///
+ [JsonProperty(PropertyName = "properties.assessmentSettings")]
+ public AssessmentSettings AssessmentSettings { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/StorageConfigurationSettings.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/StorageConfigurationSettings.cs
new file mode 100644
index 000000000000..2e38a53f5664
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/StorageConfigurationSettings.cs
@@ -0,0 +1,101 @@
+//
+// 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.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Storage Configurations for SQL Data, Log and TempDb.
+ ///
+ public partial class StorageConfigurationSettings
+ {
+ ///
+ /// Initializes a new instance of the StorageConfigurationSettings
+ /// class.
+ ///
+ public StorageConfigurationSettings()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the StorageConfigurationSettings
+ /// class.
+ ///
+ /// SQL Server Data Storage
+ /// Settings.
+ /// SQL Server Log Storage
+ /// Settings.
+ /// SQL Server TempDb Storage
+ /// Settings.
+ /// SQL Server SystemDb Storage on
+ /// DataPool if true.
+ /// Disk configuration to apply to
+ /// SQL Server. Possible values include: 'NEW', 'EXTEND', 'ADD'
+ /// Storage workload type. Possible
+ /// values include: 'GENERAL', 'OLTP', 'DW'
+ public StorageConfigurationSettings(SQLStorageSettings sqlDataSettings = default(SQLStorageSettings), SQLStorageSettings sqlLogSettings = default(SQLStorageSettings), SQLTempDbSettings sqlTempDbSettings = default(SQLTempDbSettings), bool? sqlSystemDbOnDataDisk = default(bool?), string diskConfigurationType = default(string), string storageWorkloadType = default(string))
+ {
+ SqlDataSettings = sqlDataSettings;
+ SqlLogSettings = sqlLogSettings;
+ SqlTempDbSettings = sqlTempDbSettings;
+ SqlSystemDbOnDataDisk = sqlSystemDbOnDataDisk;
+ DiskConfigurationType = diskConfigurationType;
+ StorageWorkloadType = storageWorkloadType;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets SQL Server Data Storage Settings.
+ ///
+ [JsonProperty(PropertyName = "sqlDataSettings")]
+ public SQLStorageSettings SqlDataSettings { get; set; }
+
+ ///
+ /// Gets or sets SQL Server Log Storage Settings.
+ ///
+ [JsonProperty(PropertyName = "sqlLogSettings")]
+ public SQLStorageSettings SqlLogSettings { get; set; }
+
+ ///
+ /// Gets or sets SQL Server TempDb Storage Settings.
+ ///
+ [JsonProperty(PropertyName = "sqlTempDbSettings")]
+ public SQLTempDbSettings SqlTempDbSettings { get; set; }
+
+ ///
+ /// Gets or sets SQL Server SystemDb Storage on DataPool if true.
+ ///
+ [JsonProperty(PropertyName = "sqlSystemDbOnDataDisk")]
+ public bool? SqlSystemDbOnDataDisk { get; set; }
+
+ ///
+ /// Gets or sets disk configuration to apply to SQL Server. Possible
+ /// values include: 'NEW', 'EXTEND', 'ADD'
+ ///
+ [JsonProperty(PropertyName = "diskConfigurationType")]
+ public string DiskConfigurationType { get; set; }
+
+ ///
+ /// Gets or sets storage workload type. Possible values include:
+ /// 'GENERAL', 'OLTP', 'DW'
+ ///
+ [JsonProperty(PropertyName = "storageWorkloadType")]
+ public string StorageWorkloadType { get; set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/StorageWorkloadType.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/StorageWorkloadType.cs
new file mode 100644
index 000000000000..f8eb340d49f8
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/StorageWorkloadType.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.SqlVirtualMachine.Models
+{
+
+ ///
+ /// Defines values for StorageWorkloadType.
+ ///
+ public static class StorageWorkloadType
+ {
+ public const string GENERAL = "GENERAL";
+ public const string OLTP = "OLTP";
+ public const string DW = "DW";
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SystemData.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SystemData.cs
new file mode 100644
index 000000000000..5523f4ea99bd
--- /dev/null
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Models/SystemData.cs
@@ -0,0 +1,103 @@
+//
+// 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.SqlVirtualMachine.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Metadata pertaining to creation and last modification of the resource.
+ ///
+ public partial class SystemData
+ {
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ public SystemData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ /// The identity that created the
+ /// resource.
+ /// The type of identity that created the
+ /// resource. Possible values include: 'User', 'Application',
+ /// 'ManagedIdentity', 'Key'
+ /// The timestamp of resource creation
+ /// (UTC).
+ /// The identity that last modified the
+ /// resource.
+ /// The type of identity that last
+ /// modified the resource. Possible values include: 'User',
+ /// 'Application', 'ManagedIdentity', 'Key'
+ /// The timestamp of resource last
+ /// modification (UTC)
+ public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?))
+ {
+ CreatedBy = createdBy;
+ CreatedByType = createdByType;
+ CreatedAt = createdAt;
+ LastModifiedBy = lastModifiedBy;
+ LastModifiedByType = lastModifiedByType;
+ LastModifiedAt = lastModifiedAt;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the identity that created the resource.
+ ///
+ [JsonProperty(PropertyName = "createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that created the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "createdByType")]
+ public string CreatedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource creation (UTC).
+ ///
+ [JsonProperty(PropertyName = "createdAt")]
+ public System.DateTime? CreatedAt { get; set; }
+
+ ///
+ /// Gets or sets the identity that last modified the resource.
+ ///
+ [JsonProperty(PropertyName = "lastModifiedBy")]
+ public string LastModifiedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that last modified the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "lastModifiedByType")]
+ public string LastModifiedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource last modification (UTC)
+ ///
+ [JsonProperty(PropertyName = "lastModifiedAt")]
+ public System.DateTime? LastModifiedAt { get; set; }
+
+ }
+}
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Operations.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Operations.cs
index d2fe5c15a4d6..e656e23f505e 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Operations.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/Operations.cs
@@ -51,7 +51,7 @@ internal Operations(SqlVirtualMachineManagementClient client)
public SqlVirtualMachineManagementClient Client { get; private set; }
///
- /// Lists all of the available SQL Rest API operations.
+ /// Lists all of the available SQL Virtual Machine Rest API operations.
///
///
/// Headers that will be added to request.
@@ -224,7 +224,7 @@ internal Operations(SqlVirtualMachineManagementClient client)
}
///
- /// Lists all of the available SQL Rest API operations.
+ /// Lists all of the available SQL Virtual Machine Rest API operations.
///
///
/// The NextLink from the previous successful call to List operation.
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/OperationsExtensions.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/OperationsExtensions.cs
index a5c2be31720b..9f9318243d88 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/OperationsExtensions.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/OperationsExtensions.cs
@@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.SqlVirtualMachine
public static partial class OperationsExtensions
{
///
- /// Lists all of the available SQL Rest API operations.
+ /// Lists all of the available SQL Virtual Machine Rest API operations.
///
///
/// The operations group for this extension method.
@@ -33,7 +33,7 @@ public static IPage List(this IOperations operations)
}
///
- /// Lists all of the available SQL Rest API operations.
+ /// Lists all of the available SQL Virtual Machine Rest API operations.
///
///
/// The operations group for this extension method.
@@ -50,7 +50,7 @@ public static IPage List(this IOperations operations)
}
///
- /// Lists all of the available SQL Rest API operations.
+ /// Lists all of the available SQL Virtual Machine Rest API operations.
///
///
/// The operations group for this extension method.
@@ -64,7 +64,7 @@ public static IPage ListNext(this IOperations operations, string next
}
///
- /// Lists all of the available SQL Rest API operations.
+ /// Lists all of the available SQL Virtual Machine Rest API operations.
///
///
/// The operations group for this extension method.
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SdkInfo_SqlVirtualMachineManagementClient.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SdkInfo_SqlVirtualMachineManagementClient.cs
index b0ef8bb93837..d39302214af2 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SdkInfo_SqlVirtualMachineManagementClient.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SdkInfo_SqlVirtualMachineManagementClient.cs
@@ -19,23 +19,12 @@ public static IEnumerable> ApiInfo_SqlVirtualMachi
{
return new Tuple[]
{
- new Tuple("SqlVirtualMachine", "AvailabilityGroupListeners", "2017-03-01-preview"),
- new Tuple("SqlVirtualMachine", "Operations", "2017-03-01-preview"),
- new Tuple("SqlVirtualMachine", "SqlVirtualMachineGroups", "2017-03-01-preview"),
- new Tuple("SqlVirtualMachine", "SqlVirtualMachines", "2017-03-01-preview"),
+ new Tuple("SqlVirtualMachine", "AvailabilityGroupListeners", "2021-11-01-preview"),
+ new Tuple("SqlVirtualMachine", "Operations", "2021-11-01-preview"),
+ new Tuple("SqlVirtualMachine", "SqlVirtualMachineGroups", "2021-11-01-preview"),
+ new Tuple("SqlVirtualMachine", "SqlVirtualMachines", "2021-11-01-preview"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "latest";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4407";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/sqlvirtualmachine/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\Users\\myvmadmin\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "e63401cb21aba92650b877be0b7d8893452cd6fe";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachineManagementClient.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachineManagementClient.cs
index 1dcc22834360..8ae5cbeb757b 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachineManagementClient.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachineManagementClient.cs
@@ -344,7 +344,7 @@ private void Initialize()
SqlVirtualMachineGroups = new SqlVirtualMachineGroupsOperations(this);
SqlVirtualMachines = new SqlVirtualMachinesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2017-03-01-preview";
+ ApiVersion = "2021-11-01-preview";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachinesOperations.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachinesOperations.cs
index 5ce7c101d2d5..0f0039e78795 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachinesOperations.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachinesOperations.cs
@@ -50,6 +50,203 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
///
public SqlVirtualMachineManagementClient Client { get; private set; }
+ ///
+ /// Gets the list of sql virtual machines in a SQL virtual machine group.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine group.
+ ///
+ ///
+ /// 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>> ListBySqlVmGroupWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (sqlVirtualMachineGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "sqlVirtualMachineGroupName");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("sqlVirtualMachineGroupName", sqlVirtualMachineGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySqlVmGroup", 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.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{sqlVirtualMachineGroupName}", System.Uri.EscapeDataString(sqlVirtualMachineGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new 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;
+ }
+
///
/// Gets all SQL virtual machines in a subscription.
///
@@ -228,6 +425,29 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
return _result;
}
+ ///
+ /// Uninstalls and reinstalls the SQL Iaas Extension.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task RedeployWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginRedeployWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
///
/// Gets a SQL virtual machine.
///
@@ -262,7 +482,674 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (sqlVirtualMachineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "sqlVirtualMachineName");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("sqlVirtualMachineName", sqlVirtualMachineName);
+ tracingParameters.Add("expand", expand);
+ 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.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{sqlVirtualMachineName}", System.Uri.EscapeDataString(sqlVirtualMachineName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (expand != null)
+ {
+ _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
+ }
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new 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 SQL virtual machine.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes a SQL virtual machine.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Updates a SQL virtual machine.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets all SQL virtual machines in a resource group.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", 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.SqlVirtualMachine/sqlVirtualMachines").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new 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;
+ }
+
+ ///
+ /// Starts Assessment on SQL virtual machine.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task StartAssessmentWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginStartAssessmentWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Uninstalls and reinstalls the SQL Iaas Extension.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginRedeployWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (sqlVirtualMachineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "sqlVirtualMachineName");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("sqlVirtualMachineName", sqlVirtualMachineName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginRedeploy", 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.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{sqlVirtualMachineName}", System.Uri.EscapeDataString(sqlVirtualMachineName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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;
+ // 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();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Creates or updates a SQL virtual machine.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The SQL virtual machine.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -272,6 +1159,14 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "sqlVirtualMachineName");
}
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -289,9 +1184,9 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("sqlVirtualMachineName", sqlVirtualMachineName);
- tracingParameters.Add("expand", expand);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -300,10 +1195,6 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
_url = _url.Replace("{sqlVirtualMachineName}", System.Uri.EscapeDataString(sqlVirtualMachineName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
@@ -315,7 +1206,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -346,6 +1237,12 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (Client.Credentials != null)
{
@@ -366,7 +1263,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -426,6 +1323,24 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -433,32 +1348,6 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
return _result;
}
- ///
- /// Creates or updates a SQL virtual machine.
- ///
- ///
- /// Name of the resource group that contains the resource. You can obtain this
- /// value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// Name of the SQL virtual machine.
- ///
- ///
- /// The SQL virtual machine.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send Request
- AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
///
/// Deletes a SQL virtual machine.
///
@@ -470,52 +1359,6 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
/// Name of the SQL virtual machine.
///
///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Updates a SQL virtual machine.
- ///
- ///
- /// Name of the resource group that contains the resource. You can obtain this
- /// value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// Name of the SQL virtual machine.
- ///
- ///
- /// The SQL virtual machine.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send Request
- AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets all SQL virtual machines in a resource group.
- ///
- ///
- /// Name of the resource group that contains the resource. You can obtain this
- /// value from the Azure Resource Manager API or the portal.
- ///
- ///
/// Headers that will be added to request.
///
///
@@ -524,9 +1367,6 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -536,12 +1376,16 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (sqlVirtualMachineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "sqlVirtualMachineName");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -558,13 +1402,15 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("sqlVirtualMachineName", sqlVirtualMachineName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{sqlVirtualMachineName}", System.Uri.EscapeDataString(sqlVirtualMachineName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -578,7 +1424,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -629,7 +1475,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -664,31 +1510,13 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -697,7 +1525,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
}
///
- /// Creates or updates a SQL virtual machine.
+ /// Updates a SQL virtual machine.
///
///
/// Name of the resource group that contains the resource. You can obtain this
@@ -730,7 +1558,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineModel parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -744,10 +1572,6 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- if (parameters != null)
- {
- parameters.Validate();
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -767,7 +1591,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
tracingParameters.Add("sqlVirtualMachineName", sqlVirtualMachineName);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -787,7 +1611,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.Method = new HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -844,7 +1668,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ if ((int)_statusCode != 200)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -904,24 +1728,6 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -930,7 +1736,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
}
///
- /// Deletes a SQL virtual machine.
+ /// Starts Assessment on SQL virtual machine.
///
///
/// Name of the resource group that contains the resource. You can obtain this
@@ -957,7 +1763,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginStartAssessmentWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -985,11 +1791,11 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("sqlVirtualMachineName", sqlVirtualMachineName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginStartAssessment", 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.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{sqlVirtualMachineName}", System.Uri.EscapeDataString(sqlVirtualMachineName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -1005,7 +1811,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.Method = new HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1056,7 +1862,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -1106,17 +1912,10 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
}
///
- /// Updates a SQL virtual machine.
+ /// Gets the list of sql virtual machines in a SQL virtual machine group.
///
- ///
- /// Name of the resource group that contains the resource. You can obtain this
- /// value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// Name of the SQL virtual machine.
- ///
- ///
- /// The SQL virtual machine.
+ ///
+ /// The NextLink from the previous successful call to List operation.
///
///
/// Headers that will be added to request.
@@ -1139,27 +1938,11 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListBySqlVmGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (sqlVirtualMachineName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "sqlVirtualMachineName");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.ApiVersion == null)
+ if (nextPageLink == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
@@ -1168,23 +1951,14 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("sqlVirtualMachineName", sqlVirtualMachineName);
- tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySqlVmGroupNext", 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.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{sqlVirtualMachineName}", System.Uri.EscapeDataString(sqlVirtualMachineName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
@@ -1192,7 +1966,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1223,12 +1997,6 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
// Serialize Request
string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (Client.Credentials != null)
{
@@ -1284,7 +2052,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -1297,7 +2065,7 @@ internal SqlVirtualMachinesOperations(SqlVirtualMachineManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachinesOperationsExtensions.cs b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachinesOperationsExtensions.cs
index 945541322910..295e9a1718f3 100644
--- a/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachinesOperationsExtensions.cs
+++ b/sdk/sqlvirtualmachine/Microsoft.Azure.Management.SqlVirtualMachine/src/Generated/SqlVirtualMachinesOperationsExtensions.cs
@@ -21,6 +21,48 @@ namespace Microsoft.Azure.Management.SqlVirtualMachine
///
public static partial class SqlVirtualMachinesOperationsExtensions
{
+ ///
+ /// Gets the list of sql virtual machines in a SQL virtual machine group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine group.
+ ///
+ public static IPage ListBySqlVmGroup(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineGroupName)
+ {
+ return operations.ListBySqlVmGroupAsync(resourceGroupName, sqlVirtualMachineGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the list of sql virtual machines in a SQL virtual machine group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySqlVmGroupAsync(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySqlVmGroupWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Gets all SQL virtual machines in a subscription.
///
@@ -49,6 +91,45 @@ public static IPage List(this ISqlVirtualMachinesOperati
}
}
+ ///
+ /// Uninstalls and reinstalls the SQL Iaas Extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ public static void Redeploy(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineName)
+ {
+ operations.RedeployAsync(resourceGroupName, sqlVirtualMachineName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Uninstalls and reinstalls the SQL Iaas Extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RedeployAsync(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.RedeployWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Gets a SQL virtual machine.
///
@@ -268,6 +349,84 @@ public static IPage ListByResourceGroup(this ISqlVirtual
}
}
+ ///
+ /// Starts Assessment on SQL virtual machine.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ public static void StartAssessment(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineName)
+ {
+ operations.StartAssessmentAsync(resourceGroupName, sqlVirtualMachineName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Starts Assessment on SQL virtual machine.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task StartAssessmentAsync(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.StartAssessmentWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Uninstalls and reinstalls the SQL Iaas Extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ public static void BeginRedeploy(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineName)
+ {
+ operations.BeginRedeployAsync(resourceGroupName, sqlVirtualMachineName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Uninstalls and reinstalls the SQL Iaas Extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginRedeployAsync(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginRedeployWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Creates or updates a SQL virtual machine.
///
@@ -403,6 +562,79 @@ public static SqlVirtualMachineModel BeginUpdate(this ISqlVirtualMachinesOperati
}
}
+ ///
+ /// Starts Assessment on SQL virtual machine.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ public static void BeginStartAssessment(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineName)
+ {
+ operations.BeginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Starts Assessment on SQL virtual machine.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can obtain this
+ /// value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// Name of the SQL virtual machine.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginStartAssessmentAsync(this ISqlVirtualMachinesOperations operations, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginStartAssessmentWithHttpMessagesAsync(resourceGroupName, sqlVirtualMachineName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Gets the list of sql virtual machines in a SQL virtual machine group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListBySqlVmGroupNext(this ISqlVirtualMachinesOperations operations, string nextPageLink)
+ {
+ return operations.ListBySqlVmGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the list of sql virtual machines in a SQL virtual machine group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySqlVmGroupNextAsync(this ISqlVirtualMachinesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySqlVmGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Gets all SQL virtual machines in a subscription.
///