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: 2017-08-01
  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/2017-08-01/usage.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: network-usage
  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/locations/{location}/usages":
    get:
      description: List network usages for a subscription.
      operationId: Usages_List
      parameters:
        - description: The location where resource usage is queried.
          in: path
          name: location
          pattern: ^[-\w\._]+$
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request successful. The operation returns a list of Usage resources.
          schema:
            $ref: "#/definitions/UsagesListResult"
      tags:
        - Usages
      x-ms-examples:
        List usages:
          parameters:
            api-version: 2017-08-01
            location: westus
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - currentValue: 8
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/VirtualNetworks
                    limit: 50
                    name:
                      localizedValue: Virtual Networks
                      value: VirtualNetworks
                    unit: Count
                  - currentValue: 3
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/StaticPublicIPAddresses
                    limit: 20
                    name:
                      localizedValue: Static Public IP Addresses
                      value: StaticPublicIPAddresses
                    unit: Count
                  - currentValue: 1
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/NetworkSecurityGroups
                    limit: 100
                    name:
                      localizedValue: Network Security Groups
                      value: NetworkSecurityGroups
                    unit: Count
                  - currentValue: 8
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/PublicIPAddresses
                    limit: 60
                    name:
                      localizedValue: Public IP Addresses
                      value: PublicIPAddresses
                    unit: Count
                  - currentValue: 2
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/NetworkInterfaces
                    limit: 350
                    name:
                      localizedValue: Network Interfaces
                      value: NetworkInterfaces
                    unit: Count
                  - currentValue: 2
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/LoadBalancers
                    limit: 100
                    name:
                      localizedValue: Load Balancers
                      value: LoadBalancers
                    unit: Count
                  - currentValue: 1
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/ApplicationGateways
                    limit: 50
                    name:
                      localizedValue: Application Gateways
                      value: ApplicationGateways
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/RouteTables
                    limit: 100
                    name:
                      localizedValue: Route Tables
                      value: RouteTables
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/RouteFilters
                    limit: 1000
                    name:
                      localizedValue: Route Filters
                      value: RouteFilters
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/NetworkWatchers
                    limit: 1
                    name:
                      localizedValue: Network Watchers
                      value: NetworkWatchers
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/PacketCaptures
                    limit: 10
                    name:
                      localizedValue: Packet Captures
                      value: PacketCaptures
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/DnsServersPerVirtualNetwork
                    limit: 9
                    name:
                      localizedValue: DNS servers per Virtual Network
                      value: DnsServersPerVirtualNetwork
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/SubnetsPerVirtualNetwork
                    limit: 1000
                    name:
                      localizedValue: Subnets per Virtual Network
                      value: SubnetsPerVirtualNetwork
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/IPConfigurationsPerVirtualNetwork
                    limit: 4096
                    name:
                      localizedValue: IP Configurations per Virtual Network
                      value: IPConfigurationsPerVirtualNetwork
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/PeeringsPerVirtualNetwork
                    limit: 10
                    name:
                      localizedValue: Peerings per Virtual Network
                      value: PeeringsPerVirtualNetwork
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/SecurityRulesPerNetworkSecurityGroup
                    limit: 200
                    name:
                      localizedValue: Security rules per Network Security Group
                      value: SecurityRulesPerNetworkSecurityGroup
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/SecurityRuleAddressesOrPortsPerNetworkSecurityGroup
                    limit: 2000
                    name:
                      localizedValue: Security rules addresses or ports per Network Security Group
                      value: SecurityRuleAddressesOrPortsPerNetworkSecurityGroup
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/InboundRulesPerLoadBalancer
                    limit: 150
                    name:
                      localizedValue: Inbound Rules per Load Balancer
                      value: InboundRulesPerLoadBalancer
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/FrontendIPConfigurationPerLoadBalancer
                    limit: 10
                    name:
                      localizedValue: Frontend IP Configurations per Load Balancer
                      value: FrontendIPConfigurationPerLoadBalancer
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/OutboundNatRulesPerLoadBalancer
                    limit: 5
                    name:
                      localizedValue: Outbound NAT Rules per Load Balancer
                      value: OutboundNatRulesPerLoadBalancer
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/RoutesPerRouteTable
                    limit: 100
                    name:
                      localizedValue: Routes per Route Table
                      value: RoutesPerRouteTable
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/SecondaryIPConfigurationsPerNetworkInterface
                    limit: 256
                    name:
                      localizedValue: Secondary IP Configurations per Network Interface
                      value: SecondaryIPConfigurationsPerNetworkInterface
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/InboundRulesPerNetworkInterface
                    limit: 500
                    name:
                      localizedValue: Inbound rules per Network Interface
                      value: InboundRulesPerNetworkInterface
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/RouteFilterRulesPerRouteFilter
                    limit: 1
                    name:
                      localizedValue: Route filter rules per Route Filter
                      value: RouteFilterRulesPerRouteFilter
                    unit: Count
                  - currentValue: 0
                    id: /subscriptions/subid/providers/Microsoft.Network/locations/westus/usages/RouteFiltersPerExpressRouteBgpPeering
                    limit: 1
                    name:
                      localizedValue: Route filters per Express route BGP Peering
                      value: RouteFiltersPerExpressRouteBgpPeering
                    unit: Count
      x-ms-pageable:
        nextLinkName: nextLink
definitions:
  Usage:
    description: Describes network resource usage.
    properties:
      currentValue:
        description: The current value of the usage.
        format: int64
        type: integer
      id:
        description: Resource identifier.
        readOnly: true
        type: string
      limit:
        description: The limit of usage.
        format: int64
        type: integer
      name:
        $ref: "#/definitions/UsageName"
        description: The name of the type of usage.
      unit:
        description: An enum describing the unit of measurement.
        enum:
          - Count
        type: string
        x-ms-enum:
          modelAsString: true
          name: UsageUnit
    required:
      - unit
      - currentValue
      - limit
      - name
  UsageName:
    description: The usage names.
    properties:
      localizedValue:
        description: A localized string describing the resource name.
        type: string
      value:
        description: A string describing the resource name.
        type: string
  UsagesListResult:
    description: The list usages operation response.
    properties:
      nextLink:
        description: URL to get the next set of results.
        type: string
      value:
        description: The list network resource usages.
        items:
          $ref: "#/definitions/Usage"
        type: array
