From c96e1ffa945bd971a118dd29e5c9a882890cad56 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 4 Apr 2024 15:29:34 +0000 Subject: [PATCH] Autogen code --- src/Compute/Compute/ChangeLog.md | 5 +++++ .../Disk/Config/SetAzDiskSecurityProfile.cs | 21 +++++++++++++++++-- .../Compute/Generated/Models/PSDisk.cs | 11 ++++++++-- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index c9aee39449a1..d1cae4c3cc2e 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -20,6 +20,11 @@ --> ## Upcoming Release +* Added new parameter `GallantSecurity` to `Set-AzDiskSecurityProfile` cmdlet. + - This new parameter is a string type and can only have the values DiskOn, VMOn, or SecurityOff. + - It is set on the disk's security profile. +* Fixed `New-AzVmss` to correctly work when using `-EdgeZone` by creating the Load Balancer in the correct edge zone. +* Removed references to image aliases in `New-AzVM` and `New-AzVmss` to images that were removed. * Fixed `New-AzVmss` to correctly work when using `-EdgeZone` by creating the Load Balancer in the correct edge zone. * Removed references to image aliases in `New-AzVM` and `New-AzVmss` to images that were removed. diff --git a/src/Compute/Compute/Generated/Disk/Config/SetAzDiskSecurityProfile.cs b/src/Compute/Compute/Generated/Disk/Config/SetAzDiskSecurityProfile.cs index 47e72f79c7d6..c0c9a7471989 100644 --- a/src/Compute/Compute/Generated/Disk/Config/SetAzDiskSecurityProfile.cs +++ b/src/Compute/Compute/Generated/Disk/Config/SetAzDiskSecurityProfile.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -54,6 +54,13 @@ public class SetAzDiskSecurityProfile : Microsoft.Azure.Commands.ResourceManager HelpMessage = "ResourceId of the disk encryption set to use for enabling encryption at rest.")] public string SecureVMDiskEncryptionSet { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "GallantSecurity property. Possible values include: DiskOn, VMOn, SecurityOff.")] + [PSArgumentCompleter("DiskOn", "VMOn", "SecurityOff")] + public string GallantSecurity { get; set; } + protected override void ProcessRecord() { if (ShouldProcess("DiskSecurityProfile", "Set")) @@ -94,8 +101,18 @@ private void Run() this.Disk.SecurityProfile.SecureVMDiskEncryptionSetId = this.SecureVMDiskEncryptionSet; } + if (this.IsParameterBound(c => c.GallantSecurity)) + { + if (this.Disk.SecurityProfile == null) + { + this.Disk.SecurityProfile = new DiskSecurityProfile(); + } + this.Disk.SecurityProfile.GallantSecurity = this.GallantSecurity; + } + WriteObject(this.Disk); } } -} \ No newline at end of file +} + diff --git a/src/Compute/Compute/Generated/Models/PSDisk.cs b/src/Compute/Compute/Generated/Models/PSDisk.cs index d257855adaae..7a43e6257816 100644 --- a/src/Compute/Compute/Generated/Models/PSDisk.cs +++ b/src/Compute/Compute/Generated/Models/PSDisk.cs @@ -1,4 +1,4 @@ -// + // // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -80,4 +80,11 @@ public string ResourceGroupName public double? CompletionPercent { get; set; } public bool? OptimizedForFrequentAttach { get; set; } } -} + + public partial class DiskSecurityProfile + { + public string SecurityType { get; set; } + public string SecureVMDiskEncryptionSetId { get; set; } + public string GallantSecurity { get; set; } + } +} \ No newline at end of file