Skip to content

Commit ec77580

Browse files
[SSH] Use SSH Arc Proxy from separate module Az.Ssh.ArcProxy (#21773)
* Update SDK * Write Logic to pick up proxy from installed Az.Ssh.ArcProxy module * Add logic to retrieve proxy from installed Az.Ssh.ArcProxy * Update ChangeLog.md Remove manual added version --------- Co-authored-by: Jin Lei <[email protected]>
1 parent 1a48344 commit ec77580

File tree

104 files changed

+3462
-1961
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+3462
-1961
lines changed

src/Ssh/Ssh.Helpers/Compute/ComputeManagementClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ private void Initialize()
324324
{
325325
VirtualMachines = new VirtualMachinesOperations(this);
326326
BaseUri = new System.Uri("https://management.azure.com");
327-
ApiVersion = "2022-03-01";
327+
ApiVersion = "2022-08-01";
328328
AcceptLanguage = "en-US";
329329
LongRunningOperationRetryTimeout = 30;
330330
GenerateClientRequestId = true;

src/Ssh/Ssh.Helpers/Compute/Models/DataDisk.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ public DataDisk()
6060
/// writeAccelerator should be enabled or disabled on the disk.</param>
6161
/// <param name="diskSizeGB">Specifies the size of an empty data disk
6262
/// in gigabytes. This element can be used to overwrite the size of the
63-
/// disk in a virtual machine image. &lt;br&gt;&lt;br&gt; This value
64-
/// cannot be larger than 1023 GB</param>
63+
/// disk in a virtual machine image. &lt;br&gt;&lt;br&gt; diskSizeGB is
64+
/// the number of bytes x 1024^3 for the disk and the value cannot be
65+
/// larger than 1023</param>
6566
/// <param name="managedDisk">The managed disk parameters.</param>
6667
/// <param name="toBeDetached">Specifies whether the data disk is in
6768
/// process of detachment from the
@@ -187,8 +188,9 @@ public DataDisk()
187188
/// <summary>
188189
/// Gets or sets specifies the size of an empty data disk in gigabytes.
189190
/// This element can be used to overwrite the size of the disk in a
190-
/// virtual machine image. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; This
191-
/// value cannot be larger than 1023 GB
191+
/// virtual machine image. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
192+
/// diskSizeGB is the number of bytes x 1024^3 for the disk and the
193+
/// value cannot be larger than 1023
192194
/// </summary>
193195
[JsonProperty(PropertyName = "diskSizeGB")]
194196
public int? DiskSizeGB { get; set; }

src/Ssh/Ssh.Helpers/Compute/Models/DiffDiskSettings.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public DiffDiskSettings()
4040
/// is configured for the VM size otherwise **ResourceDisk** is
4141
/// used.&lt;br&gt;&lt;br&gt; Refer to VM size documentation for
4242
/// Windows VM at
43-
/// https://learn.microsoft.com/azure/virtual-machines/windows/sizes and
43+
/// https://docs.microsoft.com/azure/virtual-machines/windows/sizes and
4444
/// Linux VM at
45-
/// https://learn.microsoft.com/azure/virtual-machines/linux/sizes to
45+
/// https://docs.microsoft.com/azure/virtual-machines/linux/sizes to
4646
/// check which VM sizes exposes a cache disk. Possible values include:
4747
/// 'CacheDisk', 'ResourceDisk'</param>
4848
public DiffDiskSettings(string option = default(string), string placement = default(string))
@@ -73,9 +73,9 @@ public DiffDiskSettings()
7373
/// is configured for the VM size otherwise **ResourceDisk** is
7474
/// used.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; Refer to VM size
7575
/// documentation for Windows VM at
76-
/// https://learn.microsoft.com/azure/virtual-machines/windows/sizes and
76+
/// https://docs.microsoft.com/azure/virtual-machines/windows/sizes and
7777
/// Linux VM at
78-
/// https://learn.microsoft.com/azure/virtual-machines/linux/sizes to
78+
/// https://docs.microsoft.com/azure/virtual-machines/linux/sizes to
7979
/// check which VM sizes exposes a cache disk. Possible values include:
8080
/// 'CacheDisk', 'ResourceDisk'
8181
/// </summary>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.PowerShell.Ssh.Helpers.Compute.Models
12+
{
13+
14+
/// <summary>
15+
/// Defines values for DiskControllerTypes.
16+
/// </summary>
17+
public static class DiskControllerTypes
18+
{
19+
public const string SCSI = "SCSI";
20+
public const string NVMe = "NVMe";
21+
}
22+
}

src/Ssh/Ssh.Helpers/Compute/Models/HardwareProfile.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public HardwareProfile()
3535
/// Recommended way to get the list of available sizes is using these
3636
/// APIs: &lt;br&gt;&lt;br&gt; [List all available virtual machine
3737
/// sizes in an availability
38-
/// set](https://learn.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)
38+
/// set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)
3939
/// &lt;br&gt;&lt;br&gt; [List all available virtual machine sizes in a
4040
/// region](
41-
/// https://learn.microsoft.com/rest/api/compute/resourceskus/list)
41+
/// https://docs.microsoft.com/rest/api/compute/resourceskus/list)
4242
/// &lt;br&gt;&lt;br&gt; [List all available virtual machine sizes for
43-
/// resizing](https://learn.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes).
43+
/// resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes).
4444
/// For more information about virtual machine sizes, see [Sizes for
4545
/// virtual
46-
/// machines](https://learn.microsoft.com/azure/virtual-machines/sizes).
46+
/// machines](https://docs.microsoft.com/azure/virtual-machines/sizes).
4747
/// &lt;br&gt;&lt;br&gt; The available VM sizes depend on region and
4848
/// availability set. Possible values include: 'Basic_A0', 'Basic_A1',
4949
/// 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1',
@@ -122,16 +122,16 @@ public HardwareProfile()
122122
/// list of available sizes is using these APIs:
123123
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [List all available virtual
124124
/// machine sizes in an availability
125-
/// set](https://learn.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)
125+
/// set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)
126126
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [List all available virtual
127127
/// machine sizes in a region](
128-
/// https://learn.microsoft.com/rest/api/compute/resourceskus/list)
128+
/// https://docs.microsoft.com/rest/api/compute/resourceskus/list)
129129
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [List all available virtual
130130
/// machine sizes for
131-
/// resizing](https://learn.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes).
131+
/// resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes).
132132
/// For more information about virtual machine sizes, see [Sizes for
133133
/// virtual
134-
/// machines](https://learn.microsoft.com/azure/virtual-machines/sizes).
134+
/// machines](https://docs.microsoft.com/azure/virtual-machines/sizes).
135135
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; The available VM sizes depend
136136
/// on region and availability set. Possible values include:
137137
/// 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4',

src/Ssh/Ssh.Helpers/Compute/Models/LinuxConfiguration.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Ssh.Helpers.Compute.Models
1717
/// Specifies the Linux operating system settings on the virtual machine.
1818
/// &lt;br&gt;&lt;br&gt;For a list of supported Linux distributions, see
1919
/// [Linux on Azure-Endorsed
20-
/// Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
20+
/// Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
2121
/// </summary>
2222
public partial class LinuxConfiguration
2323
{
@@ -44,12 +44,16 @@ public LinuxConfiguration()
4444
/// be added to the VM later.</param>
4545
/// <param name="patchSettings">[Preview Feature] Specifies settings
4646
/// related to VM Guest Patching on Linux.</param>
47-
public LinuxConfiguration(bool? disablePasswordAuthentication = default(bool?), SshConfiguration ssh = default(SshConfiguration), bool? provisionVMAgent = default(bool?), LinuxPatchSettings patchSettings = default(LinuxPatchSettings))
47+
/// <param name="enableVMAgentPlatformUpdates">Indicates whether
48+
/// VMAgent Platform Updates is enabled for the Linux virtual machine.
49+
/// Default value is false.</param>
50+
public LinuxConfiguration(bool? disablePasswordAuthentication = default(bool?), SshConfiguration ssh = default(SshConfiguration), bool? provisionVMAgent = default(bool?), LinuxPatchSettings patchSettings = default(LinuxPatchSettings), bool? enableVMAgentPlatformUpdates = default(bool?))
4851
{
4952
DisablePasswordAuthentication = disablePasswordAuthentication;
5053
Ssh = ssh;
5154
ProvisionVMAgent = provisionVMAgent;
5255
PatchSettings = patchSettings;
56+
EnableVMAgentPlatformUpdates = enableVMAgentPlatformUpdates;
5357
CustomInit();
5458
}
5559

@@ -89,5 +93,12 @@ public LinuxConfiguration()
8993
[JsonProperty(PropertyName = "patchSettings")]
9094
public LinuxPatchSettings PatchSettings { get; set; }
9195

96+
/// <summary>
97+
/// Gets or sets indicates whether VMAgent Platform Updates is enabled
98+
/// for the Linux virtual machine. Default value is false.
99+
/// </summary>
100+
[JsonProperty(PropertyName = "enableVMAgentPlatformUpdates")]
101+
public bool? EnableVMAgentPlatformUpdates { get; set; }
102+
92103
}
93104
}

src/Ssh/Ssh.Helpers/Compute/Models/OSDisk.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Ssh.Helpers.Compute.Models
1818
/// Specifies information about the operating system disk used by the
1919
/// virtual machine. &lt;br&gt;&lt;br&gt; For more information about disks,
2020
/// see [About disks and VHDs for Azure virtual
21-
/// machines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).
21+
/// machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
2222
/// </summary>
2323
public partial class OSDisk
2424
{
@@ -70,8 +70,9 @@ public OSDisk()
7070
/// machine.</param>
7171
/// <param name="diskSizeGB">Specifies the size of an empty data disk
7272
/// in gigabytes. This element can be used to overwrite the size of the
73-
/// disk in a virtual machine image. &lt;br&gt;&lt;br&gt; This value
74-
/// cannot be larger than 1023 GB</param>
73+
/// disk in a virtual machine image. &lt;br&gt;&lt;br&gt; diskSizeGB is
74+
/// the number of bytes x 1024^3 for the disk and the value cannot be
75+
/// larger than 1023</param>
7576
/// <param name="managedDisk">The managed disk parameters.</param>
7677
/// <param name="deleteOption">Specifies whether OS Disk should be
7778
/// deleted or detached upon VM deletion. &lt;br&gt;&lt;br&gt; Possible
@@ -189,8 +190,9 @@ public OSDisk()
189190
/// <summary>
190191
/// Gets or sets specifies the size of an empty data disk in gigabytes.
191192
/// This element can be used to overwrite the size of the disk in a
192-
/// virtual machine image. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; This
193-
/// value cannot be larger than 1023 GB
193+
/// virtual machine image. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
194+
/// diskSizeGB is the number of bytes x 1024^3 for the disk and the
195+
/// value cannot be larger than 1023
194196
/// </summary>
195197
[JsonProperty(PropertyName = "diskSizeGB")]
196198
public int? DiskSizeGB { get; set; }

src/Ssh/Ssh.Helpers/Compute/Models/OSProfile.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public OSProfile()
3939
/// (Linux):** 64 characters. &lt;br&gt;&lt;br&gt; For naming
4040
/// conventions and restrictions see [Azure infrastructure services
4141
/// implementation
42-
/// guidelines](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules).</param>
42+
/// guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules).</param>
4343
/// <param name="adminUsername">Specifies the name of the administrator
4444
/// account. &lt;br&gt;&lt;br&gt; This property cannot be updated after
4545
/// the VM is created. &lt;br&gt;&lt;br&gt; **Windows-only
@@ -67,11 +67,11 @@ public OSProfile()
6767
/// "Password!", "Password1", "Password22", "iloveyou!"
6868
/// &lt;br&gt;&lt;br&gt; For resetting the password, see [How to reset
6969
/// the Remote Desktop service or its login password in a Windows
70-
/// VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)
70+
/// VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)
7171
/// &lt;br&gt;&lt;br&gt; For resetting root password, see [Manage
7272
/// users, SSH, and check or repair disks on Azure Linux VMs using the
7373
/// VMAccess
74-
/// Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)</param>
74+
/// Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)</param>
7575
/// <param name="customData">Specifies a base-64 encoded string of
7676
/// custom data. The base-64 encoded string is decoded to a binary
7777
/// array that is saved as a file on the Virtual Machine. The maximum
@@ -84,20 +84,20 @@ public OSProfile()
8484
/// VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/)
8585
/// &lt;br&gt;&lt;br&gt; For using cloud-init for your Linux VM, see
8686
/// [Using cloud-init to customize a Linux VM during
87-
/// creation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init)</param>
87+
/// creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)</param>
8888
/// <param name="windowsConfiguration">Specifies Windows operating
8989
/// system settings on the virtual machine.</param>
9090
/// <param name="linuxConfiguration">Specifies the Linux operating
9191
/// system settings on the virtual machine. &lt;br&gt;&lt;br&gt;For a
9292
/// list of supported Linux distributions, see [Linux on Azure-Endorsed
93-
/// Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).</param>
93+
/// Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).</param>
9494
/// <param name="secrets">Specifies set of certificates that should be
9595
/// installed onto the virtual machine. To install certificates on a
9696
/// virtual machine it is recommended to use the [Azure Key Vault
9797
/// virtual machine extension for
98-
/// Linux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
98+
/// Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
9999
/// or the [Azure Key Vault virtual machine extension for
100-
/// Windows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).</param>
100+
/// Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).</param>
101101
/// <param name="allowExtensionOperations">Specifies whether extension
102102
/// operations should be allowed on the virtual machine.
103103
/// &lt;br&gt;&lt;br&gt;This may only be set to False when no
@@ -132,7 +132,7 @@ public OSProfile()
132132
/// characters. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; For naming
133133
/// conventions and restrictions see [Azure infrastructure services
134134
/// implementation
135-
/// guidelines](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules).
135+
/// guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules).
136136
/// </summary>
137137
[JsonProperty(PropertyName = "computerName")]
138138
public string ComputerName { get; set; }
@@ -174,11 +174,11 @@ public OSProfile()
174174
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; For resetting the password,
175175
/// see [How to reset the Remote Desktop service or its login password
176176
/// in a Windows
177-
/// VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)
177+
/// VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)
178178
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; For resetting root password,
179179
/// see [Manage users, SSH, and check or repair disks on Azure Linux
180180
/// VMs using the VMAccess
181-
/// Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)
181+
/// Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)
182182
/// </summary>
183183
[JsonProperty(PropertyName = "adminPassword")]
184184
public string AdminPassword { get; set; }
@@ -197,7 +197,7 @@ public OSProfile()
197197
/// VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/)
198198
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; For using cloud-init for your
199199
/// Linux VM, see [Using cloud-init to customize a Linux VM during
200-
/// creation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init)
200+
/// creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)
201201
/// </summary>
202202
[JsonProperty(PropertyName = "customData")]
203203
public string CustomData { get; set; }
@@ -213,7 +213,7 @@ public OSProfile()
213213
/// Gets or sets specifies the Linux operating system settings on the
214214
/// virtual machine. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For a list of
215215
/// supported Linux distributions, see [Linux on Azure-Endorsed
216-
/// Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
216+
/// Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
217217
/// </summary>
218218
[JsonProperty(PropertyName = "linuxConfiguration")]
219219
public LinuxConfiguration LinuxConfiguration { get; set; }
@@ -223,9 +223,9 @@ public OSProfile()
223223
/// onto the virtual machine. To install certificates on a virtual
224224
/// machine it is recommended to use the [Azure Key Vault virtual
225225
/// machine extension for
226-
/// Linux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
226+
/// Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
227227
/// or the [Azure Key Vault virtual machine extension for
228-
/// Windows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
228+
/// Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
229229
/// </summary>
230230
[JsonProperty(PropertyName = "secrets")]
231231
public IList<VaultSecretGroup> Secrets { get; set; }

src/Ssh/Ssh.Helpers/Compute/Models/SshPublicKey.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public SshPublicKey()
3838
/// authenticate with the VM through ssh. The key needs to be at least
3939
/// 2048-bit and in ssh-rsa format. &lt;br&gt;&lt;br&gt; For creating
4040
/// ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in
41-
/// Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).</param>
41+
/// Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).</param>
4242
public SshPublicKey(string path = default(string), string keyData = default(string))
4343
{
4444
Path = path;
@@ -64,7 +64,7 @@ public SshPublicKey()
6464
/// the VM through ssh. The key needs to be at least 2048-bit and in
6565
/// ssh-rsa format. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; For creating
6666
/// ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in
67-
/// Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
67+
/// Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
6868
/// </summary>
6969
[JsonProperty(PropertyName = "keyData")]
7070
public string KeyData { get; set; }

0 commit comments

Comments
 (0)