Skip to content

Commit

Permalink
Migrate DesktopVirtualization from generation to main (#26603)
Browse files Browse the repository at this point in the history
* Move DesktopVirtualization to main

* Add change log and suppress breaking changes

---------

Co-authored-by: azure-powershell-bot <[email protected]>
Co-authored-by: Vincent Dai <[email protected]>
  • Loading branch information
3 people authored Nov 6, 2024
1 parent 633f953 commit 48358a8
Show file tree
Hide file tree
Showing 1,153 changed files with 150,034 additions and 44,374 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.DesktopVirtualization.private.dll'
FormatsToProcess = './Az.DesktopVirtualization.format.ps1xml'
FunctionsToExport = 'Disconnect-AzWvdUserSession', 'Expand-AzWvdMsixImage', 'Get-AzWvdApplication', 'Get-AzWvdApplicationGroup', 'Get-AzWvdDesktop', 'Get-AzWvdHostPool', 'Get-AzWvdHostPoolRegistrationToken', 'Get-AzWvdMsixPackage', 'Get-AzWvdPrivateEndpointConnection', 'Get-AzWvdPrivateLinkResource', 'Get-AzWvdRegistrationInfo', 'Get-AzWvdScalingPlan', 'Get-AzWvdScalingPlanPersonalSchedule', 'Get-AzWvdScalingPlanPooledSchedule', 'Get-AzWvdSessionHost', 'Get-AzWvdStartMenuItem', 'Get-AzWvdUserSession', 'Get-AzWvdWorkspace', 'New-AzWvdApplication', 'New-AzWvdApplicationGroup', 'New-AzWvdHostPool', 'New-AzWvdMsixPackage', 'New-AzWvdRegistrationInfo', 'New-AzWvdScalingPlan', 'New-AzWvdScalingPlanPersonalSchedule', 'New-AzWvdScalingPlanPooledSchedule', 'New-AzWvdWorkspace', 'Register-AzWvdApplicationGroup', 'Remove-AzWvdApplication', 'Remove-AzWvdApplicationGroup', 'Remove-AzWvdHostPool', 'Remove-AzWvdMsixPackage', 'Remove-AzWvdPrivateEndpointConnection', 'Remove-AzWvdRegistrationInfo', 'Remove-AzWvdScalingPlan', 'Remove-AzWvdScalingPlanPersonalSchedule', 'Remove-AzWvdScalingPlanPooledSchedule', 'Remove-AzWvdSessionHost', 'Remove-AzWvdUserSession', 'Remove-AzWvdWorkspace', 'Send-AzWvdUserSessionMessage', 'Unregister-AzWvdApplicationGroup', 'Update-AzWvdApplication', 'Update-AzWvdApplicationGroup', 'Update-AzWvdDesktop', 'Update-AzWvdHostPool', 'Update-AzWvdMsixPackage', 'Update-AzWvdScalingPlan', 'Update-AzWvdScalingPlanPersonalSchedule', 'Update-AzWvdScalingPlanPooledSchedule', 'Update-AzWvdSessionHost', 'Update-AzWvdWorkspace', '*'
AliasesToExport = '*'
FunctionsToExport = 'Disconnect-AzWvdUserSession', 'Expand-AzWvdMsixImage', 'Get-AzWvdAppAttachPackage', 'Get-AzWvdApplication', 'Get-AzWvdApplicationGroup', 'Get-AzWvdDesktop', 'Get-AzWvdHostPool', 'Get-AzWvdHostPoolRegistrationToken', 'Get-AzWvdMsixPackage', 'Get-AzWvdPrivateEndpointConnection', 'Get-AzWvdPrivateLinkResource', 'Get-AzWvdRegistrationInfo', 'Get-AzWvdScalingPlan', 'Get-AzWvdScalingPlanPersonalSchedule', 'Get-AzWvdScalingPlanPooledSchedule', 'Get-AzWvdSessionHost', 'Get-AzWvdStartMenuItem', 'Get-AzWvdUserSession', 'Get-AzWvdWorkspace', 'Import-AzWvdAppAttachPackageInfo', 'New-AzWvdAppAttachPackage', 'New-AzWvdApplication', 'New-AzWvdApplicationGroup', 'New-AzWvdHostPool', 'New-AzWvdMsixPackage', 'New-AzWvdRegistrationInfo', 'New-AzWvdScalingPlan', 'New-AzWvdScalingPlanPersonalSchedule', 'New-AzWvdScalingPlanPooledSchedule', 'New-AzWvdWorkspace', 'Register-AzWvdApplicationGroup', 'Remove-AzWvdAppAttachPackage', 'Remove-AzWvdApplication', 'Remove-AzWvdApplicationGroup', 'Remove-AzWvdHostPool', 'Remove-AzWvdMsixPackage', 'Remove-AzWvdPrivateEndpointConnection', 'Remove-AzWvdRegistrationInfo', 'Remove-AzWvdScalingPlan', 'Remove-AzWvdScalingPlanPersonalSchedule', 'Remove-AzWvdScalingPlanPooledSchedule', 'Remove-AzWvdSessionHost', 'Remove-AzWvdUserSession', 'Remove-AzWvdWorkspace', 'Send-AzWvdUserSessionMessage', 'Unregister-AzWvdApplicationGroup', 'Update-AzWvdAppAttachPackage', 'Update-AzWvdApplication', 'Update-AzWvdApplicationGroup', 'Update-AzWvdDesktop', 'Update-AzWvdHostPool', 'Update-AzWvdMsixPackage', 'Update-AzWvdScalingPlan', 'Update-AzWvdScalingPlanPersonalSchedule', 'Update-AzWvdScalingPlanPooledSchedule', 'Update-AzWvdSessionHost', 'Update-AzWvdWorkspace'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DesktopVirtualization'
Expand Down
15 changes: 10 additions & 5 deletions src/DesktopVirtualization/DesktopVirtualization.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,26 @@ In this directory, run AutoRest:
> see https://aka.ms/autorest
``` yaml
commit: 50175f111e9c899249e79eb082a75fb8a7aba0e2
commit: 0feca76719343b0cb1e6a9d6064c7037827706ca
require:
- $(this-folder)/../../readme.azure.noprofile.md
sanitize-names: true
subject-prefix: 'Wvd'
input-file:
- $(repo)/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/desktopvirtualization.json
- $(repo)/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/desktopvirtualization.json

module-version: 2.1.0
title: DesktopVirtualizationClient
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

#v4 migration settings
keep-pec-and-plr: true
disable-transform-identity-type: true
flatten-userassignedidentity: false

directive:
- where:
variant: ^CreateViaIdentity.*$
remove: true
- where:
verb: New
subject: HostPool
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"resourceType": "appAttachPackages",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
"commands": [
{
"name": "Get-AzWvdAppAttachPackage",
"description": "Get an app attach package.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization/get-azwvdappattachpackage"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get an app attach package.",
"parameters": [
{
"name": "-Name",
"value": "[Path.appAttachPackageName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzWvdAppAttachPackage",
"description": "Remove an App Attach Package.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization/remove-azwvdappattachpackage"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Remove an App Attach Package.",
"parameters": [
{
"name": "-Name",
"value": "[Path.appAttachPackageName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "applicationGroups/applications",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "applicationGroups/desktops",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "applicationGroups",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "hostPools/msixPackages",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "hostPools/privateEndpointConnections",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "hostPools/sessionHosts/userSessions",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "hostPools/sessionHosts",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,51 +1,13 @@
{
"resourceType": "hostPools",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
"commands": [
{
"name": "Expand-AzWvdMsixImage",
"description": "Expands and Lists MSIX packages in an Image, given the Image Path.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization/expand-azwvdmsiximage"
},
"parameterSets": [
{
"parameters": [
"-HostPoolName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Expands and Lists MSIX packages in an Image, given the Image Path.",
"parameters": [
{
"name": "-HostPoolName",
"value": "[Path.hostPoolName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Get-AzWvdHostPoolRegistrationToken",
"description": "Registration token of the host pool.",
"description": "Operation to list the RegistrationTokens associated with the HostPool",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/retrieveRegistrationToken",
"help": {
"learnMore": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "scalingPlans/personalSchedules",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "scalingPlans/pooledSchedules",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "scalingPlans",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "workspaces/privateEndpointConnections",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "workspaces",
"apiVersion": "2023-09-05",
"apiVersion": "2024-04-03",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.desktopvirtualization"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks)
$ErrorActionPreference = 'Stop'

if($PSEdition -ne 'Core') {
Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
}

if(-not $Isolated -and -not $Debugger) {
if(-not $NotIsolated -and -not $Debugger) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
& "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
& "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated

if($LastExitCode -ne 0) {
# Build failed. Don't attempt to run the module.
Expand All @@ -45,6 +45,14 @@ if(-not $Isolated -and -not $Debugger) {
}
}

if($UX) {
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
if($LastExitCode -ne 0) {
# UX generation failed. Don't attempt to run the module.
return
}
}

if($Pack) {
. (Join-Path $PSScriptRoot 'pack-module.ps1')
if($LastExitCode -ne 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'

if(-not $Isolated) {
if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}

Expand Down
Loading

0 comments on commit 48358a8

Please sign in to comment.