Skip to content

ARM PrivateLink Apis

Suwat Ch edited this page Apr 7, 2021 · 3 revisions

Overview

Please refer to this doc for more details.

Create private link (endpoint)

ARMClient.exe put "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/privateEndpoints/{name}?api-version=2019-02-01" payload.json

Payload: Auto-Approved private link to App Service (site)

{
  "location" : "{location}",
  "properties": {
    "subnet":
      {
        "id": "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}"
      },
    "privateLinkServiceConnections" : [{
        "name" : "{name}",
        "properties" : {
            "privateLinkServiceId" : "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{site}",
            "groupIds" : [ "sites" ]
        }
    }]
  }
}

Payload: Manually-Approved private link to App Service (site)

{
  "location" : "{location}",
  "properties": {
    "subnet":
      {
        "id": "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}"
      },
    "manualPrivateLinkServiceConnections" : [{
        "name" : "{name}",
        "properties" : {
            "privateLinkServiceId" : "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{site}",
            "groupIds" : [ "sites" ]
        }
    }]
  }
}

Payload: Auto-Approved private link to App Service Environments

{
  "location" : "{location}",
  "properties": {
    "subnet":
      {
        "id": "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}"
      },
    "manualPrivateLinkServiceConnections" : [{
        "name" : "{name}",
        "properties" : {
            "privateLinkServiceId" : "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/hostingEnvironments/{ase}",
            "groupIds" : [ "hostingEnvironments" ]
        }
    }]
  }
}

Payload: Manually-Approved private link to App Service Environment

{
  "location" : "{location}",
  "properties": {
    "subnet":
      {
        "id": "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}"
      },
    "manualPrivateLinkServiceConnections" : [{
        "name" : "{name}",
        "properties" : {
            "privateLinkServiceId" : "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/hostingEnvironments/{ase}",
            "groupIds" : [ "hostingEnvironments" ]
        }
    }]
  }
}

Payload: Auto-Approved private link to Static Web App

{
  "location" : "{location}",
  "properties": {
    "subnet":
      {
        "id": "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}"
      },
    "privateLinkServiceConnections" : [{
        "name" : "{name}",
        "properties" : {
            "privateLinkServiceId" : "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/staticSites/{staticWebAppName}",
            "groupIds" : [ "staticSites" ]
        }
    }]
  }
}

Payload: Manually-Approved private link to Static Web App

{
  "location" : "{location}",
  "properties": {
    "subnet":
      {
        "id": "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}"
      },
    "manualPrivateLinkServiceConnections" : [{
        "name" : "{name}",
        "properties" : {
            "privateLinkServiceId" : "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/staticSites/{staticWebAppName}",
            "groupIds" : [ "staticSites" ]
        }
    }]
  }
}

Payload: Auto-Approved private link to App Service Slot

{
  "location" : "{location}",
  "properties": {
    "subnet":
      {
        "id": "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}"
      },
    "privateLinkServiceConnections" : [{
        "name" : "{name}",
        "properties" : {
            "privateLinkServiceId" : "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{site}",
            "groupIds" : [ "sites-{slot}" ]
        }
    }]
  }
}

Payload: Manully-Approved private link to App Service Slot

{
  "location" : "{location}",
  "properties": {
    "subnet":
      {
        "id": "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}"
      },
    "manualPrivateLinkServiceConnections" : [{
        "name" : "{name}",
        "properties" : {
            "privateLinkServiceId" : "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{site}",
            "groupIds" : [ "sites-{slot}" ]
        }
    }]
  }
}
Clone this wiki locally