Skip to content

Commit

Permalink
[AzureSearch] Add more examples on IP-restriction and private endpoin…
Browse files Browse the repository at this point in the history
…t + fixes (#9381)

* update iprules and add more samples for create and update;fix incorrect sample for private endpoint

* verbose change

* typo fix

* wording fix

* fix model validation
  • Loading branch information
huangbolun authored May 7, 2020
1 parent 03482b9 commit 2d4784c
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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": []
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"properties": {
"replicaCount": 1,
"partitionCount": 1,
"networkRuleSet": {
"ipRules": []
}
"publicNetworkAccess": "disabled"
}
}
},
Expand All @@ -35,7 +33,7 @@
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "succeeded",
"publicNetworkAccess": "enabled",
"publicNetworkAccess": "disabled",
"networkRuleSet": {
"ipRules": []
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [
{
"value": "10.2.3.4"
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@
"SearchCreateOrUpdateService": {
"$ref": "./examples/SearchCreateOrUpdateService.json"
},
"SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs": {
"$ref": "./examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json"
},
"SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints": {
"$ref": "./examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json"
},
"SearchCreateOrUpdateServiceWithIdentity": {
"$ref": "./examples/SearchCreateOrUpdateServiceWithIdentity.json"
}
Expand Down Expand Up @@ -416,8 +422,8 @@
"SearchUpdateServiceToRemoveIdentity": {
"$ref": "./examples/SearchUpdateServiceToRemoveIdentity.json"
},
"searchUpdateServiceToAllowAccessFromCustomIPs": {
"$ref": "./examples/SearchUpdateServiceToAllowAccessFromCustomIPs.json"
"searchUpdateServiceToAllowAccessFromPublicCustomIPs": {
"$ref": "./examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json"
},
"searchUpdateServiceToAllowAccessFromPrivateEndpoints": {
"$ref": "./examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json"
Expand Down Expand Up @@ -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) 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"
}
Expand Down

0 comments on commit 2d4784c

Please sign in to comment.