Skip to content
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
5 changes: 2 additions & 3 deletions src/Nginx/Nginx.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Nginx")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.2.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.2.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.2.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

269 changes: 32 additions & 237 deletions src/Nginx/Nginx.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,271 +38,66 @@ root-module-name: $(prefix).Nginx
title: Nginx
module-version: 0.1.0
subject-prefix: Nginx
nested-object-to-string: true

# If there are post APIs for some kinds of actions in the RP, you may need to
# uncomment following line to support viaIdentity for these post APIs
# 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"
flatten-userassignedidentity: false
disable-transform-identity-type: true

directive:
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update|Analysis)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$
remove: true
- where:
subject: Configuration|Certificate|Deployment
verb: Set
remove: true
# ProvisioningState readonly
- where:
subject: Deployment
variant: CreateExpanded|UpdateExpanded|UpdateViaIdentityExpanded
hide: true
# Required properties for deployment
- from: swagger-document
where: $.definitions.ProvisioningState
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}"].put.parameters[4]
transform: >-
return {
"enum": [
"Accepted",
"Creating",
"Updating",
"Deleting",
"Succeeded",
"Failed",
"Canceled",
"Deleted",
"NotSpecified"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"modelAsString": true,
"name": "ProvisioningState"
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NginxDeployment"
}
}
# Required properties for deployment
- from: swagger-document
where: $.definitions.NginxDeploymentProperties
transform: >-
return {
"type": "object",
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState"
},
"nginxVersion": {
"type": "string",
"readOnly": true
},
"managedResourceGroup": {
"type": "string",
"description": "The managed resource group to deploy VNet injection related network resources."
},
"networkProfile": {
"$ref": "#/definitions/NginxNetworkProfile"
},
"ipAddress": {
"type": "string",
"description": "The IP address of the deployment.",
"readOnly": true
},
"enableDiagnosticsSupport": {
"type": "boolean"
},
"logging": {
"$ref": "#/definitions/NginxLogging"
},
"scalingProperties": {
"$ref": "#/definitions/NginxDeploymentScalingProperties"
},
"userProfile": {
"$ref": "#/definitions/NginxDeploymentUserProfile"
}
},
"required": [
"networkProfile"
]
}
transform: $['required']= ['networkProfile']
- from: swagger-document
where: $.definitions.NginxDeployment
transform: >-
return {
"type": "object",
"x-ms-azure-resource": true,
"properties": {
"id": {
"type": "string",
"readOnly": true
},
"name": {
"type": "string",
"readOnly": true
},
"type": {
"type": "string",
"readOnly": true
},
"identity": {
"$ref": "#/definitions/IdentityProperties"
},
"properties": {
"$ref": "#/definitions/NginxDeploymentProperties"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sku": {
"$ref": "#/definitions/ResourceSku",
},
"location": {
"type": "string",
},
"systemData": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
"readOnly": true
}
},
"required": [
"properties",
"location",
"sku"
]
}
transform: $['required'] = ['properties','location','sku']
# Required properties for Certificates
- from: swagger-document
where: $.definitions.NginxCertificate
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}"].put.parameters[5]
transform: >-
return {
"type": "object",
"x-ms-azure-resource": true,
"properties": {
"id": {
"type": "string",
"readOnly": true
},
"name": {
"type": "string",
"readOnly": true
},
"type": {
"type": "string",
"readOnly": true
},
"properties": {
"$ref": "#/definitions/NginxCertificateProperties"
},
"location": {
"type": "string"
},
"systemData": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
"readOnly": true
}
},
"required": [
"properties"
]
"in": "body",
"name": "body",
"required": true,
"description": "The certificate",
"schema": {
"$ref": "#/definitions/NginxCertificate"
}
}
- from: swagger-document
where: $.definitions.NginxCertificate
transform: $['required'] = ['properties']
- from: swagger-document
where: $.definitions.NginxCertificateProperties
transform: >-
return {
"type": "object",
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState"
},
"keyVirtualPath": {
"type": "string"
},
"certificateVirtualPath": {
"type": "string"
},
"keyVaultSecretId": {
"type": "string"
}
},
"required": [
"keyVirtualPath",
"certificateVirtualPath",
"keyVaultSecretId"
]
}
transform: $['required'] = ['keyVirtualPath', 'certificateVirtualPath', 'keyVaultSecretId']
- model-cmdlet:
- NginxConfigurationFile
- NginxPrivateIPAddress
- NginxPublicIPAddress
# - NginxNetworkProfile
- model-name: NginxConfigurationFile
- model-name: NginxPrivateIPAddress
- model-name: NginxPublicIPAddress
- model-name: NginxNetworkProfile
- no-inline:
- NginxNetworkProfile
- where:
verb: Get|Update|New
subject: Configuration
set:
breaking-change:
deprecated-output-properties:
- File
- ProtectedFile
- PackageProtectedFile
new-output-properties:
- File
- ProtectedFile
- PackageProtectedFile
change-description: The types of the properties File, ProtectedFile and PackageProtectedFile will be changed from fixed array to 'List'.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: Get|Update|New
subject: Deployment
set:
breaking-change:
deprecated-output-properties:
- PrivateIPAddress
- PublicIPAddress
- AutoScaleSettingProfile
new-output-properties:
- PrivateIPAddress
- PublicIPAddress
- AutoScaleSettingProfile
change-description: The types of the properties PrivateIPAddress, ProtectedFile and AutoScaleSettingProfile will be changed from fixed array to 'List'.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: Invoke
subject: AnalysisConfiguration
set:
breaking-change:
deprecated-output-properties:
- DataError
new-output-properties:
- DataError
change-description: The type of the property DataError will be changed from fixed array to 'List'.
deprecated-by-version: 7.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: Invoke
subject: AnalysisConfiguration
variant: ^Analysis$|^AnalysisViaIdentity$
set:
breaking-change:
change-description: The parameter set 'Analysis' and 'AnalysisViaIdentity' will be removed.
deprecated-by-version: 7.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
parameter-name: IdentityType|IdentityUserAssignedIdentity
set:
breaking-change:
change-description: The cmdlet 'New-AzNginxDeployment' no longer supports the parameter 'IdentityType' and IdentityUserAssignedIdentity.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
```
Original file line number Diff line number Diff line change
Expand Up @@ -48,49 +48,6 @@
}
]
},
{
"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
Loading