Skip to content

added generated files #25401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/Nginx/Nginx.Autorest/Az.Nginx.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.Nginx.private.dll'
FormatsToProcess = './Az.Nginx.format.ps1xml'
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', '*'
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', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{
Expand Down
10 changes: 3 additions & 7 deletions src/Nginx/Nginx.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
This directory contains the PowerShell module for the Nginx service.

---
## Status
[![Az.Nginx](https://img.shields.io/powershellgallery/v/Az.Nginx.svg?style=flat-square&label=Az.Nginx "Az.Nginx")](https://www.powershellgallery.com/packages/Az.Nginx/)

## Info
- Modifiable: yes
- Generated: all
Expand All @@ -29,15 +26,14 @@ For information on how to develop for `Az.Nginx`, see [how-to.md](how-to.md).
### AutoRest Configuration
> see https://aka.ms/autorest
``` yaml
commit: e38e7dd462571865266d320bd7cec9804c67f70b
tag: package-2023-04-01
commit: d1027c6d6d0994ef3a656a561b0cce8378ac58a4
tag: package-2024-01-01-preview
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
# You need to specify your swagger files here.
- $(repo)/specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/swagger.json

- $(repo)/specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-01-01-preview/swagger.json
root-module-name: $(prefix).Nginx
title: Nginx
module-version: 0.1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "nginxDeployments/certificates",
"apiVersion": "2023-04-01",
"apiVersion": "2024-01-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.nginx"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "nginxDeployments/configurations",
"apiVersion": "2023-04-01",
"apiVersion": "2024-01-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.nginx"
},
Expand Down Expand Up @@ -48,6 +48,49 @@
}
]
},
{
"name": "Invoke-AzNginxAnalysisConfiguration",
"description": "Analyze an NGINX configuration without applying it to the NGINXaaS deployment",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}/analyze",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.nginx/invoke-aznginxanalysisconfiguration"
},
"parameterSets": [
{
"parameters": [
"-ConfigurationName <String>",
"-DeploymentName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Analyze an NGINX configuration without applying it to the NGINXaaS deployment",
"parameters": [
{
"name": "-ConfigurationName",
"value": "[Path.configurationName]"
},
{
"name": "-DeploymentName",
"value": "[Path.deploymentName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzNginxConfiguration",
"description": "Reset the NGINX configuration of given NGINX deployment to default",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "nginxDeployments",
"apiVersion": "2023-04-01",
"apiVersion": "2024-01-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.nginx"
},
Expand Down
8 changes: 4 additions & 4 deletions src/Nginx/Nginx.Autorest/custom/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Custom
This directory contains custom implementation for non-generated cmdlets for the `Az.Nginx` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Nginx.custom.psm1`. This file should not be modified.
This directory contains custom implementation for non-generated cmdlets for the `Az.Nginx` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.Nginx.custom.psm1`. This file should not be modified.

## Info
- Modifiable: yes
Expand All @@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
For script cmdlets, these are loaded via the `Az.Nginx.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.

## Purpose
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.

## Usage
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
- Break
- DefaultProfile
- HttpPipelineAppend
Expand All @@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes:
- `Microsoft.Azure.PowerShell.Cmdlets.Nginx.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Nginx`.
- `Microsoft.Azure.PowerShell.Cmdlets.Nginx.InternalExportAttribute`
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Nginx`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Nginx`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
- `Microsoft.Azure.PowerShell.Cmdlets.Nginx.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
3 changes: 3 additions & 0 deletions src/Nginx/Nginx.Autorest/docs/Az.Nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Get the NGINX configuration of given NGINX deployment
### [Get-AzNginxDeployment](Get-AzNginxDeployment.md)
Get the NGINX deployment

### [Invoke-AzNginxAnalysisConfiguration](Invoke-AzNginxAnalysisConfiguration.md)
Analyze an NGINX configuration without applying it to the NGINXaaS deployment

### [New-AzNginxCertificate](New-AzNginxCertificate.md)
Create or update the NGINX certificates for given NGINX deployment

Expand Down
2 changes: 1 addition & 1 deletion src/Nginx/Nginx.Autorest/docs/Get-AzNginxCertificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxCertificate
### Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxCertificate

## NOTES

Expand Down
2 changes: 1 addition & 1 deletion src/Nginx/Nginx.Autorest/docs/Get-AzNginxConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxConfiguration
### Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxConfiguration

## NOTES

Expand Down
2 changes: 1 addition & 1 deletion src/Nginx/Nginx.Autorest/docs/Get-AzNginxDeployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api20230401.INginxDeployment
### Microsoft.Azure.PowerShell.Cmdlets.Nginx.Models.Api202401Preview.INginxDeployment

## NOTES

Expand Down
Loading