Skip to content

Commit

Permalink
Update resource association swagger (Azure#18432)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
2 people authored and FredericHeem committed May 16, 2022
1 parent 0885591 commit f75c252
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"associationName": "association1"
"associationName": "association1",
"operationId": "operationId1"
},
"responses": {
"200": {},
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}/operationResults/{operationId}?api-version={api-version}"
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
"accessMode": "Enforced",
"hasProvisioningIssues": "no"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
"accessMode": "Enforced",
"hasProvisioningIssues": "no"
}
},
{
Expand All @@ -37,7 +38,24 @@
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "DryRunMode"
"accessMode": "Audit",
"hasProvisioningIssues": "no"
}
},
{
"name": "association3",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/resourceAssociations/association3",
"type": "Microsoft.Network/networkSecurityPerimeters/resourceAssociations",
"properties": {
"provisioningState": "Failed",
"privateLinkResource": {
"id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"
},
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "Learning",
"hasProvisioningIssues": "yes"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
"accessMode": "Enforced"
}
}
},
Expand All @@ -32,7 +32,8 @@
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
"accessMode": "Enforced",
"hasProvisioningIssues": "no"
}
}
},
Expand All @@ -49,7 +50,8 @@
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
"accessMode": "Enforced",
"hasProvisioningIssues": "no"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
"location": "resource location",
"properties": {
"accessRulesVersion": "0"
"accessRulesVersion": "0",
"enabledLogCategories": [
{
"name": "NSPOutboundAccessAllowed"
}
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
"location": "resource location",
"properties": {
"accessRulesVersion": "0"
"accessRulesVersion": "0",
"enabledLogCategories": [
{
"name": "NSPOutboundAccessDenied"
}
]
}
},
{
Expand All @@ -25,7 +30,12 @@
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
"location": "resource location",
"properties": {
"accessRulesVersion": "0"
"accessRulesVersion": "0",
"enabledLogCategories": [
{
"name": "NSPOutboundAttempt"
}
]
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
"location": "East US 2 EUAP",
"properties": {
"accessRulesVersion": "0"
"accessRulesVersion": "0",
"enabledLogCategories": [
{
"name": "NSPInboundAccessAllowed"
}
]
}
}
},
Expand All @@ -29,7 +34,12 @@
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
"location": "East US 2 EUAP",
"properties": {
"accessRulesVersion": "0"
"accessRulesVersion": "0",
"enabledLogCategories": [
{
"name": "NSPInboundAccessDenied"
}
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,15 @@
"200": {
"description": "Delete Succeed."
},
"202": {
"description": "Delete in progress.",
"headers": {
"location": {
"description": "location header",
"type": "string"
}
}
},
"204": {
"description": "Request successful. The resource does not exist."
},
Expand All @@ -678,6 +687,7 @@
}
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"NspAssociationDelete": {
"$ref": "./examples/NspAssociationDelete.json"
Expand Down Expand Up @@ -846,7 +856,7 @@
},
"provisioningState": {
"readOnly": true,
"$ref": "./network.json#/definitions/ProvisioningState",
"$ref": "#/definitions/NSPProvisioningState",
"description": "The provisioning state of the scope assignment resource."
}
},
Expand Down Expand Up @@ -906,6 +916,16 @@
"readOnly": true,
"type": "string",
"description": "Version number that increases with every update to access rules within the profile."
},
"enabledLogCategories": {
"type": "array",
"items": {
"$ref": "#/definitions/LoggingCategory"
},
"x-ms-identifiers": [
"name"
],
"description": "Gets the enabled log categories."
}
},
"description": "Properties of NSP profile."
Expand Down Expand Up @@ -962,7 +982,7 @@
"properties": {
"provisioningState": {
"readOnly": true,
"$ref": "./network.json#/definitions/ProvisioningState",
"$ref": "#/definitions/NSPProvisioningState",
"description": "The provisioning state of the scope assignment resource."
},
"direction": {
Expand Down Expand Up @@ -1080,7 +1100,7 @@
"properties": {
"provisioningState": {
"readOnly": true,
"$ref": "./network.json#/definitions/ProvisioningState",
"$ref": "#/definitions/NSPProvisioningState",
"description": "The provisioning state of the resource association resource."
},
"privateLinkResource": {
Expand All @@ -1094,16 +1114,20 @@
"accessMode": {
"type": "string",
"enum": [
"Unspecified",
"EnforceMode",
"LearningMode",
"DryRunMode"
"Learning",
"Enforced",
"Audit"
],
"x-ms-enum": {
"name": "AssociationAccessMode",
"modelAsString": true
},
"description": "Access mode on the association."
},
"hasProvisioningIssues": {
"readOnly": true,
"type": "string",
"description": "Specifies if there are provisioning issues"
}
}
},
Expand Down Expand Up @@ -1177,6 +1201,33 @@
}
},
"description": "Properties of the perimeter associable resources."
},
"LoggingCategory": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the logging category."
}
},
"description": "Logging Category"
},
"NSPProvisioningState": {
"type": "string",
"readOnly": true,
"description": "The current provisioning state.",
"enum": [
"Succeeded",
"Creating",
"Updating",
"Deleting",
"Accepted",
"Failed"
],
"x-ms-enum": {
"name": "nspProvisioningState",
"modelAsString": true
}
}
},
"parameters": {
Expand Down

0 comments on commit f75c252

Please sign in to comment.