Skip to main content

virtual_hubs

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

Overview

Namevirtual_hubs
TypeResource
Idazure.network.virtual_hubs

Fields

NameDatatypeDescription
idtextResource ID.
nametextResource name.
address_prefixtextfield from the properties object
allow_branch_to_branch_traffictextfield from the properties object
azure_firewalltextfield from the properties object
bgp_connectionstextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
express_route_gatewaytextfield from the properties object
hub_routing_preferencetextfield from the properties object
ip_configurationstextfield from the properties object
kindtextKind of service virtual hub. This is metadata used for the Azure portal experience for Route Server.
locationtextResource location.
p2_s_vpn_gatewaytextfield from the properties object
preferred_routing_gatewaytextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
route_mapstextfield from the properties object
route_tabletextfield from the properties object
routing_statetextfield from the properties object
security_partner_providertextfield from the properties object
security_provider_nametextfield from the properties object
skutextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
typetextResource type.
virtualHubNametextfield from the properties object
virtual_hub_route_table_v2stextfield from the properties object
virtual_router_asntextfield from the properties object
virtual_router_auto_scale_configurationtextfield from the properties object
virtual_router_ipstextfield from the properties object
virtual_wantextfield from the properties object
vpn_gatewaytextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualHubNameRetrieves the details of a VirtualHub.
get_inbound_routesSELECTresourceGroupName, subscriptionId, virtualHubNameGets the inbound routes configured for the Virtual Hub on a particular connection.
listSELECTsubscriptionIdLists all the VirtualHubs in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all the VirtualHubs in a resource group.
create_or_updateINSERTresourceGroupName, subscriptionId, virtualHubName, data__locationCreates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub.
deleteDELETEresourceGroupName, subscriptionId, virtualHubNameDeletes a VirtualHub.
update_tagsEXECresourceGroupName, subscriptionId, virtualHubNameUpdates VirtualHub tags.

SELECT examples

Lists all the VirtualHubs in a subscription.

SELECT
id,
name,
address_prefix,
allow_branch_to_branch_traffic,
azure_firewall,
bgp_connections,
etag,
express_route_gateway,
hub_routing_preference,
ip_configurations,
kind,
location,
p2_s_vpn_gateway,
preferred_routing_gateway,
provisioning_state,
resourceGroupName,
route_maps,
route_table,
routing_state,
security_partner_provider,
security_provider_name,
sku,
subscriptionId,
tags,
type,
virtualHubName,
virtual_hub_route_table_v2s,
virtual_router_asn,
virtual_router_auto_scale_configuration,
virtual_router_ips,
virtual_wan,
vpn_gateway
FROM azure.network.vw_virtual_hubs
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.network.virtual_hubs (
resourceGroupName,
subscriptionId,
virtualHubName,
data__location,
properties,
id,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualHubName }}',
'{{ data__location }}',
'{{ properties }}',
'{{ id }}',
'{{ location }}',
'{{ tags }}'
;

DELETE example

Deletes the specified virtual_hubs resource.

/*+ delete */
DELETE FROM azure.network.virtual_hubs
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualHubName = '{{ virtualHubName }}';