From 4acb59eaeaeff82d37f7e885096d3668588b33a1 Mon Sep 17 00:00:00 2001 From: Hari Prasad Perabattula Date: Mon, 28 Mar 2022 09:19:58 +0530 Subject: [PATCH] Adding NSP child resources, profile and access rule, to swagger (#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 Co-authored-by: Hari Prasad Perabattula --- .../examples/NspAccessRuleDelete.json | 15 + .../examples/NspAccessRuleGet.json | 31 + .../examples/NspAccessRuleList.json | 51 ++ .../examples/NspAccessRulePut.json | 58 ++ .../examples/NspAssociationDelete.json | 14 + .../examples/NspAssociationGet.json | 29 + .../examples/NspAssociationList.json | 48 ++ .../examples/NspAssociationPut.json | 57 ++ .../examples/NspProfileDelete.json | 14 + .../examples/NspProfileGet.json | 23 + .../examples/NspProfileList.json | 36 + .../examples/NspProfilePut.json | 37 + .../networkSecurityPerimeter.json | 782 +++++++++++++++++- .../network/resource-manager/readme.go.md | 10 + 14 files changed, 1204 insertions(+), 1 deletion(-) create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleDelete.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleGet.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleList.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRulePut.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationDelete.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationGet.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationList.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationPut.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileDelete.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileGet.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileList.json create mode 100644 specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfilePut.json diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleDelete.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleDelete.json new file mode 100644 index 000000000000..883c6a3cb22c --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleDelete.json @@ -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": {} + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleGet.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleGet.json new file mode 100644 index 000000000000..81a2a1631a4c --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleGet.json @@ -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": [] + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleList.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleList.json new file mode 100644 index 000000000000..d83abc555628 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRuleList.json @@ -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" + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRulePut.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRulePut.json new file mode 100644 index 000000000000..23f4fa7a8db8 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAccessRulePut.json @@ -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": [] + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationDelete.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationDelete.json new file mode 100644 index 000000000000..4c497fbc607e --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationDelete.json @@ -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": {} + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationGet.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationGet.json new file mode 100644 index 000000000000..6d94350da3f5 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationGet.json @@ -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" + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationList.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationList.json new file mode 100644 index 000000000000..b9ae83b66959 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationList.json @@ -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" + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationPut.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationPut.json new file mode 100644 index 000000000000..52d5d79db569 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspAssociationPut.json @@ -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" + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileDelete.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileDelete.json new file mode 100644 index 000000000000..3aa62ed51f31 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileDelete.json @@ -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": {} + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileGet.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileGet.json new file mode 100644 index 000000000000..a9cd5d203a92 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileGet.json @@ -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" + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileList.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileList.json new file mode 100644 index 000000000000..cd0492637aa1 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfileList.json @@ -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" + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfilePut.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfilePut.json new file mode 100644 index 000000000000..50da34f76028 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/examples/NspProfilePut.json @@ -0,0 +1,37 @@ +{ + "title": "Create/Update NSP profile", + "parameters": { + "api-version": "2021-02-01-preview", + "subscriptionId": "subId", + "resourceGroupName": "rg1", + "networkSecurityPerimeterName": "nsp1", + "profileName": "profile1", + "parameters": { + "properties": {} + } + }, + "responses": { + "200": { + "body": { + "name": "profile1", + "id": "/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1", + "type": "Microsoft.Network/networkSecurityPerimeters/profiles", + "location": "East US 2 EUAP", + "properties": { + "accessRulesVersion": "0" + } + } + }, + "201": { + "body": { + "name": "profile1", + "id": "/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1", + "type": "Microsoft.Network/networkSecurityPerimeters/profiles", + "location": "East US 2 EUAP", + "properties": { + "accessRulesVersion": "0" + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/networkSecurityPerimeter.json b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/networkSecurityPerimeter.json index 74bbcbc922d9..be3bd67e7abd 100644 --- a/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/networkSecurityPerimeter.json +++ b/specification/network/resource-manager/Microsoft.Network/preview/2021-02-01-preview/networkSecurityPerimeter.json @@ -238,10 +238,511 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}": { + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NetworkSecurityPerimeterNameParameter" + }, + { + "$ref": "#/parameters/ProfileNameParameter" + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + } + ], + "get": { + "tags": [ + "NspProfiles" + ], + "operationId": "NspProfiles_Get", + "description": "Gets the specified NSP profile.", + "responses": { + "200": { + "description": "OK - Returns information about the NSP profile.", + "schema": { + "$ref": "#/definitions/NspProfile" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspProfilesGet": { + "$ref": "./examples/NspProfileGet.json" + } + } + }, + "put": { + "tags": [ + "NspProfiles" + ], + "operationId": "NspProfiles_CreateOrUpdate", + "description": "Creates or updates a network profile.", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NspProfile" + }, + "description": "Parameters that hold the NspProfile resource to be created/updated." + } + ], + "responses": { + "200": { + "description": "Update - Profile is immutable resource. Returns the existing profile resource.", + "schema": { + "$ref": "#/definitions/NspProfile" + } + }, + "201": { + "description": "Create - Returns the NspProfile resource created.", + "schema": { + "$ref": "#/definitions/NspProfile" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspProfilesPut": { + "$ref": "./examples/NspProfilePut.json" + } + } + }, + "delete": { + "tags": [ + "NspProfiles" + ], + "operationId": "NspProfiles_Delete", + "description": "Deletes an NSP profile.", + "responses": { + "200": { + "description": "Delete Succeed." + }, + "204": { + "description": "Request successful. The resource does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspProfilesDelete": { + "$ref": "./examples/NspProfileDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles": { + "get": { + "tags": [ + "NspProfiles" + ], + "operationId": "NspProfiles_List", + "description": "Lists the NSP profiles in the specified network security perimeter.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NetworkSecurityPerimeterNameParameter" + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ListTopParameter" + }, + { + "$ref": "#/parameters/ListSkipTokenParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the list of NSP profiles.", + "schema": { + "$ref": "#/definitions/NspProfileListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspProfilesList": { + "$ref": "./examples/NspProfileList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}": { + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NetworkSecurityPerimeterNameParameter" + }, + { + "$ref": "#/parameters/ProfileNameParameter" + }, + { + "$ref": "#/parameters/AccessRuleNameParameter" + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + } + ], + "get": { + "tags": [ + "NspAccessRules" + ], + "operationId": "NspAccessRules_Get", + "description": "Gets the specified NSP access rule by name.", + "responses": { + "200": { + "description": "OK - Returns information about the NSP access rule.", + "schema": { + "$ref": "#/definitions/NspAccessRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspAccessRuleGet": { + "$ref": "./examples/NspAccessRuleGet.json" + } + } + }, + "put": { + "tags": [ + "NspAccessRules" + ], + "operationId": "NspAccessRules_CreateOrUpdate", + "description": "Creates or updates a network access rule.", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NspAccessRule" + }, + "description": "Parameters that hold the NspAccessRule resource to be created/updated." + } + ], + "responses": { + "200": { + "description": "Updated - Existing access rule is updated. Returns the resource.", + "schema": { + "$ref": "#/definitions/NspAccessRule" + } + }, + "201": { + "description": "Create - Returns the NspAccessRule resource created.", + "schema": { + "$ref": "#/definitions/NspAccessRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspAccessRulePut": { + "$ref": "./examples/NspAccessRulePut.json" + } + } + }, + "delete": { + "tags": [ + "NspAccessRules" + ], + "operationId": "NspAccessRules_Delete", + "description": "Deletes an NSP access rule.", + "responses": { + "200": { + "description": "Delete Succeed." + }, + "204": { + "description": "Request successful. The resource does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspAccessRulesDelete": { + "$ref": "./examples/NspAccessRuleDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules": { + "get": { + "tags": [ + "NspAccessRules" + ], + "operationId": "NspAccessRules_List", + "description": "Lists the NSP access rules in the specified NSP profile.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NetworkSecurityPerimeterNameParameter" + }, + { + "$ref": "#/parameters/ProfileNameParameter" + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ListTopParameter" + }, + { + "$ref": "#/parameters/ListSkipTokenParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the list of NSP access rules.", + "schema": { + "$ref": "#/definitions/NspAccessRuleListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspAccessRulesList": { + "$ref": "./examples/NspAccessRuleList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName}": { + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NetworkSecurityPerimeterNameParameter" + }, + { + "$ref": "#/parameters/AssociationNameParameter" + } + ], + "get": { + "tags": [ + "NspAssociations" + ], + "operationId": "NspAssociations_Get", + "description": "Gets the specified NSP association by name.", + "responses": { + "200": { + "description": "OK - Returns information about the NSP resource association.", + "schema": { + "$ref": "#/definitions/NspAssociation" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspAssociationGet": { + "$ref": "./examples/NspAssociationGet.json" + } + } + }, + "put": { + "tags": [ + "NspAssociations" + ], + "operationId": "NspAssociations_CreateOrUpdate", + "description": "Creates or updates a NSP resource association.", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NspAssociation" + }, + "description": "Parameters that hold the NspAssociation resource to be created/updated." + } + ], + "responses": { + "200": { + "description": "Updated - Existing resource association is updated. Returns the resource.", + "schema": { + "$ref": "#/definitions/NspAssociation" + } + }, + "201": { + "description": "Create - Returns the NspAssociation resource created.", + "schema": { + "$ref": "#/definitions/NspAssociation" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspAssociationPut": { + "$ref": "./examples/NspAssociationPut.json" + } + } + }, + "delete": { + "tags": [ + "NspAssociations" + ], + "operationId": "NspAssociations_Delete", + "description": "Deletes an NSP association resource.", + "responses": { + "200": { + "description": "Delete Succeed." + }, + "204": { + "description": "Request successful. The resource does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspAssociationDelete": { + "$ref": "./examples/NspAssociationDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations": { + "get": { + "tags": [ + "NspAssociations" + ], + "operationId": "NspAssociations_List", + "description": "Lists the NSP resource associations in the specified perimeter.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NetworkSecurityPerimeterNameParameter" + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ListTopParameter" + }, + { + "$ref": "#/parameters/ListSkipTokenParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the list of NSP resource associations.", + "schema": { + "$ref": "#/definitions/NspAssociationsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "NspAssociationList": { + "$ref": "./examples/NspAssociationList.json" + } + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes": { "get": { - "operationId": "PerimeterAssociableResourceTypes_Get", + "operationId": "PerimeterAssociableResourceTypes_List", "description": "Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "parameters": [ { "$ref": "./network.json#/parameters/SubscriptionIdParameter" @@ -351,6 +852,261 @@ }, "description": "Properties of network security perimeter." }, + "NspProfile": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/NspProfileProperties", + "description": "Properties of the network security perimeter profile" + }, + "name": { + "type": "string", + "description": "The name of the profile resource that is unique within a perimeter. This name can be used to access the resource." + }, + "id": { + "readOnly": true, + "type": "string", + "description": "Identifier of the network security perimeter profile in ARM id format." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + } + }, + "allOf": [ + { + "$ref": "./network.json#/definitions/Resource" + } + ], + "description": "The network security perimeter profile resource" + }, + "NspProfileListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/NspProfile" + }, + "description": "Gets a page of NSP profile" + }, + "nextLink": { + "type": "string", + "description": "Gets the URL to get the next page of results." + } + }, + "description": "Result of the request to list NSP profiles. Contains a list of NSP profiles and a URL link to get the next set of results." + }, + "NspProfileProperties": { + "type": "object", + "properties": { + "accessRulesVersion": { + "readOnly": true, + "type": "string", + "description": "Version number that increases with every update to access rules within the profile." + } + }, + "description": "Properties of NSP profile." + }, + "NspAccessRule": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/NspAccessRuleProperties", + "description": "Properties of the NSP access rule." + }, + "name": { + "type": "string", + "description": "The name of the access rule that is unique within a profile. This name can be used to access the resource." + }, + "id": { + "readOnly": true, + "type": "string", + "description": "NSP access rule identifier." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + } + }, + "allOf": [ + { + "$ref": "./network.json#/definitions/Resource" + } + ], + "description": "The NSP access rule resource" + }, + "NspAccessRuleListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/NspAccessRule" + }, + "description": "Gets a page of NSP access rule" + }, + "nextLink": { + "type": "string", + "description": "Gets the URL to get the next page of results." + } + }, + "description": "Result of the request to list NSP access rules. Contains a list of NSP access rules and a URL link to get the next set of results." + }, + "NspAccessRuleProperties": { + "type": "object", + "properties": { + "provisioningState": { + "readOnly": true, + "$ref": "./network.json#/definitions/ProvisioningState", + "description": "The provisioning state of the scope assignment resource." + }, + "direction": { + "type": "string", + "enum": [ + "Inbound", + "Outbound" + ], + "x-ms-enum": { + "name": "AccessRuleDirection", + "modelAsString": true + }, + "description": "Direction that specifies whether the access rules is inbound/outbound." + }, + "addressPrefixes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Inbound address prefixes (IPv4/IPv6)" + }, + "fullyQualifiedDomainNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Outbound rules fully qualified domain name format." + }, + "subscriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Subscription id in the ARM id format." + }, + "networkSecurityPerimeters": { + "type": "array", + "items": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PerimeterBasedAccessRule" + }, + "description": "Inbound rule specified by the perimeter id." + } + }, + "description": "Properties of NSP access rule." + }, + "PerimeterBasedAccessRule": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "NSP id in the ARM id format." + }, + "perimeterGuid": { + "readOnly": true, + "type": "string", + "description": "Resource guid of the NSP supplied." + }, + "location": { + "readOnly": true, + "type": "string", + "description": "Location of the NSP supplied." + } + } + }, + "NspAssociation": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/NspAssociationProperties", + "description": "Properties of the NSP resource association." + }, + "name": { + "type": "string", + "description": "The name of the resource that is unique within a resource group. This name can be used to access the resource." + }, + "id": { + "readOnly": true, + "type": "string", + "description": "NSP resource association identifier." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + } + }, + "allOf": [ + { + "$ref": "./network.json#/definitions/Resource" + } + ], + "description": "The NSP resource association resource" + }, + "NspAssociationsListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/NspAssociation" + }, + "description": "Gets a page of NSP resource associations" + }, + "nextLink": { + "type": "string", + "description": "Gets the URL to get the next page of results." + } + }, + "description": "Result of the request to list NSP resource associations. Contains a list of NSP resource associations and a URL link to get the next set of results." + }, + "NspAssociationProperties": { + "type": "object", + "properties": { + "provisioningState": { + "readOnly": true, + "$ref": "./network.json#/definitions/ProvisioningState", + "description": "The provisioning state of the resource association resource." + }, + "privateLinkResource": { + "$ref": "./network.json#/definitions/SubResource", + "description": "The PaaS resource to be associated." + }, + "profile": { + "$ref": "./network.json#/definitions/SubResource", + "description": "Profile id to which the PaaS resource is associated." + }, + "accessMode": { + "type": "string", + "enum": [ + "Unspecified", + "EnforceMode", + "LearningMode", + "DryRunMode" + ], + "x-ms-enum": { + "name": "AssociationAccessMode", + "modelAsString": true + }, + "description": "Access mode on the association." + } + } + }, "PerimeterAssociableResource": { "type": "object", "properties": { @@ -440,6 +1196,30 @@ "description": "The name of the network security perimeter.", "x-ms-parameter-location": "method" }, + "ProfileNameParameter": { + "name": "profileName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the NSP profile.", + "x-ms-parameter-location": "method" + }, + "AccessRuleNameParameter": { + "name": "accessRuleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the NSP access rule.", + "x-ms-parameter-location": "method" + }, + "AssociationNameParameter": { + "name": "associationName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the NSP association.", + "x-ms-parameter-location": "method" + }, "ListTopParameter": { "name": "$top", "description": "An optional query parameter which specifies the maximum number of records to be returned by the server.", diff --git a/specification/network/resource-manager/readme.go.md b/specification/network/resource-manager/readme.go.md index d58ec6154cd8..aef1b12a06ed 100644 --- a/specification/network/resource-manager/readme.go.md +++ b/specification/network/resource-manager/readme.go.md @@ -23,6 +23,7 @@ azure-arm: true batch: - tag: package-2021-05 - tag: package-2021-03 + - tag: package-2021-02-preview - tag: package-2021-03-preview - tag: package-2021-02 - tag: package-2020-11 @@ -81,6 +82,15 @@ Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2021-02-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2021-02-01-preview/$(namespace) +``` + ### Tag: package-2021-02 and go These settings apply only when `--tag=package-2021-02 --go` is specified on the command line.