From ac29d9593a89c29ff578626cf272f5f659379b96 Mon Sep 17 00:00:00 2001 From: "Ajit Navasare (MINDTREE LIMITED)" Date: Mon, 11 Mar 2019 11:52:39 -0700 Subject: [PATCH 1/5] Added NetwruleSet to 2017 version --- .../SBNetworkRuleSetCreate.json | 103 ++++++++++ .../SBNetworkRuleSetGet.json | 56 ++++++ .../stable/2017-04-01/servicebus.json | 177 ++++++++++++++++++ 3 files changed, 336 insertions(+) create mode 100644 specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json create mode 100644 specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json new file mode 100644 index 000000000000..a9a79861250b --- /dev/null +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-6019", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "subscriptionId": "Subscription", + "parameters": { + "properties": { + "defaultAction": "Deny", + "virtualNetworkRules": [ + { + "subnet": { + "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2" + }, + "ignoreMissingVnetServiceEndpoint": true + }, + { + "subnet": { + "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3" + }, + "ignoreMissingVnetServiceEndpoint": false + }, + { + "subnet": { + "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6" + }, + "ignoreMissingVnetServiceEndpoint": false + } + ], + "ipRules": [ + { + "ipMask": "1.1.1.1", + "action": "Allow" + }, + { + "ipMask": "1.1.1.2", + "action": "Allow" + }, + { + "ipMask": "1.1.1.3", + "action": "Allow" + }, + { + "ipMask": "1.1.1.4", + "action": "Allow" + }, + { + "ipMask": "1.1.1.5", + "action": "Allow" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkruleset/default", + "name": "default", + "type": "Microsoft.ServiceBus/Namespaces/NetworkRuleSet", + "properties": { + "defaultAction": "Deny", + "virtualNetworkRules": [ + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2" }, + "ignoreMissingVnetServiceEndpoint": true + }, + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3" }, + "ignoreMissingVnetServiceEndpoint": false + }, + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6" }, + "ignoreMissingVnetServiceEndpoint": false + } + ], + "ipRules": [ + { + "ipMask": "1.1.1.1", + "action": "Allow" + }, + { + "ipMask": "1.1.1.2", + "action": "Allow" + }, + { + "ipMask": "1.1.1.3", + "action": "Allow" + }, + { + "ipMask": "1.1.1.4", + "action": "Allow" + }, + { + "ipMask": "1.1.1.5", + "action": "Allow" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json new file mode 100644 index 000000000000..e580d9e5a857 --- /dev/null +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-6019", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "subscriptionId": "Subscription" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkruleset/default", + "name": "default", + "type": "Microsoft.ServiceBus/Namespaces/NetworkRuleSet", + "properties": { + "defaultAction": "Deny", + "virtualNetworkRules": [ + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2" }, + "ignoreMissingVnetServiceEndpoint": true + }, + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3" }, + "ignoreMissingVnetServiceEndpoint": false + }, + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6" }, + "ignoreMissingVnetServiceEndpoint": false + } + ], + "ipRules": [ + { + "ipMask": "1.1.1.1", + "action": "Allow" + }, + { + "ipMask": "1.1.1.2", + "action": "Allow" + }, + { + "ipMask": "1.1.1.3", + "action": "Allow" + }, + { + "ipMask": "1.1.1.4", + "action": "Allow" + }, + { + "ipMask": "1.1.1.5", + "action": "Allow" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json index ef9433dff693..036fe49621f4 100644 --- a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json @@ -2993,6 +2993,97 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSet/default": { + "put": { + "tags": [ + "Namespaces" + ], + "x-ms-examples": { + "NameSpaceNetworkRuleSetCreate": { + "$ref": "./examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json" + } + }, + "operationId": "Namespaces_CreateOrUpdateNetworkRuleSet", + "description": "Create or update NetworkRuleSet for a Namespace.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NamespaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NetworkRuleSet" + }, + "description": "The Namespace IpFilterRule." + } + ], + "responses": { + "200": { + "description": "Namespace NetworkRuleSet successfully returned.", + "schema": { + "$ref": "#/definitions/NetworkRuleSet" + } + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Namespaces" + ], + "x-ms-examples": { + "NameSpaceNetworkRuleSetGet": { + "$ref": "./examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json" + } + }, + "operationId": "Namespaces_GetNetworkRuleSet", + "description": "Gets NetworkRuleSet for a Namespace.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NamespaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Namespace NetworkRuleSet successfully returned.", + "schema": { + "$ref": "#/definitions/NetworkRuleSet" + } + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -4408,6 +4499,92 @@ } }, "description": "The result of the List migrationConfigurations operation." + }, + "Subnet": { + "properties": { + "id": { + "type": "string", + "description": "Resource ID of Virtual Network Subnet" + } + }, + "description": "Properties supplied for Subnet" + }, + "NWRuleSetIpRules": { + "x-ms-client-flatten": true, + "properties": { + "ipMask": { + "type": "string", + "description": "IP Mask" + }, + "action": { + "type": "string", + "description": "The IP Filter Action", + "enum": [ + "Allow" + ], + "x-ms-enum": { + "name": "NetworkRuleIPAction", + "modelAsString": true + } + } + }, + "description": "The response from the List namespace operation." + }, + "NWRuleSetVirtualNetworkRules": { + "x-ms-client-flatten": true, + "properties": { + "subnet": { + "$ref": "#/definitions/Subnet", + "description": "Subnet properties" + }, + "ignoreMissingVnetServiceEndpoint": { + "type": "boolean", + "description": "Value that indicates whether to ignore missing VNet Service Endpoint" + } + }, + "description": "The response from the List namespace operation." + }, + "NetworkRuleSet": { + "properties": { + "properties": { + "description": "NetworkRuleSet properties", + "x-ms-client-flatten": true, + "properties": { + "defaultAction": { + "type": "string", + "description": "Default Action for Network Rule Set", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "DefaultAction", + "modelAsString": true + } + }, + "virtualNetworkRules": { + "type": "array", + "items": { + "$ref": "#/definitions/NWRuleSetVirtualNetworkRules" + }, + "description": "List VirtualNetwork Rules" + }, + "ipRules": { + "type": "array", + "items": { + "$ref": "#/definitions/NWRuleSetIpRules" + }, + "description": "List of IpRules" + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "Description of NetworkRuleSet resource." } }, "parameters": { From dc6cc6fe21ccb8c91819471c0380561af5910aa7 Mon Sep 17 00:00:00 2001 From: "Ajit Navasare (MINDTREE LIMITED)" Date: Mon, 11 Mar 2019 14:04:57 -0700 Subject: [PATCH 2/5] fixed indentation and aded default value to single value enum --- .../Microsoft.ServiceBus/stable/2017-04-01/servicebus.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json index 036fe49621f4..24177a15b80e 100644 --- a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json @@ -2994,7 +2994,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSet/default": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSet/default": { "put": { "tags": [ "Namespaces" @@ -4500,7 +4500,7 @@ }, "description": "The result of the List migrationConfigurations operation." }, - "Subnet": { + "Subnet": { "properties": { "id": { "type": "string", @@ -4524,6 +4524,7 @@ ], "x-ms-enum": { "name": "NetworkRuleIPAction", + "default": "Allow", "modelAsString": true } } From e828e75e53a4091dc3dc4c9f27dc34b2a60446b7 Mon Sep 17 00:00:00 2001 From: "Ajit Navasare (MINDTREE LIMITED)" Date: Mon, 11 Mar 2019 14:13:37 -0700 Subject: [PATCH 3/5] fixed default for enum --- .../Microsoft.ServiceBus/stable/2017-04-01/servicebus.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json index 24177a15b80e..fd7b49c604dd 100644 --- a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json @@ -4524,9 +4524,9 @@ ], "x-ms-enum": { "name": "NetworkRuleIPAction", - "default": "Allow", "modelAsString": true - } + }, + "default": "Allow" } }, "description": "The response from the List namespace operation." From 530b1bf768af8bde3f78795429c083d446f3ec5b Mon Sep 17 00:00:00 2001 From: "Ajit Navasare (MINDTREE LIMITED)" Date: Wed, 13 Mar 2019 16:52:49 -0700 Subject: [PATCH 4/5] updated the URI to networkRuleSets as per ARM guideline --- .../NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json | 2 +- .../NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json | 2 +- .../Microsoft.ServiceBus/stable/2017-04-01/servicebus.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json index a9a79861250b..2bc46fa6cb2d 100644 --- a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json @@ -55,7 +55,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkruleset/default", + "id": "/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkrulesets/default", "name": "default", "type": "Microsoft.ServiceBus/Namespaces/NetworkRuleSet", "properties": { diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json index e580d9e5a857..a9659eeb10fc 100644 --- a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json @@ -8,7 +8,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkruleset/default", + "id": "/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkrulesets/default", "name": "default", "type": "Microsoft.ServiceBus/Namespaces/NetworkRuleSet", "properties": { diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json index fd7b49c604dd..a054c68b2c4b 100644 --- a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json @@ -2994,7 +2994,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSet/default": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default": { "put": { "tags": [ "Namespaces" From ba179ab792139616c7b8812464f6814eba64c87b Mon Sep 17 00:00:00 2001 From: "Ajit Navasare (MINDTREE LIMITED)" Date: Fri, 15 Mar 2019 11:16:51 -0700 Subject: [PATCH 5/5] updated with review comments resolve --- .../stable/2017-04-01/servicebus.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json index a054c68b2c4b..4759d4311bbc 100644 --- a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json @@ -2983,7 +2983,7 @@ } }, "default": { - "description": "Eventhub error response describing why the operation failed.", + "description": "ServiceBus error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -4507,6 +4507,9 @@ "description": "Resource ID of Virtual Network Subnet" } }, + "required": [ + "id" + ], "description": "Properties supplied for Subnet" }, "NWRuleSetIpRules": { @@ -4529,7 +4532,7 @@ "default": "Allow" } }, - "description": "The response from the List namespace operation." + "description": "Description of NetWorkRuleSet - IpRules resource." }, "NWRuleSetVirtualNetworkRules": { "x-ms-client-flatten": true, @@ -4543,7 +4546,7 @@ "description": "Value that indicates whether to ignore missing VNet Service Endpoint" } }, - "description": "The response from the List namespace operation." + "description": "Description of VirtualNetworkRules - NetworkRules resource." }, "NetworkRuleSet": { "properties": {