Skip to content

Commit 502246f

Browse files
grizzlytheodoreTheodore ChangVeryEarly
committed
NetworkAccessPolicy to New-AzSnapshopUpdateConfig (#21164)
* changes * Update ChangeLog.md --------- Co-authored-by: Theodore Chang <[email protected]> Co-authored-by: Yabo Hu <[email protected]>
1 parent 3e3d9b9 commit 502246f

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
-->
2222
## Upcoming Release
23+
* Added `-NetworkAccessPolicy` parameter to `New-AzSnapshotUpdateConfig`.
2324
* Added `-SharedGalleryImageId` parameter to `New-AzVM`, `New-AzVmConfig`, `New-AzVmss`, `New-AzVmssConfig`, `Update-AzVmss`, and `Set-AzVmssStorageProfile`.
2425

2526
## Version 5.5.0

src/Compute/Compute/Generated/Models/PSSnapshotUpdate.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public partial class PSSnapshotUpdate
3535
public SnapshotSku Sku { get; set; }
3636
public bool? SupportsHibernation { get; set; }
3737
public SupportedCapabilities SupportedCapabilities { get; set; }
38+
public string NetworkAccessPolicy { get; set; }
3839

3940
//
4041
// Summary:

src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotUpdateConfigCommand.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ public partial class NewAzureRmSnapshotUpdateConfigCommand : Microsoft.Azure.Com
121121
[PSArgumentCompleter("X64", "Arm64")]
122122
public string Architecture { get; set; }
123123

124+
[Parameter(
125+
Mandatory = false,
126+
ValueFromPipelineByPropertyName = true,
127+
HelpMessage = "Policy for accessing the disk via network. Available values are: AllowAll, AllowPrivate, DeyAll")]
128+
[PSArgumentCompleter("AllowAll", "AllowPrivate", "DenyAll")]
129+
public string NetworkAccessPolicy { get; set; }
130+
124131
protected override void ProcessRecord()
125132
{
126133
if (ShouldProcess("SnapshotUpdate", "New"))
@@ -243,7 +250,8 @@ private void Run()
243250
SupportsHibernation = this.IsParameterBound(c => c.SupportsHibernation) ? SupportsHibernation : null,
244251
PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null,
245252
DataAccessAuthMode = this.IsParameterBound(c => c.DataAccessAuthMode) ? DataAccessAuthMode : null,
246-
SupportedCapabilities = vSupportedCapabilities
253+
SupportedCapabilities = vSupportedCapabilities,
254+
NetworkAccessPolicy = this.IsParameterBound(c => c.NetworkAccessPolicy) ? this.NetworkAccessPolicy : null
247255
};
248256

249257
WriteObject(vSnapshotUpdate);

src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ New-AzSnapshotUpdateConfig [[-SkuName] <String>] [[-OsType] <OperatingSystemType
1818
[-DiskEncryptionKey <KeyVaultAndSecretReference>] [-EdgeZone <String>]
1919
[-KeyEncryptionKey <KeyVaultAndKeyReference>] [-DiskEncryptionSetId <String>] [-EncryptionType <String>]
2020
[-PublicNetworkAccess <String>] [-DataAccessAuthMode <String>] [-Architecture <String>]
21-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
21+
[-NetworkAccessPolicy <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
22+
[<CommonParameters>]
2223
```
2324

2425
## DESCRIPTION
@@ -204,6 +205,21 @@ Accept pipeline input: True (ByPropertyName)
204205
Accept wildcard characters: False
205206
```
206207
208+
### -NetworkAccessPolicy
209+
Policy for accessing the disk via network. Available values are: AllowAll, AllowPrivate, DeyAll
210+
211+
```yaml
212+
Type: System.String
213+
Parameter Sets: (All)
214+
Aliases:
215+
216+
Required: False
217+
Position: Named
218+
Default value: None
219+
Accept pipeline input: True (ByPropertyName)
220+
Accept wildcard characters: False
221+
```
222+
207223
### -OsType
208224
Specifies the OS type.
209225

0 commit comments

Comments
 (0)