Skip to main content

peerings

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

Overview

Namepeerings
TypeResource
Idazure.peering.peerings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the resource.
namestringThe name of the resource.
directobjectThe properties that define a direct peering.
exchangeobjectThe properties that define an exchange peering.
kindstringThe kind of the peering. Required. Known values are: "Direct" and "Exchange".
locationstringThe location of the resource. Required.
peeringLocationstringThe location of the peering.
provisioningStatestringThe provisioning state of the resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed".
skuobjectThe SKU that defines the tier and kind of the peering. Required.
tagsobjectThe resource tags.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, peering_name, subscription_idGets an existing peering with the specified name under the given subscription and resource group.
list_by_resource_groupselectresource_group_name, subscription_idLists all of the peerings under the given subscription and resource group.
list_by_subscriptionselectsubscription_idLists all of the peerings under the given subscription.
create_or_updateinsertresource_group_name, peering_name, subscription_id, sku, kind, locationCreates a new peering or updates an existing peering with the specified name under the given subscription and resource group.
updateupdateresource_group_name, peering_name, subscription_idUpdates tags for a peering with the specified name under the given subscription and resource group.
create_or_updatereplaceresource_group_name, peering_name, subscription_id, sku, kind, locationCreates a new peering or updates an existing peering with the specified name under the given subscription and resource group.
deletedeleteresource_group_name, peering_name, subscription_idDeletes an existing peering with the specified name under the given subscription and resource group.

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
peering_namestringThe name of the peering. Required.
resource_group_namestringThe name of the resource group. Required.
subscription_idstring

SELECT examples

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

SELECT
id,
name,
direct,
exchange,
kind,
location,
peeringLocation,
provisioningState,
sku,
tags,
type
FROM azure.peering.peerings
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND peering_name = '{{ peering_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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

INSERT INTO azure.peering.peerings (
sku,
kind,
location,
tags,
properties,
resource_group_name,
peering_name,
subscription_id
)
SELECT
'{{ sku }}' /* required */,
'{{ kind }}' /* required */,
'{{ location }}' /* required */,
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ peering_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
kind,
location,
properties,
sku,
tags,
type
;

UPDATE examples

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

UPDATE azure.peering.peerings
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND peering_name = '{{ peering_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
kind,
location,
properties,
sku,
tags,
type;

REPLACE examples

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

REPLACE azure.peering.peerings
SET
sku = '{{ sku }}',
kind = '{{ kind }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND peering_name = '{{ peering_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND sku = '{{ sku }}' --required
AND kind = '{{ kind }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
kind,
location,
properties,
sku,
tags,
type;

DELETE examples

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

DELETE FROM azure.peering.peerings
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND peering_name = '{{ peering_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;