{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "The Microsoft Azure Network management API provides a RESTful set of web services that interact with Microsoft Azure Networks service to manage your network resources. The API has entities that capture the relationship between an end user and the Microsoft Azure Networks service.",
    "title": "NetworkManagementClient",
    "version": "2015-06-15",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/network/resource-manager/Microsoft.Network/stable/2015-06-15/virtualNetwork.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "network-virtualNetwork",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json",
    "text/json"
  ],
  "produces": [
    "application/json",
    "text/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "Client API version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "SubscriptionIdParameter": {
      "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualnetworks": {
      "get": {
        "description": "Gets all virtual networks in a subscription.",
        "operationId": "VirtualNetworks_ListAll",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Request successful. The operation returns a list of VirtualNetwork resources.",
            "schema": {
              "$ref": "#/definitions/VirtualNetworkListResult"
            }
          }
        },
        "tags": [
          "VirtualNetworks"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}": {
      "delete": {
        "description": "Deletes the specified virtual network.",
        "operationId": "VirtualNetworks_Delete",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the virtual network.",
            "in": "path",
            "name": "virtualNetworkName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete successful."
          },
          "202": {
            "description": "Accepted and the operation will complete asynchronously."
          },
          "204": {
            "description": "Delete successful."
          }
        },
        "tags": [
          "VirtualNetworks"
        ],
        "x-ms-long-running-operation": true
      },
      "get": {
        "description": "Gets the specified virtual network by resource group.",
        "operationId": "VirtualNetworks_Get",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the virtual network.",
            "in": "path",
            "name": "virtualNetworkName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "Expands referenced resources.",
            "in": "query",
            "name": "$expand",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Request successful. The operation returns the resulting VirtualNetwork resource.",
            "schema": {
              "$ref": "#/definitions/VirtualNetwork"
            }
          }
        },
        "tags": [
          "VirtualNetworks"
        ]
      },
      "put": {
        "description": "Creates or updates a virtual network in the specified resource group.",
        "operationId": "VirtualNetworks_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the virtual network.",
            "in": "path",
            "name": "virtualNetworkName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Parameters supplied to the create or update virtual network operation",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/VirtualNetwork"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Update successful. The operation returns the resulting VirtualNetwork resource.",
            "schema": {
              "$ref": "#/definitions/VirtualNetwork"
            }
          },
          "201": {
            "description": "Create successful. The operation returns the resulting VirtualNetwork resource.",
            "schema": {
              "$ref": "#/definitions/VirtualNetwork"
            }
          }
        },
        "tags": [
          "VirtualNetworks"
        ],
        "x-ms-long-running-operation": true
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworks": {
      "get": {
        "description": "Gets all virtual networks in a resource group.",
        "operationId": "VirtualNetworks_List",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Request successful. The operation returns a list of VirtualNetwork resources.",
            "schema": {
              "$ref": "#/definitions/VirtualNetworkListResult"
            }
          }
        },
        "tags": [
          "VirtualNetworks"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworks/{virtualNetworkName}/subnets": {
      "get": {
        "description": "Gets all subnets in a virtual network.",
        "operationId": "Subnets_List",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the virtual network.",
            "in": "path",
            "name": "virtualNetworkName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Request successful. The operation returns a list of Subnet resources.",
            "schema": {
              "$ref": "#/definitions/SubnetListResult"
            }
          }
        },
        "tags": [
          "Subnets"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworks/{virtualNetworkName}/subnets/{subnetName}": {
      "delete": {
        "description": "Deletes the specified subnet.",
        "operationId": "Subnets_Delete",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the virtual network.",
            "in": "path",
            "name": "virtualNetworkName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the subnet.",
            "in": "path",
            "name": "subnetName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete successful."
          },
          "202": {
            "description": "Accepted and the operation will complete asynchronously."
          },
          "204": {
            "description": "Request successful. Resource does not exist."
          }
        },
        "tags": [
          "Subnets"
        ],
        "x-ms-long-running-operation": true
      },
      "get": {
        "description": "Gets the specified subnet by virtual network and resource group.",
        "operationId": "Subnets_Get",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the virtual network.",
            "in": "path",
            "name": "virtualNetworkName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the subnet.",
            "in": "path",
            "name": "subnetName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "Expands referenced resources.",
            "in": "query",
            "name": "$expand",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Request successful. The operation returns the resulting Subnet resource.",
            "schema": {
              "$ref": "#/definitions/Subnet"
            }
          }
        },
        "tags": [
          "Subnets"
        ]
      },
      "put": {
        "description": "Creates or updates a subnet in the specified virtual network.",
        "operationId": "Subnets_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the virtual network.",
            "in": "path",
            "name": "virtualNetworkName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the subnet.",
            "in": "path",
            "name": "subnetName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Parameters supplied to the create or update subnet operation.",
            "in": "body",
            "name": "subnetParameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Subnet"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Update successful. The operation returns the resulting Subnet resource.",
            "schema": {
              "$ref": "#/definitions/Subnet"
            }
          },
          "201": {
            "description": "Create successful. The operation returns the resulting Subnet resource.",
            "schema": {
              "$ref": "#/definitions/Subnet"
            }
          }
        },
        "tags": [
          "Subnets"
        ],
        "x-ms-long-running-operation": true
      }
    }
  },
  "definitions": {
    "AddressSpace": {
      "description": "AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network.",
      "properties": {
        "addressPrefixes": {
          "description": "A list of address blocks reserved for this virtual network in CIDR notation.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      }
    },
    "DhcpOptions": {
      "description": "DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options.",
      "properties": {
        "dnsServers": {
          "description": "The list of DNS servers IP addresses.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      }
    },
    "Subnet": {
      "allOf": [
        {
          "description": "Azure resource manager sub resource properties.",
          "properties": {
            "id": {
              "description": "Resource Identifier.",
              "type": "string"
            }
          },
          "x-ms-azure-resource": true
        }
      ],
      "description": "Subnet in a virtual network resource.",
      "properties": {
        "etag": {
          "description": "A unique read-only string that changes whenever the resource is updated.",
          "type": "string"
        },
        "name": {
          "description": "The name of the resource that is unique within a resource group. This name can be used to access the resource.",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/SubnetPropertiesFormat",
          "x-ms-client-flatten": true
        }
      }
    },
    "SubnetListResult": {
      "description": "Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network",
      "properties": {
        "nextLink": {
          "description": "The URL to get the next set of results.",
          "type": "string"
        },
        "value": {
          "description": "The subnets in a virtual network.",
          "items": {
            "$ref": "#/definitions/Subnet"
          },
          "type": "array"
        }
      }
    },
    "SubnetPropertiesFormat": {
      "properties": {
        "addressPrefix": {
          "description": "The address prefix for the subnet.",
          "type": "string"
        },
        "ipConfigurations": {
          "description": "Gets an array of references to the network interface IP configurations using subnet.",
          "items": {
            "$ref": "./networkInterface.json#/definitions/IPConfiguration"
          },
          "type": "array"
        },
        "networkSecurityGroup": {
          "$ref": "./networkSecurityGroup.json#/definitions/NetworkSecurityGroup",
          "description": "The reference of the NetworkSecurityGroup resource."
        },
        "provisioningState": {
          "description": "The provisioning state of the resource.",
          "type": "string"
        },
        "routeTable": {
          "$ref": "./routeTable.json#/definitions/RouteTable",
          "description": "The reference of the RouteTable resource."
        }
      }
    },
    "VirtualNetwork": {
      "allOf": [
        {
          "description": "Azure resource manager resource properties.",
          "properties": {
            "id": {
              "description": "Resource Identifier.",
              "type": "string"
            },
            "location": {
              "description": "Resource location.",
              "type": "string"
            },
            "name": {
              "description": "Resource name.",
              "readOnly": true,
              "type": "string"
            },
            "tags": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "Resource tags.",
              "type": "object"
            },
            "type": {
              "description": "Resource type.",
              "readOnly": true,
              "type": "string"
            }
          },
          "x-ms-azure-resource": true
        }
      ],
      "description": "Virtual Network resource.",
      "properties": {
        "etag": {
          "description": "Gets a unique read-only string that changes whenever the resource is updated.",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/VirtualNetworkPropertiesFormat",
          "x-ms-client-flatten": true
        }
      }
    },
    "VirtualNetworkListResult": {
      "description": "Response for the ListVirtualNetworks API service call.",
      "properties": {
        "nextLink": {
          "description": "The URL to get the next set of results.",
          "type": "string"
        },
        "value": {
          "description": "Gets a list of VirtualNetwork resources in a resource group.",
          "items": {
            "$ref": "#/definitions/VirtualNetwork"
          },
          "type": "array"
        }
      }
    },
    "VirtualNetworkPropertiesFormat": {
      "properties": {
        "addressSpace": {
          "$ref": "#/definitions/AddressSpace",
          "description": "The AddressSpace that contains an array of IP address ranges that can be used by subnets."
        },
        "dhcpOptions": {
          "$ref": "#/definitions/DhcpOptions",
          "description": "The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network."
        },
        "provisioningState": {
          "description": "The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.",
          "type": "string"
        },
        "resourceGuid": {
          "description": "The resourceGuid property of the Virtual Network resource.",
          "type": "string"
        },
        "subnets": {
          "description": "A list of subnets in a Virtual Network.",
          "items": {
            "$ref": "#/definitions/Subnet"
          },
          "type": "array"
        }
      }
    }
  }
}