{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "APIs to manage Peering resources through the Azure Resource Manager.",
    "title": "PeeringManagementClient",
    "version": "2019-03-01-preview",
    "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/peering/resource-manager/Microsoft.Peering/preview/2019-03-01-preview/peering.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "peering",
    "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"
      ]
    }
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "The client API version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "SubscriptionIdParameter": {
      "description": "The Azure subscription ID.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/providers/Microsoft.Peering/operations": {
      "get": {
        "description": "Lists all of the available API operations for peering resources.",
        "operationId": "Operations_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OperationListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Operations"
        ],
        "x-ms-examples": {
          "List peering operations": {
            "parameters": {
              "api-version": "2019-03-01-preview"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "display": {
                        "description": "Registers the subscription for the Peering Resource Provider and enables the creation of peerings",
                        "operation": "Registers the Peering Resource Provider",
                        "provider": "Microsoft.Peering",
                        "resource": "Peering Resource Provider"
                      },
                      "isDataAction": false,
                      "name": "Microsoft.Peering/register/action"
                    },
                    {
                      "display": {
                        "description": "Read any peeringLocations",
                        "operation": "Read PeeringLocation",
                        "provider": "Microsoft.Peering",
                        "resource": "peeringLocations"
                      },
                      "isDataAction": false,
                      "name": "Microsoft.Peering/peeringLocations/read"
                    },
                    {
                      "display": {
                        "description": "Read any peeringPartners",
                        "operation": "Read PeeringPartner",
                        "provider": "Microsoft.Peering",
                        "resource": "peerings"
                      },
                      "isDataAction": false,
                      "name": "Microsoft.Peering/peeringPartners/read"
                    },
                    {
                      "display": {
                        "description": "Read any peerings",
                        "operation": "Read Peering",
                        "provider": "Microsoft.Peering",
                        "resource": "peerings"
                      },
                      "isDataAction": false,
                      "name": "Microsoft.Peering/peerings/read"
                    },
                    {
                      "display": {
                        "description": "Write any peerings",
                        "operation": "Write Peering",
                        "provider": "Microsoft.Peering",
                        "resource": "peerings"
                      },
                      "isDataAction": false,
                      "name": "Microsoft.Peering/peerings/write"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/legacyPeerings": {
      "get": {
        "description": "Lists all of the legacy peerings under the given subscription matching the specified kind and location.",
        "operationId": "LegacyPeerings_List",
        "parameters": [
          {
            "description": "The location of the peering.",
            "in": "query",
            "name": "peeringLocation",
            "required": true,
            "type": "string"
          },
          {
            "description": "The kind of the peering.",
            "enum": [
              "Direct",
              "Exchange"
            ],
            "in": "query",
            "name": "kind",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PeeringListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "LegacyPeerings"
        ],
        "x-ms-examples": {
          "List legacy peerings": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "kind": "Exchange",
              "peeringLocation": "peeringLocation0",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Exchange",
                  "name": "peeringName",
                  "properties": {
                    "exchange": {
                      "connections": [
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.1",
                            "microsoftSessionIPv6Address": "fd00::1:1",
                            "peerSessionIPv4Address": "192.168.2.1",
                            "peerSessionIPv6Address": "fd00::1",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        },
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.2",
                            "microsoftSessionIPv6Address": "fd00::1:2",
                            "peerSessionIPv4Address": "192.168.2.2",
                            "peerSessionIPv6Address": "fd00::2",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      }
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Exchange",
                    "name": "Basic_Exchange_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns": {
      "get": {
        "description": "Lists all of the peer ASNs under the given subscription.",
        "operationId": "PeerAsns_ListBySubscription",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PeerAsnListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PeerAsns"
        ],
        "x-ms-examples": {
          "List peer ASNs in a subscription": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/peerAsnName",
                      "name": "peerAsnName",
                      "properties": {
                        "peerAsn": 65000,
                        "peerContactInfo": {
                          "emails": [
                            "abc@contoso.com",
                            "xyz@contoso.com"
                          ],
                          "phone": [
                            "+1 (234) 567-8900"
                          ]
                        },
                        "peerName": "Contoso",
                        "validationState": "Approved"
                      },
                      "type": "Microsoft.Peering/peerAsns"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}": {
      "delete": {
        "description": "Deletes an existing peer ASN with the specified name under the given subscription.",
        "operationId": "PeerAsns_Delete",
        "parameters": [
          {
            "description": "The peer ASN name.",
            "in": "path",
            "name": "peerAsnName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "No Content"
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PeerAsns"
        ],
        "x-ms-examples": {
          "Delete a peer ASN": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "peerAsnName": "peerAsnName",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets the peer ASN with the specified name under the given subscription.",
        "operationId": "PeerAsns_Get",
        "parameters": [
          {
            "description": "The peer ASN name.",
            "in": "path",
            "name": "peerAsnName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PeerAsn"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PeerAsns"
        ],
        "x-ms-examples": {
          "Get a peer ASN": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "peerAsnName": "peerAsnName",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/peerAsnName",
                  "name": "peerAsnName",
                  "properties": {
                    "peerAsn": 65000,
                    "peerContactInfo": {
                      "emails": [
                        "abc@contoso.com",
                        "xyz@contoso.com"
                      ],
                      "phone": [
                        "+1 (234) 567-8900"
                      ]
                    },
                    "peerName": "Contoso",
                    "validationState": "Approved"
                  },
                  "type": "Microsoft.Peering/peerAsns"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.",
        "operationId": "PeerAsns_CreateOrUpdate",
        "parameters": [
          {
            "description": "The peer ASN name.",
            "in": "path",
            "name": "peerAsnName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The peer ASN.",
            "in": "body",
            "name": "peerAsn",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PeerAsn"
            }
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PeerAsn"
            }
          },
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/PeerAsn"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PeerAsns"
        ],
        "x-ms-examples": {
          "Create a peer ASN": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "peerAsnName": "peerAsnName",
              "peerInfo": {
                "properties": {
                  "peerAsn": 65000,
                  "peerContactInfo": {
                    "emails": [
                      "abc@contoso.com",
                      "xyz@contoso.com"
                    ],
                    "phone": [
                      "+1 (234) 567-8900"
                    ]
                  },
                  "peerName": "Contoso"
                }
              },
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/peerAsnName",
                  "name": "peerAsnName",
                  "properties": {
                    "peerAsn": 65000,
                    "peerContactInfo": {
                      "emails": [
                        "abc@contoso.com",
                        "xyz@contoso.com"
                      ],
                      "phone": [
                        "+1 (234) 567-8900"
                      ]
                    },
                    "peerName": "Contoso",
                    "validationState": "Pending"
                  },
                  "type": "Microsoft.Peering/peerAsns"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/peerAsnName",
                  "name": "peerAsnName",
                  "properties": {
                    "peerAsn": 65000,
                    "peerContactInfo": {
                      "emails": [
                        "abc@contoso.com",
                        "xyz@contoso.com"
                      ],
                      "phone": [
                        "+1 (234) 567-8900"
                      ]
                    },
                    "peerName": "Contoso",
                    "validationState": "Pending"
                  },
                  "type": "Microsoft.Peering/peerAsns"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringLocations": {
      "get": {
        "description": "Lists all of the available peering locations for the specified kind of peering.",
        "operationId": "PeeringLocations_List",
        "parameters": [
          {
            "description": "The kind of the peering.",
            "enum": [
              "Direct",
              "Exchange"
            ],
            "in": "query",
            "name": "kind",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PeeringLocationListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PeeringLocations"
        ],
        "x-ms-examples": {
          "List direct peering locations": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "kind": "Direct",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/subId/providers/Microsoft.Peering/peeringLocations/peeringLocation1",
                      "kind": "Direct",
                      "name": "peeringLocation1",
                      "properties": {
                        "country": "country1",
                        "direct": {
                          "bandwidthOffers": [
                            {
                              "offerName": "10Gbps",
                              "valueInMbps": 10000
                            },
                            {
                              "offerName": "100Gbps",
                              "valueInMbps": 100000
                            }
                          ],
                          "peeringFacilities": [
                            {
                              "address": "address1",
                              "peeringDBFacilityId": 99999,
                              "peeringDBFacilityLink": "https://www.peeringdb.com/fac/99999"
                            },
                            {
                              "address": "address3",
                              "peeringDBFacilityId": 99999,
                              "peeringDBFacilityLink": "https://www.peeringdb.com/fac/99999"
                            }
                          ]
                        },
                        "peeringLocation": "peeringLocation1"
                      },
                      "type": "Microsoft.Peering/peeringLocations"
                    },
                    {
                      "id": "/subscriptions/subId/providers/Microsoft.Peering/peeringLocations/peeringLocation2",
                      "kind": "Direct",
                      "name": "peeringLocation2",
                      "properties": {
                        "country": "country2",
                        "direct": {
                          "bandwidthOffers": [
                            {
                              "offerName": "10Gbps",
                              "valueInMbps": 10000
                            },
                            {
                              "offerName": "100Gbps",
                              "valueInMbps": 100000
                            }
                          ],
                          "peeringFacilities": [
                            {
                              "address": "address2",
                              "peeringDBFacilityId": 99999,
                              "peeringDBFacilityLink": "https://www.peeringdb.com/fac/99999"
                            }
                          ]
                        },
                        "peeringLocation": "peeringLocation2"
                      },
                      "type": "Microsoft.Peering/peeringLocations"
                    }
                  ]
                }
              }
            }
          },
          "List exchange peering locations": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "kind": "Exchange",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/subId/providers/Microsoft.Peering/peeringLocations/peeringLocation1",
                      "kind": "Exchange",
                      "name": "peeringLocation1",
                      "properties": {
                        "country": "country1",
                        "exchange": {
                          "peeringFacilities": [
                            {
                              "bandwidthInMbps": 10000,
                              "exchangeName": "name1",
                              "facilityIPv4Prefix": "192.168.128.0/17",
                              "facilityIPv6Prefix": "fd00::1000:0/98",
                              "microsoftIPv4Address": "192.168.131.1",
                              "microsoftIPv6Address": "fd00::1:1",
                              "peeringDBFacilityId": 99999,
                              "peeringDBFacilityLink": "https://www.peeringdb.com/ix/99999"
                            },
                            {
                              "bandwidthInMbps": 10000,
                              "exchangeName": "name3",
                              "facilityIPv4Prefix": "192.168.0.0/17",
                              "facilityIPv6Prefix": "fd00::0/98",
                              "microsoftIPv4Address": "192.168.2.2",
                              "microsoftIPv6Address": "fd00::2",
                              "peeringDBFacilityId": 99999,
                              "peeringDBFacilityLink": "https://www.peeringdb.com/ix/99999"
                            }
                          ]
                        },
                        "peeringLocation": "peeringLocation1"
                      },
                      "type": "Microsoft.Peering/peeringLocations"
                    },
                    {
                      "id": "/subscriptions/subId/providers/Microsoft.Peering/peeringLocations/peeringLocation2",
                      "kind": "Exchange",
                      "name": "peeringLocation2",
                      "properties": {
                        "country": "country2",
                        "exchange": {
                          "peeringFacilities": [
                            {
                              "bandwidthInMbps": 10000,
                              "exchangeName": "name2",
                              "facilityIPv4Prefix": "192.168.0.0/16",
                              "facilityIPv6Prefix": "fd00::0/98",
                              "microsoftIPv4Address": "192.168.2.1",
                              "microsoftIPv6Address": "fd00::2",
                              "peeringDBFacilityId": 99999,
                              "peeringDBFacilityLink": "https://www.peeringdb.com/ix/99999"
                            }
                          ]
                        },
                        "peeringLocation": "peeringLocation2"
                      },
                      "type": "Microsoft.Peering/peeringLocations"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerings": {
      "get": {
        "description": "Lists all of the peerings under the given subscription.",
        "operationId": "Peerings_ListBySubscription",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PeeringListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Peerings"
        ],
        "x-ms-examples": {
          "List peerings in a subscription": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Exchange",
                  "location": "eastus",
                  "name": "peeringName",
                  "properties": {
                    "exchange": {
                      "connections": [
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.1",
                            "microsoftSessionIPv6Address": "fd00::1:1",
                            "peerSessionIPv4Address": "192.168.2.1",
                            "peerSessionIPv6Address": "fd00::1",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        },
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.2",
                            "microsoftSessionIPv6Address": "fd00::1:2",
                            "peerSessionIPv4Address": "192.168.2.2",
                            "peerSessionIPv6Address": "fd00::2",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      }
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Exchange",
                    "name": "Basic_Exchange_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings": {
      "get": {
        "description": "Lists all of the peerings under the given subscription and resource group.",
        "operationId": "Peerings_ListByResourceGroup",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PeeringListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Peerings"
        ],
        "x-ms-examples": {
          "List peerings in a resource group": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "resourceGroupName": "rgName",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Exchange",
                  "location": "eastus",
                  "name": "peeringName",
                  "properties": {
                    "exchange": {
                      "connections": [
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.1",
                            "microsoftSessionIPv6Address": "fd00::1:1",
                            "peerSessionIPv4Address": "192.168.2.1",
                            "peerSessionIPv6Address": "fd00::1",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        },
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.2",
                            "microsoftSessionIPv6Address": "fd00::1:2",
                            "peerSessionIPv4Address": "192.168.2.2",
                            "peerSessionIPv6Address": "fd00::2",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      }
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Exchange",
                    "name": "Basic_Exchange_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}": {
      "delete": {
        "description": "Deletes an existing peering with the specified name under the given subscription and resource group.",
        "operationId": "Peerings_Delete",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the peering.",
            "in": "path",
            "name": "peeringName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "NoContent"
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Peerings"
        ],
        "x-ms-examples": {
          "Delete a peering": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "peeringName": "peeringName",
              "resourceGroupName": "rgName",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets an existing peering with the specified name under the given subscription and resource group.",
        "operationId": "Peerings_Get",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the peering.",
            "in": "path",
            "name": "peeringName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Peering"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Peerings"
        ],
        "x-ms-examples": {
          "Get a peering": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "peeringName": "peeringName",
              "resourceGroupName": "rgName",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Exchange",
                  "location": "eastus",
                  "name": "peeringName",
                  "properties": {
                    "exchange": {
                      "connections": [
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.1",
                            "microsoftSessionIPv6Address": "fd00::1:1",
                            "peerSessionIPv4Address": "192.168.2.1",
                            "peerSessionIPv6Address": "fd00::1",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        },
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.2",
                            "microsoftSessionIPv6Address": "fd00::1:2",
                            "peerSessionIPv4Address": "192.168.2.2",
                            "peerSessionIPv6Address": "fd00::2",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      }
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Exchange",
                    "name": "Basic_Exchange_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates tags for a peering with the specified name under the given subscription and resource group.",
        "operationId": "Peerings_Update",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the peering.",
            "in": "path",
            "name": "peeringName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The resource tags.",
            "in": "body",
            "name": "tags",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ResourceTags"
            }
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Peering"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Peerings"
        ],
        "x-ms-examples": {
          "Update peering tags": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "peeringName": "peeringName",
              "resourceGroupName": "rgName",
              "subscriptionId": "subId",
              "tags": {
                "tags": {
                  "tag0": "value0",
                  "tag1": "value1"
                }
              }
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Exchange",
                  "location": "eastus",
                  "name": "peeringName",
                  "properties": {
                    "exchange": {
                      "connections": [
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.1",
                            "microsoftSessionIPv6Address": "fd00::1:1",
                            "peerSessionIPv4Address": "192.168.2.1",
                            "peerSessionIPv6Address": "fd00::1",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        },
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.2",
                            "microsoftSessionIPv6Address": "fd00::1:2",
                            "peerSessionIPv4Address": "192.168.2.2",
                            "peerSessionIPv6Address": "fd00::2",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      }
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Exchange",
                    "name": "Basic_Exchange_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "tags": {
                    "tag0": "value0",
                    "tag1": "value1"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Creates a new peering or updates an existing peering with the specified name under the given subscription and resource group.",
        "operationId": "Peerings_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the peering.",
            "in": "path",
            "name": "peeringName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The properties needed to create or update a peering.",
            "in": "body",
            "name": "peering",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Peering"
            }
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Peering"
            }
          },
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/Peering"
            }
          },
          "default": {
            "description": "Error response describing why the operation has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Peerings"
        ],
        "x-ms-examples": {
          "Create a direct peering": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "peering": {
                "kind": "Direct",
                "location": "eastus",
                "properties": {
                  "direct": {
                    "connections": [
                      {
                        "bandwidthInMbps": 10000,
                        "bgpSession": {
                          "maxPrefixesAdvertisedV4": 1000,
                          "maxPrefixesAdvertisedV6": 100,
                          "md5AuthenticationKey": "test-md5-auth-key",
                          "sessionPrefixV4": "192.168.0.0/31",
                          "sessionPrefixV6": "fd00::0/127"
                        },
                        "peeringDBFacilityId": 99999
                      },
                      {
                        "bandwidthInMbps": 10000,
                        "bgpSession": {
                          "maxPrefixesAdvertisedV4": 1000,
                          "maxPrefixesAdvertisedV6": 100,
                          "md5AuthenticationKey": "test-md5-auth-key",
                          "sessionPrefixV4": "192.168.1.0/31",
                          "sessionPrefixV6": "fd00::2/127"
                        },
                        "peeringDBFacilityId": 99999
                      }
                    ],
                    "peerAsn": {
                      "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                    },
                    "useForPeeringService": false
                  },
                  "peeringLocation": "peeringLocation0"
                },
                "sku": {
                  "name": "Basic_Direct_Free"
                }
              },
              "peeringName": "peeringName",
              "resourceGroupName": "rgName",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Direct",
                  "location": "eastus",
                  "name": "peeringName",
                  "properties": {
                    "direct": {
                      "connections": [
                        {
                          "bandwidthInMbps": 10000,
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "sessionPrefixV4": "192.168.0.0/31",
                            "sessionPrefixV6": "fd00::0/127",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999,
                          "provisionedBandwidthInMbps": 10000
                        },
                        {
                          "bandwidthInMbps": 10000,
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "sessionPrefixV4": "192.168.1.0/31",
                            "sessionPrefixV6": "fd00::2/127",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999,
                          "provisionedBandwidthInMbps": 10000
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      },
                      "useForPeeringService": false
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Direct",
                    "name": "Basic_Direct_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Direct",
                  "location": "eastus",
                  "name": "peeringName",
                  "properties": {
                    "direct": {
                      "connections": [
                        {
                          "bandwidthInMbps": 10000,
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "sessionPrefixV4": "192.168.0.0/31",
                            "sessionPrefixV6": "fd00::0/127",
                            "sessionStateV4": "PendingAdd",
                            "sessionStateV6": "PendingAdd"
                          },
                          "connectionState": "PendingApproval",
                          "peeringDBFacilityId": 99999,
                          "provisionedBandwidthInMbps": 0
                        },
                        {
                          "bandwidthInMbps": 10000,
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "sessionPrefixV4": "192.168.1.0/31",
                            "sessionPrefixV6": "fd00::2/127",
                            "sessionStateV4": "PendingAdd",
                            "sessionStateV6": "PendingAdd"
                          },
                          "connectionState": "PendingApproval",
                          "peeringDBFacilityId": 99999,
                          "provisionedBandwidthInMbps": 0
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      },
                      "useForPeeringService": false
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Direct",
                    "name": "Basic_Direct_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              }
            }
          },
          "Create an exchange peering": {
            "parameters": {
              "api-version": "2019-03-01-preview",
              "peering": {
                "kind": "Exchange",
                "location": "eastus",
                "properties": {
                  "exchange": {
                    "connections": [
                      {
                        "bgpSession": {
                          "maxPrefixesAdvertisedV4": 1000,
                          "maxPrefixesAdvertisedV6": 100,
                          "md5AuthenticationKey": "test-md5-auth-key",
                          "peerSessionIPv4Address": "192.168.2.1",
                          "peerSessionIPv6Address": "fd00::1"
                        },
                        "peeringDBFacilityId": 99999
                      },
                      {
                        "bgpSession": {
                          "maxPrefixesAdvertisedV4": 1000,
                          "maxPrefixesAdvertisedV6": 100,
                          "md5AuthenticationKey": "test-md5-auth-key",
                          "peerSessionIPv4Address": "192.168.2.2",
                          "peerSessionIPv6Address": "fd00::2"
                        },
                        "peeringDBFacilityId": 99999
                      }
                    ],
                    "peerAsn": {
                      "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                    }
                  },
                  "peeringLocation": "peeringLocation0"
                },
                "sku": {
                  "name": "Basic_Exchange_Free"
                }
              },
              "peeringName": "peeringName",
              "resourceGroupName": "rgName",
              "subscriptionId": "subId"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Exchange",
                  "location": "eastus",
                  "name": "peeringName",
                  "properties": {
                    "exchange": {
                      "connections": [
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.1",
                            "microsoftSessionIPv6Address": "fd00::1:1",
                            "peerSessionIPv4Address": "192.168.2.1",
                            "peerSessionIPv6Address": "fd00::1",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        },
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.2",
                            "microsoftSessionIPv6Address": "fd00::1:2",
                            "peerSessionIPv4Address": "192.168.2.2",
                            "peerSessionIPv6Address": "fd00::2",
                            "sessionStateV4": "Established",
                            "sessionStateV6": "Established"
                          },
                          "connectionState": "Active",
                          "peeringDBFacilityId": 99999
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      }
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Exchange",
                    "name": "Basic_Exchange_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Peering/peerings/peeringName",
                  "kind": "Exchange",
                  "location": "eastus",
                  "name": "peeringName",
                  "properties": {
                    "exchange": {
                      "connections": [
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.1",
                            "microsoftSessionIPv6Address": "fd00::1:1",
                            "peerSessionIPv4Address": "192.168.2.1",
                            "peerSessionIPv6Address": "fd00::1",
                            "sessionStateV4": "PendingAdd",
                            "sessionStateV6": "PendingAdd"
                          },
                          "connectionState": "PendingApproval",
                          "peeringDBFacilityId": 99999
                        },
                        {
                          "bgpSession": {
                            "maxPrefixesAdvertisedV4": 1000,
                            "maxPrefixesAdvertisedV6": 100,
                            "md5AuthenticationKey": "test-md5-auth-key",
                            "microsoftSessionIPv4Address": "192.168.3.2",
                            "microsoftSessionIPv6Address": "fd00::1:2",
                            "peerSessionIPv4Address": "192.168.2.2",
                            "peerSessionIPv6Address": "fd00::2",
                            "sessionStateV4": "PendingAdd",
                            "sessionStateV6": "PendingAdd"
                          },
                          "connectionState": "PendingApproval",
                          "peeringDBFacilityId": 99999
                        }
                      ],
                      "peerAsn": {
                        "id": "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"
                      }
                    },
                    "peeringLocation": "peeringLocation0",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "family": "Exchange",
                    "name": "Basic_Exchange_Free",
                    "size": "Free",
                    "tier": "Basic"
                  },
                  "type": "Microsoft.Peering/peerings"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "BgpSession": {
      "description": "The properties that define a BGP session.",
      "properties": {
        "maxPrefixesAdvertisedV4": {
          "description": "The maximum number of prefixes advertised over the IPv4 session.",
          "format": "int32",
          "type": "integer"
        },
        "maxPrefixesAdvertisedV6": {
          "description": "The maximum number of prefixes advertised over the IPv6 session.",
          "format": "int32",
          "type": "integer"
        },
        "md5AuthenticationKey": {
          "description": "The MD5 authentication key of the session.",
          "type": "string"
        },
        "microsoftSessionIPv4Address": {
          "description": "The IPv4 session address on Microsoft's end.",
          "readOnly": true,
          "type": "string"
        },
        "microsoftSessionIPv6Address": {
          "description": "The IPv6 session address on Microsoft's end.",
          "readOnly": true,
          "type": "string"
        },
        "peerSessionIPv4Address": {
          "description": "The IPv4 session address on peer's end.",
          "type": "string"
        },
        "peerSessionIPv6Address": {
          "description": "The IPv6 session address on peer's end.",
          "type": "string"
        },
        "sessionPrefixV4": {
          "description": "The IPv4 prefix that contains both ends' IPv4 addresses.",
          "type": "string"
        },
        "sessionPrefixV6": {
          "description": "The IPv6 prefix that contains both ends' IPv6 addresses.",
          "type": "string"
        },
        "sessionStateV4": {
          "description": "The state of the IPv4 session.",
          "enum": [
            "None",
            "Idle",
            "Connect",
            "Active",
            "OpenSent",
            "OpenConfirm",
            "Established",
            "PendingAdd",
            "PendingUpdate",
            "PendingRemove"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "sessionStateV4"
          }
        },
        "sessionStateV6": {
          "description": "The state of the IPv6 session.",
          "enum": [
            "None",
            "Idle",
            "Connect",
            "Active",
            "OpenSent",
            "OpenConfirm",
            "Established",
            "PendingAdd",
            "PendingUpdate",
            "PendingRemove"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "sessionStateV6"
          }
        }
      },
      "type": "object"
    },
    "ContactInfo": {
      "description": "The contact information of the peer.",
      "properties": {
        "emails": {
          "description": "The list of email addresses.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "phone": {
          "description": "The list of contact numbers.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "DirectConnection": {
      "description": "The properties that define a direct connection.",
      "properties": {
        "bandwidthInMbps": {
          "description": "The bandwidth of the connection.",
          "format": "int32",
          "type": "integer"
        },
        "bgpSession": {
          "$ref": "#/definitions/BgpSession",
          "description": "The BGP session associated with the connection."
        },
        "connectionState": {
          "description": "The state of the connection.",
          "enum": [
            "None",
            "PendingApproval",
            "Approved",
            "ProvisioningStarted",
            "ProvisioningFailed",
            "ProvisioningCompleted",
            "Validating",
            "Active"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "connectionState"
          }
        },
        "peeringDBFacilityId": {
          "description": "The PeeringDB.com ID of the facility at which the connection has to be set up.",
          "format": "int32",
          "type": "integer"
        },
        "provisionedBandwidthInMbps": {
          "description": "The bandwidth that is actually provisioned.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "DirectPeeringFacility": {
      "description": "The properties that define a direct peering facility.",
      "properties": {
        "address": {
          "description": "The address of the direct peering facility.",
          "type": "string"
        },
        "peeringDBFacilityId": {
          "description": "The PeeringDB.com ID of the facility.",
          "format": "int32",
          "type": "integer"
        },
        "peeringDBFacilityLink": {
          "description": "The PeeringDB.com URL of the facility.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ErrorResponse": {
      "description": "The error response that indicates why an operation has failed.",
      "properties": {
        "code": {
          "description": "The error code.",
          "readOnly": true,
          "type": "string"
        },
        "message": {
          "description": "The error message.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "ExchangeConnection": {
      "description": "The properties that define an exchange connection.",
      "properties": {
        "bgpSession": {
          "$ref": "#/definitions/BgpSession",
          "description": "The BGP session associated with the connection."
        },
        "connectionState": {
          "description": "The state of the connection.",
          "enum": [
            "None",
            "PendingApproval",
            "Approved",
            "ProvisioningStarted",
            "ProvisioningFailed",
            "ProvisioningCompleted",
            "Validating",
            "Active"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "connectionState"
          }
        },
        "peeringDBFacilityId": {
          "description": "The PeeringDB.com ID of the facility at which the connection has to be set up.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "ExchangePeeringFacility": {
      "description": "The properties that define an exchange peering facility.",
      "properties": {
        "bandwidthInMbps": {
          "description": "The bandwidth of the connection between Microsoft and the exchange peering facility.",
          "format": "int32",
          "type": "integer"
        },
        "exchangeName": {
          "description": "The name of the exchange peering facility.",
          "type": "string"
        },
        "facilityIPv4Prefix": {
          "description": "The IPv4 prefixes associated with the exchange peering facility.",
          "type": "string"
        },
        "facilityIPv6Prefix": {
          "description": "The IPv6 prefixes associated with the exchange peering facility.",
          "type": "string"
        },
        "microsoftIPv4Address": {
          "description": "The IPv4 address of Microsoft at the exchange peering facility.",
          "type": "string"
        },
        "microsoftIPv6Address": {
          "description": "The IPv6 address of Microsoft at the exchange peering facility.",
          "type": "string"
        },
        "peeringDBFacilityId": {
          "description": "The PeeringDB.com ID of the facility.",
          "format": "int32",
          "type": "integer"
        },
        "peeringDBFacilityLink": {
          "description": "The PeeringDB.com URL of the facility.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Operation": {
      "description": "The peering API operation.",
      "properties": {
        "display": {
          "$ref": "#/definitions/OperationDisplayInfo",
          "description": "The information related to the operation.",
          "readOnly": true
        },
        "isDataAction": {
          "description": "The flag that indicates whether the operation applies to data plane.",
          "readOnly": true,
          "type": "boolean"
        },
        "name": {
          "description": "The name of the operation.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "OperationDisplayInfo": {
      "description": "The information related to the operation.",
      "properties": {
        "description": {
          "description": "The description of the operation.",
          "readOnly": true,
          "type": "string"
        },
        "operation": {
          "description": "The name of the operation.",
          "readOnly": true,
          "type": "string"
        },
        "provider": {
          "description": "The name of the resource provider.",
          "readOnly": true,
          "type": "string"
        },
        "resource": {
          "description": "The type of the resource.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "OperationListResult": {
      "description": "The paginated list of peering API operations.",
      "properties": {
        "nextLink": {
          "description": "The link to fetch the next page of peering API operations.",
          "type": "string"
        },
        "value": {
          "description": "The list of peering API operations.",
          "items": {
            "$ref": "#/definitions/Operation"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "PeerAsn": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "The essential information related to the peer's ASN.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/PeerAsnProperties",
          "description": "The properties that define a peer's ASN.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "PeerAsnListResult": {
      "description": "The paginated list of peer ASNs.",
      "properties": {
        "nextLink": {
          "description": "The link to fetch the next page of peer ASNs.",
          "type": "string"
        },
        "value": {
          "description": "The list of peer ASNs.",
          "items": {
            "$ref": "#/definitions/PeerAsn"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "PeerAsnProperties": {
      "description": "The properties that define a peer's ASN.",
      "properties": {
        "peerAsn": {
          "description": "The Autonomous System Number (ASN) of the peer.",
          "format": "int32",
          "type": "integer"
        },
        "peerContactInfo": {
          "$ref": "#/definitions/ContactInfo",
          "description": "The contact information of the peer."
        },
        "peerName": {
          "description": "The name of the peer.",
          "type": "string"
        },
        "validationState": {
          "description": "The validation state of the ASN associated with the peer.",
          "enum": [
            "None",
            "Pending",
            "Approved",
            "Failed"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "validationState"
          }
        }
      },
      "type": "object"
    },
    "Peering": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location.",
      "properties": {
        "kind": {
          "description": "The kind of the peering.",
          "enum": [
            "Direct",
            "Exchange"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "kind"
          }
        },
        "location": {
          "description": "The location of the resource.",
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "properties": {
          "$ref": "#/definitions/PeeringProperties",
          "description": "The properties that define a peering.",
          "x-ms-client-flatten": true
        },
        "sku": {
          "$ref": "#/definitions/PeeringSku",
          "description": "The SKU that defines the tier and kind of the peering."
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The resource tags.",
          "type": "object"
        }
      },
      "required": [
        "sku",
        "kind",
        "location"
      ],
      "type": "object"
    },
    "PeeringBandwidthOffer": {
      "description": "The properties that define a peering bandwidth offer.",
      "properties": {
        "offerName": {
          "description": "The name of the bandwidth offer.",
          "type": "string"
        },
        "valueInMbps": {
          "description": "The value of the bandwidth offer in Mbps.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "PeeringListResult": {
      "description": "The paginated list of peerings.",
      "properties": {
        "nextLink": {
          "description": "The link to fetch the next page of peerings.",
          "type": "string"
        },
        "value": {
          "description": "The list of peerings.",
          "items": {
            "$ref": "#/definitions/Peering"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "PeeringLocation": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Peering location is where connectivity could be established to the Microsoft Cloud Edge.",
      "properties": {
        "kind": {
          "description": "The kind of peering that the peering location supports.",
          "enum": [
            "Direct",
            "Exchange"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "kind"
          }
        },
        "properties": {
          "$ref": "#/definitions/PeeringLocationProperties",
          "description": "The properties that define a peering location.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "PeeringLocationListResult": {
      "description": "The paginated list of peering locations.",
      "properties": {
        "nextLink": {
          "description": "The link to fetch the next page of peering locations.",
          "type": "string"
        },
        "value": {
          "description": "The list of peering locations.",
          "items": {
            "$ref": "#/definitions/PeeringLocation"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "PeeringLocationProperties": {
      "description": "The properties that define a peering location.",
      "properties": {
        "azureRegion": {
          "description": "The Azure region associated with the peering location.",
          "type": "string"
        },
        "country": {
          "description": "The country in which the peering location exists.",
          "type": "string"
        },
        "direct": {
          "$ref": "#/definitions/PeeringLocationPropertiesDirect",
          "description": "The properties that define a direct peering location."
        },
        "exchange": {
          "$ref": "#/definitions/PeeringLocationPropertiesExchange",
          "description": "The properties that define an exchange peering location."
        },
        "peeringLocation": {
          "description": "The name of the peering location.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "PeeringLocationPropertiesDirect": {
      "description": "The properties that define a direct peering location.",
      "properties": {
        "bandwidthOffers": {
          "description": "The list of bandwidth offers available at the peering location.",
          "items": {
            "$ref": "#/definitions/PeeringBandwidthOffer"
          },
          "type": "array"
        },
        "peeringFacilities": {
          "description": "The list of direct peering facilities at the peering location.",
          "items": {
            "$ref": "#/definitions/DirectPeeringFacility"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "PeeringLocationPropertiesExchange": {
      "description": "The properties that define an exchange peering location.",
      "properties": {
        "peeringFacilities": {
          "description": "The list of exchange peering facilities at the peering location.",
          "items": {
            "$ref": "#/definitions/ExchangePeeringFacility"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "PeeringProperties": {
      "description": "The properties that define connectivity to the Microsoft Cloud Edge.",
      "properties": {
        "direct": {
          "$ref": "#/definitions/PeeringPropertiesDirect",
          "description": "The properties that define a direct peering."
        },
        "exchange": {
          "$ref": "#/definitions/PeeringPropertiesExchange",
          "description": "The properties that define an exchange peering."
        },
        "peeringLocation": {
          "description": "The location of the peering.",
          "type": "string"
        },
        "provisioningState": {
          "description": "The provisioning state of the resource.",
          "enum": [
            "Succeeded",
            "Updating",
            "Deleting",
            "Failed"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "provisioningState"
          }
        }
      },
      "type": "object"
    },
    "PeeringPropertiesDirect": {
      "description": "The properties that define a direct peering.",
      "properties": {
        "connections": {
          "description": "The set of connections that constitute a direct peering.",
          "items": {
            "$ref": "#/definitions/DirectConnection"
          },
          "type": "array"
        },
        "peerAsn": {
          "$ref": "#/definitions/SubResource",
          "description": "The reference of the peer ASN."
        },
        "useForPeeringService": {
          "description": "The flag that indicates whether or not the peering is used for peering service.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "PeeringPropertiesExchange": {
      "description": "The properties that define an exchange peering.",
      "properties": {
        "connections": {
          "description": "The set of connections that constitute an exchange peering.",
          "items": {
            "$ref": "#/definitions/ExchangeConnection"
          },
          "type": "array"
        },
        "peerAsn": {
          "$ref": "#/definitions/SubResource",
          "description": "The reference of the peer ASN."
        }
      },
      "type": "object"
    },
    "PeeringSku": {
      "description": "The SKU that defines the tier and kind of the peering.",
      "properties": {
        "family": {
          "description": "The family of the peering SKU.",
          "enum": [
            "Direct",
            "Exchange"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "family"
          }
        },
        "name": {
          "description": "The name of the peering SKU.",
          "enum": [
            "Basic_Exchange_Free",
            "Basic_Direct_Free",
            "Premium_Direct_Free",
            "Premium_Exchange_Metered"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "name"
          }
        },
        "size": {
          "description": "The size of the peering SKU.",
          "enum": [
            "Free",
            "Metered",
            "Unlimited"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "size"
          }
        },
        "tier": {
          "description": "The tier of the peering SKU.",
          "enum": [
            "Basic",
            "Premium"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "tier"
          }
        }
      },
      "type": "object"
    },
    "Resource": {
      "description": "The ARM resource class.",
      "properties": {
        "id": {
          "description": "The ID of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "The name of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "type": {
          "description": "The type of the resource.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object",
      "x-ms-azure-resource": true
    },
    "ResourceTags": {
      "description": "The resource tags.",
      "properties": {
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Gets or sets the tags, a dictionary of descriptors arm object",
          "type": "object"
        }
      },
      "type": "object"
    },
    "SubResource": {
      "description": "The sub resource.",
      "properties": {
        "id": {
          "description": "The identifier of the referenced resource.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}