[Compute] ProximityPlacementGroupId Update feature (#10675)

* ProximityPlacementGroupId Update feature

* Hide a breaking change introduced by SDK which changes Type to Type1.
This commit is contained in:
Hyonho Lee 2019-12-11 20:18:54 -08:00 коммит произвёл Yunchi Wang
Родитель 5120088efc
Коммит 12dee4a9e3
48 изменённых файлов: 3720 добавлений и 2107 удалений

Просмотреть файл

@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.1.0" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.2.0" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="2.4.2" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
</ItemGroup>

Просмотреть файл

@ -80,31 +80,45 @@ function Test-ProximityPlacementGroupAvSet
New-AzResourceGroup -Name $rgname -Location $loc -Force;
# Create a VM first
$ppgname = $rgname + 'ppg'
New-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname -Location $loc -ProximityPlacementGroupType "Standard" -Tag @{key1 = "val1"};
$ppgname1 = $rgname + 'ppg'
New-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname1 -Location $loc -ProximityPlacementGroupType "Standard" -Tag @{key1 = "val1"};
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname;
$ppg1 = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname1;
Assert-AreEqual $rgname $ppg.ResourceGroupName;
Assert-AreEqual $ppgname $ppg.Name;
Assert-AreEqual $loc $ppg.Location;
Assert-AreEqual "Standard" $ppg.ProximityPlacementGroupType;
Assert-True { $ppg.Tags.Keys.Contains("key1") };
Assert-AreEqual "val1" $ppg.Tags["key1"];
Assert-AreEqual $rgname $ppg1.ResourceGroupName;
Assert-AreEqual $ppgname1 $ppg1.Name;
Assert-AreEqual $loc $ppg1.Location;
Assert-AreEqual "Standard" $ppg1.ProximityPlacementGroupType;
Assert-True { $ppg1.Tags.Keys.Contains("key1") };
Assert-AreEqual "val1" $ppg1.Tags["key1"];
$asetName = $rgname + 'as';
New-AzAvailabilitySet -ResourceGroupName $rgname -Name $asetName -Location $loc -ProximityPlacementGroupId $ppg.Id -Sku 'Classic';
$av = Get-AzAvailabilitySet -ResourceGroupName $rgname -Name $asetName;
Assert-AreEqual $ppg.Id $av.ProximityPlacementGroup.Id;
Assert-AreEqual $ppg1.Id $av.ProximityPlacementGroup.Id;
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname;
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname1;
Assert-AreEqual $av.Id $ppg.AvailabilitySets[0].Id;
Remove-AzAvailabilitySet -ResourceGroupName $rgname -Name $asetName -Force;
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname;
Assert-Null $ppg.AvailabilitySets;
# Create another PPG
$ppgname2 = $rgname + 'ppg2'
New-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2 -Location $loc -ProximityPlacementGroupType "Standard" -Tag @{key2 = "val2"};
$ppg2 = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2;
Remove-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname -Force;
# Update AvSet to another PPG
Update-AzAvailabilitySet -AvailabilitySet $av -ProximityPlacementGroupId $ppg2.Id;
$av = Get-AzAvailabilitySet -ResourceGroupName $rgname -Name $asetName;
Assert-AreEqual $ppg2.Id $av.ProximityPlacementGroup.Id;
Remove-AzAvailabilitySet -ResourceGroupName $rgname -Name $asetName -Force;
$ppg1 = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname1;
Assert-Null $ppg1.AvailabilitySets;
$ppg2 = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2;
Assert-Null $ppg2.AvailabilitySets;
Remove-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname1 -Force;
Remove-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2 -Force;
}
finally
{
@ -182,11 +196,28 @@ function Test-ProximityPlacementGroupVM
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname;
Assert-AreEqual $vm.Id $ppg.VirtualMachines[0].Id;
Stop-AzVM -ResourceGroupName $rgname -Name $vmName -Force;
$ppgname2 = $rgname + 'ppg2'
New-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2 -Location $loc -ProximityPlacementGroupType "Standard" -Tag @{key2 = "val2"};
$ppg2 = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2;
Update-AzVM -ResourceGroupName $rgname -VM $vm -ProximityPlacementGroupId $ppg2.Id;
$vm = Get-AzVM -ResourceGroupName $rgname -Name $vmName;
Assert-AreEqual $ppg2.Id $vm.ProximityPlacementGroup.Id;
$ppg2 = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2;
Assert-AreEqual $vm.Id $ppg2.VirtualMachines[0].Id;
Remove-AzVM -ResourceGroupName $rgname -Name $vmName -Force;
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname;
Assert-Null $ppg.VirtualMachines;
$ppg2 = Get-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2;
Assert-Null $ppg2.VirtualMachines;
Remove-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname -Force;
Remove-AzProximityPlacementGroup -ResourceGroupName $rgname -Name $ppgname2 -Force;
}
finally
{

Просмотреть файл

@ -558,7 +558,7 @@ function Test-SimpleNewVmPpgId
-ResourceGroupName $rgname `
-Name $ppgname `
-Location "eastus"
$vm = New-AzVM -Name $vmname -Credential $cred -DomainNameLabel $domainNameLabel -ProximityPlacementGroup $ppg.Id
$vm = New-AzVM -Name $vmname -Credential $cred -DomainNameLabel $domainNameLabel -ProximityPlacementGroupId $ppg.Id
Assert-AreEqual $vm.ProximityPlacementGroup.Id $ppg.Id
}

Просмотреть файл

@ -394,7 +394,7 @@ function Test-SimpleNewVmssPpg
-ResourceGroupName $rgname `
-Name $ppgname `
-Location "eastus"
$vmss = New-AzVmss -Name $vmssname -ResourceGroup $rgname -Credential $cred -DomainNameLabel $domainNameLabel -LoadBalancerName $lbName -ProximityPlacementGroup $ppgname
$vmss = New-AzVmss -Name $vmssname -ResourceGroup $rgname -Credential $cred -DomainNameLabel $domainNameLabel -LoadBalancerName $lbName -ProximityPlacementGroupId $ppgname
Assert-AreEqual $vmss.ProximityPlacementGroup.Id $ppg.Id
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -18,6 +18,7 @@ using System.Management.Automation;
using Microsoft.Azure.Commands.Compute.Common;
using Microsoft.Azure.Commands.Compute.Models;
using Microsoft.Azure.Management.Compute.Models;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
namespace Microsoft.Azure.Commands.Compute
{
@ -37,13 +38,18 @@ namespace Microsoft.Azure.Commands.Compute
public PSAvailabilitySet AvailabilitySet { get; set; }
[Parameter(
Mandatory = true,
Mandatory = false,
Position = 1,
ParameterSetName = SkuParameterSetName,
ValueFromPipelineByPropertyName = false,
HelpMessage = "The Name of Sku")]
public string Sku { get; set; }
[Parameter(
Mandatory = false)]
[ValidateNotNullOrEmpty]
public string ProximityPlacementGroupId { get; set; }
[Parameter(
Mandatory = false,
HelpMessage = "Key-value pairs in the form of a hash table."
@ -67,7 +73,10 @@ namespace Microsoft.Azure.Commands.Compute
PlatformUpdateDomainCount = this.AvailabilitySet.PlatformUpdateDomainCount,
PlatformFaultDomainCount = this.AvailabilitySet.PlatformFaultDomainCount,
Tags = Tag == null ? null : Tag.Cast<DictionaryEntry>().ToDictionary(d => (string)d.Key, d => (string)d.Value),
Sku = new Sku(this.Sku, null, null)
Sku = new Sku(this.IsParameterBound(c => c.Sku) ? this.Sku : this.AvailabilitySet.Sku, null, null),
ProximityPlacementGroup = this.IsParameterBound(c => c.ProximityPlacementGroupId)
? new SubResource(this.ProximityPlacementGroupId)
: this.AvailabilitySet.ProximityPlacementGroup
};
var result = this.AvailabilitySetClient.CreateOrUpdateWithHttpMessagesAsync(

Просмотреть файл

@ -19,6 +19,11 @@
- Additional information about change #1
-->
## Upcoming Release
* Add ProximityPlacementGroupId parameter to the following cmdlets:
- Update-AzAvailabilitySet, Update-AzVM, Update-AzVmss
* Change ProximityPlacementGroup parameter to ProximityPlacementGroupId parameter in New-AzVM and New-AzVmss.
(ProximityPlacementGroup parameter is still supported as an alias)
* Update help message for VM and VMSS priority.
* Update references in .psd1 to use relative path
## Version 3.1.0

Просмотреть файл

@ -12,7 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Serialization;
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
using Microsoft.Azure.Commands.Compute.Automation.Models;
using Microsoft.Azure.Commands.Management.Storage.Models;
using Microsoft.Azure.Management.Compute.Models;
using Microsoft.Azure.Management.Storage.Version2017_10_01;
@ -24,16 +35,6 @@ using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Serialization;
namespace Microsoft.Azure.Commands.Compute.Common
{
@ -740,6 +741,17 @@ namespace Microsoft.Azure.Commands.Compute.Common
/// <param name="extension">VMSS extension</param>
/// <returns>Whether the VMSS extension is diagnostics extension</returns>
public static bool IsDiagnosticsExtension(VirtualMachineScaleSetExtension extension)
{
return extension.Publisher.Equals(DiagnosticsExtensionConstants.ExtensionPublisher, StringComparison.InvariantCultureIgnoreCase) &&
extension.Type1.Equals(DiagnosticsExtensionConstants.ExtensionType, StringComparison.InvariantCultureIgnoreCase);
}
/// <summary>
/// Check if a VMSS extension is diagnostics extension.
/// </summary>
/// <param name="extension">VMSS extension</param>
/// <returns>Whether the VMSS extension is diagnostics extension</returns>
public static bool IsDiagnosticsExtension(PSVirtualMachineScaleSetExtension extension)
{
return extension.Publisher.Equals(DiagnosticsExtensionConstants.ExtensionPublisher, StringComparison.InvariantCultureIgnoreCase) &&
extension.Type.Equals(DiagnosticsExtensionConstants.ExtensionType, StringComparison.InvariantCultureIgnoreCase);

Просмотреть файл

@ -13,7 +13,7 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="6.2.2" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.1.0" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.2.0" />
<PackageReference Include="System.Security.Permissions" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.4.1" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />

Просмотреть файл

@ -120,19 +120,19 @@ namespace Microsoft.Azure.Commands.Compute.Extension.Diagnostics
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// ExtensionProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile = new VirtualMachineScaleSetExtensionProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile = new PSVirtualMachineScaleSetExtensionProfile();
}
// Extensions
if (this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions = new List<VirtualMachineScaleSetExtension>();
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions = new List<PSVirtualMachineScaleSetExtension>();
}
bool shouldContinue = true;
@ -162,7 +162,7 @@ namespace Microsoft.Azure.Commands.Compute.Extension.Diagnostics
// Parse configs, and auto fill incomplete parts
Tuple<Hashtable, Hashtable> settings = DiagnosticsHelper.GetConfigurationsFromFiles(this.SettingFilePath, this.ProtectedSettingFilePath, this.VirtualMachineScaleSet.Id, this, storageClient);
var newDiagnosticsExtension = new VirtualMachineScaleSetExtension();
var newDiagnosticsExtension = new PSVirtualMachineScaleSetExtension();
newDiagnosticsExtension.Name = this.Name;
newDiagnosticsExtension.Publisher = DiagnosticsExtensionConstants.ExtensionPublisher;

Просмотреть файл

@ -127,7 +127,7 @@ namespace Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption
bool extensionFound = false;
foreach (var ext in vmss.VirtualMachineProfile.ExtensionProfile.Extensions)
{
if (ext.Type.Equals(this.ExtensionName))
if (ext.Type1.Equals(this.ExtensionName))
{
ext.Settings = GetDisalbeEncryptionSetting();
ext.ProtectedSettings = null;

Просмотреть файл

@ -148,7 +148,7 @@ namespace Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption
}
ext = vmssResult.VirtualMachineProfile.ExtensionProfile.Extensions.First(
e => e.Type.Equals(this.ExtensionName));
e => e.Type1.Equals(this.ExtensionName));
}
catch (InvalidOperationException)
{

Просмотреть файл

@ -190,7 +190,7 @@ namespace Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption
{
Name = this.ExtensionName,
Publisher = AzureVmssDiskEncryptionExtensionContext.ExtensionDefaultPublisher,
Type = AzureVmssDiskEncryptionExtensionContext.ExtensionDefaultName,
Type1 = AzureVmssDiskEncryptionExtensionContext.ExtensionDefaultName,
TypeHandlerVersion = (this.TypeHandlerVersion) ?? AzureVmssDiskEncryptionExtensionContext.ExtensionDefaultVersion,
Settings = SettingString,
AutoUpgradeMinorVersion = !DisableAutoUpgradeMinorVersion.IsPresent,
@ -205,7 +205,7 @@ namespace Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption
{
Name = this.ExtensionName,
Publisher = AzureVmssDiskEncryptionExtensionContext.LinuxExtensionDefaultPublisher,
Type = AzureVmssDiskEncryptionExtensionContext.LinuxExtensionDefaultName,
Type1 = AzureVmssDiskEncryptionExtensionContext.LinuxExtensionDefaultName,
TypeHandlerVersion = (this.TypeHandlerVersion) ?? AzureVmssDiskEncryptionExtensionContext.LinuxExtensionDefaultVersion,
Settings = SettingString,
AutoUpgradeMinorVersion = !DisableAutoUpgradeMinorVersion.IsPresent,

Просмотреть файл

@ -178,6 +178,15 @@ namespace Microsoft.Azure.Commands.Compute.Automation.Models
cfg.CreateMap<FROM.VirtualMachineSize, TO.PSVirtualMachineSize>();
cfg.CreateMap<TO.PSVirtualMachineSize, FROM.VirtualMachineSize>();
cfg.CreateMap<FROM.VirtualMachineScaleSetVMProfile, TO.PSVirtualMachineScaleSetVMProfile>();
cfg.CreateMap<TO.PSVirtualMachineScaleSetVMProfile, FROM.VirtualMachineScaleSetVMProfile>();
cfg.CreateMap<FROM.VirtualMachineScaleSetExtensionProfile, TO.PSVirtualMachineScaleSetExtensionProfile>();
cfg.CreateMap<TO.PSVirtualMachineScaleSetExtensionProfile, FROM.VirtualMachineScaleSetExtensionProfile>();
cfg.CreateMap<FROM.VirtualMachineScaleSetExtension, TO.PSVirtualMachineScaleSetExtension>()
.ForMember(c => c.Type, o => o.MapFrom(r => r.Type1));
cfg.CreateMap<TO.PSVirtualMachineScaleSetExtension, FROM.VirtualMachineScaleSetExtension>()
.ForMember(c => c.Type1, o => o.MapFrom(r => r.Type));
});
_mapper = config.CreateMapper();
}

Просмотреть файл

@ -44,7 +44,6 @@ namespace Microsoft.Azure.Commands.Compute.Automation.Models
public Plan Plan { get; set; }
public UpgradePolicy UpgradePolicy { get; set; }
public AutomaticRepairsPolicy AutomaticRepairsPolicy { get; set; }
public VirtualMachineScaleSetVMProfile VirtualMachineProfile { get; set; }
public string ProvisioningState { get; set; }
public bool? Overprovision { get; set; }
public bool? DoNotRunExtensionsOnOverprovisionedVMs { get; set; }

Просмотреть файл

@ -78,7 +78,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile

Просмотреть файл

@ -108,7 +108,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile

Просмотреть файл

@ -106,22 +106,22 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// ExtensionProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile = new VirtualMachineScaleSetExtensionProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile = new PSVirtualMachineScaleSetExtensionProfile();
}
// Extensions
if (this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions = new List<VirtualMachineScaleSetExtension>();
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions = new List<PSVirtualMachineScaleSetExtension>();
}
var vExtensions = new VirtualMachineScaleSetExtension();
var vExtensions = new PSVirtualMachineScaleSetExtension();
vExtensions.Name = this.IsParameterBound(c => c.Name) ? this.Name : null;
vExtensions.ForceUpdateTag = this.IsParameterBound(c => c.ForceUpdateTag) ? this.ForceUpdateTag : null;

Просмотреть файл

@ -97,7 +97,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// NetworkProfile

Просмотреть файл

@ -66,7 +66,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile

Просмотреть файл

@ -66,7 +66,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile

Просмотреть файл

@ -66,7 +66,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile

Просмотреть файл

@ -28,6 +28,7 @@ using System.Management.Automation;
using Microsoft.Azure.Commands.Compute.Automation.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Management.Compute.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
namespace Microsoft.Azure.Commands.Compute.Automation
@ -102,7 +103,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
Mandatory = false,
Position = 10,
ValueFromPipelineByPropertyName = true)]
public VirtualMachineScaleSetExtension[] Extension { get; set; }
public PSVirtualMachineScaleSetExtension[] Extension { get; set; }
[Parameter(
Mandatory = false)]
@ -165,6 +166,8 @@ namespace Microsoft.Azure.Commands.Compute.Automation
[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true)]
[CmdletParameterBreakingChange("AutomaticRepairMaxInstanceRepairsPercent",
ChangeDescription = "AutomaticRepairMaxInstanceRepairsPercent is not supported until future.")]
public int AutomaticRepairMaxInstanceRepairsPercent { get; set; }
[Parameter(
@ -198,7 +201,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true)]
[PSArgumentCompleter("Regular", "Low", "Spot")]
[PSArgumentCompleter("Regular", "Spot")]
public string Priority { get; set; }
[Parameter(
@ -268,7 +271,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
AutomaticRepairsPolicy vAutomaticRepairsPolicy = null;
// VirtualMachineProfile
VirtualMachineScaleSetVMProfile vVirtualMachineProfile = null;
PSVirtualMachineScaleSetVMProfile vVirtualMachineProfile = null;
// ProximityPlacementGroup
SubResource vProximityPlacementGroup = null;
@ -414,7 +417,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
vVirtualMachineProfile.OsProfile = this.OsProfile;
}
@ -423,7 +426,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
vVirtualMachineProfile.StorageProfile = this.StorageProfile;
}
@ -432,7 +435,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (vVirtualMachineProfile.NetworkProfile == null)
{
@ -449,7 +452,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (vVirtualMachineProfile.NetworkProfile == null)
{
@ -462,7 +465,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (vVirtualMachineProfile.DiagnosticsProfile == null)
{
@ -475,11 +478,11 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (vVirtualMachineProfile.ExtensionProfile == null)
{
vVirtualMachineProfile.ExtensionProfile = new VirtualMachineScaleSetExtensionProfile();
vVirtualMachineProfile.ExtensionProfile = new PSVirtualMachineScaleSetExtensionProfile();
}
vVirtualMachineProfile.ExtensionProfile.Extensions = this.Extension;
}
@ -488,7 +491,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
vVirtualMachineProfile.LicenseType = this.LicenseType;
}
@ -497,7 +500,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
vVirtualMachineProfile.Priority = this.Priority;
}
@ -506,7 +509,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
vVirtualMachineProfile.EvictionPolicy = this.EvictionPolicy;
}
@ -515,7 +518,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (vVirtualMachineProfile.BillingProfile == null)
{
@ -528,7 +531,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (vVirtualMachineProfile.ScheduledEventsProfile == null)
{
@ -545,7 +548,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (vVirtualMachineProfile == null)
{
vVirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
vVirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (vVirtualMachineProfile.ScheduledEventsProfile == null)
{

Просмотреть файл

@ -68,7 +68,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// DiagnosticsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.DiagnosticsProfile == null)
@ -88,7 +88,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// DiagnosticsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.DiagnosticsProfile == null)

Просмотреть файл

@ -128,7 +128,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -143,7 +143,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -158,7 +158,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -173,7 +173,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -188,7 +188,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -208,7 +208,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -228,7 +228,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -248,7 +248,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -268,7 +268,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -293,7 +293,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -313,7 +313,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
@ -338,7 +338,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// OsProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)

Просмотреть файл

@ -148,7 +148,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -168,7 +168,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -188,7 +188,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -208,7 +208,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -228,7 +228,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -248,7 +248,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -268,7 +268,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -286,7 +286,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -305,7 +305,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -325,7 +325,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -350,7 +350,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -370,7 +370,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -395,7 +395,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -415,7 +415,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -440,7 +440,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
@ -470,7 +470,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
// VirtualMachineProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
// StorageProfile
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)

Просмотреть файл

@ -29,6 +29,7 @@ using Microsoft.Azure.Commands.Compute.Automation.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Management.Compute;
using Microsoft.Azure.Management.Compute.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
namespace Microsoft.Azure.Commands.Compute.Automation
@ -104,6 +105,8 @@ namespace Microsoft.Azure.Commands.Compute.Automation
[Parameter(
Mandatory = false)]
[CmdletParameterBreakingChange("AutomaticRepairMaxInstanceRepairsPercent",
ChangeDescription = "AutomaticRepairMaxInstanceRepairsPercent is not supported until future.")]
public int AutomaticRepairMaxInstanceRepairsPercent { get; set; }
[Parameter(
@ -246,6 +249,11 @@ namespace Microsoft.Azure.Commands.Compute.Automation
Mandatory = false)]
public bool ProvisionVMAgent { get; set; }
[Parameter(
Mandatory = false)]
[ValidateNotNullOrEmpty]
public string ProximityPlacementGroupId { get; set; }
[Parameter(
Mandatory = false)]
[ValidateNotNullOrEmpty]
@ -899,6 +907,19 @@ namespace Microsoft.Azure.Commands.Compute.Automation
this.VirtualMachineScaleSetUpdate.VirtualMachineProfile.OsProfile.WindowsConfiguration.ProvisionVMAgent = this.ProvisionVMAgent;
}
if (this.IsParameterBound(c => c.ProximityPlacementGroupId))
{
if (this.VirtualMachineScaleSetUpdate == null)
{
this.VirtualMachineScaleSetUpdate = new VirtualMachineScaleSetUpdate();
}
if (this.VirtualMachineScaleSetUpdate.ProximityPlacementGroup == null)
{
this.VirtualMachineScaleSetUpdate.ProximityPlacementGroup = new SubResource();
}
this.VirtualMachineScaleSetUpdate.ProximityPlacementGroup.Id = this.ProximityPlacementGroupId;
}
if (this.IsParameterBound(c => c.ScaleInPolicy))
{
if (this.VirtualMachineScaleSetUpdate == null)
@ -1135,7 +1156,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.DiagnosticsProfile == null)
{
@ -1152,7 +1173,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.DiagnosticsProfile == null)
{
@ -1169,7 +1190,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
{
@ -1195,7 +1216,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
{
@ -1221,7 +1242,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
{
@ -1265,7 +1286,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1282,7 +1303,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1299,7 +1320,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1316,7 +1337,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1333,7 +1354,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1350,7 +1371,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1371,7 +1392,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
this.VirtualMachineScaleSet.VirtualMachineProfile.LicenseType = this.LicenseType;
}
@ -1380,7 +1401,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1414,7 +1435,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.BillingProfile == null)
{
@ -1453,7 +1474,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1470,7 +1491,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{
@ -1541,7 +1562,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
{
@ -1554,6 +1575,15 @@ namespace Microsoft.Azure.Commands.Compute.Automation
this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile.WindowsConfiguration.ProvisionVMAgent = this.ProvisionVMAgent;
}
if (this.IsParameterBound(c => c.ProximityPlacementGroupId))
{
if (this.VirtualMachineScaleSet.ProximityPlacementGroup == null)
{
this.VirtualMachineScaleSet.ProximityPlacementGroup = new SubResource();
}
this.VirtualMachineScaleSet.ProximityPlacementGroup.Id = this.ProximityPlacementGroupId;
}
if (this.IsParameterBound(c => c.ScaleInPolicy))
{
if (this.VirtualMachineScaleSet.ScaleInPolicy == null)
@ -1609,7 +1639,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.ScheduledEventsProfile == null)
{
@ -1626,7 +1656,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.ScheduledEventsProfile == null)
{
@ -1643,7 +1673,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.OsProfile == null)
{
@ -1678,7 +1708,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
{
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
{
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
}
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile == null)
{

Просмотреть файл

@ -19,14 +19,13 @@
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.
using System.Collections.Generic;
using Microsoft.Azure.Management.Compute.Models;
namespace Microsoft.Azure.Commands.Compute.Automation.Models
{
public partial class PSVirtualMachineScaleSet
{
// Gets or sets the FQDN.
public string FullyQualifiedDomainName { get; set; }
public PSVirtualMachineScaleSetVMProfile VirtualMachineProfile { get; set; } // To hide a breaking change
}
}

Просмотреть файл

@ -0,0 +1,40 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.
using System.Collections.Generic;
namespace Microsoft.Azure.Commands.Compute.Automation.Models
{
public class PSVirtualMachineScaleSetExtension
{
public string Id { get; set; }
public string Name { get; set; }
public string ForceUpdateTag { get; set; }
public string Publisher { get; set; }
public string Type { get; set; } // This is Type1 in SDK, but mapped to Type to hide a breaking change.
public string TypeHandlerVersion { get; set; }
public bool? AutoUpgradeMinorVersion { get; set; }
public object Settings { get; set; }
public object ProtectedSettings { get; set; }
public string ProvisioningState { get; set; }
public IList<string> ProvisionAfterExtensions { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,30 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.
using System.Collections.Generic;
namespace Microsoft.Azure.Commands.Compute.Automation.Models
{
public class PSVirtualMachineScaleSetExtensionProfile
{
public IList<PSVirtualMachineScaleSetExtension> Extensions { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,39 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.
using Microsoft.Azure.Management.Compute.Models;
namespace Microsoft.Azure.Commands.Compute.Automation.Models
{
public class PSVirtualMachineScaleSetVMProfile
{
public VirtualMachineScaleSetOSProfile OsProfile { get; set; }
public VirtualMachineScaleSetStorageProfile StorageProfile { get; set; }
public VirtualMachineScaleSetNetworkProfile NetworkProfile { get; set; }
public DiagnosticsProfile DiagnosticsProfile { get; set; }
public PSVirtualMachineScaleSetExtensionProfile ExtensionProfile { get; set; } // To hide a breaking change
public string LicenseType { get; set; }
public string Priority { get; set; }
public string EvictionPolicy { get; set; }
public BillingProfile BillingProfile { get; set; }
public ScheduledEventsProfile ScheduledEventsProfile { get; set; }
}
}

Просмотреть файл

@ -130,12 +130,13 @@ namespace Microsoft.Azure.Commands.Compute.Automation
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false, HelpMessage ="Use this to create the Scale set in a single placement group, default is multiple groups")]
public SwitchParameter SinglePlacementGroup;
[Alias("ProximityPlacementGroup")]
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false)]
public string ProximityPlacementGroup { get; set; }
public string ProximityPlacementGroupId { get; set; }
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false,
HelpMessage = "The priority for the virtual machine scale set. Only supported values are 'Regular', 'Low' and 'Spot'.")]
[PSArgumentCompleter("Regular", "Low", "Spot")]
HelpMessage = "The priority for the virtual machine in the scale set. Only supported values are 'Regular', 'Spot' and 'Low'. 'Regular' is for regular virtual machine. 'Spot' is for spot virtual machine. 'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.")]
[PSArgumentCompleter("Regular", "Spot")]
public string Priority { get; set; }
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false,
@ -279,7 +280,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
_cmdlet.VMScaleSetName,
_cmdlet.NatBackendPort.Concat(_cmdlet.BackendPort).ToList());
var proximityPlacementGroup = resourceGroup.CreateProximityPlacementGroupSubResourceFunc(_cmdlet.ProximityPlacementGroup);
var proximityPlacementGroup = resourceGroup.CreateProximityPlacementGroupSubResourceFunc(_cmdlet.ProximityPlacementGroupId);
return resourceGroup.CreateVirtualMachineScaleSetConfig(
name: _cmdlet.VMScaleSetName,

Просмотреть файл

@ -29,7 +29,7 @@ namespace Microsoft.Azure.Commands.Compute.Strategies.ComputeRp
provider: "proximityPlacementGroups",
getOperations: client => client.ProximityPlacementGroups,
getAsync: (o, p) => o.GetAsync(
p.ResourceGroupName, p.Name, p.CancellationToken),
p.ResourceGroupName, p.Name, null, p.CancellationToken),
createOrUpdateAsync: (o, p) => o.CreateOrUpdateAsync(
p.ResourceGroupName, p.Name, p.Model, p.CancellationToken),
createTime: _ => 1);

Просмотреть файл

@ -110,8 +110,8 @@ namespace Microsoft.Azure.Commands.Compute
[Parameter(
ValueFromPipelineByPropertyName = true,
HelpMessage = "The priority for the virtual machine. Only supported values are 'Regular', 'Low' and 'Spot'.")]
[PSArgumentCompleter("Regular", "Low", "Spot")]
HelpMessage = "The priority for the virtual machine. Only supported values are 'Regular', 'Spot' and 'Low'. 'Regular' is for regular virtual machine. 'Spot' is for spot virtual machine. 'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.")]
[PSArgumentCompleter("Regular", "Spot")]
public string Priority { get; set; }
[Parameter(

Просмотреть файл

@ -225,19 +225,20 @@ namespace Microsoft.Azure.Commands.Compute
[Parameter(ParameterSetName = DiskFileParameterSet, Mandatory = false)]
public SwitchParameter EnableUltraSSD { get; set; }
[Alias("ProximityPlacementGroup")]
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false)]
[Parameter(ParameterSetName = DiskFileParameterSet, Mandatory = false)]
public string ProximityPlacementGroup { get; set; }
public string ProximityPlacementGroupId { get; set; }
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false)]
[Parameter(ParameterSetName = DiskFileParameterSet, Mandatory = false)]
public string HostId { get; set; }
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false,
HelpMessage = "The priority for the virtual machine. Only supported values are 'Regular', 'Low' and 'Spot'.")]
HelpMessage = "The priority for the virtual machine. Only supported values are 'Regular', 'Spot' and 'Low'. 'Regular' is for regular virtual machine. 'Spot' is for spot virtual machine. 'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.")]
[Parameter(ParameterSetName = DiskFileParameterSet, Mandatory = false,
HelpMessage = "The priority for the virtual machine. Only supported values are 'Regular', 'Low' and 'Spot'.")]
[PSArgumentCompleter("Regular", "Low", "Spot")]
HelpMessage = "The priority for the virtual machine. Only supported values are 'Regular', 'Spot' and 'Low'. 'Regular' is for regular virtual machine. 'Spot' is for spot virtual machine. 'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.")]
[PSArgumentCompleter("Regular", "Spot")]
public string Priority { get; set; }
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false,
@ -360,7 +361,7 @@ namespace Microsoft.Azure.Commands.Compute
var networkInterface = resourceGroup.CreateNetworkInterfaceConfig(
_cmdlet.Name, subnet, publicIpAddress, networkSecurityGroup, enableAcceleratedNetwork);
var ppgSubResourceFunc = resourceGroup.CreateProximityPlacementGroupSubResourceFunc(_cmdlet.ProximityPlacementGroup);
var ppgSubResourceFunc = resourceGroup.CreateProximityPlacementGroupSubResourceFunc(_cmdlet.ProximityPlacementGroupId);
var availabilitySet = _cmdlet.AvailabilitySetName == null
? null

Просмотреть файл

@ -107,6 +107,11 @@ namespace Microsoft.Azure.Commands.Compute
HelpMessage = "The max price of the billing of a low priority virtual machine")]
public double MaxPrice { get; set; }
[Parameter(
Mandatory = false)]
[ValidateNotNullOrEmpty]
public string ProximityPlacementGroupId { get; set; }
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
public SwitchParameter AsJob { get; set; }
@ -143,7 +148,9 @@ namespace Microsoft.Azure.Commands.Compute
? new VirtualMachineIdentity(null, null, ResourceIdentityType.SystemAssigned, null)
: ComputeAutoMapperProfile.Mapper.Map<VirtualMachineIdentity>(this.VM.Identity),
Zones = (this.VM.Zones != null && this.VM.Zones.Count > 0) ? this.VM.Zones : null,
ProximityPlacementGroup = this.VM.ProximityPlacementGroup,
ProximityPlacementGroup = this.IsParameterBound(c => c.ProximityPlacementGroupId)
? new SubResource(this.ProximityPlacementGroupId)
: this.VM.ProximityPlacementGroup,
Host = this.VM.Host,
VirtualMachineScaleSet = this.VM.VirtualMachineScaleSet,
AdditionalCapabilities = this.VM.AdditionalCapabilities,

Просмотреть файл

@ -125,7 +125,7 @@ Accept wildcard characters: False
```
### -ProximityPlacementGroupId
The Id of ProximityPlacementGroup
The resource id of the Proximity Placement Group to use with this availability set.
```yaml
Type: System.String

Просмотреть файл

@ -20,7 +20,7 @@ New-AzVM [[-ResourceGroupName] <String>] [[-Location] <String>] [[-Zone] <String
[-SubnetAddressPrefix <String>] [-PublicIpAddressName <String>] [-DomainNameLabel <String>]
[-AllocationMethod <String>] [-SecurityGroupName <String>] [-OpenPorts <Int32[]>] [-Image <String>]
[-Size <String>] [-AvailabilitySetName <String>] [-SystemAssignedIdentity] [-UserAssignedIdentity <String>]
[-AsJob] [-DataDiskSizeInGb <Int32[]>] [-EnableUltraSSD] [-ProximityPlacementGroup <String>]
[-AsJob] [-DataDiskSizeInGb <Int32[]>] [-EnableUltraSSD] [-ProximityPlacementGroupId <String>]
[-HostId <String>] [-Priority <String>] [-EvictionPolicy <String>] [-MaxPrice <Double>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
@ -39,7 +39,7 @@ New-AzVM [[-ResourceGroupName] <String>] [[-Location] <String>] -Name <String> [
[-PublicIpAddressName <String>] [-DomainNameLabel <String>] [-AllocationMethod <String>]
[-SecurityGroupName <String>] [-OpenPorts <Int32[]>] -DiskFile <String> [-Linux] [-Size <String>]
[-AvailabilitySetName <String>] [-SystemAssignedIdentity] [-UserAssignedIdentity <String>] [-AsJob]
[-DataDiskSizeInGb <Int32[]>] [-EnableUltraSSD] [-ProximityPlacementGroup <String>] [-HostId <String>]
[-DataDiskSizeInGb <Int32[]>] [-EnableUltraSSD] [-ProximityPlacementGroupId <String>] [-HostId <String>]
[-Priority <String>] [-EvictionPolicy <String>] [-MaxPrice <Double>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
@ -488,7 +488,10 @@ Accept wildcard characters: False
```
### -Priority
The priority for the virtual machine. Only supported values are 'Regular' and 'Low'.
The priority for the virtual machine. Only supported values are 'Regular', 'Spot' and 'Low'.
'Regular' is for regular virtual machine.
'Spot' is for spot virtual machine.
'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.
```yaml
Type: System.String
@ -502,13 +505,13 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProximityPlacementGroup
The name or resource id of the Proximity Placement Group to use with this VM.
### -ProximityPlacementGroupId
The resource id of the Proximity Placement Group to use with this virtual machine.
```yaml
Type: System.String
Parameter Sets: SimpleParameterSet, DiskFileParameterSet
Aliases:
Aliases: ProximityPlacementGroup
Required: False
Position: Named

Просмотреть файл

@ -214,7 +214,10 @@ Accept wildcard characters: False
```
### -Priority
The priority for the virtual machine. Only supported values are 'Regular' and 'Low'.
The priority for the virtual machine. Only supported values are 'Regular', 'Spot' and 'Low'.
'Regular' is for regular virtual machine.
'Spot' is for spot virtual machine.
'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.
```yaml
Type: System.String
@ -229,7 +232,7 @@ Accept wildcard characters: False
```
### -ProximityPlacementGroupId
The Id of ProximityPlacementGroup
The resource id of the Proximity Placement Group to use with this virtual machine.
```yaml
Type: System.String

Просмотреть файл

@ -30,7 +30,7 @@ New-AzVmss [[-ResourceGroupName] <String>] [-VMScaleSetName] <String> [-AsJob] [
[-SubnetAddressPrefix <String>] [-FrontendPoolName <String>] [-BackendPoolName <String>]
[-SystemAssignedIdentity] [-UserAssignedIdentity <String>] [-EnableUltraSSD]
[-Zone <System.Collections.Generic.List`1[System.String]>] [-NatBackendPort <Int32[]>]
[-DataDiskSizeInGb <Int32[]>] [-ProximityPlacementGroup <String>] [-Priority <String>]
[-DataDiskSizeInGb <Int32[]>] [-ProximityPlacementGroupId <String>] [-Priority <String>]
[-EvictionPolicy <String>] [-MaxPrice <Double>] [-ScaleInPolicy <String[]>]
[-SkipExtensionsOnOverprovisionedVMs] [-DefaultProfile <IAzureContextContainer>] [-SinglePlacementGroup]
[-WhatIf] [-Confirm] [<CommonParameters>]
@ -425,7 +425,10 @@ Accept wildcard characters: False
```
### -Priority
The priority for the virtual machine scale set. Only supported values are 'Regular' and 'Low'.
The priority for the virtual machine in the scale set. Only supported values are 'Regular', 'Spot' and 'Low'.
'Regular' is for regular virtual machine.
'Spot' is for spot virtual machine.
'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.
```yaml
Type: System.String
@ -439,13 +442,13 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProximityPlacementGroup
The name or resource id of the Proximity Placement Group to use with this Scale Set.
### -ProximityPlacementGroupId
The resource id of the Proximity Placement Group to use with this scale set.
```yaml
Type: System.String
Parameter Sets: SimpleParameterSet
Aliases:
Aliases: ProximityPlacementGroup
Required: False
Position: Named

Просмотреть файл

@ -488,7 +488,10 @@ Accept wildcard characters: False
```
### -Priority
Specifies the priority for the virtual machines in the scale set.
The priority for the virtual machien in the scale set. Only supported values are 'Regular', 'Spot' and 'Low'.
'Regular' is for regular virtual machine.
'Spot' is for spot virtual machine.
'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.
```yaml
Type: System.String
@ -503,7 +506,7 @@ Accept wildcard characters: False
```
### -ProximityPlacementGroupId
The Id of ProximityPlacementGroup
The resource id of the Proximity Placement Group to use with this scale set.
```yaml
Type: System.String

Просмотреть файл

@ -13,8 +13,9 @@ Updates an availability set.
## SYNTAX
```
Update-AzAvailabilitySet [-AvailabilitySet] <PSAvailabilitySet> [-Sku] <String> [-Tag <Hashtable>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Update-AzAvailabilitySet [-AvailabilitySet] <PSAvailabilitySet> [[-Sku] <String>]
[-ProximityPlacementGroupId <String>] [-Tag <Hashtable>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
@ -76,6 +77,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProximityPlacementGroupId
The resource id of the Proximity Placement Group to use with this availability set.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Sku
The Name of Sku
@ -84,7 +100,7 @@ Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Required: False
Position: 1
Default value: None
Accept pipeline input: False

Просмотреть файл

@ -16,29 +16,31 @@ Updates the state of an Azure virtual machine.
### ResourceGroupNameParameterSetName (Default)
```
Update-AzVM [-ResourceGroupName] <String> -VM <PSVirtualMachine> [-Tag <Hashtable>]
[-OsDiskWriteAccelerator <Boolean>] [-UltraSSDEnabled <Boolean>] [-MaxPrice <Double>] [-AsJob] [-NoWait]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-OsDiskWriteAccelerator <Boolean>] [-UltraSSDEnabled <Boolean>] [-MaxPrice <Double>]
[-ProximityPlacementGroupId <String>] [-AsJob] [-NoWait] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
### AssignIdentityParameterSet
```
Update-AzVM [-ResourceGroupName] <String> -VM <PSVirtualMachine> [-Tag <Hashtable>] [-AssignIdentity]
[-OsDiskWriteAccelerator <Boolean>] [-UltraSSDEnabled <Boolean>] [-MaxPrice <Double>] [-AsJob] [-NoWait]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-OsDiskWriteAccelerator <Boolean>] [-UltraSSDEnabled <Boolean>] [-MaxPrice <Double>]
[-ProximityPlacementGroupId <String>] [-AsJob] [-NoWait] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
### ExplicitIdentityParameterSet
```
Update-AzVM [-ResourceGroupName] <String> -VM <PSVirtualMachine> [-Tag <Hashtable>]
-IdentityType <ResourceIdentityType> [-IdentityId <String[]>] [-OsDiskWriteAccelerator <Boolean>]
[-UltraSSDEnabled <Boolean>] [-MaxPrice <Double>] [-AsJob] [-NoWait]
[-UltraSSDEnabled <Boolean>] [-MaxPrice <Double>] [-ProximityPlacementGroupId <String>] [-AsJob] [-NoWait]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### IdParameterSetName
```
Update-AzVM [-Id] <String> -VM <PSVirtualMachine> [-Tag <Hashtable>] [-OsDiskWriteAccelerator <Boolean>]
[-UltraSSDEnabled <Boolean>] [-MaxPrice <Double>] [-AsJob] [-NoWait]
[-UltraSSDEnabled <Boolean>] [-MaxPrice <Double>] [-ProximityPlacementGroupId <String>] [-AsJob] [-NoWait]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
@ -195,6 +197,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProximityPlacementGroupId
The resource id of the Proximity Placement Group to use with this virtual machine.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResourceGroupName
Specifies the name of the resource group of the virtual machine.

Просмотреть файл

@ -27,12 +27,13 @@ Update-AzVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String>
[-MaxUnhealthyUpgradedInstancePercent <Int32>] [-OsDiskCaching <CachingTypes>]
[-OsDiskWriteAccelerator <Boolean>] [-Overprovision <Boolean>] [-PauseTimeBetweenBatches <String>]
[-PlanName <String>] [-PlanProduct <String>] [-PlanPromotionCode <String>] [-PlanPublisher <String>]
[-ProvisionVMAgent <Boolean>] [-ScaleInPolicy <String[]>] [-SinglePlacementGroup <Boolean>]
[-SkipExtensionsOnOverprovisionedVMs <Boolean>] [-SkuCapacity <Int32>] [-SkuName <String>] [-SkuTier <String>]
[-Tag <Hashtable>] [-TerminateScheduledEventNotBeforeTimeoutInMinutes <Int32>]
[-TerminateScheduledEvents <Boolean>] [-TimeZone <String>] [-UltraSSDEnabled <Boolean>]
[-UpgradePolicyMode <UpgradeMode>] [-VhdContainer <String[]>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-ProvisionVMAgent <Boolean>] [-ProximityPlacementGroupId <String>] [-ScaleInPolicy <String[]>]
[-SinglePlacementGroup <Boolean>] [-SkipExtensionsOnOverprovisionedVMs <Boolean>] [-SkuCapacity <Int32>]
[-SkuName <String>] [-SkuTier <String>] [-Tag <Hashtable>]
[-TerminateScheduledEventNotBeforeTimeoutInMinutes <Int32>] [-TerminateScheduledEvents <Boolean>]
[-TimeZone <String>] [-UltraSSDEnabled <Boolean>] [-UpgradePolicyMode <UpgradeMode>]
[-VhdContainer <String[]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
### ExplicitIdentityParameterSet
@ -49,9 +50,9 @@ Update-AzVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String>
[-MaxUnhealthyInstancePercent <Int32>] [-MaxUnhealthyUpgradedInstancePercent <Int32>]
[-OsDiskCaching <CachingTypes>] [-OsDiskWriteAccelerator <Boolean>] [-Overprovision <Boolean>]
[-PauseTimeBetweenBatches <String>] [-PlanName <String>] [-PlanProduct <String>] [-PlanPromotionCode <String>]
[-PlanPublisher <String>] [-ProvisionVMAgent <Boolean>] [-ScaleInPolicy <String[]>]
[-SinglePlacementGroup <Boolean>] [-SkipExtensionsOnOverprovisionedVMs <Boolean>] [-SkuCapacity <Int32>]
[-SkuName <String>] [-SkuTier <String>] [-Tag <Hashtable>]
[-PlanPublisher <String>] [-ProvisionVMAgent <Boolean>] [-ProximityPlacementGroupId <String>]
[-ScaleInPolicy <String[]>] [-SinglePlacementGroup <Boolean>] [-SkipExtensionsOnOverprovisionedVMs <Boolean>]
[-SkuCapacity <Int32>] [-SkuName <String>] [-SkuTier <String>] [-Tag <Hashtable>]
[-TerminateScheduledEventNotBeforeTimeoutInMinutes <Int32>] [-TerminateScheduledEvents <Boolean>]
[-TimeZone <String>] [-UltraSSDEnabled <Boolean>] [-UpgradePolicyMode <UpgradeMode>]
[-VhdContainer <String[]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
@ -633,6 +634,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProximityPlacementGroupId
The resource id of the Proximity Placement Group to use with this scale set.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResourceGroupName
Specifies the name of the resource group the VMSS belongs to.

Просмотреть файл

@ -16,7 +16,7 @@
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
<PackageReference Include="Microsoft.Azure.Insights" Version="0.16.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.1.0" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.2.0" />
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Redis" Version="4.4.1" />
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.19.0-preview" />

Просмотреть файл

@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.1.0" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.2.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices" Version="4.2.1-preview" />
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="4.0.0-preview" />

Просмотреть файл

@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.1.0" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.2.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="13.1.0" />
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="2.2.0-preview" />