peer_asns
Creates, updates, deletes, gets or lists a peer_asns resource.
Overview
| Name | peer_asns |
| Type | Resource |
| Id | azure.peering.peer_asns |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
name | string | The name of the resource. |
peerAsn | integer | The Autonomous System Number (ASN) of the peer. |
peerContactInfo | object | The contact information of the peer. |
peerName | string | The name of the peer. |
type | string | The type of the resource. |
validationState | string | The validation state of the ASN associated with the peer. Known values are: "None", "Pending", "Approved", and "Failed". |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
name | string | The name of the resource. |
peerAsn | integer | The Autonomous System Number (ASN) of the peer. |
peerContactInfo | object | The contact information of the peer. |
peerName | string | The name of the peer. |
type | string | The type of the resource. |
validationState | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | peer_asn_name, subscription_id | Gets the peer ASN with the specified name under the given subscription. | |
list_by_subscription | select | subscription_id | Lists all of the peer ASNs under the given subscription. | |
create_or_update | insert | peer_asn_name, subscription_id | Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription. | |
create_or_update | replace | peer_asn_name, subscription_id | Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription. | |
delete | delete | peer_asn_name, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
peer_asn_name | string | The peer ASN name. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_subscription
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
;
Lists all of the peer ASNs under the given subscription.
SELECT
id,
name,
peerAsn,
peerContactInfo,
peerName,
type,
validationState
FROM azure.peering.peer_asns
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: peer_asns
props:
- name: peer_asn_name
value: "{{ peer_asn_name }}"
description: Required parameter for the peer_asns resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the peer_asns resource.
- name: properties
value:
peerAsn: {{ peerAsn }}
peerContactInfo:
emails:
- "{{ emails }}"
phone:
- "{{ phone }}"
peerName: "{{ peerName }}"
validationState: "{{ validationState }}"
REPLACE examples
- create_or_update
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
- delete
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
;