az peering peering

Note

This reference is part of the peering extension for the Azure CLI (version 2.3.1 or higher). The extension will automatically install the first time you run an az peering peering command. Learn more about extensions.

Peering peering.

Commands

Name Description Type Status
az peering peering create

Creates a new peering or updates an existing peering with the specified name under the given subscription and resource group.

Extension GA
az peering peering delete

Deletes an existing peering with the specified name under the given subscription and resource group.

Extension GA
az peering peering list

Lists all of the peerings under the given subscription.

Extension GA
az peering peering show

Gets an existing peering with the specified name under the given subscription and resource group.

Extension GA
az peering peering update

Updates tags for a peering with the specified name under the given subscription and resource group.

Extension GA

az peering peering create

Creates a new peering or updates an existing peering with the specified name under the given subscription and resource group.

az peering peering create --kind {Direct, Exchange}
                          --location
                          --peering-name
                          --resource-group
                          --sku
                          [--direct]
                          [--exchange]
                          [--peering-location]
                          [--tags]

Examples

Create a direct peering

az peering peering create --kind "Direct" --location "eastus" --direct "{\"connections\":[{\"bandwidthInMbps\":10000,\"bgpSession\":{\"maxPrefixesAdvertisedV4\":1000,\"maxPrefixesAdvertisedV6\":100,\"md5AuthenticationKey\":\"test-md5-auth-key\",\"sessionPrefixV4\":\"192.168.0.0/31\",\"sessionPrefixV6\":\"fd00::0/127\"},\"connectionIdentifier\":\"5F4CB5C7-6B43-4444-9338-9ABC72606C16\",\"peeringDBFacilityId\":99999,\"sessionAddressProvider\":\"Peer\",\"useForPeeringService\":false},{\"bandwidthInMbps\":10000,\"connectionIdentifier\":\"8AB00818-D533-4504-A25A-03A17F61201C\",\"peeringDBFacilityId\":99999,\"sessionAddressProvider\":\"Microsoft\",\"useForPeeringService\":true}],\"directPeeringType\":\"Edge\",\"peerAsn\":{\"id\":\"/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1\"}}" --peering-location "peeringLocation0" --sku name="Basic_Direct_Free" --peering-name "peeringName" --resource-group "rgName"

Create a peering with exchange route server

az peering peering create --kind "Direct" --location "eastus" --direct "{\"connections\":[{\"bandwidthInMbps\":10000,\"bgpSession\":{\"maxPrefixesAdvertisedV4\":1000,\"maxPrefixesAdvertisedV6\":100,\"microsoftSessionIPv4Address\":\"192.168.0.123\",\"peerSessionIPv4Address\":\"192.168.0.234\",\"sessionPrefixV4\":\"192.168.0.0/24\"},\"connectionIdentifier\":\"5F4CB5C7-6B43-4444-9338-9ABC72606C16\",\"peeringDBFacilityId\":99999,\"sessionAddressProvider\":\"Peer\",\"useForPeeringService\":true}],\"directPeeringType\":\"IxRs\",\"peerAsn\":{\"id\":\"/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1\"}}" --peering-location "peeringLocation0" --sku name="Premium_Direct_Free" --peering-name "peeringName" --resource-group "rgName"

Create an exchange peering

az peering peering create --kind "Exchange" --location "eastus" --exchange "{\"connections\":[{\"bgpSession\":{\"maxPrefixesAdvertisedV4\":1000,\"maxPrefixesAdvertisedV6\":100,\"md5AuthenticationKey\":\"test-md5-auth-key\",\"peerSessionIPv4Address\":\"192.168.2.1\",\"peerSessionIPv6Address\":\"fd00::1\"},\"connectionIdentifier\":\"CE495334-0E94-4E51-8164-8116D6CD284D\",\"peeringDBFacilityId\":99999},{\"bgpSession\":{\"maxPrefixesAdvertisedV4\":1000,\"maxPrefixesAdvertisedV6\":100,\"md5AuthenticationKey\":\"test-md5-auth-key\",\"peerSessionIPv4Address\":\"192.168.2.2\",\"peerSessionIPv6Address\":\"fd00::2\"},\"connectionIdentifier\":\"CDD8E673-CB07-47E6-84DE-3739F778762B\",\"peeringDBFacilityId\":99999}],\"peerAsn\":{\"id\":\"/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1\"}}" --peering-location "peeringLocation0" --sku name="Basic_Exchange_Free" --peering-name "peeringName" --resource-group "rgName"

Required Parameters

--kind

The kind of the peering.

accepted values: Direct, Exchange
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--peering-name

The name of the peering.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sku

The SKU that defines the tier and kind of the peering. Expect value: KEY1=VALUE1 KEY2=VALUE2 ... , available KEYs are: name, tier, family, size.

Optional Parameters

--direct

The properties that define a direct peering. Expected value: json-string/@json-file.

--exchange

The properties that define an exchange peering. Expected value: json-string/@json-file.

--peering-location

The location of the peering.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az peering peering delete

Deletes an existing peering with the specified name under the given subscription and resource group.

az peering peering delete --peering-name
                          --resource-group

Examples

Delete a peering

az peering peering delete --peering-name "peeringName" --resource-group "rgName"

Required Parameters

--peering-name

The name of the peering.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az peering peering list

Lists all of the peerings under the given subscription.

az peering peering list [--resource-group]

Examples

List peerings in a resource group

az peering peering list --resource-group "rgName"

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az peering peering show

Gets an existing peering with the specified name under the given subscription and resource group.

az peering peering show --peering-name
                        --resource-group

Examples

Get a peering

az peering peering show --peering-name "peeringName" --resource-group "rgName"

Required Parameters

--peering-name

The name of the peering.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az peering peering update

Updates tags for a peering with the specified name under the given subscription and resource group.

az peering peering update --peering-name
                          --resource-group
                          [--tags]

Examples

Update peering tags

az peering peering update --peering-name "peeringName" --resource-group "rgName" --tags tags={"tag0":"value0","tag1":"value1"}

Required Parameters

--peering-name

The name of the peering.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.