From 19b7e932633d4d0b4f40c0caf32850646e0f1a1f Mon Sep 17 00:00:00 2001 From: Bolun Date: Thu, 7 May 2020 13:22:56 -0700 Subject: [PATCH 1/5] update iprules and add more samples for create and update;fix incorrect sample for private endpoint --- ...viceToAllowAccessFromPrivateEndpoints.json | 81 ++++++++++++++ ...rviceToAllowAccessFromPublicCustomIPs.json | 104 ++++++++++++++++++ ...viceToAllowAccessFromPrivateEndpoints.json | 6 +- ...viceToAllowAccessFromPublicCustomIPs.json} | 6 +- .../stable/2020-03-13/search.json | 12 +- 5 files changed, 201 insertions(+), 8 deletions(-) create mode 100644 specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json create mode 100644 specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json rename specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/{SearchUpdateServiceToAllowAccessFromCustomIPs.json => SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json} (90%) diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json new file mode 100644 index 000000000000..d1ebd44ea193 --- /dev/null +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "searchServiceName": "mysearchservice", + "resourceGroupName": "rg1", + "api-version": "2020-03-13", + "subscriptionId": "subid", + "service": { + "location": "westus", + "tags": { + "app-name": "My e-commerce app" + }, + "sku": { + "name": "standard" + }, + "properties": { + "replicaCount": 3, + "partitionCount": 1, + "publicNetworkAccess": "Disabled", + "hostingMode": "default" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice", + "name": "mysearchservice", + "location": "westus", + "type": "Microsoft.Search/searchServices", + "tags": { + "app-name": "My e-commerce app" + }, + "sku": { + "name": "standard" + }, + "properties": { + "replicaCount": 3, + "partitionCount": 1, + "status": "provisioning", + "statusDetails": "", + "hostingMode": "default", + "provisioningState": "provisioning", + "publicNetworkAccess": "disabled", + "networkRuleSet": { + "ipRules": [] + }, + "privateEndpointConnections": [], + "sharedPrivateLinkResources": [] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice", + "name": "mysearchservice", + "location": "westus", + "type": "Microsoft.Search/searchServices", + "tags": { + "app-name": "My e-commerce app" + }, + "sku": { + "name": "standard" + }, + "properties": { + "replicaCount": 3, + "partitionCount": 1, + "status": "provisioning", + "statusDetails": "", + "hostingMode": "default", + "provisioningState": "provisioning", + "publicNetworkAccess": "disabled", + "networkRuleSet": { + "ipRules": [] + }, + "privateEndpointConnections": [], + "sharedPrivateLinkResources": [] + } + } + } + } +} diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json new file mode 100644 index 000000000000..04a1a93a0753 --- /dev/null +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "searchServiceName": "mysearchservice", + "resourceGroupName": "rg1", + "api-version": "2020-03-13", + "subscriptionId": "subid", + "service": { + "location": "westus", + "tags": { + "app-name": "My e-commerce app" + }, + "sku": { + "name": "standard" + }, + "properties": { + "replicaCount": 1, + "partitionCount": 1, + "networkRuleSet": { + "ipRules": [ + { + "value": "123.4.5.6" + }, + { + "value": "123.4.6.0/18" + } + ] + }, + "hostingMode": "default" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice", + "name": "mysearchservice", + "location": "westus", + "type": "Microsoft.Search/searchServices", + "tags": { + "app-name": "My e-commerce app" + }, + "sku": { + "name": "standard" + }, + "properties": { + "replicaCount": 1, + "partitionCount": 1, + "status": "provisioning", + "statusDetails": "", + "hostingMode": "default", + "provisioningState": "provisioning", + "publicNetworkAccess": "enabled", + "networkRuleSet": { + "ipRules": [ + { + "value": "123.4.5.6" + }, + { + "value": "123.4.6.0/18" + } + ] + }, + "privateEndpointConnections": [], + "sharedPrivateLinkResources": [] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice", + "name": "mysearchservice", + "location": "westus", + "type": "Microsoft.Search/searchServices", + "tags": { + "app-name": "My e-commerce app" + }, + "sku": { + "name": "standard" + }, + "properties": { + "replicaCount": 1, + "partitionCount": 1, + "status": "provisioning", + "statusDetails": "", + "hostingMode": "default", + "provisioningState": "provisioning", + "publicNetworkAccess": "enabled", + "networkRuleSet": { + "ipRules": [ + { + "value": "123.4.5.6" + }, + { + "value": "123.4.6.0/18" + } + ] + }, + "privateEndpointConnections": [], + "sharedPrivateLinkResources": [] + } + } + } + } +} diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json index 9ca6ab6cb3c4..b6aed287866f 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json @@ -8,9 +8,7 @@ "properties": { "replicaCount": 1, "partitionCount": 1, - "networkRuleSet": { - "ipRules": [] - } + "publicNetworkAccess": "Disabled" } } }, @@ -35,7 +33,7 @@ "statusDetails": "", "hostingMode": "default", "provisioningState": "succeeded", - "publicNetworkAccess": "enabled", + "publicNetworkAccess": "disabled", "networkRuleSet": { "ipRules": [] }, diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromCustomIPs.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json similarity index 90% rename from specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromCustomIPs.json rename to specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json index 82fb1e0c8d88..f77e2247a70a 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromCustomIPs.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json @@ -8,10 +8,14 @@ "properties": { "replicaCount": 3, "partitionCount": 1, + "publicNetworkAccess": "Eisabled", "networkRuleSet": { "ipRules": [ { - "value": "10.2.3.4" + "value": "123.4.5.6" + }, + { + "value": "123.4.6.0/18" } ] } diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json index e96041380541..96d150b0d36a 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json @@ -344,6 +344,12 @@ "SearchCreateOrUpdateService": { "$ref": "./examples/SearchCreateOrUpdateService.json" }, + "SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs": { + "$ref": "./examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json" + }, + "SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints": { + "$ref": "./examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json" + }, "SearchCreateOrUpdateServiceWithIdentity": { "$ref": "./examples/SearchCreateOrUpdateServiceWithIdentity.json" } @@ -416,8 +422,8 @@ "SearchUpdateServiceToRemoveIdentity": { "$ref": "./examples/SearchUpdateServiceToRemoveIdentity.json" }, - "searchUpdateServiceToAllowAccessFromCustomIPs": { - "$ref": "./examples/SearchUpdateServiceToAllowAccessFromCustomIPs.json" + "searchUpdateServiceToAllowAccessFromPublicCustomIPs": { + "$ref": "./examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json" }, "searchUpdateServiceToAllowAccessFromPrivateEndpoints": { "$ref": "./examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json" @@ -1350,7 +1356,7 @@ "properties": { "ipRules": { "type": "array", - "description": "A list of IP restriction rules that defines the inbound network access to the search service endpoint. These restriction rules are applied only when the EndpointAccess of the search service is Public.", + "description": "A list of IP restriction rules that defines the inbound network(s) allowing access to the search service endpoint. These restriction rules are applied only when the 'publicNetworkAccess' of the search service is 'enabled'; otherwise, IP rules will not take effect even if they are specified.", "items": { "$ref": "#/definitions/IpRule" } From 14a74d556c8a91533c4dd3967f8bdc34b5964a5c Mon Sep 17 00:00:00 2001 From: Bolun Date: Thu, 7 May 2020 13:28:06 -0700 Subject: [PATCH 2/5] verbose change --- .../Microsoft.Search/stable/2020-03-13/search.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json index 96d150b0d36a..82b28623c694 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json @@ -1356,7 +1356,7 @@ "properties": { "ipRules": { "type": "array", - "description": "A list of IP restriction rules that defines the inbound network(s) allowing access to the search service endpoint. These restriction rules are applied only when the 'publicNetworkAccess' of the search service is 'enabled'; otherwise, IP rules will not take effect even if they are specified.", + "description": "A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service endpoint. At the meantime, all other public IP networks are blocked by the firewall. These restriction rules are applied only when the 'publicNetworkAccess' of the search service is 'enabled'; otherwise, IP rules will not take effect even if they are specified.", "items": { "$ref": "#/definitions/IpRule" } From 6a9bd6b0d4d1e73e210bddaa6ca916422821f7f4 Mon Sep 17 00:00:00 2001 From: Bolun Date: Thu, 7 May 2020 13:31:17 -0700 Subject: [PATCH 3/5] typo fix --- .../SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json index f77e2247a70a..f38e9e17264d 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json @@ -8,7 +8,7 @@ "properties": { "replicaCount": 3, "partitionCount": 1, - "publicNetworkAccess": "Eisabled", + "publicNetworkAccess": "Enabled", "networkRuleSet": { "ipRules": [ { From 799774ba21e9a7a6c324ac4629c829bf06e98782 Mon Sep 17 00:00:00 2001 From: Bolun Date: Thu, 7 May 2020 13:37:19 -0700 Subject: [PATCH 4/5] wording fix --- .../Microsoft.Search/stable/2020-03-13/search.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json index 82b28623c694..3d29a817eecc 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/search.json @@ -1356,7 +1356,7 @@ "properties": { "ipRules": { "type": "array", - "description": "A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service endpoint. At the meantime, all other public IP networks are blocked by the firewall. These restriction rules are applied only when the 'publicNetworkAccess' of the search service is 'enabled'; otherwise, IP rules will not take effect even if they are specified.", + "description": "A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service endpoint. At the meantime, all other public IP networks are blocked by the firewall. These restriction rules are applied only when the 'publicNetworkAccess' of the search service is 'enabled'; otherwise, traffic over public interface is not allowed even with any public IP rules, and private endpoint connections would be the exclusive access method.", "items": { "$ref": "#/definitions/IpRule" } From 7b979641fd7f464632d9608bbfb6701fa3c60f1b Mon Sep 17 00:00:00 2001 From: Bolun Date: Thu, 7 May 2020 14:01:59 -0700 Subject: [PATCH 5/5] fix model validation --- ...hCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json | 2 +- .../SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json | 2 +- .../SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json index d1ebd44ea193..c0c46c253951 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json @@ -15,7 +15,7 @@ "properties": { "replicaCount": 3, "partitionCount": 1, - "publicNetworkAccess": "Disabled", + "publicNetworkAccess": "disabled", "hostingMode": "default" } } diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json index b6aed287866f..cb73c5c6854a 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json @@ -8,7 +8,7 @@ "properties": { "replicaCount": 1, "partitionCount": 1, - "publicNetworkAccess": "Disabled" + "publicNetworkAccess": "disabled" } } }, diff --git a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json index f38e9e17264d..2220cb66433a 100644 --- a/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json +++ b/specification/search/resource-manager/Microsoft.Search/stable/2020-03-13/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json @@ -8,7 +8,7 @@ "properties": { "replicaCount": 3, "partitionCount": 1, - "publicNetworkAccess": "Enabled", + "publicNetworkAccess": "enabled", "networkRuleSet": { "ipRules": [ {