Azure Networking Load Balancers API

Operations for creating, updating, deleting, and listing Azure Load Balancer resources.

OpenAPI Specification

microsoft-azure-networking-load-balancers-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Azure Networking Azure Load Balancer Backend Address Pools Load Balancers API
  description: Distribute traffic across multiple virtual machines and services with Azure Load Balancer. This API provides operations for creating, configuring, and managing load balancers including frontend IP configurations, backend address pools, health probes, load balancing rules, inbound NAT rules, and outbound rules.
  version: '2024-05-01'
  contact:
    name: Microsoft Azure Support
    url: https://azure.microsoft.com/en-us/support/
  license:
    name: Microsoft API License
    url: https://learn.microsoft.com/en-us/legal/microsoft-apis/terms-of-use
servers:
- url: https://management.azure.com
  description: Azure Resource Manager
security:
- OAuth2Auth: []
tags:
- name: Load Balancers
  description: Operations for creating, updating, deleting, and listing Azure Load Balancer resources.
paths:
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers:
    get:
      operationId: LoadBalancers_List
      summary: Azure Networking List load balancers
      description: Gets all the load balancers in a resource group. Returns a paginated list of load balancer resources with their configurations.
      tags:
      - Load Balancers
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully retrieved the list of load balancers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadBalancerListResult'
        '401':
          description: Unauthorized. Authentication credentials are missing or invalid.
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}
  : get:
      operationId: LoadBalancers_Get
      summary: Azure Networking Get load balancer
      description: Gets the specified load balancer. Returns the full resource representation including frontend IP configurations, backend pools, probes, and rules.
      tags:
      - Load Balancers
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/LoadBalancerNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully retrieved the load balancer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadBalancer'
        '401':
          description: Unauthorized. Authentication credentials are missing or invalid.
        '404':
          description: Load balancer not found.
    put:
      operationId: LoadBalancers_CreateOrUpdate
      summary: Azure Networking Create or update load balancer
      description: Creates or updates a load balancer. The request body must include the location and at least a frontend IP configuration to create a functional load balancer.
      tags:
      - Load Balancers
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/LoadBalancerNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoadBalancer'
      responses:
        '200':
          description: Successfully updated the load balancer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadBalancer'
        '201':
          description: Successfully created the load balancer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadBalancer'
        '400':
          description: Bad request. The request body is invalid.
        '401':
          description: Unauthorized. Authentication credentials are missing or invalid.
    delete:
      operationId: LoadBalancers_Delete
      summary: Azure Networking Delete load balancer
      description: Deletes the specified load balancer. This is an asynchronous operation that returns a 202 Accepted while in progress.
      tags:
      - Load Balancers
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/LoadBalancerNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully deleted the load balancer.
        '202':
          description: Accepted. The delete operation is in progress.
        '204':
          description: No content. The load balancer does not exist.
        '401':
          description: Unauthorized. Authentication credentials are missing or invalid.
  /subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers:
    get:
      operationId: LoadBalancers_ListAll
      summary: Azure Networking List all load balancers
      description: Gets all the load balancers in a subscription across all resource groups.
      tags:
      - Load Balancers
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully retrieved all load balancers in the subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadBalancerListResult'
        '401':
          description: Unauthorized. Authentication credentials are missing or invalid.
components:
  schemas:
    FrontendIPConfiguration:
      type: object
      description: Frontend IP address of the load balancer.
      properties:
        id:
          type: string
          description: Resource ID.
        name:
          type: string
          description: The name of the resource.
        properties:
          type: object
          properties:
            privateIPAddress:
              type: string
              description: The private IP address of the IP configuration.
            privateIPAllocationMethod:
              type: string
              enum:
              - Static
              - Dynamic
              description: The private IP address allocation method.
            publicIPAddress:
              type: object
              properties:
                id:
                  type: string
                  description: Resource ID.
              description: The reference to the public IP resource.
            subnet:
              type: object
              properties:
                id:
                  type: string
                  description: Resource ID.
              description: The reference to the subnet resource.
    BackendAddressPool:
      type: object
      description: Pool of backend IP addresses.
      properties:
        id:
          type: string
          description: Resource ID.
        name:
          type: string
          description: The name of the resource.
        properties:
          type: object
          properties:
            loadBalancerBackendAddresses:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Name of the backend address.
                  properties:
                    type: object
                    properties:
                      virtualNetwork:
                        type: object
                        properties:
                          id:
                            type: string
                        description: Reference to an existing virtual network.
                      ipAddress:
                        type: string
                        description: IP address belonging to the referenced virtual network.
              description: An array of backend addresses.
            provisioningState:
              type: string
              readOnly: true
              description: The provisioning state of the backend address pool resource.
    LoadBalancingRule:
      type: object
      description: A load balancing rule for a load balancer.
      properties:
        id:
          type: string
          description: Resource ID.
        name:
          type: string
          description: The name of the resource.
        properties:
          type: object
          properties:
            frontendIPConfiguration:
              type: object
              properties:
                id:
                  type: string
              description: A reference to frontend IP addresses.
            backendAddressPool:
              type: object
              properties:
                id:
                  type: string
              description: A reference to a pool of DIPs.
            probe:
              type: object
              properties:
                id:
                  type: string
              description: The reference to the load balancer probe.
            protocol:
              type: string
              enum:
              - Udp
              - Tcp
              - All
              description: The reference to the transport protocol.
            frontendPort:
              type: integer
              description: The port for the external endpoint.
            backendPort:
              type: integer
              description: The port used for internal connections on the endpoint.
            idleTimeoutInMinutes:
              type: integer
              description: The timeout for the TCP idle connection.
            enableFloatingIP:
              type: boolean
              description: Configures a virtual machine endpoint for the floating IP capability.
            loadDistribution:
              type: string
              enum:
              - Default
              - SourceIP
              - SourceIPProtocol
              description: The load distribution policy for this rule.
    LoadBalancerListResult:
      type: object
      description: Response for ListLoadBalancers API service call.
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/LoadBalancer'
          description: A list of load balancers in a resource group.
        nextLink:
          type: string
          readOnly: true
          description: The URL to get the next set of results.
    LoadBalancer:
      type: object
      description: A load balancer resource.
      properties:
        id:
          type: string
          readOnly: true
          description: Resource ID.
        name:
          type: string
          readOnly: true
          description: Resource name.
        type:
          type: string
          readOnly: true
          description: Resource type.
        location:
          type: string
          description: Resource location.
        tags:
          type: object
          additionalProperties:
            type: string
          description: Resource tags.
        sku:
          type: object
          description: The load balancer SKU.
          properties:
            name:
              type: string
              description: Name of the load balancer SKU.
              enum:
              - Basic
              - Standard
              - Gateway
            tier:
              type: string
              description: Tier of the load balancer SKU.
              enum:
              - Regional
              - Global
        properties:
          type: object
          description: Properties of the load balancer.
          properties:
            frontendIPConfigurations:
              type: array
              items:
                $ref: '#/components/schemas/FrontendIPConfiguration'
              description: Object representing the frontend IPs to be used for the load balancer.
            backendAddressPools:
              type: array
              items:
                $ref: '#/components/schemas/BackendAddressPool'
              description: Collection of backend address pools used by a load balancer.
            loadBalancingRules:
              type: array
              items:
                $ref: '#/components/schemas/LoadBalancingRule'
              description: Object collection representing the load balancing rules.
            probes:
              type: array
              items:
                $ref: '#/components/schemas/Probe'
              description: Collection of probe objects used in the load balancer.
            inboundNatRules:
              type: array
              items:
                $ref: '#/components/schemas/InboundNatRule'
              description: Collection of inbound NAT rules used by a load balancer.
            outboundRules:
              type: array
              items:
                $ref: '#/components/schemas/OutboundRule'
              description: The outbound rules.
            provisioningState:
              type: string
              readOnly: true
              description: The provisioning state of the load balancer resource.
              enum:
              - Succeeded
              - Updating
              - Deleting
              - Failed
    OutboundRule:
      type: object
      description: Outbound rule of the load balancer.
      properties:
        id:
          type: string
          description: Resource ID.
        name:
          type: string
          description: The name of the resource.
        properties:
          type: object
          properties:
            allocatedOutboundPorts:
              type: integer
              description: The number of outbound ports to be used for NAT.
            frontendIPConfigurations:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
              description: The frontend IP addresses of the load balancer.
            backendAddressPool:
              type: object
              properties:
                id:
                  type: string
              description: A reference to a pool of DIPs.
            protocol:
              type: string
              enum:
              - Tcp
              - Udp
              - All
              description: The protocol for the outbound rule.
            idleTimeoutInMinutes:
              type: integer
              description: The timeout for the TCP idle connection.
    Probe:
      type: object
      description: A load balancer probe.
      properties:
        id:
          type: string
          description: Resource ID.
        name:
          type: string
          description: The name of the resource.
        properties:
          type: object
          properties:
            protocol:
              type: string
              enum:
              - Http
              - Tcp
              - Https
              description: The protocol of the endpoint.
            port:
              type: integer
              description: The port for communicating the probe.
            intervalInSeconds:
              type: integer
              description: The interval between probes in seconds.
            numberOfProbes:
              type: integer
              description: The number of probes where if no response the load balancer marks the status as down.
            requestPath:
              type: string
              description: The URI used for requesting health status from the VM.
    InboundNatRule:
      type: object
      description: Inbound NAT rule of the load balancer.
      properties:
        id:
          type: string
          description: Resource ID.
        name:
          type: string
          description: The name of the resource.
        properties:
          type: object
          properties:
            frontendIPConfiguration:
              type: object
              properties:
                id:
                  type: string
              description: A reference to frontend IP addresses.
            protocol:
              type: string
              enum:
              - Udp
              - Tcp
              - All
              description: The reference to the transport protocol.
            frontendPort:
              type: integer
              description: The port for the external endpoint.
            backendPort:
              type: integer
              description: The port used for the internal endpoint.
            idleTimeoutInMinutes:
              type: integer
              description: The timeout for the TCP idle connection.
            enableFloatingIP:
              type: boolean
              description: Configures a virtual machine endpoint for the floating IP capability.
  parameters:
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      required: true
      description: The subscription credentials which uniquely identify the Microsoft Azure subscription.
      schema:
        type: string
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      required: true
      description: The name of the resource group.
      schema:
        type: string
    LoadBalancerNameParameter:
      name: loadBalancerName
      in: path
      required: true
      description: The name of the load balancer.
      schema:
        type: string
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: Client API version.
      schema:
        type: string
        default: '2024-05-01'
  securitySchemes:
    OAuth2Auth:
      type: oauth2
      description: Azure Active Directory OAuth2 Flow
      flows:
        implicit:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
          scopes:
            user_impersonation: Access Azure Load Balancer API
externalDocs:
  description: Azure Load Balancer REST API Documentation
  url: https://learn.microsoft.com/en-us/rest/api/load-balancer/