Skip to content

Commit 5a67875

Browse files
briantkim93briantkim-msftkazrael2119skywing918
authored
Adding 2025-11-01 spec for Nginx.NginxPlus (#39907)
* Base commit * Added 2025-11-01 * Reran tsp compile * Updated field descriptions * Update client.tsp --------- Co-authored-by: Brian Kimutai <briankimutai@microsoft.com> Co-authored-by: ZiWei Chen <v-ziweichen@microsoft.com> Co-authored-by: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Co-authored-by: Kyle Zhang <skywing918@hotmail.com>
1 parent 1d03fa5 commit 5a67875

64 files changed

Lines changed: 6039 additions & 24 deletions

File tree

Some content is hidden

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

specification/nginx/Nginx.Management/NginxDeploymentWafPolicy.tsp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import "@azure-tools/typespec-azure-core";
22
import "@azure-tools/typespec-azure-resource-manager";
33
import "@typespec/openapi";
44
import "@typespec/rest";
5+
import "@typespec/versioning";
56
import "./models.tsp";
67
import "./NginxDeployment.tsp";
78

89
using TypeSpec.Rest;
910
using Azure.ResourceManager;
11+
using TypeSpec.Versioning;
1012
using TypeSpec.Http;
1113
using TypeSpec.OpenAPI;
1214

@@ -49,12 +51,21 @@ interface NginxDeploymentWafPolicies {
4951
* Reset the Nginx Waf Policy of given Nginx deployment to default
5052
*/
5153
delete is ArmResourceDeleteWithoutOkAsync<NginxDeploymentWafPolicy>;
54+
55+
/**
56+
* Analyze an Nginx Waf Policy
57+
*/
58+
@added(Versions.v2025_11_01)
59+
@action("analyzeWafPolicy")
60+
analysis is ArmResourceActionSync<
61+
NginxDeploymentWafPolicy,
62+
NginxDeploymentWafPolicyAnalysisCreateRequest,
63+
ArmResponse<NginxDeploymentWafPolicyAnalysisResponse>,
64+
OptionalRequestBody = true
65+
>;
5266
}
5367

5468
@@doc(NginxDeploymentWafPolicy.name, "The name of Waf Policy");
5569
@@doc(NginxDeploymentWafPolicy.properties,
5670
"Nginx Deployment Waf Policy Properties"
5771
);
58-
@@doc(NginxDeploymentWafPolicies.create::parameters.resource,
59-
"The Nginx Deployment Waf Policy"
60-
);

specification/nginx/Nginx.Management/client.tsp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,14 @@ using Azure.Core;
135135
);
136136
@@clientName(AnalysisResultData, "NginxAnalysisResultDetails", "csharp");
137137
@@clientName(Level, "NginxDiagnosticLevel", "csharp");
138-
@@clientName(NginxConfigurationResponse, "NginxConfiguration", "csharp");
138+
@@clientName(NginxConfigurationResponse,
139+
"NginxConfiguration",
140+
"csharp,go,javascript"
141+
);
139142
@@usage(NginxConfigurationResponse, Usage.input, "csharp");
140143
@@clientName(NginxConfigurationResponseProperties,
141144
"NginxConfigurationProperties",
142-
"csharp"
145+
"csharp,go,javascript"
143146
);
144147
@@clientName(NginxDeploymentApiKeyResponse, "NginxDeploymentApiKey", "csharp");
145148
@@clientName(NginxDeploymentApiKeyResponseProperties,
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-11-01",
4+
"apiKeyName": "myApiKey",
5+
"deploymentName": "myDeployment",
6+
"requestBody": {
7+
"properties": {
8+
"endDateTime": "2024-09-01T00:00:00Z",
9+
"secretText": "00000000-0000-0000-0000-000000000000"
10+
}
11+
},
12+
"resourceGroupName": "myResourceGroup",
13+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
14+
},
15+
"responses": {
16+
"200": {
17+
"body": {
18+
"name": "myApiKey",
19+
"type": "Nginx.NginxPlus/nginxDeployments/apiKeys",
20+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/myApiKey",
21+
"properties": {
22+
"endDateTime": "2024-09-01T00:00:00Z",
23+
"hint": "000"
24+
}
25+
}
26+
},
27+
"201": {
28+
"body": {
29+
"name": "myApiKey",
30+
"type": "Nginx.NginxPlus/nginxDeployments/apiKeys",
31+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/myApiKey",
32+
"properties": {
33+
"endDateTime": "2024-09-01T00:00:00Z",
34+
"hint": "000"
35+
}
36+
}
37+
}
38+
},
39+
"operationId": "ApiKeys_CreateOrUpdate",
40+
"title": "ApiKeys_CreateOrUpdate"
41+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-11-01",
4+
"apiKeyName": "myApiKey",
5+
"deploymentName": "myDeployment",
6+
"resourceGroupName": "myResourceGroup",
7+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
8+
},
9+
"responses": {
10+
"200": {},
11+
"204": {}
12+
},
13+
"operationId": "ApiKeys_Delete",
14+
"title": "ApiKeys_Delete"
15+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-11-01",
4+
"apiKeyName": "myApiKey",
5+
"deploymentName": "myDeployment",
6+
"resourceGroupName": "myResourceGroup",
7+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"name": "myApiKey",
13+
"type": "Nginx.NginxPlus/nginxDeployments/apiKeys",
14+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/myApiKey",
15+
"properties": {
16+
"endDateTime": "2024-09-01T00:00:00Z",
17+
"hint": "000"
18+
}
19+
}
20+
}
21+
},
22+
"operationId": "ApiKeys_Get",
23+
"title": "ApiKeys_Get"
24+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-11-01",
4+
"deploymentName": "myDeployment",
5+
"resourceGroupName": "myResourceGroup",
6+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": [
12+
{
13+
"name": "myApiKey",
14+
"type": "Nginx.NginxPlus/nginxDeployments/apiKeys",
15+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/myApiKey",
16+
"properties": {
17+
"endDateTime": "2024-09-01T00:00:00Z",
18+
"hint": "000"
19+
}
20+
},
21+
{
22+
"name": "myApiKey2",
23+
"type": "Nginx.NginxPlus/nginxDeployments/apiKeys",
24+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/myApiKey2",
25+
"properties": {
26+
"endDateTime": "2024-10-01T00:00:00Z",
27+
"hint": "111"
28+
}
29+
}
30+
]
31+
}
32+
}
33+
},
34+
"operationId": "ApiKeys_List",
35+
"title": "ApiKeys_List"
36+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-11-01",
4+
"certificateName": "default",
5+
"deploymentName": "myDeployment",
6+
"requestBody": {
7+
"properties": {
8+
"certificateVirtualPath": "/src/cert/somePath.cert",
9+
"keyVaultSecretId": "https://someKV.vault.azure.com/someSecretID",
10+
"keyVirtualPath": "/src/cert/somekey.key"
11+
}
12+
},
13+
"resourceGroupName": "myResourceGroup",
14+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
15+
},
16+
"responses": {
17+
"200": {
18+
"body": {
19+
"name": "default",
20+
"type": "nginx.nginxplus/nginxdeployments/certificates",
21+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/certificates/default",
22+
"properties": {
23+
"certificateVirtualPath": "/src/cert/somePath.cert",
24+
"keyVaultSecretId": "https://someKV.vault.azure.com/someSecretID",
25+
"keyVirtualPath": "/src/cert/somekey.key",
26+
"provisioningState": "Succeeded"
27+
}
28+
}
29+
},
30+
"201": {
31+
"body": {
32+
"name": "default",
33+
"type": "nginx.nginxplus/nginxdeployments/certificates",
34+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/certificates/default",
35+
"properties": {
36+
"certificateVirtualPath": "/src/cert/somePath.cert",
37+
"keyVaultSecretId": "https://someKV.vault.azure.com/someSecretID",
38+
"keyVirtualPath": "/src/cert/somekey.key",
39+
"provisioningState": "Accepted"
40+
}
41+
}
42+
}
43+
},
44+
"operationId": "Certificates_CreateOrUpdate",
45+
"title": "Certificates_CreateOrUpdate"
46+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-11-01",
4+
"certificateName": "default",
5+
"deploymentName": "myDeployment",
6+
"resourceGroupName": "myResourceGroup",
7+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
8+
},
9+
"responses": {
10+
"202": {
11+
"headers": {
12+
"Azure-AsyncOperation": "https://example.com/operationstatus"
13+
}
14+
},
15+
"204": {}
16+
},
17+
"operationId": "Certificates_Delete",
18+
"title": "Certificates_Delete"
19+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-11-01",
4+
"certificateName": "default",
5+
"deploymentName": "myDeployment",
6+
"resourceGroupName": "myResourceGroup",
7+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"name": "default",
13+
"type": "nginx.nginxplus/nginxdeployments/certificates",
14+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/certificates/default",
15+
"properties": {
16+
"certificateError": {
17+
"code": "CertificateNotYetValid",
18+
"message": "The certificate is not yet valid. The certificate is not yet valid. NotBefore: '2020-01-01T00:00:00Z', NotAfter: '2020-01-01T00:00:00Z'"
19+
},
20+
"certificateVirtualPath": "/src/cert/somePath.cert",
21+
"keyVaultSecretCreated": "2020-01-01T00:00:00Z",
22+
"keyVaultSecretId": "https://someKV.vault.azure.com/someSecretID",
23+
"keyVaultSecretVersion": "12345678ef9a12345678ef9a12345678",
24+
"keyVirtualPath": "/src/cert/somekey.key",
25+
"provisioningState": "Succeeded",
26+
"sha1Thumbprint": "1234567890ABCDEF1234567890ABCDEF12345678"
27+
}
28+
}
29+
}
30+
},
31+
"operationId": "Certificates_Get",
32+
"title": "Certificates_Get"
33+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-11-01",
4+
"deploymentName": "myDeployment",
5+
"resourceGroupName": "myResourceGroup",
6+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": [
12+
{
13+
"name": "cert1",
14+
"type": "nginx.nginxplus/nginxdeployments/certificates",
15+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/certificates/cert1",
16+
"properties": {
17+
"certificateError": {
18+
"code": "CertificateNotYetValid",
19+
"message": "The certificate is not yet valid. The certificate is not yet valid. NotBefore: '2020-01-01T00:00:00Z', NotAfter: '2020-01-01T00:00:00Z'"
20+
},
21+
"certificateVirtualPath": "/src/cert/somePath.cert",
22+
"keyVaultSecretCreated": "2020-01-01T00:00:00Z",
23+
"keyVaultSecretId": "https://someKV.vault.azure.com/someSecretID",
24+
"keyVaultSecretVersion": "12345678ef9a12345678ef9a12345678",
25+
"keyVirtualPath": "/src/cert/somekey.key",
26+
"provisioningState": "Succeeded",
27+
"sha1Thumbprint": "1234567890ABCDEF1234567890ABCDEF12345678"
28+
}
29+
},
30+
{
31+
"name": "cert2",
32+
"type": "nginx.nginxplus/nginxdeployments/certificates",
33+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/certificates/cert2",
34+
"properties": {
35+
"certificateError": null,
36+
"certificateVirtualPath": "/src/cert/somePath2.cert",
37+
"keyVaultSecretCreated": "2020-01-01T00:00:00Z",
38+
"keyVaultSecretId": "https://someKV.vault.azure.com/someSecretID2",
39+
"keyVaultSecretVersion": "12345678ef9a12345678ef9a12345678",
40+
"keyVirtualPath": "/src/cert/somekey2.key",
41+
"provisioningState": "Succeeded",
42+
"sha1Thumbprint": "1234567890ABCDEF1234567890ABCDEF12345678"
43+
}
44+
}
45+
]
46+
}
47+
}
48+
},
49+
"operationId": "Certificates_List",
50+
"title": "Certificates_List"
51+
}

0 commit comments

Comments
 (0)