Create Network Resource

Creates or updates a network resource.

Creates a network resource with the specified name and description. If a network with the same name already exists, then its description is updated to the one indicated in this request.

Use network resources to create private network and configure public connectivity for services within your application.

Request

Method Request URI
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkName}?api-version=2018-07-01-preview

Parameters

Name Type Required Location
subscriptionId string Yes Path
resourceGroupName string Yes Path
networkName string Yes Path
api-version string Yes Query
networkResourceDescription NetworkResourceDescription Yes Body

subscriptionId

Type: string
Required: Yes

The customer subscription identifier


resourceGroupName

Type: string
Required: Yes

Azure resource group name


networkName

Type: string
Required: Yes

The identity of the network.


api-version

Type: string
Required: Yes
Default: 2018-07-01-preview

The version of the API. This parameter is required and its value must be 2018-07-01-preview.


networkResourceDescription

Type: NetworkResourceDescription
Required: Yes

Description for creating a network resource.

Responses

HTTP Status Code Description Response Schema
200 (OK) Ok
NetworkResourceDescription
201 (Created) Created
NetworkResourceDescription
All other status codes Error
ErrorModel

Examples

Network_Create

This example shows how to create a network resource with custom address range and a load balanced public endpoint.

Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/helloWorldNetworkWindows?api-version=2018-07-01-preview
Body
{
  "properties": {
    "addressPrefix": "10.0.0.4/22",
    "ingressConfig": {
      "layer4": [
        {
          "publicPort": "80",
          "applicationName": "helloWorldAppWindows",
          "serviceName": "helloWorldService",
          "endpointName": "helloWorldListener"
        }
      ]
    }
  },
  "location": "eastus"
}

200 Response

Body
{
  "type": "Microsoft.ServiceFabricMesh/networks",
  "location": "eastus",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/helloWorldNetworkWindows",
  "name": "helloWorldNetworkWindows",
  "tags": {},
  "properties": {
    "provisioningState": "Succeeded",
    "addressPrefix": "10.0.0.4/22",
    "ingressConfig": {
      "qosLevel": "Bronze",
      "layer4": [
        {
          "publicPort": "80",
          "applicationName": "helloWorldAppWindows",
          "serviceName": "helloWorldService",
          "endpointName": "helloWorldListener"
        }
      ]
    }
  }
}

201 Response

Body
{
  "type": "Microsoft.ServiceFabricMesh/networks",
  "location": "eastus",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/helloWorldNetworkWindows",
  "name": "helloWorldNetworkWindows",
  "tags": {},
  "properties": {
    "provisioningState": "Updating",
    "addressPrefix": "10.0.0.4/22",
    "ingressConfig": {
      "qosLevel": "Bronze",
      "layer4": [
        {
          "publicPort": "80",
          "applicationName": "helloWorldAppWindows",
          "serviceName": "helloWorldService",
          "endpointName": "helloWorldListener"
        }
      ]
    }
  }
}