Skip to content

Commit

Permalink
Adding NSP child resources, profile and access rule, to swagger (Azur…
Browse files Browse the repository at this point in the history
…e#18066)

* Defining the APIs for the new NSP resource

* Adding NSP child resources - profile and access rule

* Fixing the model errors, prettier-fix and typos

* Fixing the typo in the spec file for NSP

* Adding definitions for resource association

* Prettier fix on the spec and example files

* Fix typos, and removing the apiVersion on the top level

* Handling the review comments

* Correcting the subId in the path

* Adding the NSP preview version for go in the read me

Co-authored-by: Hari Prasad Perabattula <haperaba@microsoft.com>
Co-authored-by: Hari Prasad Perabattula <Hari.Perabattula@Microsoft.com>
  • Loading branch information
3 people authored and FredericHeem committed May 16, 2022
1 parent fafffa5 commit 85c8494
Show file tree
Hide file tree
Showing 14 changed files with 1,204 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"title": "Delete NSP access rule",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"profileName": "profile1",
"accessRuleName": "accessRule1"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"title": "Get NSP Access Rule",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"profileName": "profile1",
"accessRuleName": "accessRule1"
},
"responses": {
"200": {
"body": {
"name": "accessRule1",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules",
"properties": {
"provisioningState": "Succeeded",
"direction": "Outbound",
"addressPrefixes": [],
"fullyQualifiedDomainNames": [
"paasrp1.contoso.org",
"paasrp2.contoso.org"
],
"subscriptions": [],
"networkSecurityPerimeters": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"title": "List NSP Access Rules",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"profileName": "profile1"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "accessRule1",
"id": "/subscriptions/rg1/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules",
"properties": {
"provisioningState": "Succeeded",
"direction": "Inbound",
"addressPrefixes": [
"10.11.0.0/16",
"10.10.1.0/24"
],
"fullyQualifiedDomainNames": [],
"subscriptions": [],
"networkSecurityPerimeters": []
}
},
{
"name": "accessRule2",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule2",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules",
"properties": {
"provisioningState": "Succeeded",
"direction": "Outbound",
"addressPrefixes": [],
"fullyQualifiedDomainNames": [
"paasrp1.contoso.org",
"paasrp2.contoso.org"
],
"subscriptions": [],
"networkSecurityPerimeters": []
}
}
],
"nextLink": "{baseurl}/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules?api-version=2021-02-01-preview&$skipToken=10"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"title": "Create/Update NSP access rule",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"profileName": "profile1",
"accessRuleName": "accessRule1",
"parameters": {
"properties": {
"direction": "Inbound",
"addressPrefixes": [
"10.11.0.0/16",
"10.10.1.0/24"
]
}
}
},
"responses": {
"200": {
"body": {
"name": "accessRule1",
"id": "/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules",
"properties": {
"provisioningState": "Succeeded",
"direction": "Inbound",
"addressPrefixes": [
"10.11.0.0/16",
"10.10.1.0/24"
],
"fullyQualifiedDomainNames": [],
"subscriptions": [],
"networkSecurityPerimeters": []
}
}
},
"201": {
"body": {
"name": "accessRule1",
"id": "/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules",
"properties": {
"provisioningState": "Succeeded",
"direction": "Inbound",
"addressPrefixes": [
"10.11.0.0/16",
"10.10.1.0/24"
],
"fullyQualifiedDomainNames": [],
"subscriptions": [],
"networkSecurityPerimeters": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"title": "Delete NSP resource association",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"associationName": "association1"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"title": "Get NSP resource association",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"associationName": "association1"
},
"responses": {
"200": {
"body": {
"name": "association1",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/resourceAssociations/association1",
"type": "Microsoft.Network/networkSecurityPerimeters/resourceAssociations",
"properties": {
"provisioningState": "Succeeded",
"privateLinkResource": {
"id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"
},
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"title": "List NSP resource associations",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "association1",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/resourceAssociations/association1",
"type": "Microsoft.Network/networkSecurityPerimeters/resourceAssociations",
"properties": {
"provisioningState": "Succeeded",
"privateLinkResource": {
"id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"
},
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
}
},
{
"name": "association2",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/resourceAssociations/association2",
"type": "Microsoft.Network/networkSecurityPerimeters/resourceAssociations",
"properties": {
"provisioningState": "Succeeded",
"privateLinkResource": {
"id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"
},
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "DryRunMode"
}
}
],
"nextLink": "{baseurl}/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/resourceAssociations?api-version=2021-02-01-preview&$skipToken=10"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"title": "Create/Update NSP association",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"associationName": "association1",
"parameters": {
"properties": {
"privateLinkResource": {
"id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"
},
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
}
}
},
"responses": {
"200": {
"body": {
"name": "association1",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/resourceAssociations/association1",
"type": "Microsoft.Network/networkSecurityPerimeters/resourceAssociations",
"properties": {
"provisioningState": "Succeeded",
"privateLinkResource": {
"id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"
},
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
}
}
},
"201": {
"body": {
"name": "association1",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/resourceAssociations/association1",
"type": "Microsoft.Network/networkSecurityPerimeters/resourceAssociations",
"properties": {
"provisioningState": "Succeeded",
"privateLinkResource": {
"id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"
},
"profile": {
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"
},
"accessMode": "EnforceMode"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"title": "Delete NSP profile",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"profileName": "profile1"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"title": "Get NSP Profile",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"profileName": "profile1"
},
"responses": {
"200": {
"body": {
"name": "nsp1",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
"location": "resource location",
"properties": {
"accessRulesVersion": "0"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"title": "List NSP Profiles",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "profile1",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
"location": "resource location",
"properties": {
"accessRulesVersion": "0"
}
},
{
"name": "profile2",
"id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile2",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles",
"location": "resource location",
"properties": {
"accessRulesVersion": "0"
}
}
],
"nextLink": "{baseurl}/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles?api-version=2021-02-01-preview&$skipToken=10"
}
}
}
}
Loading

0 comments on commit 85c8494

Please sign in to comment.