Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
-->
## Upcoming Release
* Added `SecureVMGuestStateSAS` parameter to `Grant-AzSnapshotAccess`.

## Version 10.3.0
* Fixed typo 'DeyAll' to 'DenyAll' in NetworkAccessPolicy description.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public override void ExecuteCmdlet()
var grantAccessData = new GrantAccessData();
grantAccessData.Access = this.Access;
grantAccessData.DurationInSeconds = this.DurationInSecond;
grantAccessData.GetSecureVMGuestStateSAS = this.SecureVMGuestStateSAS;

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

[Parameter(
ParameterSetName = "DefaultParameter",
HelpMessage = "Set this flag to true to get additional SAS for VM guest state.",
Mandatory = false,
ValueFromPipelineByPropertyName = true)]
public SwitchParameter SecureVMGuestStateSAS { get; set; }


[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
public SwitchParameter AsJob { get; set; }
}
Expand Down
19 changes: 17 additions & 2 deletions src/Compute/Compute/help/Grant-AzSnapshotAccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Grants an access to a snapshot.

```
Grant-AzSnapshotAccess [-ResourceGroupName] <String> [-SnapshotName] <String> [-Access] <String>
[[-DurationInSecond] <Int32>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
[[-DurationInSecond] <Int32>] [-SecureVMGuestStateSAS] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -107,6 +107,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -SecureVMGuestStateSAS
Set this flag to true to get additional SAS for VM guest state.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -SnapshotName
Specifies the name of a snapshot.

Expand Down