Skip to main content

peer_asns

Creates, updates, deletes, gets or lists a peer_asns resource.

Overview

Namepeer_asns
TypeResource
Idazure.peering.peer_asns

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the resource.
namestringThe name of the resource.
propertiesobjectThe properties that define a peer's ASN.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpeerAsnName, subscriptionIdGets the peer ASN with the specified name under the given subscription.
list_by_subscriptionselectsubscriptionIdLists all of the peer ASNs under the given subscription.
create_or_updateinsertpeerAsnName, subscriptionIdCreates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
deletedeletepeerAsnName, subscriptionIdDeletes an existing peer ASN with the specified name under the given subscription.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
peerAsnNamestringThe peer ASN name.
subscriptionIdstringThe Azure subscription ID.

SELECT examples

Gets the peer ASN with the specified name under the given subscription.

SELECT
id,
name,
properties,
type
FROM azure.peering.peer_asns
WHERE peerAsnName = '{{ peerAsnName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.

INSERT INTO azure.peering.peer_asns (
data__properties,
peerAsnName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ peerAsnName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
properties,
type
;

DELETE examples

Deletes an existing peer ASN with the specified name under the given subscription.

DELETE FROM azure.peering.peer_asns
WHERE peerAsnName = '{{ peerAsnName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;