diff --git a/src/SDKs/Compute/AzSdk.RP.props b/src/SDKs/Compute/AzSdk.RP.props
index b8b85ec760474..a22c36aebd490 100644
--- a/src/SDKs/Compute/AzSdk.RP.props
+++ b/src/SDKs/Compute/AzSdk.RP.props
@@ -1,7 +1,7 @@
- Compute_2018-10-01;Compute_2018-09-30;Compute_2018-06-01;Compute_2017-09-01;ContainerService_2017-01-31;
+ Compute_2019-03-01;Compute_2018-09-30;Compute_2017-09-01;ContainerService_2017-01-31;
$(PackageTags);$(CommonTags);$(AzureApiTag);
\ No newline at end of file
diff --git a/src/SDKs/Compute/Management.Compute/Generated/AvailabilitySetsOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/AvailabilitySetsOperations.cs
index 7d920e3ca3a7c..e37c477a11b8d 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/AvailabilitySetsOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/AvailabilitySetsOperations.cs
@@ -105,7 +105,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -313,7 +313,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -511,7 +511,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -687,7 +687,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -867,7 +867,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1050,7 +1050,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1243,7 +1243,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/src/SDKs/Compute/Management.Compute/Generated/ComputeManagementClient.cs b/src/SDKs/Compute/Management.Compute/Generated/ComputeManagementClient.cs
index 00286b4a0c50f..e1c2399839dcd 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/ComputeManagementClient.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/ComputeManagementClient.cs
@@ -81,11 +81,6 @@ public partial class ComputeManagementClient : ServiceClient
public virtual IAvailabilitySetsOperations AvailabilitySets { get; private set; }
- ///
- /// Gets the IProximityPlacementGroupsOperations.
- ///
- public virtual IProximityPlacementGroupsOperations ProximityPlacementGroups { get; private set; }
-
///
/// Gets the IVirtualMachineExtensionImagesOperations.
///
@@ -136,6 +131,11 @@ public partial class ComputeManagementClient : ServiceClient
public virtual IVirtualMachineScaleSetRollingUpgradesOperations VirtualMachineScaleSetRollingUpgrades { get; private set; }
+ ///
+ /// Gets the IVirtualMachineScaleSetOperations.
+ ///
+ public virtual IVirtualMachineScaleSetOperations VirtualMachineScaleSet { get; private set; }
+
///
/// Gets the IVirtualMachineScaleSetVMsOperations.
///
@@ -429,7 +429,6 @@ private void Initialize()
{
Operations = new Operations(this);
AvailabilitySets = new AvailabilitySetsOperations(this);
- ProximityPlacementGroups = new ProximityPlacementGroupsOperations(this);
VirtualMachineExtensionImages = new VirtualMachineExtensionImagesOperations(this);
VirtualMachineExtensions = new VirtualMachineExtensionsOperations(this);
VirtualMachineImages = new VirtualMachineImagesOperations(this);
@@ -440,6 +439,7 @@ private void Initialize()
VirtualMachineScaleSets = new VirtualMachineScaleSetsOperations(this);
VirtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsOperations(this);
VirtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesOperations(this);
+ VirtualMachineScaleSet = new VirtualMachineScaleSetOperations(this);
VirtualMachineScaleSetVMs = new VirtualMachineScaleSetVMsOperations(this);
LogAnalytics = new LogAnalyticsOperations(this);
VirtualMachineRunCommands = new VirtualMachineRunCommandsOperations(this);
diff --git a/src/SDKs/Compute/Management.Compute/Generated/GalleriesOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/GalleriesOperations.cs
index 18f8c1a255b68..9d3bca62d1fb7 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/GalleriesOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/GalleriesOperations.cs
@@ -121,7 +121,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -330,7 +330,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -508,7 +508,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -711,7 +711,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
gallery.Validate();
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -945,7 +945,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/src/SDKs/Compute/Management.Compute/Generated/GalleryImageVersionsOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/GalleryImageVersionsOperations.cs
index af7d9af8f65e1..ba1a471334644 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/GalleryImageVersionsOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/GalleryImageVersionsOperations.cs
@@ -149,7 +149,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -389,7 +389,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -615,7 +615,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
galleryImageVersion.Validate();
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -868,7 +868,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/src/SDKs/Compute/Management.Compute/Generated/GalleryImagesOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/GalleryImagesOperations.cs
index 35234212a3ecf..3a1b279861563 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/GalleryImagesOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/GalleryImagesOperations.cs
@@ -133,7 +133,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -356,7 +356,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -571,7 +571,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
galleryImage.Validate();
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -815,7 +815,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2018-06-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/src/SDKs/Compute/Management.Compute/Generated/IComputeManagementClient.cs b/src/SDKs/Compute/Management.Compute/Generated/IComputeManagementClient.cs
index 393489305f2de..fca3ebe781706 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/IComputeManagementClient.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/IComputeManagementClient.cs
@@ -76,11 +76,6 @@ public partial interface IComputeManagementClient : System.IDisposable
///
IAvailabilitySetsOperations AvailabilitySets { get; }
- ///
- /// Gets the IProximityPlacementGroupsOperations.
- ///
- IProximityPlacementGroupsOperations ProximityPlacementGroups { get; }
-
///
/// Gets the IVirtualMachineExtensionImagesOperations.
///
@@ -131,6 +126,11 @@ public partial interface IComputeManagementClient : System.IDisposable
///
IVirtualMachineScaleSetRollingUpgradesOperations VirtualMachineScaleSetRollingUpgrades { get; }
+ ///
+ /// Gets the IVirtualMachineScaleSetOperations.
+ ///
+ IVirtualMachineScaleSetOperations VirtualMachineScaleSet { get; }
+
///
/// Gets the IVirtualMachineScaleSetVMsOperations.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/IProximityPlacementGroupsOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/IProximityPlacementGroupsOperations.cs
deleted file mode 100644
index dbae9809c3ca4..0000000000000
--- a/src/SDKs/Compute/Management.Compute/Generated/IProximityPlacementGroupsOperations.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Compute
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// ProximityPlacementGroupsOperations operations.
- ///
- public partial interface IProximityPlacementGroupsOperations
- {
- ///
- /// Create or update a proximity placement group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// Parameters supplied to the Create Proximity Placement Group
- /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string proximityPlacementGroupName, ProximityPlacementGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Update a proximity placement group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// Resource tags
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string proximityPlacementGroupName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Delete a proximity placement group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string proximityPlacementGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Retrieves information about a proximity placement group .
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement 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> GetWithHttpMessagesAsync(string resourceGroupName, string proximityPlacementGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all proximity placement groups in a subscription.
- ///
- ///
- /// 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>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all proximity placement groups in a resource group.
- ///
- ///
- /// The name of the resource 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all proximity placement groups in a subscription.
- ///
- ///
- /// 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>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all proximity placement groups in a resource 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>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetOperations.cs
new file mode 100644
index 0000000000000..bc10aedae175c
--- /dev/null
+++ b/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetOperations.cs
@@ -0,0 +1,57 @@
+//
+// 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.Compute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// VirtualMachineScaleSetOperations operations.
+ ///
+ public partial interface IVirtualMachineScaleSetOperations
+ {
+ ///
+ /// Converts SinglePlacementGroup property to false for a existing
+ /// virtual machine scale set.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the virtual machine scale set to create or update.
+ ///
+ ///
+ /// Id of the placement group in which you want future virtual machine
+ /// instances to be placed. To query placement group Id, please use
+ /// Virtual Machine Scale Set VMs - Get API. If not provided, the
+ /// platform will choose one with maximum number of virtual machine
+ /// instances.
+ ///
+ ///
+ /// 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 ConvertToSinglePlacementGroupWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string activePlacementGroupId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetVMsOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetVMsOperations.cs
index e3301fdc27ad8..7207e9ace55cb 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetVMsOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetVMsOperations.cs
@@ -268,6 +268,11 @@ public partial interface IVirtualMachineScaleSetVMsOperations
///
/// The instance ID of the virtual machine.
///
+ ///
+ /// The parameter to request non-graceful VM shutdown. True value for
+ /// this flag indicates non-graceful shutdown whereas false indicates
+ /// otherwise. Default value for this flag is false if not specified
+ ///
///
/// The headers that will be added to request.
///
@@ -280,7 +285,7 @@ public partial interface IVirtualMachineScaleSetVMsOperations
///
/// Thrown when a required parameter is null
///
- Task PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, bool? skipShutdown = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Restarts a virtual machine in a VM scale set.
///
@@ -569,6 +574,11 @@ public partial interface IVirtualMachineScaleSetVMsOperations
///
/// The instance ID of the virtual machine.
///
+ ///
+ /// The parameter to request non-graceful VM shutdown. True value for
+ /// this flag indicates non-graceful shutdown whereas false indicates
+ /// otherwise. Default value for this flag is false if not specified
+ ///
///
/// The headers that will be added to request.
///
@@ -581,7 +591,7 @@ public partial interface IVirtualMachineScaleSetVMsOperations
///
/// Thrown when a required parameter is null
///
- Task BeginPowerOffWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginPowerOffWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, bool? skipShutdown = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Restarts a virtual machine in a VM scale set.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetsOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetsOperations.cs
index 31b717a0f7466..10a10435f50f3 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetsOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachineScaleSetsOperations.cs
@@ -313,6 +313,11 @@ public partial interface IVirtualMachineScaleSetsOperations
///
/// The name of the VM scale set.
///
+ ///
+ /// The parameter to request non-graceful VM shutdown. True value for
+ /// this flag indicates non-graceful shutdown whereas false indicates
+ /// otherwise. Default value for this flag is false if not specified
+ ///
///
/// The virtual machine scale set instance ids. Omitting the virtual
/// machine scale set instance ids will result in the operation being
@@ -330,7 +335,7 @@ public partial interface IVirtualMachineScaleSetsOperations
///
/// Thrown when a required parameter is null
///
- Task PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, bool? skipShutdown = false, IList instanceIds = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Restarts one or more virtual machines in a VM scale set.
///
@@ -701,6 +706,11 @@ public partial interface IVirtualMachineScaleSetsOperations
///
/// The name of the VM scale set.
///
+ ///
+ /// The parameter to request non-graceful VM shutdown. True value for
+ /// this flag indicates non-graceful shutdown whereas false indicates
+ /// otherwise. Default value for this flag is false if not specified
+ ///
///
/// The virtual machine scale set instance ids. Omitting the virtual
/// machine scale set instance ids will result in the operation being
@@ -718,7 +728,7 @@ public partial interface IVirtualMachineScaleSetsOperations
///
/// Thrown when a required parameter is null
///
- Task BeginPowerOffWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginPowerOffWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, bool? skipShutdown = false, IList instanceIds = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Restarts one or more virtual machines in a VM scale set.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachinesOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachinesOperations.cs
index 8ea1b72368d66..49d605b45ad11 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachinesOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/IVirtualMachinesOperations.cs
@@ -362,6 +362,11 @@ public partial interface IVirtualMachinesOperations
///
/// The name of the virtual machine.
///
+ ///
+ /// The parameter to request non-graceful VM shutdown. True value for
+ /// this flag indicates non-graceful shutdown whereas false indicates
+ /// otherwise. Default value for this flag is false if not specified
+ ///
///
/// The headers that will be added to request.
///
@@ -374,7 +379,7 @@ public partial interface IVirtualMachinesOperations
///
/// Thrown when a required parameter is null
///
- Task PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? skipShutdown = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// The operation to restart a virtual machine.
///
@@ -683,6 +688,11 @@ public partial interface IVirtualMachinesOperations
///
/// The name of the virtual machine.
///
+ ///
+ /// The parameter to request non-graceful VM shutdown. True value for
+ /// this flag indicates non-graceful shutdown whereas false indicates
+ /// otherwise. Default value for this flag is false if not specified
+ ///
///
/// The headers that will be added to request.
///
@@ -695,7 +705,7 @@ public partial interface IVirtualMachinesOperations
///
/// Thrown when a required parameter is null
///
- Task BeginPowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginPowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? skipShutdown = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// The operation to restart a virtual machine.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/ImagesOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/ImagesOperations.cs
index 5e4ce6a06868a..30e8f9cd9afec 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/ImagesOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/ImagesOperations.cs
@@ -169,7 +169,7 @@ internal ImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -361,7 +361,7 @@ internal ImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -541,7 +541,7 @@ internal ImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -742,7 +742,7 @@ internal ImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -968,7 +968,7 @@ internal ImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1184,7 +1184,7 @@ internal ImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/src/SDKs/Compute/Management.Compute/Generated/LogAnalyticsOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/LogAnalyticsOperations.cs
index 9bf47eb41599f..0246ea672b270 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/LogAnalyticsOperations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/LogAnalyticsOperations.cs
@@ -152,7 +152,7 @@ internal LogAnalyticsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -363,7 +363,7 @@ internal LogAnalyticsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/AvailabilitySet.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/AvailabilitySet.cs
index 996056f68bb6f..9576acb9998e8 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/AvailabilitySet.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/AvailabilitySet.cs
@@ -55,23 +55,18 @@ public AvailabilitySet()
/// Fault Domain count.
/// A list of references to all virtual
/// machines in the availability set.
- /// Specifies information about
- /// the proximity placement group that the availability set should be
- /// assigned to. <br><br>Minimum api-version:
- /// 2018-04-01.
/// The resource status information.
/// Sku of the availability set, only name is
/// required to be set. See AvailabilitySetSkuTypes for possible set of
/// values. Use 'Aligned' for virtual machines with managed disks and
/// 'Classic' for virtual machines with unmanaged disks. Default value
/// is 'Classic'.
- public AvailabilitySet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), int? platformUpdateDomainCount = default(int?), int? platformFaultDomainCount = default(int?), IList virtualMachines = default(IList), SubResource proximityPlacementGroup = default(SubResource), IList statuses = default(IList), Sku sku = default(Sku))
+ public AvailabilitySet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), int? platformUpdateDomainCount = default(int?), int? platformFaultDomainCount = default(int?), IList virtualMachines = default(IList), IList statuses = default(IList), Sku sku = default(Sku))
: base(location, id, name, type, tags)
{
PlatformUpdateDomainCount = platformUpdateDomainCount;
PlatformFaultDomainCount = platformFaultDomainCount;
VirtualMachines = virtualMachines;
- ProximityPlacementGroup = proximityPlacementGroup;
Statuses = statuses;
Sku = sku;
CustomInit();
@@ -101,15 +96,6 @@ public AvailabilitySet()
[JsonProperty(PropertyName = "properties.virtualMachines")]
public IList VirtualMachines { get; set; }
- ///
- /// Gets or sets specifies information about the proximity placement
- /// group that the availability set should be assigned to.
- /// <br><br>Minimum api-version:
- /// 2018-04-01.
- ///
- [JsonProperty(PropertyName = "properties.proximityPlacementGroup")]
- public SubResource ProximityPlacementGroup { get; set; }
-
///
/// Gets the resource status information.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/AvailabilitySetUpdate.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/AvailabilitySetUpdate.cs
index 7249426adf54e..051a2c67c6cbc 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/AvailabilitySetUpdate.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/AvailabilitySetUpdate.cs
@@ -41,19 +41,14 @@ public AvailabilitySetUpdate()
/// Fault Domain count.
/// A list of references to all virtual
/// machines in the availability set.
- /// Specifies information about
- /// the proximity placement group that the availability set should be
- /// assigned to. <br><br>Minimum api-version:
- /// 2018-04-01.
/// The resource status information.
/// Sku of the availability set
- public AvailabilitySetUpdate(IDictionary tags = default(IDictionary), int? platformUpdateDomainCount = default(int?), int? platformFaultDomainCount = default(int?), IList virtualMachines = default(IList), SubResource proximityPlacementGroup = default(SubResource), IList statuses = default(IList), Sku sku = default(Sku))
+ public AvailabilitySetUpdate(IDictionary tags = default(IDictionary), int? platformUpdateDomainCount = default(int?), int? platformFaultDomainCount = default(int?), IList virtualMachines = default(IList), IList statuses = default(IList), Sku sku = default(Sku))
: base(tags)
{
PlatformUpdateDomainCount = platformUpdateDomainCount;
PlatformFaultDomainCount = platformFaultDomainCount;
VirtualMachines = virtualMachines;
- ProximityPlacementGroup = proximityPlacementGroup;
Statuses = statuses;
Sku = sku;
CustomInit();
@@ -83,15 +78,6 @@ public AvailabilitySetUpdate()
[JsonProperty(PropertyName = "properties.virtualMachines")]
public IList VirtualMachines { get; set; }
- ///
- /// Gets or sets specifies information about the proximity placement
- /// group that the availability set should be assigned to.
- /// <br><br>Minimum api-version:
- /// 2018-04-01.
- ///
- [JsonProperty(PropertyName = "properties.proximityPlacementGroup")]
- public SubResource ProximityPlacementGroup { get; set; }
-
///
/// Gets the resource status information.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/GalleryImageVersionPublishingProfile.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/GalleryImageVersionPublishingProfile.cs
index 1acb6d0af07a2..4fd577dc36da0 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/GalleryImageVersionPublishingProfile.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/GalleryImageVersionPublishingProfile.cs
@@ -48,13 +48,17 @@ public GalleryImageVersionPublishingProfile()
/// The end of life date of the gallery
/// Image Version. This property can be used for decommissioning
/// purposes. This property is updatable.
- public GalleryImageVersionPublishingProfile(GalleryArtifactSource source, IList targetRegions = default(IList), int? replicaCount = default(int?), bool? excludeFromLatest = default(bool?), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?))
+ /// Specifies the storage account type
+ /// to be used to store the image. This property is not updatable.
+ /// Possible values include: 'Standard_LRS', 'Standard_ZRS'
+ public GalleryImageVersionPublishingProfile(GalleryArtifactSource source, IList targetRegions = default(IList), int? replicaCount = default(int?), bool? excludeFromLatest = default(bool?), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?), string storageAccountType = default(string))
: base(source, targetRegions)
{
ReplicaCount = replicaCount;
ExcludeFromLatest = excludeFromLatest;
PublishedDate = publishedDate;
EndOfLifeDate = endOfLifeDate;
+ StorageAccountType = storageAccountType;
CustomInit();
}
@@ -94,6 +98,14 @@ public GalleryImageVersionPublishingProfile()
[JsonProperty(PropertyName = "endOfLifeDate")]
public System.DateTime? EndOfLifeDate { get; set; }
+ ///
+ /// Gets or sets specifies the storage account type to be used to store
+ /// the image. This property is not updatable. Possible values include:
+ /// 'Standard_LRS', 'Standard_ZRS'
+ ///
+ [JsonProperty(PropertyName = "storageAccountType")]
+ public string StorageAccountType { get; set; }
+
///
/// Validate the object.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroup.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroup.cs
deleted file mode 100644
index ab6d2f16a1d4b..0000000000000
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroup.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Compute.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Specifies information about the proximity placement group.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class ProximityPlacementGroup : Resource
- {
- ///
- /// Initializes a new instance of the ProximityPlacementGroup class.
- ///
- public ProximityPlacementGroup()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ProximityPlacementGroup class.
- ///
- /// Resource location
- /// Resource Id
- /// Resource name
- /// Resource type
- /// Resource tags
- /// Specifies the type of the
- /// proximity placement group. <br><br> Possible values
- /// are: <br><br> **Standard** <br><br>
- /// **Ultra**. Possible values include: 'Standard', 'Ultra'
- /// A list of references to all virtual
- /// machines in the proximity placement group.
- /// A list of references to all
- /// virtual machine scale sets in the proximity placement
- /// group.
- /// A list of references to all
- /// availability sets in the proximity placement group.
- public ProximityPlacementGroup(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string proximityPlacementGroupType = default(string), IList virtualMachines = default(IList), IList virtualMachineScaleSets = default(IList), IList availabilitySets = default(IList))
- : base(location, id, name, type, tags)
- {
- ProximityPlacementGroupType = proximityPlacementGroupType;
- VirtualMachines = virtualMachines;
- VirtualMachineScaleSets = virtualMachineScaleSets;
- AvailabilitySets = availabilitySets;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets specifies the type of the proximity placement group.
- /// <br><br> Possible values are:
- /// <br><br> **Standard**
- /// <br><br> **Ultra**. Possible values
- /// include: 'Standard', 'Ultra'
- ///
- [JsonProperty(PropertyName = "properties.proximityPlacementGroupType")]
- public string ProximityPlacementGroupType { get; set; }
-
- ///
- /// Gets a list of references to all virtual machines in the proximity
- /// placement group.
- ///
- [JsonProperty(PropertyName = "properties.virtualMachines")]
- public IList VirtualMachines { get; private set; }
-
- ///
- /// Gets a list of references to all virtual machine scale sets in the
- /// proximity placement group.
- ///
- [JsonProperty(PropertyName = "properties.virtualMachineScaleSets")]
- public IList VirtualMachineScaleSets { get; private set; }
-
- ///
- /// Gets a list of references to all availability sets in the proximity
- /// placement group.
- ///
- [JsonProperty(PropertyName = "properties.availabilitySets")]
- public IList AvailabilitySets { get; private set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public override void Validate()
- {
- base.Validate();
- }
- }
-}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroupUpdate.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroupUpdate.cs
deleted file mode 100644
index 0343a07d68f68..0000000000000
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroupUpdate.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Compute.Models
-{
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Specifies information about the proximity placement group.
- ///
- public partial class ProximityPlacementGroupUpdate : UpdateResource
- {
- ///
- /// Initializes a new instance of the ProximityPlacementGroupUpdate
- /// class.
- ///
- public ProximityPlacementGroupUpdate()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ProximityPlacementGroupUpdate
- /// class.
- ///
- /// Resource tags
- public ProximityPlacementGroupUpdate(IDictionary tags = default(IDictionary))
- : base(tags)
- {
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- }
-}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroupType.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/StorageAccountType.cs
similarity index 69%
rename from src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroupType.cs
rename to src/SDKs/Compute/Management.Compute/Generated/Models/StorageAccountType.cs
index 9d5fc54330490..7bb338ee5e2a0 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/ProximityPlacementGroupType.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/StorageAccountType.cs
@@ -12,11 +12,11 @@ namespace Microsoft.Azure.Management.Compute.Models
{
///
- /// Defines values for ProximityPlacementGroupType.
+ /// Defines values for StorageAccountType.
///
- public static class ProximityPlacementGroupType
+ public static class StorageAccountType
{
- public const string Standard = "Standard";
- public const string Ultra = "Ultra";
+ public const string StandardLRS = "Standard_LRS";
+ public const string StandardZRS = "Standard_ZRS";
}
}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/TargetRegion.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/TargetRegion.cs
index 4179cf259b098..8e331c042ccda 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/TargetRegion.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/TargetRegion.cs
@@ -34,10 +34,14 @@ public TargetRegion()
/// The number of replicas of the
/// Image Version to be created per region. This property is
/// updatable.
- public TargetRegion(string name, int? regionalReplicaCount = default(int?))
+ /// Specifies the storage account type
+ /// to be used to store the image. This property is not updatable.
+ /// Possible values include: 'Standard_LRS', 'Standard_ZRS'
+ public TargetRegion(string name, int? regionalReplicaCount = default(int?), string storageAccountType = default(string))
{
Name = name;
RegionalReplicaCount = regionalReplicaCount;
+ StorageAccountType = storageAccountType;
CustomInit();
}
@@ -59,6 +63,14 @@ public TargetRegion()
[JsonProperty(PropertyName = "regionalReplicaCount")]
public int? RegionalReplicaCount { get; set; }
+ ///
+ /// Gets or sets specifies the storage account type to be used to store
+ /// the image. This property is not updatable. Possible values include:
+ /// 'Standard_LRS', 'Standard_ZRS'
+ ///
+ [JsonProperty(PropertyName = "storageAccountType")]
+ public string StorageAccountType { get; set; }
+
///
/// Validate the object.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VMScaleSetConvertToSinglePlacementGroupInput.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VMScaleSetConvertToSinglePlacementGroupInput.cs
new file mode 100644
index 0000000000000..b2955a8cb32da
--- /dev/null
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VMScaleSetConvertToSinglePlacementGroupInput.cs
@@ -0,0 +1,58 @@
+//
+// 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.Compute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class VMScaleSetConvertToSinglePlacementGroupInput
+ {
+ ///
+ /// Initializes a new instance of the
+ /// VMScaleSetConvertToSinglePlacementGroupInput class.
+ ///
+ public VMScaleSetConvertToSinglePlacementGroupInput()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// VMScaleSetConvertToSinglePlacementGroupInput class.
+ ///
+ /// Id of the placement group in
+ /// which you want future virtual machine instances to be placed. To
+ /// query placement group Id, please use Virtual Machine Scale Set VMs
+ /// - Get API. If not provided, the platform will choose one with
+ /// maximum number of virtual machine instances.
+ public VMScaleSetConvertToSinglePlacementGroupInput(string activePlacementGroupId = default(string))
+ {
+ ActivePlacementGroupId = activePlacementGroupId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets id of the placement group in which you want future
+ /// virtual machine instances to be placed. To query placement group
+ /// Id, please use Virtual Machine Scale Set VMs - Get API. If not
+ /// provided, the platform will choose one with maximum number of
+ /// virtual machine instances.
+ ///
+ [JsonProperty(PropertyName = "activePlacementGroupId")]
+ public string ActivePlacementGroupId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachine.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachine.cs
index 851477f35b4d5..a103de40463e6 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachine.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachine.cs
@@ -72,10 +72,6 @@ public VirtualMachine()
/// <br><br> Currently, a VM can only be added to
/// availability set at creation time. An existing VM cannot be added
/// to an availability set.
- /// Specifies information about
- /// the proximity placement group that the virtual machine should be
- /// assigned to. <br><br>Minimum api-version:
- /// 2018-04-01.
/// The provisioning state, which only
/// appears in the response.
/// The virtual machine instance
@@ -99,7 +95,7 @@ public VirtualMachine()
/// The identity of the virtual machine, if
/// configured.
/// The virtual machine zones.
- public VirtualMachine(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), SubResource proximityPlacementGroup = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), IList resources = default(IList), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList zones = default(IList))
+ public VirtualMachine(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), IList resources = default(IList), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList zones = default(IList))
: base(location, id, name, type, tags)
{
Plan = plan;
@@ -110,7 +106,6 @@ public VirtualMachine()
NetworkProfile = networkProfile;
DiagnosticsProfile = diagnosticsProfile;
AvailabilitySet = availabilitySet;
- ProximityPlacementGroup = proximityPlacementGroup;
ProvisioningState = provisioningState;
InstanceView = instanceView;
LicenseType = licenseType;
@@ -199,15 +194,6 @@ public VirtualMachine()
[JsonProperty(PropertyName = "properties.availabilitySet")]
public SubResource AvailabilitySet { get; set; }
- ///
- /// Gets or sets specifies information about the proximity placement
- /// group that the virtual machine should be assigned to.
- /// <br><br>Minimum api-version:
- /// 2018-04-01.
- ///
- [JsonProperty(PropertyName = "properties.proximityPlacementGroup")]
- public SubResource ProximityPlacementGroup { get; set; }
-
///
/// Gets the provisioning state, which only appears in the response.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSet.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSet.cs
index 7a1550e99da68..761d55af01ad3 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSet.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSet.cs
@@ -54,6 +54,11 @@ public VirtualMachineScaleSet()
/// appears in the response.
/// Specifies whether the Virtual Machine
/// Scale Set should be overprovisioned.
+ /// When
+ /// Overprovision is enabled, extensions are launched only on the
+ /// requested number of VMs which are finally kept. This property will
+ /// hence ensure that the extensions do not run on the extra
+ /// overprovisioned VMs.
/// Specifies the ID which uniquely identifies a
/// Virtual Machine Scale Set.
/// When true this limits the scale
@@ -64,14 +69,10 @@ public VirtualMachineScaleSet()
/// outage.
/// Fault Domain count for each
/// placement group.
- /// Specifies information about
- /// the proximity placement group that the virtual machine scale set
- /// should be assigned to. <br><br>Minimum api-version:
- /// 2018-04-01.
/// The identity of the virtual machine scale
/// set, if configured.
/// The virtual machine scale set zones.
- public VirtualMachineScaleSet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), Plan plan = default(Plan), UpgradePolicy upgradePolicy = default(UpgradePolicy), VirtualMachineScaleSetVMProfile virtualMachineProfile = default(VirtualMachineScaleSetVMProfile), string provisioningState = default(string), bool? overprovision = default(bool?), string uniqueId = default(string), bool? singlePlacementGroup = default(bool?), bool? zoneBalance = default(bool?), int? platformFaultDomainCount = default(int?), SubResource proximityPlacementGroup = default(SubResource), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity), IList zones = default(IList))
+ public VirtualMachineScaleSet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), Plan plan = default(Plan), UpgradePolicy upgradePolicy = default(UpgradePolicy), VirtualMachineScaleSetVMProfile virtualMachineProfile = default(VirtualMachineScaleSetVMProfile), string provisioningState = default(string), bool? overprovision = default(bool?), bool? doNotRunExtensionsOnOverprovisionedVMs = default(bool?), string uniqueId = default(string), bool? singlePlacementGroup = default(bool?), bool? zoneBalance = default(bool?), int? platformFaultDomainCount = default(int?), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity), IList zones = default(IList))
: base(location, id, name, type, tags)
{
Sku = sku;
@@ -80,11 +81,11 @@ public VirtualMachineScaleSet()
VirtualMachineProfile = virtualMachineProfile;
ProvisioningState = provisioningState;
Overprovision = overprovision;
+ DoNotRunExtensionsOnOverprovisionedVMs = doNotRunExtensionsOnOverprovisionedVMs;
UniqueId = uniqueId;
SinglePlacementGroup = singlePlacementGroup;
ZoneBalance = zoneBalance;
PlatformFaultDomainCount = platformFaultDomainCount;
- ProximityPlacementGroup = proximityPlacementGroup;
Identity = identity;
Zones = zones;
CustomInit();
@@ -138,6 +139,15 @@ public VirtualMachineScaleSet()
[JsonProperty(PropertyName = "properties.overprovision")]
public bool? Overprovision { get; set; }
+ ///
+ /// Gets or sets when Overprovision is enabled, extensions are launched
+ /// only on the requested number of VMs which are finally kept. This
+ /// property will hence ensure that the extensions do not run on the
+ /// extra overprovisioned VMs.
+ ///
+ [JsonProperty(PropertyName = "properties.doNotRunExtensionsOnOverprovisionedVMs")]
+ public bool? DoNotRunExtensionsOnOverprovisionedVMs { get; set; }
+
///
/// Gets specifies the ID which uniquely identifies a Virtual Machine
/// Scale Set.
@@ -165,15 +175,6 @@ public VirtualMachineScaleSet()
[JsonProperty(PropertyName = "properties.platformFaultDomainCount")]
public int? PlatformFaultDomainCount { get; set; }
- ///
- /// Gets or sets specifies information about the proximity placement
- /// group that the virtual machine scale set should be assigned to.
- /// <br><br>Minimum api-version:
- /// 2018-04-01.
- ///
- [JsonProperty(PropertyName = "properties.proximityPlacementGroup")]
- public SubResource ProximityPlacementGroup { get; set; }
-
///
/// Gets or sets the identity of the virtual machine scale set, if
/// configured.
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVM.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVM.cs
index 4ca9bb307f6a8..26dbda4597c2c 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVM.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVM.cs
@@ -59,6 +59,8 @@ public VirtualMachineScaleSetVM()
/// the virtual machine.
/// Specifies the network interfaces of
/// the virtual machine.
+ /// Specifies the network
+ /// profile configuration of the virtual machine.
/// Specifies the boot diagnostic
/// settings state. <br><br>Minimum api-version:
/// 2015-06-15.
@@ -88,6 +90,11 @@ public VirtualMachineScaleSetVM()
/// [Azure Hybrid Use Benefit for Windows
/// Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
/// <br><br> Minimum api-version: 2015-06-15
+ /// Specifies whether the model
+ /// applied to the virtual machine is the model of the virtual machine
+ /// scale set or the customized model for the virtual machine.
+ /// Specifies the protection policy of
+ /// the virtual machine.
/// Specifies information about the marketplace
/// image used to create the virtual machine. This element is only used
/// for marketplace images. Before you can use a marketplace image from
@@ -98,7 +105,7 @@ public VirtualMachineScaleSetVM()
/// The virtual machine child extension
/// resources.
/// The virtual machine zones.
- public VirtualMachineScaleSetVM(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string instanceId = default(string), Sku sku = default(Sku), bool? latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), string licenseType = default(string), Plan plan = default(Plan), IList resources = default(IList), IList zones = default(IList))
+ public VirtualMachineScaleSetVM(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string instanceId = default(string), Sku sku = default(Sku), bool? latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration = default(VirtualMachineScaleSetVMNetworkProfileConfiguration), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), string licenseType = default(string), string modelDefinitionApplied = default(string), VirtualMachineScaleSetVMProtectionPolicy protectionPolicy = default(VirtualMachineScaleSetVMProtectionPolicy), Plan plan = default(Plan), IList resources = default(IList), IList zones = default(IList))
: base(location, id, name, type, tags)
{
InstanceId = instanceId;
@@ -111,10 +118,13 @@ public VirtualMachineScaleSetVM()
AdditionalCapabilities = additionalCapabilities;
OsProfile = osProfile;
NetworkProfile = networkProfile;
+ NetworkProfileConfiguration = networkProfileConfiguration;
DiagnosticsProfile = diagnosticsProfile;
AvailabilitySet = availabilitySet;
ProvisioningState = provisioningState;
LicenseType = licenseType;
+ ModelDefinitionApplied = modelDefinitionApplied;
+ ProtectionPolicy = protectionPolicy;
Plan = plan;
Resources = resources;
Zones = zones;
@@ -194,6 +204,13 @@ public VirtualMachineScaleSetVM()
[JsonProperty(PropertyName = "properties.networkProfile")]
public NetworkProfile NetworkProfile { get; set; }
+ ///
+ /// Gets or sets specifies the network profile configuration of the
+ /// virtual machine.
+ ///
+ [JsonProperty(PropertyName = "properties.networkProfileConfiguration")]
+ public VirtualMachineScaleSetVMNetworkProfileConfiguration NetworkProfileConfiguration { get; set; }
+
///
/// Gets or sets specifies the boot diagnostic settings state.
/// <br><br>Minimum api-version:
@@ -244,6 +261,21 @@ public VirtualMachineScaleSetVM()
[JsonProperty(PropertyName = "properties.licenseType")]
public string LicenseType { get; set; }
+ ///
+ /// Gets specifies whether the model applied to the virtual machine is
+ /// the model of the virtual machine scale set or the customized model
+ /// for the virtual machine.
+ ///
+ [JsonProperty(PropertyName = "properties.modelDefinitionApplied")]
+ public string ModelDefinitionApplied { get; private set; }
+
+ ///
+ /// Gets or sets specifies the protection policy of the virtual
+ /// machine.
+ ///
+ [JsonProperty(PropertyName = "properties.protectionPolicy")]
+ public VirtualMachineScaleSetVMProtectionPolicy ProtectionPolicy { get; set; }
+
///
/// Gets or sets specifies information about the marketplace image used
/// to create the virtual machine. This element is only used for
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMNetworkProfileConfiguration.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMNetworkProfileConfiguration.cs
new file mode 100644
index 0000000000000..f8e141cdd2b98
--- /dev/null
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMNetworkProfileConfiguration.cs
@@ -0,0 +1,56 @@
+//
+// 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.Compute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes a virtual machine scale set VM network profile.
+ ///
+ public partial class VirtualMachineScaleSetVMNetworkProfileConfiguration
+ {
+ ///
+ /// Initializes a new instance of the
+ /// VirtualMachineScaleSetVMNetworkProfileConfiguration class.
+ ///
+ public VirtualMachineScaleSetVMNetworkProfileConfiguration()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// VirtualMachineScaleSetVMNetworkProfileConfiguration class.
+ ///
+ /// The list of network
+ /// configurations.
+ public VirtualMachineScaleSetVMNetworkProfileConfiguration(IList networkInterfaceConfigurations = default(IList))
+ {
+ NetworkInterfaceConfigurations = networkInterfaceConfigurations;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the list of network configurations.
+ ///
+ [JsonProperty(PropertyName = "networkInterfaceConfigurations")]
+ public IList NetworkInterfaceConfigurations { get; set; }
+
+ }
+}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMProtectionPolicy.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMProtectionPolicy.cs
new file mode 100644
index 0000000000000..73637dcff1c88
--- /dev/null
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMProtectionPolicy.cs
@@ -0,0 +1,69 @@
+//
+// 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.Compute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The protection policy of a virtual machine scale set VM.
+ ///
+ public partial class VirtualMachineScaleSetVMProtectionPolicy
+ {
+ ///
+ /// Initializes a new instance of the
+ /// VirtualMachineScaleSetVMProtectionPolicy class.
+ ///
+ public VirtualMachineScaleSetVMProtectionPolicy()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// VirtualMachineScaleSetVMProtectionPolicy class.
+ ///
+ /// Indicates that the virtual machine
+ /// scale set VM shouldn't be considered for deletion during a scale-in
+ /// operation.
+ /// Indicates that model
+ /// updates or actions (including scale-in) initiated on the virtual
+ /// machine scale set should not be applied to the virtual machine
+ /// scale set VM.
+ public VirtualMachineScaleSetVMProtectionPolicy(bool? protectFromScaleIn = default(bool?), bool? protectFromScaleSetActions = default(bool?))
+ {
+ ProtectFromScaleIn = protectFromScaleIn;
+ ProtectFromScaleSetActions = protectFromScaleSetActions;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets indicates that the virtual machine scale set VM
+ /// shouldn't be considered for deletion during a scale-in operation.
+ ///
+ [JsonProperty(PropertyName = "protectFromScaleIn")]
+ public bool? ProtectFromScaleIn { get; set; }
+
+ ///
+ /// Gets or sets indicates that model updates or actions (including
+ /// scale-in) initiated on the virtual machine scale set should not be
+ /// applied to the virtual machine scale set VM.
+ ///
+ [JsonProperty(PropertyName = "protectFromScaleSetActions")]
+ public bool? ProtectFromScaleSetActions { get; set; }
+
+ }
+}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineUpdate.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineUpdate.cs
index f2298eea32d80..b1b1f4a66e168 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineUpdate.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineUpdate.cs
@@ -68,10 +68,6 @@ public VirtualMachineUpdate()
/// <br><br> Currently, a VM can only be added to
/// availability set at creation time. An existing VM cannot be added
/// to an availability set.
- /// Specifies information about
- /// the proximity placement group that the virtual machine should be
- /// assigned to. <br><br>Minimum api-version:
- /// 2018-04-01.
/// The provisioning state, which only
/// appears in the response.
/// The virtual machine instance
@@ -93,7 +89,7 @@ public VirtualMachineUpdate()
/// The identity of the virtual machine, if
/// configured.
/// The virtual machine zones.
- public VirtualMachineUpdate(IDictionary tags = default(IDictionary), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), SubResource proximityPlacementGroup = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList zones = default(IList))
+ public VirtualMachineUpdate(IDictionary tags = default(IDictionary), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList zones = default(IList))
: base(tags)
{
Plan = plan;
@@ -104,7 +100,6 @@ public VirtualMachineUpdate()
NetworkProfile = networkProfile;
DiagnosticsProfile = diagnosticsProfile;
AvailabilitySet = availabilitySet;
- ProximityPlacementGroup = proximityPlacementGroup;
ProvisioningState = provisioningState;
InstanceView = instanceView;
LicenseType = licenseType;
@@ -192,15 +187,6 @@ public VirtualMachineUpdate()
[JsonProperty(PropertyName = "properties.availabilitySet")]
public SubResource AvailabilitySet { get; set; }
- ///
- /// Gets or sets specifies information about the proximity placement
- /// group that the virtual machine should be assigned to.
- /// <br><br>Minimum api-version:
- /// 2018-04-01.
- ///
- [JsonProperty(PropertyName = "properties.proximityPlacementGroup")]
- public SubResource ProximityPlacementGroup { get; set; }
-
///
/// Gets the provisioning state, which only appears in the response.
///
diff --git a/src/SDKs/Compute/Management.Compute/Generated/Operations.cs b/src/SDKs/Compute/Management.Compute/Generated/Operations.cs
index 1e22ea9fcce71..8c2104e84ef84 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/Operations.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/Operations.cs
@@ -70,7 +70,7 @@ internal Operations(ComputeManagementClient client)
///
public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- string apiVersion = "2018-10-01";
+ string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/src/SDKs/Compute/Management.Compute/Generated/ProximityPlacementGroupsOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/ProximityPlacementGroupsOperations.cs
deleted file mode 100644
index 1b45dc6dd70e7..0000000000000
--- a/src/SDKs/Compute/Management.Compute/Generated/ProximityPlacementGroupsOperations.cs
+++ /dev/null
@@ -1,1567 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Compute
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// ProximityPlacementGroupsOperations operations.
- ///
- internal partial class ProximityPlacementGroupsOperations : IServiceOperations, IProximityPlacementGroupsOperations
- {
- ///
- /// Initializes a new instance of the ProximityPlacementGroupsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal ProximityPlacementGroupsOperations(ComputeManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the ComputeManagementClient
- ///
- public ComputeManagementClient Client { get; private set; }
-
- ///
- /// Create or update a proximity placement group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// Parameters supplied to the Create Proximity Placement Group operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string proximityPlacementGroupName, ProximityPlacementGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (proximityPlacementGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "proximityPlacementGroupName");
- }
- 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");
- }
- string apiVersion = "2018-10-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("proximityPlacementGroupName", proximityPlacementGroupName);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{proximityPlacementGroupName}", System.Uri.EscapeDataString(proximityPlacementGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
- {
- var ex = new 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);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Update a proximity placement group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// Resource tags
- ///
- ///
- /// 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string proximityPlacementGroupName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (proximityPlacementGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "proximityPlacementGroupName");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2018-10-01";
- ProximityPlacementGroupUpdate parameters = new ProximityPlacementGroupUpdate();
- if (tags != null)
- {
- parameters.Tags = tags;
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("proximityPlacementGroupName", proximityPlacementGroupName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{proximityPlacementGroupName}", System.Uri.EscapeDataString(proximityPlacementGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PATCH");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // 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;
- }
-
- ///
- /// Delete a proximity placement group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string proximityPlacementGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (proximityPlacementGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "proximityPlacementGroupName");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2018-10-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("proximityPlacementGroupName", proximityPlacementGroupName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{proximityPlacementGroupName}", System.Uri.EscapeDataString(proximityPlacementGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- 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;
- }
-
- ///
- /// Retrieves information about a proximity placement group .
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement 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> GetWithHttpMessagesAsync(string resourceGroupName, string proximityPlacementGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (proximityPlacementGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "proximityPlacementGroupName");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2018-10-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("proximityPlacementGroupName", proximityPlacementGroupName);
- tracingParameters.Add("apiVersion", apiVersion);
- 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.Compute/proximityPlacementGroups/{proximityPlacementGroupName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{proximityPlacementGroupName}", System.Uri.EscapeDataString(proximityPlacementGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all proximity placement groups in a subscription.
- ///
- ///
- /// 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>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2018-10-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all proximity placement groups in a resource group.
- ///
- ///
- /// The name of the resource 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>> 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");
- }
- string apiVersion = "2018-10-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("apiVersion", apiVersion);
- 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.Compute/proximityPlacementGroups").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all proximity placement groups in a subscription.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all proximity placement groups in a resource group.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/ProximityPlacementGroupsOperationsExtensions.cs b/src/SDKs/Compute/Management.Compute/Generated/ProximityPlacementGroupsOperationsExtensions.cs
deleted file mode 100644
index 189e7609ad499..0000000000000
--- a/src/SDKs/Compute/Management.Compute/Generated/ProximityPlacementGroupsOperationsExtensions.cs
+++ /dev/null
@@ -1,326 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Compute
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for ProximityPlacementGroupsOperations.
- ///
- public static partial class ProximityPlacementGroupsOperationsExtensions
- {
- ///
- /// Create or update a proximity placement group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// Parameters supplied to the Create Proximity Placement Group operation.
- ///
- public static ProximityPlacementGroup CreateOrUpdate(this IProximityPlacementGroupsOperations operations, string resourceGroupName, string proximityPlacementGroupName, ProximityPlacementGroup parameters)
- {
- return operations.CreateOrUpdateAsync(resourceGroupName, proximityPlacementGroupName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Create or update a proximity placement group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// Parameters supplied to the Create Proximity Placement Group operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CreateOrUpdateAsync(this IProximityPlacementGroupsOperations operations, string resourceGroupName, string proximityPlacementGroupName, ProximityPlacementGroup parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, proximityPlacementGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Update a proximity placement group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// Resource tags
- ///
- public static ProximityPlacementGroup Update(this IProximityPlacementGroupsOperations operations, string resourceGroupName, string proximityPlacementGroupName, IDictionary tags = default(IDictionary))
- {
- return operations.UpdateAsync(resourceGroupName, proximityPlacementGroupName, tags).GetAwaiter().GetResult();
- }
-
- ///
- /// Update a proximity placement group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// Resource tags
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task UpdateAsync(this IProximityPlacementGroupsOperations operations, string resourceGroupName, string proximityPlacementGroupName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, proximityPlacementGroupName, tags, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Delete a proximity placement group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- public static void Delete(this IProximityPlacementGroupsOperations operations, string resourceGroupName, string proximityPlacementGroupName)
- {
- operations.DeleteAsync(resourceGroupName, proximityPlacementGroupName).GetAwaiter().GetResult();
- }
-
- ///
- /// Delete a proximity placement group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task DeleteAsync(this IProximityPlacementGroupsOperations operations, string resourceGroupName, string proximityPlacementGroupName, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, proximityPlacementGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// Retrieves information about a proximity placement group .
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- public static ProximityPlacementGroup Get(this IProximityPlacementGroupsOperations operations, string resourceGroupName, string proximityPlacementGroupName)
- {
- return operations.GetAsync(resourceGroupName, proximityPlacementGroupName).GetAwaiter().GetResult();
- }
-
- ///
- /// Retrieves information about a proximity placement group .
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the proximity placement group.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IProximityPlacementGroupsOperations operations, string resourceGroupName, string proximityPlacementGroupName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, proximityPlacementGroupName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all proximity placement groups in a subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- public static IPage ListBySubscription(this IProximityPlacementGroupsOperations operations)
- {
- return operations.ListBySubscriptionAsync().GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all proximity placement groups in a subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListBySubscriptionAsync(this IProximityPlacementGroupsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all proximity placement groups in a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- public static IPage ListByResourceGroup(this IProximityPlacementGroupsOperations operations, string resourceGroupName)
- {
- return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all proximity placement groups in a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListByResourceGroupAsync(this IProximityPlacementGroupsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all proximity placement groups in a subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListBySubscriptionNext(this IProximityPlacementGroupsOperations operations, string nextPageLink)
- {
- return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all proximity placement groups in a subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListBySubscriptionNextAsync(this IProximityPlacementGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all proximity placement groups in a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListByResourceGroupNext(this IProximityPlacementGroupsOperations operations, string nextPageLink)
- {
- return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all proximity placement groups in a resource 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> ListByResourceGroupNextAsync(this IProximityPlacementGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/src/SDKs/Compute/Management.Compute/Generated/SdkInfo_ComputeManagementClient.cs b/src/SDKs/Compute/Management.Compute/Generated/SdkInfo_ComputeManagementClient.cs
index 67f2233ea328e..a26709004e2f1 100644
--- a/src/SDKs/Compute/Management.Compute/Generated/SdkInfo_ComputeManagementClient.cs
+++ b/src/SDKs/Compute/Management.Compute/Generated/SdkInfo_ComputeManagementClient.cs
@@ -19,28 +19,28 @@ public static IEnumerable> ApiInfo_ComputeManageme
{
return new Tuple[]
{
- new Tuple("Compute", "AvailabilitySets", "2018-10-01"),
+ new Tuple("Compute", "AvailabilitySets", "2019-03-01"),
new Tuple("Compute", "Disks", "2018-09-30"),
- new Tuple("Compute", "Galleries", "2018-06-01"),
- new Tuple("Compute", "GalleryImageVersions", "2018-06-01"),
- new Tuple("Compute", "GalleryImages", "2018-06-01"),
- new Tuple("Compute", "Images", "2018-10-01"),
- new Tuple("Compute", "LogAnalytics", "2018-10-01"),
- new Tuple("Compute", "Operations", "2018-10-01"),
- new Tuple("Compute", "ProximityPlacementGroups", "2018-10-01"),
+ new Tuple("Compute", "Galleries", "2019-03-01"),
+ new Tuple("Compute", "GalleryImageVersions", "2019-03-01"),
+ new Tuple("Compute", "GalleryImages", "2019-03-01"),
+ new Tuple("Compute", "Images", "2019-03-01"),
+ new Tuple("Compute", "LogAnalytics", "2019-03-01"),
+ new Tuple("Compute", "Operations", "2019-03-01"),
new Tuple("Compute", "ResourceSkus", "2017-09-01"),
new Tuple