Skip to content

Commit

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

* add changelog and suppress breakingchange issues

---------

Co-authored-by: YanaXu <[email protected]>
  • Loading branch information
azure-powershell-bot and YanaXu authored Jan 9, 2024
1 parent 5b1b8ef commit 528378b
Show file tree
Hide file tree
Showing 100 changed files with 6,591 additions and 364 deletions.
Original file line number Diff line number Diff line change
@@ -1,140 +1,24 @@
#
# Module manifest for module 'Az.SqlVirtualMachine'
#
# Generated by: Microsoft Corporation
#
# Generated on: 8/30/2023
#

@{

# Script module or binary module file associated with this manifest.
RootModule = './Az.SqlVirtualMachine.psm1'

# Version number of this module.
ModuleVersion = '2.1.0'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'

# ID used to uniquely identify this module
GUID = '91832aaa-dc11-4583-8239-bce5fd531604'

# Author of this module
Author = 'Microsoft Corporation'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell: SqlVirtualMachine cmdlets'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '5.1'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
DotNetFrameworkVersion = '4.7.2'

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.0'; })

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = './bin/Az.SqlVirtualMachine.private.dll'

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = './Az.SqlVirtualMachine.format.ps1xml'

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# 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.
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'

# 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.
CmdletsToExport = @()

# Variables to export from this module
# VariablesToExport = @()

# 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.
AliasesToExport = '*'

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# 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.
PrivateData = @{

GUID = 'b0fb9454-c75f-4eb7-ab6a-aaae12f8bde3'
RootModule = './Az.SqlVirtualMachine.psm1'
ModuleVersion = '0.1.0'
CompatiblePSEditions = 'Core', 'Desktop'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'
Description = 'Microsoft Azure PowerShell: SqlVirtualMachine cmdlets'
PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.SqlVirtualMachine.private.dll'
FormatsToProcess = './Az.SqlVirtualMachine.format.ps1xml'
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', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','ResourceManager','ARM','PSModule','SqlVirtualMachine'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/Azure/azure-powershell'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Added more parameters on cmdlet ''Update-AzSqlVM''.'

# Prerelease string of this module
# Prerelease = ''

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false

# External dependent modules of this module
# ExternalModuleDependencies = @()

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'SqlVirtualMachine'
LicenseUri = 'https://aka.ms/azps-license'
ProjectUri = 'https://github.com/Azure/azure-powershell'
ReleaseNotes = ''
}
}
}

8 changes: 6 additions & 2 deletions src/SqlVirtualMachine/SqlVirtualMachine.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ For information on how to develop for `Az.SqlVirtualMachine`, see [how-to.md](ho
> see https://aka.ms/autorest
```yaml
branch: 0e20dd2e4e2a40e83840c30cce2efc4847fd9cb9
commit: 0e20dd2e4e2a40e83840c30cce2efc4847fd9cb9
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../readme.azure.noprofile.md
- $(this-folder)/../../readme.azure.noprofile.md
- $(repo)/specification/sqlvirtualmachine/resource-manager/readme.md

try-require:
Expand All @@ -44,6 +44,10 @@ resourcegroup-append: true
nested-object-to-string: true
identity-correction-for-post: true

# 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"

directive:
#1. [swagger] define password parameters as password type
- from: swagger-document
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ if($NoDocs) {
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
}
$null = New-Item -ItemType Directory -Force -Path $docsFolder
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
}

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

if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
{
Write-Host -ForegroundColor Green 'Creating ux metadata...'
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}

Write-Host -ForegroundColor Green '-------------Done-------------'
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
Creates or updates a SQL virtual machine.
.Description
Creates or updates a SQL virtual machine.
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.
.Example
{{ Add code here }}
.Example
Expand Down Expand Up @@ -525,12 +527,6 @@ function New-AzSqlVM {
# Resource tags.
${Tag},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')]
[System.String]
# ARM Resource id of underlying virtual machine created from SQL marketplace image.
${VirtualMachineResourceId},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')]
[System.Security.SecureString]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
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)){
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
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)){
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
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)){
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
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)){
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
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)){
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
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)){
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
Creates or updates a SQL virtual machine.
.Description
Creates or updates a SQL virtual machine.
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.
.Example
New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus'
.Example
Expand Down Expand Up @@ -542,12 +545,6 @@ param(
# Resource tags.
${Tag},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')]
[System.String]
# ARM Resource id of underlying virtual machine created from SQL marketplace image.
${VirtualMachineResourceId},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')]
[System.Security.SecureString]
Expand Down Expand Up @@ -665,6 +662,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
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)){
[Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
Expand Down
Loading

0 comments on commit 528378b

Please sign in to comment.