Skip to content

Commit 1772a15

Browse files
haaghaHaider AghaCopilot
authored
[Compute] Introduced SecureVMGuestStateSAS switch parameter in Grant-AzSnapshotAccess (#28471)
Co-authored-by: Haider Agha <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent bdaf61f commit 1772a15

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-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 `SecureVMGuestStateSAS` parameter to `Grant-AzSnapshotAccess`.
2324

2425
## Version 10.3.0
2526
* Fixed typo 'DeyAll' to 'DenyAll' in NetworkAccessPolicy description.

src/Compute/Compute/Generated/Snapshot/SnapshotGrantAccessMethod.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public override void ExecuteCmdlet()
4848
var grantAccessData = new GrantAccessData();
4949
grantAccessData.Access = this.Access;
5050
grantAccessData.DurationInSeconds = this.DurationInSecond;
51+
grantAccessData.GetSecureVMGuestStateSAS = this.SecureVMGuestStateSAS;
5152

5253
var result = SnapshotsClient.GrantAccess(resourceGroupName, snapshotName, grantAccessData);
5354
var psObject = new PSAccessUri();
@@ -86,6 +87,14 @@ public override void ExecuteCmdlet()
8687
Mandatory = false)]
8788
public int DurationInSecond { get; set; }
8889

90+
[Parameter(
91+
ParameterSetName = "DefaultParameter",
92+
HelpMessage = "Set this flag to true to get additional SAS for VM guest state.",
93+
Mandatory = false,
94+
ValueFromPipelineByPropertyName = true)]
95+
public SwitchParameter SecureVMGuestStateSAS { get; set; }
96+
97+
8998
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
9099
public SwitchParameter AsJob { get; set; }
91100
}

src/Compute/Compute/help/Grant-AzSnapshotAccess.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Grants an access to a snapshot.
1414

1515
```
1616
Grant-AzSnapshotAccess [-ResourceGroupName] <String> [-SnapshotName] <String> [-Access] <String>
17-
[[-DurationInSecond] <Int32>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
18-
[-WhatIf] [-Confirm] [<CommonParameters>]
17+
[[-DurationInSecond] <Int32>] [-SecureVMGuestStateSAS] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
18+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
1919
```
2020

2121
## DESCRIPTION
@@ -107,6 +107,21 @@ Accept pipeline input: True (ByPropertyName)
107107
Accept wildcard characters: False
108108
```
109109
110+
### -SecureVMGuestStateSAS
111+
Set this flag to true to get additional SAS for VM guest state.
112+
113+
```yaml
114+
Type: System.Management.Automation.SwitchParameter
115+
Parameter Sets: (All)
116+
Aliases:
117+
118+
Required: False
119+
Position: Named
120+
Default value: None
121+
Accept pipeline input: True (ByPropertyName)
122+
Accept wildcard characters: False
123+
```
124+
110125
### -SnapshotName
111126
Specifies the name of a snapshot.
112127

0 commit comments

Comments
 (0)