Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
* Fixed typo 'DeyAll' to 'DenyAll' in NetworkAccessPolicy description.
* Preannounced breaking changes. Please refer to https://go.microsoft.com/fwlink/?linkid=2333229
* Updated New-AzDiskConfig to include `SecurityMetadataUri` and `SecurityDataUri` parameters.
* Updated Grant-AzDisk to return `SecurityMetadataAccessSAS` property.
* Updated Grant-AzDiskAccess to return `SecurityMetadataAccessSAS` property.
* Updated Grant-AzSnapshotAcess to return `SecurityMetadataAccessSAS` property.

## Version 10.2.0
* Compute DiskRP related cmdlets will now use 2025-01-02 version of the DiskRP API.
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
34 changes: 32 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 @@ -92,6 +92,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

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

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ResourceGroupName
Specifies the name of a resource group.

Expand All @@ -107,6 +122,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