You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/cache-private-link.md
+110Lines changed: 110 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,116 @@ To create a private endpoint, follow these steps.
203
203
> There is a `publicNetworkAccess` flag which is `Disabled` by default.
204
204
> You can set the value to `Disabled` or `Enabled`. When set to enabled, this flag allows both public and private endpoint access to the cache. When set to `Disabled`, it allows only private endpoint access. For more information on how to change the value, see the [FAQ](#how-can-i-change-my-private-endpoint-to-be-disabled-or-enabled-from-public-network-access).
205
205
>
206
+
## Create a private endpoint using Azure PowerShell
207
+
208
+
To create a private endpoint named *MyPrivateEndpoint* for an existing Azure Cache for Redis instance, run the following PowerShell script. Replace the variable values with the details for your environment:
209
+
210
+
```azurepowershell-interactive
211
+
212
+
$SubscriptionId = "<your Azure subscription ID>"
213
+
# Resource group where the Azure Cache for Redis instance and virtual network resources are located
214
+
$ResourceGroupName = "myResourceGroup"
215
+
# Name of the Azure Cache for Redis instance
216
+
$redisCacheName = "mycacheInstance"
217
+
218
+
# Name of the existing virtual network
219
+
$VNetName = "myVnet"
220
+
# Name of the target subnet in the virtual network
221
+
$SubnetName = "mySubnet"
222
+
# Name of the private endpoint to create
223
+
$PrivateEndpointName = "MyPrivateEndpoint"
224
+
# Location where the private endpoint can be created. The private endpoint should be created in the same location where your subnet or the virtual network exists
To create a private endpoint named *myPrivateEndpoint* for an existing Azure Cache for Redis instance, run the following Azure CLI script. Replace the variable values with the details for your environment:
257
+
258
+
```azurecli-interactive
259
+
# Resource group where the Azure Cache for Redis and virtual network resources are located
260
+
ResourceGroupName="myResourceGroup"
261
+
262
+
# Subscription ID where the Azure Cache for Redis and virtual network resources are located
263
+
SubscriptionId="<your Azure subscription ID>"
264
+
265
+
# Name of the existing Azure Cache for Redis instance
266
+
redisCacheName="mycacheInstance"
267
+
268
+
# Name of the virtual network to create
269
+
VNetName="myVnet"
270
+
271
+
# Name of the subnet to create
272
+
SubnetName="mySubnet"
273
+
274
+
# Name of the private endpoint to create
275
+
PrivateEndpointName="myPrivateEndpoint"
276
+
277
+
# Name of the private endpoint connection to create
0 commit comments