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: 2018-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/2018-08-01/expressRouteGateway.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: network-expressRouteGateway
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/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
paths:
  "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways":
    get:
      description: Lists ExpressRoute gateways under a given subscription.
      operationId: ExpressRouteGateways_ListBySubscription
      parameters:
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Request successful.
          schema:
            $ref: "#/definitions/ExpressRouteGatewayList"
      tags:
        - ExpressRouteGateways
      x-ms-examples:
        ExpressRouteGatewayListBySubscription:
          parameters:
            api-version: 2018-08-01
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - etag: w/\00000000-0000-0000-0000-000000000000\
                    id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName
                    location: westus
                    name: expressRouteGatewayName
                    properties:
                      autoScaleConfiguration:
                        bounds:
                          min: 2
                      expressRouteConnections:
                        - id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName
                          name: connectionName
                          properties:
                            authorizationKey: f28e9c99-78d8-4248-a855-c54cf6beb99d
                            expressRouteCircuitPeering:
                              id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering
                            provisioningState: Provisioned
                            routingWeight: 1
                      provisioningState: Succeeded
                      virtualHub:
                        id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/virtualHubName
                    type: Microsoft.Network/expressRouteGateways
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways":
    get:
      description: Lists ExpressRoute gateways in a given resource group.
      operationId: ExpressRouteGateways_ListByResourceGroup
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Operation successful.
          schema:
            $ref: "#/definitions/ExpressRouteGatewayList"
      tags:
        - ExpressRouteGateways
      x-ms-examples:
        ExpressRouteGatewayListByResourceGroup:
          parameters:
            api-version: 2018-08-01
            resourceGroupName: resourceGroupName
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - etag: w/\00000000-0000-0000-0000-000000000000\
                    id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName
                    location: westus
                    name: expressRouteGatewayName
                    properties:
                      autoScaleConfiguration:
                        bounds:
                          min: 2
                      expressRouteConnections:
                        - id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName
                          name: connectionName
                          properties:
                            authorizationKey: f28e9c99-78d8-4248-a855-c54cf6beb99d
                            expressRouteCircuitPeering:
                              id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering
                            provisioningState: Provisioned
                            routingWeight: 1
                      provisioningState: Succeeded
                      virtualHub:
                        id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/virtualHubName
                    type: Microsoft.Network/expressRouteGateways
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}":
    delete:
      description: Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted when there are no connection subresources.
      operationId: ExpressRouteGateways_Delete
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the ExpressRoute gateway.
          in: path
          name: expressRouteGatewayName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Delete successful.
        "202":
          description: Accepted and the operation will complete asynchronously.
        "204":
          description: Delete successful.
      tags:
        - ExpressRouteGateways
      x-ms-examples:
        ExpressRouteGatewayDelete:
          parameters:
            api-version: 2018-08-01
            expressRouteGatewayName: expressRouteGatewayName
            resourceGroupName: resourceGroupName
            subscriptionId: subid
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Fetches the details of a ExpressRoute gateway in a resource group.
      operationId: ExpressRouteGateways_Get
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the ExpressRoute gateway.
          in: path
          name: expressRouteGatewayName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Operation succeeded. The operation returns the ExpressRoute gateway.
          schema:
            $ref: "#/definitions/ExpressRouteGateway"
      tags:
        - ExpressRouteGateways
      x-ms-examples:
        ExpressRouteGatewayGet:
          parameters:
            api-version: 2018-08-01
            expressRouteGatewayName: expressRouteGatewayName
            resourceGroupName: resourceGroupName
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: w/\00000000-0000-0000-0000-000000000000\
                id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName
                location: westus
                name: expressRouteGatewayName
                properties:
                  provisioningState: Succeeded
                  virtualHub:
                    id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/virtualHubName
                type: Microsoft.Network/expressRouteGateways
    put:
      description: Creates or updates a ExpressRoute gateway in a specified resource group.
      operationId: ExpressRouteGateways_CreateOrUpdate
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the ExpressRoute gateway.
          in: path
          name: expressRouteGatewayName
          required: true
          type: string
        - description: Parameters required in an ExpressRoute gateway PUT operation.
          in: body
          name: putExpressRouteGatewayParameters
          required: true
          schema:
            $ref: "#/definitions/ExpressRouteGateway"
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Update successful. The operation returns the resulting ExpressRoute gateway resource.
          schema:
            $ref: "#/definitions/ExpressRouteGateway"
        "201":
          description: Create successful. The operation returns the resulting ExpressRoute gateway resource.
          schema:
            $ref: "#/definitions/ExpressRouteGateway"
      tags:
        - ExpressRouteGateways
      x-ms-examples:
        ExpressRouteGatewayCreate:
          parameters:
            api-version: 2018-08-01
            expressRouteGatewayName: gateway-2
            putExpressRouteGatewayParameters:
              location: westus
              properties:
                autoScaleConfiguration:
                  bounds:
                    min: 3
                virtualHub:
                  id: /subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName
            resourceGroupName: resourceGroupName
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: w/\00000000-0000-0000-0000-000000000000\
                id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2
                location: westus
                name: gateway-2
                properties:
                  autoScaleConfiguration:
                    bounds:
                      min: 3
                  provisioningState: Succeeded
                  virtualHub:
                    id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/virtualHubName
                type: Microsoft.Network/expressRouteGateways
            "201":
              body:
                etag: w/\00000000-0000-0000-0000-000000000000\
                id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2
                location: westus
                name: gateway-2
                properties:
                  autoScaleConfiguration:
                    bounds:
                      min: 3
                  provisioningState: Succeeded
                  virtualHub:
                    id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/virtualHubName
                type: Microsoft.Network/expressRouteGateways
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections":
    get:
      description: Lists ExpressRouteConnections.
      operationId: ExpressRouteConnections_List
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the ExpressRoute gateway.
          in: path
          name: expressRouteGatewayName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Request successful.
          schema:
            $ref: "#/definitions/ExpressRouteConnectionList"
      tags:
        - ExpressRouteConnections
      x-ms-examples:
        ExpressRouteConnectionList:
          parameters:
            api-version: 2018-08-01
            expressRouteGatewayName: expressRouteGatewayName
            resourceGroupName: resourceGroupName
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName
                    name: connectionName
                    properties:
                      authorizationKey: authorizationKey
                      expressRouteCircuitPeering:
                        id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering
                      provisioningState: Provisioned
                      routingWeight: 1
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}":
    delete:
      description: Deletes a connection to a ExpressRoute circuit.
      operationId: ExpressRouteConnections_Delete
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the ExpressRoute gateway.
          in: path
          name: expressRouteGatewayName
          required: true
          type: string
        - description: The name of the connection subresource.
          in: path
          name: connectionName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Delete successful.
        "202":
          description: Accepted, and the operation will continue asynchronously.
        "204":
          description: Delete successful.
      tags:
        - ExpressRouteConnections
      x-ms-examples:
        ExpressRouteConnectionDelete:
          parameters:
            api-version: 2018-08-01
            connectionName: connectionName
            expressRouteGatewayName: expressRouteGatewayName
            resourceGroupName: resourceGroupName
            subscriptionId: subid
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets the specified ExpressRouteConnection.
      operationId: ExpressRouteConnections_Get
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the ExpressRoute gateway.
          in: path
          name: expressRouteGatewayName
          required: true
          type: string
        - description: The name of the ExpressRoute connection.
          in: path
          name: connectionName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Request successful. The operation returns the ExpressRouteConnection.
          schema:
            $ref: "#/definitions/ExpressRouteConnection"
      tags:
        - ExpressRouteConnections
      x-ms-examples:
        ExpressRouteConnectionGet:
          parameters:
            api-version: 2018-08-01
            connectionName: connectionName
            expressRouteGatewayName: expressRouteGatewayName
            resourceGroupName: resourceGroupName
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName
                name: connectionName
                properties:
                  authorizationKey: authorizationKey
                  expressRouteCircuitPeering:
                    id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering
                  provisioningState: Provisioned
                  routingWeight: 1
    put:
      description: Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit.
      operationId: ExpressRouteConnections_CreateOrUpdate
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the ExpressRoute gateway.
          in: path
          name: expressRouteGatewayName
          required: true
          type: string
        - description: The name of the connection subresource.
          in: path
          name: connectionName
          required: true
          type: string
        - description: Parameters required in an ExpressRouteConnection PUT operation.
          in: body
          name: putExpressRouteConnectionParameters
          required: true
          schema:
            $ref: "#/definitions/ExpressRouteConnection"
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Update successful. The operation returns the ExpressRouteConnection.
          schema:
            $ref: "#/definitions/ExpressRouteConnection"
        "201":
          description: Create successful. The operation returns the ExpressRouteConnection.
          schema:
            $ref: "#/definitions/ExpressRouteConnection"
      tags:
        - ExpressRouteConnections
      x-ms-examples:
        ExpressRouteConnectionCreate:
          parameters:
            api-version: 2018-08-01
            connectionName: connectionName
            expressRouteGatewayName: expressRouteGatewayName
            putExpressRouteConnectionParameters:
              id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName
              name: connectionName
              properties:
                authorizationKey: authorizationKey
                expressRouteCircuitPeering:
                  id: /subscriptions/subid2/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering
                routingWeight: 2
            resourceGroupName: resourceGroupName
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName
                name: connectionName
                properties:
                  authorizationKey: authorizationKey
                  expressRouteCircuitPeering:
                    id: /subscriptions/subid2/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering
                  provisioningState: Provisioned
                  routingWeight: 2
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName
                name: connectionName
                properties:
                  authorizationKey: authorizationKey
                  expressRouteCircuitPeering:
                    id: /subscriptions/subid2/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering
                  provisioningState: Provisioned
                  routingWeight: 2
      x-ms-long-running-operation: true
definitions:
  ExpressRouteCircuitPeeringId:
    description: ExpressRoute circuit peering identifier.
    properties:
      id:
        description: The ID of the ExpressRoute circuit peering.
        type: string
  ExpressRouteConnection:
    allOf:
      - description: Reference to another subresource.
        properties:
          id:
            description: Resource ID.
            type: string
        x-ms-azure-resource: true
    description: ExpressRouteConnection resource.
    properties:
      name:
        description: The name of the resource.
        type: string
      properties:
        $ref: "#/definitions/ExpressRouteConnectionProperties"
        x-ms-client-flatten: true
    required:
      - name
  ExpressRouteConnectionId:
    description: The ID of the ExpressRouteConnection.
    properties:
      id:
        description: The ID of the ExpressRouteConnection.
        readOnly: true
        type: string
  ExpressRouteConnectionList:
    description: ExpressRouteConnection list
    properties:
      value:
        description: The list of ExpressRoute connections
        items:
          $ref: "#/definitions/ExpressRouteConnection"
        type: array
  ExpressRouteConnectionProperties:
    description: Properties of the ExpressRouteConnection subresource.
    properties:
      authorizationKey:
        description: Authorization key to establish the connection.
        type: string
      expressRouteCircuitPeering:
        $ref: "#/definitions/ExpressRouteCircuitPeeringId"
        description: The ExpressRoute circuit peering.
      provisioningState:
        description: The provisioning state of the resource.
        enum:
          - Succeeded
          - Updating
          - Deleting
          - Failed
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: ProvisioningState
      routingWeight:
        description: The routing weight associated to the connection.
        type: integer
    required:
      - expressRouteCircuitPeering
  ExpressRouteGateway:
    allOf:
      - description: Common resource representation.
        properties:
          id:
            description: Resource ID.
            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: ExpressRoute gateway resource.
    properties:
      etag:
        description: A unique read-only string that changes whenever the resource is updated.
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/ExpressRouteGatewayProperties"
        x-ms-client-flatten: true
  ExpressRouteGatewayList:
    description: List of ExpressRoute gateways.
    properties:
      value:
        description: List of ExpressRoute gateways.
        items:
          $ref: "#/definitions/ExpressRouteGateway"
        type: array
  ExpressRouteGatewayProperties:
    description: ExpressRoute gateway resource properties.
    properties:
      autoScaleConfiguration:
        description: Configuration for auto scaling.
        properties:
          bounds:
            description: Minimum and maximum number of scale units to deploy.
            properties:
              max:
                description: Maximum number of scale units deployed for ExpressRoute gateway.
                type: integer
              min:
                description: Minimum number of scale units deployed for ExpressRoute gateway.
                type: integer
      expressRouteConnections:
        description: List of ExpressRoute connections to the ExpressRoute gateway.
        items:
          $ref: "#/definitions/ExpressRouteConnection"
        readOnly: true
        type: array
      provisioningState:
        description: The provisioning state of the resource.
        enum:
          - Succeeded
          - Updating
          - Deleting
          - Failed
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: ProvisioningState
      virtualHub:
        $ref: "#/definitions/VirtualHubId"
        description: The Virtual Hub where the ExpressRoute gateway is or will be deployed.
    required:
      - virtualHub
  VirtualHubId:
    description: Virtual Hub identifier.
    properties:
      id:
        description: The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription.
        type: string
