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

NameDatatypeDescription
idtextThe ID of the resource.
nametextThe name of the resource.
error_messagetextfield from the properties object
peerAsnNametextfield from the properties object
peer_asntextfield from the properties object
peer_contact_detailtextfield from the properties object
peer_nametextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of the resource.
validation_statetextfield from the properties object

Methods

NameAccessible byRequired 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.

SELECT examples

Lists all of the peer ASNs under the given subscription.

SELECT
id,
name,
error_message,
peerAsnName,
peer_asn,
peer_contact_detail,
peer_name,
subscriptionId,
type,
validation_state
FROM azure.peering.vw_peer_asns
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new peer_asns resource.

/*+ create */
INSERT INTO azure.peering.peer_asns (
peerAsnName,
subscriptionId,
properties
)
SELECT
'{{ peerAsnName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified peer_asns resource.

/*+ delete */
DELETE FROM azure.peering.peer_asns
WHERE peerAsnName = '{{ peerAsnName }}'
AND subscriptionId = '{{ subscriptionId }}';