Skip to content

Commit f20b483

Browse files
kaushal087Kaushal Kumar
andauthored
Update resource association swagger (#18432)
* update access mode values * update examples * Add 202 in delete spec * Add provisioning issues changes * update schema * review changs * update * typo in model fix * make provisioning issues readonly * Add one example in list association, provisioning state enum update * Add logggin categories in profile * examples update * update * update examples * reformat code * Add x-msidentifier for logger * update * provisioning state fix * Fix provisioning state * Add location header in delete nsp association * update location header * update location header * location header update Co-authored-by: Kaushal Kumar <[email protected]>
1 parent f5b15e8 commit f20b483

File tree

8 files changed

+122
-19
lines changed

8 files changed

+122
-19
lines changed

specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationDelete.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
"subscriptionId": "subId",
66
"resourceGroupName": "rg1",
77
"networkSecurityPerimeterName": "nsp1",
8-
"associationName": "association1"
8+
"associationName": "association1",
9+
"operationId": "operationId1"
910
},
1011
"responses": {
1112
"200": {},
13+
"202": {
14+
"headers": {
15+
"location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}/operationResults/{operationId}?api-version={api-version}"
16+
}
17+
},
1218
"204": {}
1319
}
1420
}

specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationGet.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"profile": {
2222
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
2323
},
24-
"accessMode": "EnforceMode"
24+
"accessMode": "Enforced",
25+
"hasProvisioningIssues": "no"
2526
}
2627
}
2728
}

specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationList.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"profile": {
2323
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
2424
},
25-
"accessMode": "EnforceMode"
25+
"accessMode": "Enforced",
26+
"hasProvisioningIssues": "no"
2627
}
2728
},
2829
{
@@ -37,7 +38,24 @@
3738
"profile": {
3839
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
3940
},
40-
"accessMode": "DryRunMode"
41+
"accessMode": "Audit",
42+
"hasProvisioningIssues": "no"
43+
}
44+
},
45+
{
46+
"name": "association3",
47+
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/resourceAssociations/association3",
48+
"type": "Microsoft.Network/networkSecurityPerimeters/resourceAssociations",
49+
"properties": {
50+
"provisioningState": "Failed",
51+
"privateLinkResource": {
52+
"id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"
53+
},
54+
"profile": {
55+
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
56+
},
57+
"accessMode": "Learning",
58+
"hasProvisioningIssues": "yes"
4159
}
4260
}
4361
],

specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationPut.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"profile": {
1515
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
1616
},
17-
"accessMode": "EnforceMode"
17+
"accessMode": "Enforced"
1818
}
1919
}
2020
},
@@ -32,7 +32,8 @@
3232
"profile": {
3333
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
3434
},
35-
"accessMode": "EnforceMode"
35+
"accessMode": "Enforced",
36+
"hasProvisioningIssues": "no"
3637
}
3738
}
3839
},
@@ -49,7 +50,8 @@
4950
"profile": {
5051
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
5152
},
52-
"accessMode": "EnforceMode"
53+
"accessMode": "Enforced",
54+
"hasProvisioningIssues": "no"
5355
}
5456
}
5557
}

specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileGet.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
1616
"location": "resource location",
1717
"properties": {
18-
"accessRulesVersion": "0"
18+
"accessRulesVersion": "0",
19+
"enabledLogCategories": [
20+
{
21+
"name": "NSPOutboundAccessAllowed"
22+
}
23+
]
1924
}
2025
}
2126
}

specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileList.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
1717
"location": "resource location",
1818
"properties": {
19-
"accessRulesVersion": "0"
19+
"accessRulesVersion": "0",
20+
"enabledLogCategories": [
21+
{
22+
"name": "NSPOutboundAccessDenied"
23+
}
24+
]
2025
}
2126
},
2227
{
@@ -25,7 +30,12 @@
2530
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
2631
"location": "resource location",
2732
"properties": {
28-
"accessRulesVersion": "0"
33+
"accessRulesVersion": "0",
34+
"enabledLogCategories": [
35+
{
36+
"name": "NSPOutboundAttempt"
37+
}
38+
]
2939
}
3040
}
3141
],

specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfilePut.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
1919
"location": "East US 2 EUAP",
2020
"properties": {
21-
"accessRulesVersion": "0"
21+
"accessRulesVersion": "0",
22+
"enabledLogCategories": [
23+
{
24+
"name": "NSPInboundAccessAllowed"
25+
}
26+
]
2227
}
2328
}
2429
},
@@ -29,7 +34,12 @@
2934
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
3035
"location": "East US 2 EUAP",
3136
"properties": {
32-
"accessRulesVersion": "0"
37+
"accessRulesVersion": "0",
38+
"enabledLogCategories": [
39+
{
40+
"name": "NSPInboundAccessDenied"
41+
}
42+
]
3343
}
3444
}
3545
}

specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/networkSecurityPerimeter.json

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,15 @@
668668
"200": {
669669
"description": "Delete Succeed."
670670
},
671+
"202": {
672+
"description": "Delete in progress.",
673+
"headers": {
674+
"location": {
675+
"description": "location header",
676+
"type": "string"
677+
}
678+
}
679+
},
671680
"204": {
672681
"description": "Request successful. The resource does not exist."
673682
},
@@ -678,6 +687,7 @@
678687
}
679688
}
680689
},
690+
"x-ms-long-running-operation": true,
681691
"x-ms-examples": {
682692
"NspAssociationDelete": {
683693
"$ref": "./examples/NspAssociationDelete.json"
@@ -846,7 +856,7 @@
846856
},
847857
"provisioningState": {
848858
"readOnly": true,
849-
"$ref": "./network.json#/definitions/ProvisioningState",
859+
"$ref": "#/definitions/NSPProvisioningState",
850860
"description": "The provisioning state of the scope assignment resource."
851861
}
852862
},
@@ -906,6 +916,16 @@
906916
"readOnly": true,
907917
"type": "string",
908918
"description": "Version number that increases with every update to access rules within the profile."
919+
},
920+
"enabledLogCategories": {
921+
"type": "array",
922+
"items": {
923+
"$ref": "#/definitions/LoggingCategory"
924+
},
925+
"x-ms-identifiers": [
926+
"name"
927+
],
928+
"description": "Gets the enabled log categories."
909929
}
910930
},
911931
"description": "Properties of NSP profile."
@@ -962,7 +982,7 @@
962982
"properties": {
963983
"provisioningState": {
964984
"readOnly": true,
965-
"$ref": "./network.json#/definitions/ProvisioningState",
985+
"$ref": "#/definitions/NSPProvisioningState",
966986
"description": "The provisioning state of the scope assignment resource."
967987
},
968988
"direction": {
@@ -1080,7 +1100,7 @@
10801100
"properties": {
10811101
"provisioningState": {
10821102
"readOnly": true,
1083-
"$ref": "./network.json#/definitions/ProvisioningState",
1103+
"$ref": "#/definitions/NSPProvisioningState",
10841104
"description": "The provisioning state of the resource association resource."
10851105
},
10861106
"privateLinkResource": {
@@ -1094,16 +1114,20 @@
10941114
"accessMode": {
10951115
"type": "string",
10961116
"enum": [
1097-
"Unspecified",
1098-
"EnforceMode",
1099-
"LearningMode",
1100-
"DryRunMode"
1117+
"Learning",
1118+
"Enforced",
1119+
"Audit"
11011120
],
11021121
"x-ms-enum": {
11031122
"name": "AssociationAccessMode",
11041123
"modelAsString": true
11051124
},
11061125
"description": "Access mode on the association."
1126+
},
1127+
"hasProvisioningIssues": {
1128+
"readOnly": true,
1129+
"type": "string",
1130+
"description": "Specifies if there are provisioning issues"
11071131
}
11081132
}
11091133
},
@@ -1177,6 +1201,33 @@
11771201
}
11781202
},
11791203
"description": "Properties of the perimeter associable resources."
1204+
},
1205+
"LoggingCategory": {
1206+
"type": "object",
1207+
"properties": {
1208+
"name": {
1209+
"type": "string",
1210+
"description": "The name of the logging category."
1211+
}
1212+
},
1213+
"description": "Logging Category"
1214+
},
1215+
"NSPProvisioningState": {
1216+
"type": "string",
1217+
"readOnly": true,
1218+
"description": "The current provisioning state.",
1219+
"enum": [
1220+
"Succeeded",
1221+
"Creating",
1222+
"Updating",
1223+
"Deleting",
1224+
"Accepted",
1225+
"Failed"
1226+
],
1227+
"x-ms-enum": {
1228+
"name": "nspProvisioningState",
1229+
"modelAsString": true
1230+
}
11801231
}
11811232
},
11821233
"parameters": {

0 commit comments

Comments
 (0)