> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aviatrix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create peering HA gateway

> POST /v2/api/create_peering_ha_gateway



## OpenAPI

````yaml /openapi/8.2/aviatrix-api.json post /v2/api/create_peering_ha_gateway
openapi: 3.1.0
info:
  title: Aviatrix Controller API
  version: '8.2'
  description: >-
    Aviatrix Controller API — version 8.2. Selected operations with Mintlify
    metadata.
servers: []
security: []
tags:
  - name: policies
    x-group: Policies
  - name: authentication
    x-group: Authentication
  - name: account-management
    x-group: Account Management
  - name: rbac
    x-group: RBAC & Permissions
  - name: gateways
    x-group: Gateways
  - name: transit
    x-group: Transit
  - name: nat
    x-group: NAT
  - name: app-domains
    x-group: SmartGroups
  - name: certificates
    x-group: Certificates
  - name: mitm
    x-group: MITM
  - name: monitoring
    x-group: Monitoring & Diagnostics
  - name: fqdn
    x-group: FQDN
  - name: logging
    x-group: Logging
  - name: vpn
    x-group: UserVPN
  - name: site-to-cloud
    x-group: Site-to-Cloud
  - name: controller
    x-group: Controller
  - name: bgp
    x-group: BGP
  - name: general
    x-group: General
  - name: firenet
    x-group: FireNet
  - name: networking
    x-group: Networking
  - name: tgw
    x-group: AWS TGW
  - name: ips
    x-group: IPS
  - name: saml
    x-group: SAML
paths:
  /v2/api/create_peering_ha_gateway:
    post:
      tags:
        - gateways
      operationId: create_peering_ha_gateway
      requestBody:
        content:
          application/json:
            schema:
              properties:
                CID:
                  $ref: '#/components/schemas/CID'
                action:
                  $ref: '#/components/schemas/action'
                auto_advertise_lan_cidrs:
                  description: Enable/Disable edge gateway auto adverise lan cidrs.
                  enum:
                    - disable
                    - enable
                  type: string
                autogen_hagw_name:
                  description: Auto generate HA gateway name.
                  type: boolean
                autoscale:
                  description: Indicates it is from autoscaling module.
                  type: boolean
                availability_domain:
                  description: OCI availability domain.
                  type: string
                backup_link_config:
                  description: Backup link configuration for transit HA gateway.
                  type: string
                bgp_lan:
                  description: Create transit gateway for BGP over LAN.
                  type: boolean
                bgp_lan_specify_subnet:
                  description: Subnet for BGP over LAN interface.
                  type: string
                bgp_lan_vpc:
                  description: VPC for the BGP over LAN interface.
                  type: string
                bgp_local_as_num:
                  description: Local BGP ASN.
                  type: string
                cloud_init:
                  description: Supports cloud-init instead of ISO data.
                  type: boolean
                cloud_type:
                  description: Edge platform type.
                  type: integer
                default_mgmt_interface:
                  description: >-
                    The host interface to be used as mgmt, by default it is
                    eth2.
                  type: string
                device_id:
                  description: Device UUID of the edge device.
                  type: string
                dhcp:
                  description: Use DHCP for management interface.
                  type: boolean
                disable_active_standby:
                  description: Disables edge gateways active-standby mode.
                  type: boolean
                disable_active_standby_preemptive:
                  description: Disables edge gateways active-standby preemptive mode.
                  type: boolean
                dns_server_ip:
                  description: User provided DNS server IP.
                  type: string
                dns_server_ip_secondary:
                  description: User provided secondary DNS server IP.
                  type: string
                do_not_delete_iso:
                  description: Keep ISO file on the controller.
                  type: boolean
                dry_run:
                  description: Sanity check for GA gateway.
                  type: boolean
                eip:
                  description: Reuse a specific EIP.
                  type: string
                eip_map:
                  description: Public IP mapping for the gateway wan interfaces.
                  type: string
                enable_active_standby:
                  description: Supports edge gateways in active-standby mode.
                  type: boolean
                enable_active_standby_preemptive:
                  description: Supports edge gateways in active-standby preemptive mode.
                  type: boolean
                extended_zone:
                  description: Extended Zone.
                  type: string
                fault_domain:
                  description: OCI fault domain.
                  type: string
                group_uuid:
                  description: Gateway group uuid.
                  type: string
                guest_mgmt_interfaces:
                  description: Guest management interfaces.
                  type: string
                gw_name:
                  description: The name of the VPC.
                  type: string
                gw_registration_method:
                  description: Provide the method to register the gateway.
                  enum:
                    - cloud_init
                    - iso
                  type: string
                gw_resource_size:
                  description: >-
                    Size of gw in terms of CPU and Memory, see edge csp API for
                    choices.
                  type: string
                gw_size:
                  description: Instance size of vpc cloudx.
                  type: string
                hagw_name:
                  description: HA gateway name.
                  type: string
                hpe:
                  description: >-
                    Use high performance encryption for this Aviatrix Edge
                    gateway.
                  type: boolean
                insane_mode:
                  $ref: '#/components/schemas/StringToggle'
                  description: High performance spoke/transit gateway.
                insertion_gateway:
                  description: Insert a new subnet for the gateway.
                  type: boolean
                interface_mapping:
                  description: User specific interface mapping for the gateway.
                  type: string
                interface_mapping_type:
                  description: |-

                    pci: Map interfaces by the PCIe IDs.
                    mac: Map interfaces by the mac addresses.
                  enum:
                    - custom
                    - mac
                    - pci
                  type: string
                interfaces:
                  description: Interface configuration.
                  type: string
                is_bgp_configured:
                  description: Enable/Disable BGP on edge gateway.
                  type: boolean
                is_transit:
                  description: Creates Edge as a transit gateway.
                  type: boolean
                lan_default_gateway:
                  description: Default gateway for LAN network.
                  type: string
                lan_ifnames:
                  description: >-
                    Comma separated list LAN host interface names on the edge
                    gateway VM.
                  type: string
                lan_ip:
                  description: LAN IP to connect to on premises network.
                  type: string
                log_file:
                  description: Full path of the progress log file.
                  type: string
                logical_intf_eip_map:
                  description: Public IP mapping for the gateway wan logical interfaces.
                  type: string
                logical_wan_interface:
                  description: WAN discovery on logical wan interface.
                  type: string
                mgmt_default_gateway:
                  description: Default gateway for mgmt interface.
                  type: string
                mgmt_egress_ip:
                  description: IP cidr for controller to reach gateway.
                  type: string
                mgmt_ifnames:
                  description: >-
                    Comma separated list of Management host interface names on
                    the edge gateway VM.
                  type: string
                mgmt_ip:
                  description: Static IP for mgmt interface, in CIDR notation.
                  type: string
                mgmt_over_private_network:
                  description: >-
                    Indicate that Gateway to controller traffic is over a
                    private network.
                  type: boolean
                multicloud_gw:
                  description: Indicates it is a multi-cloud transit/spoke gateway.
                  type: boolean
                name:
                  description: Name for the Aviatrix Edge gateway instance.
                  type: string
                native_vlan:
                  description: Native vlan-id.
                  type: string
                new_zone:
                  description: |-
                    New Gateway Zone.
                    This parameter is part of the required parameter group:

                    * public_subnet
                    * new_zone
                  type: string
                no_progress_bar:
                  description: Do not show gateway creation progress bar.
                  type: boolean
                oob_mgmt_subnet:
                  description: Oob_mgmt subnet.
                  type: string
                phase2_dh:
                  description: Phase 2 PFS policy for the gateway.
                  type: string
                phase2_encryption:
                  description: Phase 2 encryption policy for the gateway.
                  type: string
                public_subnet:
                  description: |-
                    The new subnet.
                    This parameter is part of the required parameter group:

                    * public_subnet
                    * new_zone
                  type: string
                site_id:
                  description: Optional site id.
                  type: string
                storage:
                  description: Azure ARM image storage.
                  type: string
                vlan:
                  description: VLAN configuration.
                  type: string
                wan_default_gateway:
                  description: Default gateway for the WAN interface.
                  type: string
                wan_discovery_ip:
                  description: Edit wan discovery public ip.
                  type: string
                wan_ifnames:
                  description: >-
                    Comma separated list of host WAN interfacess on the edge
                    gateway VM.
                  type: string
                wan_interface:
                  description: WAN discovery interface.
                  type: string
                wan_ip:
                  description: WAN IP to connect to transit gateways.
                  type: string
              required:
                - gw_name
              type: object
        required: true
      responses:
        '200':
          $ref: '#/components/responses/general_response_v2'
        default:
          $ref: '#/components/responses/general_response_v2'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -sk -X POST
            "https://<controller>/v2/api/create_peering_ha_gateway" \
              -H "Authorization: cid <CID>"
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://<controller>/v2/api/create_peering_ha_gateway"
            headers = {"Authorization": "cid <CID>"}

            response = requests.post(url, headers=headers, verify=False)
            print(response.status_code)
            print(response.text)
        - lang: javascript
          label: JavaScript
          source: |-
            fetch("https://<controller>/v2/api/create_peering_ha_gateway", {
              method: "POST",
              headers: {"Authorization": "cid <CID>"}
            })
              .then(res => res.text())
              .then(console.log)
              .catch(console.error);
        - lang: go
          label: Go
          source: |-
            package main

            import (
              "fmt"
              "net/http"
            )

            func main() {
              req, _ := http.NewRequest("POST", "https://<controller>/v2/api/create_peering_ha_gateway", nil)
              req.Header.Set("Authorization", "cid <CID>")

              client := &http.Client{}
              resp, err := client.Do(req)
              if err != nil {
                panic(err)
              }
              defer resp.Body.Close()

              fmt.Println(resp.Status)
            }
components:
  schemas:
    CID:
      description: The opaque session ID token. Required for 7.2 controllers only.
      type: string
    action:
      description: The API action to perform. Required for 7.2 controllers only.
      type: string
    StringToggle:
      description: A boolean choice expressed as a string
      enum:
        - 'yes'
        - 'no'
      type: string
    general_response_v2:
      additionalProperties: true
      description: A generic API response container for v2 style APIs.
      properties:
        errortype:
          description: Error type if the API failed.
          type: string
        reason:
          description: Failure reason if the API failed.
          type: string
        results:
          oneOf:
            - description: API response data
              type: boolean
            - description: API response data
              type: integer
            - description: API response data
              type: string
            - description: API response data
              type: object
            - description: API response data
              items: {}
              type: array
        return:
          description: Whether the API returned successfully
          type: boolean
      title: General Response v2
      type: object
  responses:
    general_response_v2:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/general_response_v2'
      description: General v2 API response schema.

````