Skip to content

Commit c8a8b31

Browse files
azure-pipelines[bot]azure-powershell-botVeryEarly
authored
Migrate Nginx from generation to main (#25686)
* Move Nginx to main * Update ChangeLog.md --------- Co-authored-by: azure-powershell-bot <[email protected]> Co-authored-by: Yabo Hu <[email protected]>
1 parent fb2fec6 commit c8a8b31

File tree

309 files changed

+15592
-7788
lines changed

Some content is hidden

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

309 files changed

+15592
-7788
lines changed

src/Nginx/Nginx.Autorest/Az.Nginx.format.ps1xml

Lines changed: 254 additions & 58 deletions
Large diffs are not rendered by default.

src/Nginx/Nginx.Autorest/Az.Nginx.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Nginx.private.dll'
1313
FormatsToProcess = './Az.Nginx.format.ps1xml'
14-
FunctionsToExport = 'Get-AzNginxCertificate', 'Get-AzNginxConfiguration', 'Get-AzNginxDeployment', 'New-AzNginxCertificate', 'New-AzNginxConfiguration', 'New-AzNginxConfigurationFileObject', 'New-AzNginxDeployment', 'New-AzNginxNetworkProfileObject', 'New-AzNginxPrivateIPAddressObject', 'New-AzNginxPublicIPAddressObject', 'Remove-AzNginxCertificate', 'Remove-AzNginxConfiguration', 'Remove-AzNginxDeployment', 'Update-AzNginxDeployment', '*'
14+
FunctionsToExport = 'Get-AzNginxCertificate', 'Get-AzNginxConfiguration', 'Get-AzNginxDeployment', 'Invoke-AzNginxAnalysisConfiguration', 'New-AzNginxCertificate', 'New-AzNginxConfiguration', 'New-AzNginxConfigurationFileObject', 'New-AzNginxDeployment', 'New-AzNginxNetworkProfileObject', 'New-AzNginxPrivateIPAddressObject', 'New-AzNginxPublicIPAddressObject', 'Remove-AzNginxCertificate', 'Remove-AzNginxConfiguration', 'Remove-AzNginxDeployment', 'Update-AzNginxDeployment', '*'
1515
AliasesToExport = '*'
1616
PrivateData = @{
1717
PSData = @{

src/Nginx/Nginx.Autorest/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ For information on how to develop for `Az.Nginx`, see [how-to.md](how-to.md).
2626
### AutoRest Configuration
2727
> see https://aka.ms/autorest
2828
``` yaml
29-
commit: e38e7dd462571865266d320bd7cec9804c67f70b
30-
tag: package-2023-04-01
29+
commit: d1027c6d6d0994ef3a656a561b0cce8378ac58a4
30+
tag: package-2024-01-01-preview
3131
require:
3232
# readme.azure.noprofile.md is the common configuration file
3333
- $(this-folder)/../../readme.azure.noprofile.md
3434
input-file:
3535
# You need to specify your swagger files here.
36-
- $(repo)/specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/swagger.json
37-
36+
- $(repo)/specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-01-01-preview/swagger.json
3837
root-module-name: $(prefix).Nginx
3938
title: Nginx
4039
module-version: 0.1.0

src/Nginx/Nginx.Autorest/UX/Nginx.NginxPlus/nginxDeployments-certificates.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "nginxDeployments/certificates",
3-
"apiVersion": "2023-04-01",
3+
"apiVersion": "2024-01-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.nginx"
66
},

src/Nginx/Nginx.Autorest/UX/Nginx.NginxPlus/nginxDeployments-configurations.json

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "nginxDeployments/configurations",
3-
"apiVersion": "2023-04-01",
3+
"apiVersion": "2024-01-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.nginx"
66
},
@@ -48,6 +48,49 @@
4848
}
4949
]
5050
},
51+
{
52+
"name": "Invoke-AzNginxAnalysisConfiguration",
53+
"description": "Analyze an NGINX configuration without applying it to the NGINXaaS deployment",
54+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}/analyze",
55+
"help": {
56+
"learnMore": {
57+
"url": "https://learn.microsoft.com/powershell/module/az.nginx/invoke-aznginxanalysisconfiguration"
58+
},
59+
"parameterSets": [
60+
{
61+
"parameters": [
62+
"-ConfigurationName <String>",
63+
"-DeploymentName <String>",
64+
"-ResourceGroupName <String>",
65+
"[-SubscriptionId <String>]"
66+
]
67+
}
68+
]
69+
},
70+
"examples": [
71+
{
72+
"description": "Analyze an NGINX configuration without applying it to the NGINXaaS deployment",
73+
"parameters": [
74+
{
75+
"name": "-ConfigurationName",
76+
"value": "[Path.configurationName]"
77+
},
78+
{
79+
"name": "-DeploymentName",
80+
"value": "[Path.deploymentName]"
81+
},
82+
{
83+
"name": "-ResourceGroupName",
84+
"value": "[Path.resourceGroupName]"
85+
},
86+
{
87+
"name": "-SubscriptionId",
88+
"value": "[Path.subscriptionId]"
89+
}
90+
]
91+
}
92+
]
93+
},
5194
{
5295
"name": "Remove-AzNginxConfiguration",
5396
"description": "Reset the NGINX configuration of given NGINX deployment to default",

src/Nginx/Nginx.Autorest/UX/Nginx.NginxPlus/nginxDeployments.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "nginxDeployments",
3-
"apiVersion": "2023-04-01",
3+
"apiVersion": "2024-01-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.nginx"
66
},

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15+
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -169,4 +169,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
169169
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170170
}
171171

172+
if (-not $DisableAfterBuildTasks){
173+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
174+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
175+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
176+
Write-Host -ForegroundColor Green 'Running after build tasks...'
177+
. $afterBuildTasksPath @afterBuildTasksArgs
178+
}
179+
}
180+
181+
172182
Write-Host -ForegroundColor Green '-------------Done-------------'

src/Nginx/Nginx.Autorest/custom/autogen-model-cmdlets/New-AzNginxConfigurationFileObject.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ Create an in-memory object for NginxConfigurationFile.
2121
Create an in-memory object for NginxConfigurationFile.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxConfigurationFile
24+
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxConfigurationFile
2525
.Link
2626
https://learn.microsoft.com/powershell/module/Az.Nginx/new-AzNginxConfigurationFileObject
2727
#>
2828
function New-AzNginxConfigurationFileObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxConfigurationFile')]
29+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxConfigurationFile')]
3030
[CmdletBinding(PositionalBinding=$false)]
3131
Param(
3232

@@ -39,7 +39,7 @@ function New-AzNginxConfigurationFileObject {
3939
)
4040

4141
process {
42-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxConfigurationFile]::New()
42+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxConfigurationFile]::New()
4343

4444
if ($PSBoundParameters.ContainsKey('Content')) {
4545
$Object.Content = $Content

src/Nginx/Nginx.Autorest/custom/autogen-model-cmdlets/New-AzNginxNetworkProfileObject.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ Create an in-memory object for NginxNetworkProfile.
2121
Create an in-memory object for NginxNetworkProfile.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxNetworkProfile
24+
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxNetworkProfile
2525
.Link
2626
https://learn.microsoft.com/powershell/module/Az.Nginx/new-AzNginxNetworkProfileObject
2727
#>
2828
function New-AzNginxNetworkProfileObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxNetworkProfile')]
29+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxNetworkProfile')]
3030
[CmdletBinding(PositionalBinding=$false)]
3131
Param(
3232

3333
[Parameter()]
34-
[Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxFrontendIPConfiguration]
34+
[Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxFrontendIPConfiguration]
3535
$FrontEndIPConfiguration,
3636
[Parameter()]
37-
[Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxNetworkInterfaceConfiguration]
37+
[Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxNetworkInterfaceConfiguration]
3838
$NetworkInterfaceConfiguration
3939
)
4040

4141
process {
42-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxNetworkProfile]::New()
42+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxNetworkProfile]::New()
4343

4444
if ($PSBoundParameters.ContainsKey('FrontEndIPConfiguration')) {
4545
$Object.FrontEndIPConfiguration = $FrontEndIPConfiguration

src/Nginx/Nginx.Autorest/custom/autogen-model-cmdlets/New-AzNginxPrivateIPAddressObject.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ Create an in-memory object for NginxPrivateIPAddress.
2121
Create an in-memory object for NginxPrivateIPAddress.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxPrivateIPAddress
24+
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxPrivateIPAddress
2525
.Link
2626
https://learn.microsoft.com/powershell/module/Az.Nginx/new-AzNginxPrivateIPAddressObject
2727
#>
2828
function New-AzNginxPrivateIPAddressObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxPrivateIPAddress')]
29+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxPrivateIPAddress')]
3030
[CmdletBinding(PositionalBinding=$false)]
3131
Param(
3232

@@ -43,7 +43,7 @@ function New-AzNginxPrivateIPAddressObject {
4343
)
4444

4545
process {
46-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxPrivateIPAddress]::New()
46+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxPrivateIPAddress]::New()
4747

4848
if ($PSBoundParameters.ContainsKey('PrivateIPAddress')) {
4949
$Object.PrivateIPAddress = $PrivateIPAddress

src/Nginx/Nginx.Autorest/custom/autogen-model-cmdlets/New-AzNginxPublicIPAddressObject.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ Create an in-memory object for NginxPublicIPAddress.
2121
Create an in-memory object for NginxPublicIPAddress.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxPublicIPAddress
24+
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxPublicIPAddress
2525
.Link
2626
https://learn.microsoft.com/powershell/module/Az.Nginx/new-AzNginxPublicIPAddressObject
2727
#>
2828
function New-AzNginxPublicIPAddressObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxPublicIPAddress')]
29+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxPublicIPAddress')]
3030
[CmdletBinding(PositionalBinding=$false)]
3131
Param(
3232

@@ -36,7 +36,7 @@ function New-AzNginxPublicIPAddressObject {
3636
)
3737

3838
process {
39-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.NginxPublicIPAddress]::New()
39+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.NginxPublicIPAddress]::New()
4040

4141
if ($PSBoundParameters.ContainsKey('Id')) {
4242
$Object.Id = $Id
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Example 1: Analyzing nginx configuration before creating the nginx configuration
2+
```powershell
3+
$confFile = New-AzNginxConfigurationFileObject -VirtualPath "nginx.conf" -Content 'xxxx'
4+
5+
# configuration analysis
6+
$confAnalysis = Invoke-AzNginxAnalysisConfiguration -ConfigurationName default -DeploymentName xxxx -ResourceGroupName xxxx -ConfigFile $confFile -ConfigRootFile "nginx.conf"
7+
```
8+
9+
```output
10+
Status
11+
------
12+
SUCCEEDED
13+
```
14+
15+
This command analyzes the configuration before you submit to create your configuration for your nginx deployment

src/Nginx/Nginx.Autorest/exports/Get-AzNginxCertificate.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Get-AzNginxCertificate -DeploymentName nginx-test -Name cert -ResourceGroupName
2727
.Inputs
2828
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.INginxIdentity
2929
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxCertificate
30+
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxCertificate
3131
.Notes
3232
COMPLEX PARAMETER PROPERTIES
3333
@@ -44,7 +44,7 @@ INPUTOBJECT <INginxIdentity>: Identity Parameter
4444
https://learn.microsoft.com/powershell/module/az.nginx/get-aznginxcertificate
4545
#>
4646
function Get-AzNginxCertificate {
47-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxCertificate])]
47+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxCertificate])]
4848
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
4949
param(
5050
[Parameter(ParameterSetName='Get', Mandatory)]

src/Nginx/Nginx.Autorest/exports/Get-AzNginxConfiguration.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Get-AzNginxConfiguration -DeploymentName nginx-test -Name default -ResourceGroup
2525
.Inputs
2626
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.INginxIdentity
2727
.Outputs
28-
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxConfiguration
28+
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxConfiguration
2929
.Notes
3030
COMPLEX PARAMETER PROPERTIES
3131
@@ -42,7 +42,7 @@ INPUTOBJECT <INginxIdentity>: Identity Parameter
4242
https://learn.microsoft.com/powershell/module/az.nginx/get-aznginxconfiguration
4343
#>
4444
function Get-AzNginxConfiguration {
45-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxConfiguration])]
45+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxConfiguration])]
4646
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
4747
param(
4848
[Parameter(ParameterSetName='Get', Mandatory)]

src/Nginx/Nginx.Autorest/exports/Get-AzNginxDeployment.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Get-AzNginxDeployment -ResourceGroupName nginx-test-rg
2929
.Inputs
3030
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.INginxIdentity
3131
.Outputs
32-
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxDeployment
32+
Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxDeployment
3333
.Notes
3434
COMPLEX PARAMETER PROPERTIES
3535
@@ -46,7 +46,7 @@ INPUTOBJECT <INginxIdentity>: Identity Parameter
4646
https://learn.microsoft.com/powershell/module/az.nginx/get-aznginxdeployment
4747
#>
4848
function Get-AzNginxDeployment {
49-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxDeployment])]
49+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxDeployment])]
5050
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
5151
param(
5252
[Parameter(ParameterSetName='Get', Mandatory)]

0 commit comments

Comments
 (0)