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.
peerAsnintegerThe Autonomous System Number (ASN) of the peer.
peerContactInfoobjectThe contact information of the peer.
peerNamestringThe name of the peer.
typestringThe type of the resource.
validationStatestringThe validation state of the ASN associated with the peer. Known values are: "None", "Pending", "Approved", and "Failed".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpeer_asn_name, subscription_idGets the peer ASN with the specified name under the given subscription.
list_by_subscriptionselectsubscription_idLists all of the peer ASNs under the given subscription.
create_or_updateinsertpeer_asn_name, subscription_idCreates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
create_or_updatereplacepeer_asn_name, subscription_idCreates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
deletedeletepeer_asn_name, subscription_idDeletes 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
peer_asn_namestringThe peer ASN name. Required.
subscription_idstring

SELECT examples

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

SELECT
id,
name,
peerAsn,
peerContactInfo,
peerName,
type,
validationState
FROM azure.peering.peer_asns
WHERE peer_asn_name = '{{ peer_asn_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- 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 (
properties,
peer_asn_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ peer_asn_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
type
;

REPLACE examples

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

REPLACE azure.peering.peer_asns
SET
properties = '{{ properties }}'
WHERE
peer_asn_name = '{{ peer_asn_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
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 peer_asn_name = '{{ peer_asn_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;