Nginx.NginxPlus (preview:2024-11-01)

2025/01/10 • 1 updated methods

Configurations_Analysis (updated)
Description Analyze an NGINX configuration without applying it to the NGINXaaS deployment
Reference Link ¶

⚶ Changes

{
  "#id": "Configurations_Analysis",
  "$responses": {
    "200": {
      "$properties": {
        "data": [
          {
            "diagnostics": {
              "Description": {
                "new": "A diagnostic is a message associated with an NGINX config. The Analyzer returns diagnostics with a level indicating the importance of the diagnostic with optional category.",
                "old": "A config diagnostic object found during the analysis of an NGINX configuration that can be a warning or recommendation."
              },
              "$properties": [
                {
                  "#name": "id",
                  "Description": {
                    "new": "Unique identifier for the diagnostic.",
                    "old": "Unique identifier for the error"
                  }
                },
                {
                  "#name": "file",
                  "Description": {
                    "new": "The filepath of the most relevant config file.",
                    "old": "the filepath of the most relevant config file"
                  }
                },
                {
                  "#name": "category",
                  "Description": {
                    "new": "Category of warning like Best-practices, Recommendation, Security etc.",
                    "old": "category of warning"
                  }
                }
              ]
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}/analyze
{
subscriptionId: string ,
resourceGroupName: string ,
deploymentName: string ,
configurationName: string ,
api-version: string ,
body:
{
config:
{
rootFile: string ,
files:
[
{
content: string ,
virtualPath: string ,
}
,
]
,
protectedFiles:
[
{
content: string ,
virtualPath: string ,
contentHash: string ,
}
,
]
,
package:
{
data: string ,
protectedFiles:
[
string ,
]
,
}
,
}
,
}
,
}

⚐ Response (200)

{
status: string ,
data:
{
errors:
[
{
id: string ,
directive: string ,
description: string ,
file: string ,
line: number ,
message: string ,
rule: string ,
}
,
]
,
diagnostics:
[
{
id: string ,
directive: string ,
description: string ,
file: string ,
line: number ,
message: string ,
rule: string ,
level: enum ,
category: string ,
}
,
]
,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}