Skip to content

Commit 528378b

Browse files
Migrate SqlVirtualMachine from generation to main (#23905)
* Move SqlVirtualMachine to main * add changelog and suppress breakingchange issues --------- Co-authored-by: YanaXu <[email protected]>
1 parent 5b1b8ef commit 528378b

File tree

100 files changed

+6591
-364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+6591
-364
lines changed
Lines changed: 21 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,24 @@
1-
#
2-
# Module manifest for module 'Az.SqlVirtualMachine'
3-
#
4-
# Generated by: Microsoft Corporation
5-
#
6-
# Generated on: 8/30/2023
7-
#
8-
91
@{
10-
11-
# Script module or binary module file associated with this manifest.
12-
RootModule = './Az.SqlVirtualMachine.psm1'
13-
14-
# Version number of this module.
15-
ModuleVersion = '2.1.0'
16-
17-
# Supported PSEditions
18-
CompatiblePSEditions = 'Core', 'Desktop'
19-
20-
# ID used to uniquely identify this module
21-
GUID = '91832aaa-dc11-4583-8239-bce5fd531604'
22-
23-
# Author of this module
24-
Author = 'Microsoft Corporation'
25-
26-
# Company or vendor of this module
27-
CompanyName = 'Microsoft Corporation'
28-
29-
# Copyright statement for this module
30-
Copyright = 'Microsoft Corporation. All rights reserved.'
31-
32-
# Description of the functionality provided by this module
33-
Description = 'Microsoft Azure PowerShell: SqlVirtualMachine cmdlets'
34-
35-
# Minimum version of the PowerShell engine required by this module
36-
PowerShellVersion = '5.1'
37-
38-
# Name of the PowerShell host required by this module
39-
# PowerShellHostName = ''
40-
41-
# Minimum version of the PowerShell host required by this module
42-
# PowerShellHostVersion = ''
43-
44-
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45-
DotNetFrameworkVersion = '4.7.2'
46-
47-
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48-
# ClrVersion = ''
49-
50-
# Processor architecture (None, X86, Amd64) required by this module
51-
# ProcessorArchitecture = ''
52-
53-
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.0'; })
55-
56-
# Assemblies that must be loaded prior to importing this module
57-
RequiredAssemblies = './bin/Az.SqlVirtualMachine.private.dll'
58-
59-
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60-
# ScriptsToProcess = @()
61-
62-
# Type files (.ps1xml) to be loaded when importing this module
63-
# TypesToProcess = @()
64-
65-
# Format files (.ps1xml) to be loaded when importing this module
66-
FormatsToProcess = './Az.SqlVirtualMachine.format.ps1xml'
67-
68-
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69-
# NestedModules = @()
70-
71-
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72-
FunctionsToExport = 'Get-AzAvailabilityGroupListener', 'Get-AzSqlVM', 'Get-AzSqlVMGroup',
73-
'Invoke-AzRedeploySqlVM', 'Invoke-AzSqlVMTroubleshoot',
74-
'New-AzAvailabilityGroupListener',
75-
'New-AzSqlVirtualMachineAgReplicaObject',
76-
'New-AzSqlVirtualMachineMultiSubnetIPConfigurationObject',
77-
'New-AzSqlVM', 'New-AzSqlVMGroup',
78-
'Remove-AzAvailabilityGroupListener', 'Remove-AzSqlVM',
79-
'Remove-AzSqlVMGroup', 'Start-AzSqlVMAssessment', 'Update-AzSqlVM',
80-
'Update-AzSqlVMGroup'
81-
82-
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
83-
CmdletsToExport = @()
84-
85-
# Variables to export from this module
86-
# VariablesToExport = @()
87-
88-
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
89-
AliasesToExport = '*'
90-
91-
# DSC resources to export from this module
92-
# DscResourcesToExport = @()
93-
94-
# List of all modules packaged with this module
95-
# ModuleList = @()
96-
97-
# List of all files packaged with this module
98-
# FileList = @()
99-
100-
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
101-
PrivateData = @{
102-
2+
GUID = 'b0fb9454-c75f-4eb7-ab6a-aaae12f8bde3'
3+
RootModule = './Az.SqlVirtualMachine.psm1'
4+
ModuleVersion = '0.1.0'
5+
CompatiblePSEditions = 'Core', 'Desktop'
6+
Author = 'Microsoft Corporation'
7+
CompanyName = 'Microsoft Corporation'
8+
Copyright = 'Microsoft Corporation. All rights reserved.'
9+
Description = 'Microsoft Azure PowerShell: SqlVirtualMachine cmdlets'
10+
PowerShellVersion = '5.1'
11+
DotNetFrameworkVersion = '4.7.2'
12+
RequiredAssemblies = './bin/Az.SqlVirtualMachine.private.dll'
13+
FormatsToProcess = './Az.SqlVirtualMachine.format.ps1xml'
14+
FunctionsToExport = 'Get-AzAvailabilityGroupListener', 'Get-AzSqlVM', 'Get-AzSqlVMGroup', 'Invoke-AzRedeploySqlVM', 'Invoke-AzSqlVMTroubleshoot', 'New-AzAvailabilityGroupListener', 'New-AzSqlVirtualMachineAgReplicaObject', 'New-AzSqlVirtualMachineMultiSubnetIPConfigurationObject', 'New-AzSqlVM', 'New-AzSqlVMGroup', 'Remove-AzAvailabilityGroupListener', 'Remove-AzSqlVM', 'Remove-AzSqlVMGroup', 'Start-AzSqlVMAssessment', 'Update-AzSqlVM', 'Update-AzSqlVMGroup', '*'
15+
AliasesToExport = '*'
16+
PrivateData = @{
10317
PSData = @{
104-
105-
# Tags applied to this module. These help with module discovery in online galleries.
106-
Tags = 'Azure','ResourceManager','ARM','PSModule','SqlVirtualMachine'
107-
108-
# A URL to the license for this module.
109-
LicenseUri = 'https://aka.ms/azps-license'
110-
111-
# A URL to the main website for this project.
112-
ProjectUri = 'https://github.com/Azure/azure-powershell'
113-
114-
# A URL to an icon representing this module.
115-
# IconUri = ''
116-
117-
# ReleaseNotes of this module
118-
ReleaseNotes = '* Added more parameters on cmdlet ''Update-AzSqlVM''.'
119-
120-
# Prerelease string of this module
121-
# Prerelease = ''
122-
123-
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
124-
# RequireLicenseAcceptance = $false
125-
126-
# External dependent modules of this module
127-
# ExternalModuleDependencies = @()
128-
129-
} # End of PSData hashtable
130-
131-
} # End of PrivateData hashtable
132-
133-
# HelpInfo URI of this module
134-
# HelpInfoURI = ''
135-
136-
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
137-
# DefaultCommandPrefix = ''
138-
18+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'SqlVirtualMachine'
19+
LicenseUri = 'https://aka.ms/azps-license'
20+
ProjectUri = 'https://github.com/Azure/azure-powershell'
21+
ReleaseNotes = ''
22+
}
23+
}
13924
}
140-

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ For information on how to develop for `Az.SqlVirtualMachine`, see [how-to.md](ho
3030
> see https://aka.ms/autorest
3131
3232
```yaml
33-
branch: 0e20dd2e4e2a40e83840c30cce2efc4847fd9cb9
33+
commit: 0e20dd2e4e2a40e83840c30cce2efc4847fd9cb9
3434
require:
3535
# readme.azure.noprofile.md is the common configuration file
36-
- $(this-folder)/../readme.azure.noprofile.md
36+
- $(this-folder)/../../readme.azure.noprofile.md
3737
- $(repo)/specification/sqlvirtualmachine/resource-manager/readme.md
3838

3939
try-require:
@@ -44,6 +44,10 @@ resourcegroup-append: true
4444
nested-object-to-string: true
4545
identity-correction-for-post: true
4646

47+
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
48+
use-extension:
49+
"@autorest/powershell": "3.x"
50+
4751
directive:
4852
#1. [swagger] define password parameters as password type
4953
- from: swagger-document

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/build-module.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ if($NoDocs) {
143143
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
144144
}
145145
$null = New-Item -ItemType Directory -Force -Path $docsFolder
146-
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
146+
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
147+
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
147148
}
148149

149150
Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
@@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
162163
Write-Host -ForegroundColor Green 'Creating example stubs...'
163164
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
164165

166+
if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
167+
{
168+
Write-Host -ForegroundColor Green 'Creating ux metadata...'
169+
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170+
}
171+
165172
Write-Host -ForegroundColor Green '-------------Done-------------'

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/custom/New-AzSqlVM.ps1

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
Creates or updates a SQL virtual machine.
2020
.Description
2121
Creates or updates a SQL virtual machine.
22+
23+
If you are updating an existing SQL virtual machine and a parameter such as -Tag is omitted, then the previously defined values may be removed. For this reason, it is recommended to use [Update-AzSqlVM](https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/update-azsqlvm) to prevent overwriting of unintended parameters.
2224
.Example
2325
{{ Add code here }}
2426
.Example
@@ -525,12 +527,6 @@ function New-AzSqlVM {
525527
# Resource tags.
526528
${Tag},
527529

528-
[Parameter()]
529-
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')]
530-
[System.String]
531-
# ARM Resource id of underlying virtual machine created from SQL marketplace image.
532-
${VirtualMachineResourceId},
533-
534530
[Parameter()]
535531
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')]
536532
[System.Security.SecureString]

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/exports/Get-AzAvailabilityGroupListener.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ begin {
176176
}
177177
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
178178
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
179+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
180+
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
181+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
182+
}
179183
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
180184
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
181185
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/exports/Get-AzSqlVM.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ begin {
182182
}
183183
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
184184
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
185+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
186+
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
187+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
188+
}
185189
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
186190
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
187191
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/exports/Get-AzSqlVMGroup.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ begin {
165165
}
166166
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
167167
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
168+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
169+
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
170+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
171+
}
168172
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
169173
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
170174
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/exports/Invoke-AzRedeploySqlVM.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ begin {
176176
}
177177
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
178178
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
179+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
180+
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
181+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
182+
}
179183
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
180184
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
181185
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/exports/Invoke-AzSqlVMTroubleshoot.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ begin {
195195
}
196196
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
197197
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
198+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
199+
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
200+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
201+
}
198202
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
199203
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
200204
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/SqlVirtualMachine/SqlVirtualMachine.Autorest/exports/New-AzAvailabilityGroupListener.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ begin {
247247
}
248248
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
249249
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
250+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
251+
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
252+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
253+
}
250254
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
251255
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
252256
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

0 commit comments

Comments
 (0)