1. Packages
  2. Packages
  3. Azure Native
  4. API Docs
  5. network
  6. getConnectionPolicy
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Viewing docs for Azure Native v3.25.0
published on Wednesday, Aug 5, 2026 by Pulumi
azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Viewing docs for Azure Native v3.25.0
published on Wednesday, Aug 5, 2026 by Pulumi

    Retrieves the details of a ConnectionPolicy.

    Uses Azure REST API version 2025-07-01.

    Using getConnectionPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getConnectionPolicy(args: GetConnectionPolicyArgs, opts?: InvokeOptions): Promise<GetConnectionPolicyResult>
    function getConnectionPolicyOutput(args: GetConnectionPolicyOutputArgs, opts?: InvokeOptions): Output<GetConnectionPolicyResult>
    def get_connection_policy(connection_policy_name: Optional[str] = None,
                              resource_group_name: Optional[str] = None,
                              virtual_hub_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetConnectionPolicyResult
    def get_connection_policy_output(connection_policy_name: pulumi.Input[Optional[str]] = None,
                              resource_group_name: pulumi.Input[Optional[str]] = None,
                              virtual_hub_name: pulumi.Input[Optional[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetConnectionPolicyResult]
    func LookupConnectionPolicy(ctx *Context, args *LookupConnectionPolicyArgs, opts ...InvokeOption) (*LookupConnectionPolicyResult, error)
    func LookupConnectionPolicyOutput(ctx *Context, args *LookupConnectionPolicyOutputArgs, opts ...InvokeOption) LookupConnectionPolicyResultOutput

    > Note: This function is named LookupConnectionPolicy in the Go SDK.

    public static class GetConnectionPolicy 
    {
        public static Task<GetConnectionPolicyResult> InvokeAsync(GetConnectionPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetConnectionPolicyResult> Invoke(GetConnectionPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConnectionPolicyResult> getConnectionPolicy(GetConnectionPolicyArgs args, InvokeOptions options)
    public static Output<GetConnectionPolicyResult> getConnectionPolicy(GetConnectionPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure-native:network:getConnectionPolicy
      arguments:
        # arguments dictionary
    data "azure-native_network_get_connection_policy" "name" {
        # arguments
    }

    The following arguments are supported:

    ConnectionPolicyName string
    The name of the ConnectionPolicy that is unique within a VirtualHub. This name can be used to access the resource.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    VirtualHubName string
    The name of the VirtualHub.
    ConnectionPolicyName string
    The name of the ConnectionPolicy that is unique within a VirtualHub. This name can be used to access the resource.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    VirtualHubName string
    The name of the VirtualHub.
    connection_policy_name string
    The name of the ConnectionPolicy that is unique within a VirtualHub. This name can be used to access the resource.
    resource_group_name string
    The name of the resource group. The name is case insensitive.
    virtual_hub_name string
    The name of the VirtualHub.
    connectionPolicyName String
    The name of the ConnectionPolicy that is unique within a VirtualHub. This name can be used to access the resource.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    virtualHubName String
    The name of the VirtualHub.
    connectionPolicyName string
    The name of the ConnectionPolicy that is unique within a VirtualHub. This name can be used to access the resource.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    virtualHubName string
    The name of the VirtualHub.
    connection_policy_name str
    The name of the ConnectionPolicy that is unique within a VirtualHub. This name can be used to access the resource.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    virtual_hub_name str
    The name of the VirtualHub.
    connectionPolicyName String
    The name of the ConnectionPolicy that is unique within a VirtualHub. This name can be used to access the resource.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    virtualHubName String
    The name of the VirtualHub.

    getConnectionPolicy Result

    The following output properties are available:

    AzureApiVersion string
    The Azure API version of the resource.
    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Name string
    Resource name.
    Properties Pulumi.AzureNative.Network.Outputs.ConnectionPolicyPropertiesResponse
    Properties of the ConnectionPolicy resource.
    Type string
    Resource type.
    Id string
    Resource ID.
    AzureApiVersion string
    The Azure API version of the resource.
    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Name string
    Resource name.
    Properties ConnectionPolicyPropertiesResponse
    Properties of the ConnectionPolicy resource.
    Type string
    Resource type.
    Id string
    Resource ID.
    azure_api_version string
    The Azure API version of the resource.
    etag string
    A unique read-only string that changes whenever the resource is updated.
    name string
    Resource name.
    properties object
    Properties of the ConnectionPolicy resource.
    type string
    Resource type.
    id string
    Resource ID.
    azureApiVersion String
    The Azure API version of the resource.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    name String
    Resource name.
    properties ConnectionPolicyPropertiesResponse
    Properties of the ConnectionPolicy resource.
    type String
    Resource type.
    id String
    Resource ID.
    azureApiVersion string
    The Azure API version of the resource.
    etag string
    A unique read-only string that changes whenever the resource is updated.
    name string
    Resource name.
    properties ConnectionPolicyPropertiesResponse
    Properties of the ConnectionPolicy resource.
    type string
    Resource type.
    id string
    Resource ID.
    azure_api_version str
    The Azure API version of the resource.
    etag str
    A unique read-only string that changes whenever the resource is updated.
    name str
    Resource name.
    properties ConnectionPolicyPropertiesResponse
    Properties of the ConnectionPolicy resource.
    type str
    Resource type.
    id str
    Resource ID.
    azureApiVersion String
    The Azure API version of the resource.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    name String
    Resource name.
    properties Property Map
    Properties of the ConnectionPolicy resource.
    type String
    Resource type.
    id String
    Resource ID.

    Supporting Types

    ConnectionPolicyPropertiesResponse

    AssociatedConnections List<string>
    List of connection names (e.g. VpnConnection, HubVirtualNetworkConnection) associated with this ConnectionPolicy. These are resource names, not Azure resource IDs, consistent with the established VirtualWAN pattern used by HubRouteTable.associatedConnections.
    ProvisioningState string
    The provisioning state of the ConnectionPolicy resource.
    EnableInternetSecurity bool
    Enable internet security.
    RoutingConfiguration Pulumi.AzureNative.Network.Inputs.RoutingConfigurationResponse
    The Routing Configuration indicating the associated and propagated route tables on this connection.
    AssociatedConnections []string
    List of connection names (e.g. VpnConnection, HubVirtualNetworkConnection) associated with this ConnectionPolicy. These are resource names, not Azure resource IDs, consistent with the established VirtualWAN pattern used by HubRouteTable.associatedConnections.
    ProvisioningState string
    The provisioning state of the ConnectionPolicy resource.
    EnableInternetSecurity bool
    Enable internet security.
    RoutingConfiguration RoutingConfigurationResponse
    The Routing Configuration indicating the associated and propagated route tables on this connection.
    associated_connections list(string)
    List of connection names (e.g. VpnConnection, HubVirtualNetworkConnection) associated with this ConnectionPolicy. These are resource names, not Azure resource IDs, consistent with the established VirtualWAN pattern used by HubRouteTable.associatedConnections.
    provisioning_state string
    The provisioning state of the ConnectionPolicy resource.
    enable_internet_security bool
    Enable internet security.
    routing_configuration object
    The Routing Configuration indicating the associated and propagated route tables on this connection.
    associatedConnections List<String>
    List of connection names (e.g. VpnConnection, HubVirtualNetworkConnection) associated with this ConnectionPolicy. These are resource names, not Azure resource IDs, consistent with the established VirtualWAN pattern used by HubRouteTable.associatedConnections.
    provisioningState String
    The provisioning state of the ConnectionPolicy resource.
    enableInternetSecurity Boolean
    Enable internet security.
    routingConfiguration RoutingConfigurationResponse
    The Routing Configuration indicating the associated and propagated route tables on this connection.
    associatedConnections string[]
    List of connection names (e.g. VpnConnection, HubVirtualNetworkConnection) associated with this ConnectionPolicy. These are resource names, not Azure resource IDs, consistent with the established VirtualWAN pattern used by HubRouteTable.associatedConnections.
    provisioningState string
    The provisioning state of the ConnectionPolicy resource.
    enableInternetSecurity boolean
    Enable internet security.
    routingConfiguration RoutingConfigurationResponse
    The Routing Configuration indicating the associated and propagated route tables on this connection.
    associated_connections Sequence[str]
    List of connection names (e.g. VpnConnection, HubVirtualNetworkConnection) associated with this ConnectionPolicy. These are resource names, not Azure resource IDs, consistent with the established VirtualWAN pattern used by HubRouteTable.associatedConnections.
    provisioning_state str
    The provisioning state of the ConnectionPolicy resource.
    enable_internet_security bool
    Enable internet security.
    routing_configuration RoutingConfigurationResponse
    The Routing Configuration indicating the associated and propagated route tables on this connection.
    associatedConnections List<String>
    List of connection names (e.g. VpnConnection, HubVirtualNetworkConnection) associated with this ConnectionPolicy. These are resource names, not Azure resource IDs, consistent with the established VirtualWAN pattern used by HubRouteTable.associatedConnections.
    provisioningState String
    The provisioning state of the ConnectionPolicy resource.
    enableInternetSecurity Boolean
    Enable internet security.
    routingConfiguration Property Map
    The Routing Configuration indicating the associated and propagated route tables on this connection.

    PropagatedRouteTableResponse

    Ids List<Pulumi.AzureNative.Network.Inputs.SubResourceResponse>
    The list of resource ids of all the RouteTables.
    Labels List<string>
    The list of labels.
    Ids []SubResourceResponse
    The list of resource ids of all the RouteTables.
    Labels []string
    The list of labels.
    ids list(object)
    The list of resource ids of all the RouteTables.
    labels list(string)
    The list of labels.
    ids List<SubResourceResponse>
    The list of resource ids of all the RouteTables.
    labels List<String>
    The list of labels.
    ids SubResourceResponse[]
    The list of resource ids of all the RouteTables.
    labels string[]
    The list of labels.
    ids Sequence[SubResourceResponse]
    The list of resource ids of all the RouteTables.
    labels Sequence[str]
    The list of labels.
    ids List<Property Map>
    The list of resource ids of all the RouteTables.
    labels List<String>
    The list of labels.

    RoutingConfigurationResponse

    AssociatedRouteTable Pulumi.AzureNative.Network.Inputs.SubResourceResponse
    The resource id RouteTable associated with this RoutingConfiguration.
    InboundRouteMap Pulumi.AzureNative.Network.Inputs.SubResourceResponse
    The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes.
    OutboundRouteMap Pulumi.AzureNative.Network.Inputs.SubResourceResponse
    The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes.
    PropagatedRouteTables Pulumi.AzureNative.Network.Inputs.PropagatedRouteTableResponse
    The list of RouteTables to advertise the routes to.
    VnetRoutes Pulumi.AzureNative.Network.Inputs.VnetRouteResponse
    List of routes that control routing from VirtualHub into a virtual network connection.
    AssociatedRouteTable SubResourceResponse
    The resource id RouteTable associated with this RoutingConfiguration.
    InboundRouteMap SubResourceResponse
    The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes.
    OutboundRouteMap SubResourceResponse
    The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes.
    PropagatedRouteTables PropagatedRouteTableResponse
    The list of RouteTables to advertise the routes to.
    VnetRoutes VnetRouteResponse
    List of routes that control routing from VirtualHub into a virtual network connection.
    associated_route_table object
    The resource id RouteTable associated with this RoutingConfiguration.
    inbound_route_map object
    The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes.
    outbound_route_map object
    The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes.
    propagated_route_tables object
    The list of RouteTables to advertise the routes to.
    vnet_routes object
    List of routes that control routing from VirtualHub into a virtual network connection.
    associatedRouteTable SubResourceResponse
    The resource id RouteTable associated with this RoutingConfiguration.
    inboundRouteMap SubResourceResponse
    The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes.
    outboundRouteMap SubResourceResponse
    The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes.
    propagatedRouteTables PropagatedRouteTableResponse
    The list of RouteTables to advertise the routes to.
    vnetRoutes VnetRouteResponse
    List of routes that control routing from VirtualHub into a virtual network connection.
    associatedRouteTable SubResourceResponse
    The resource id RouteTable associated with this RoutingConfiguration.
    inboundRouteMap SubResourceResponse
    The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes.
    outboundRouteMap SubResourceResponse
    The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes.
    propagatedRouteTables PropagatedRouteTableResponse
    The list of RouteTables to advertise the routes to.
    vnetRoutes VnetRouteResponse
    List of routes that control routing from VirtualHub into a virtual network connection.
    associated_route_table SubResourceResponse
    The resource id RouteTable associated with this RoutingConfiguration.
    inbound_route_map SubResourceResponse
    The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes.
    outbound_route_map SubResourceResponse
    The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes.
    propagated_route_tables PropagatedRouteTableResponse
    The list of RouteTables to advertise the routes to.
    vnet_routes VnetRouteResponse
    List of routes that control routing from VirtualHub into a virtual network connection.
    associatedRouteTable Property Map
    The resource id RouteTable associated with this RoutingConfiguration.
    inboundRouteMap Property Map
    The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes.
    outboundRouteMap Property Map
    The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes.
    propagatedRouteTables Property Map
    The list of RouteTables to advertise the routes to.
    vnetRoutes Property Map
    List of routes that control routing from VirtualHub into a virtual network connection.

    StaticRouteResponse

    AddressPrefixes List<string>
    List of all address prefixes.
    Name string
    The name of the StaticRoute that is unique within a VnetRoute.
    NextHopIpAddress string
    The ip address of the next hop.
    AddressPrefixes []string
    List of all address prefixes.
    Name string
    The name of the StaticRoute that is unique within a VnetRoute.
    NextHopIpAddress string
    The ip address of the next hop.
    address_prefixes list(string)
    List of all address prefixes.
    name string
    The name of the StaticRoute that is unique within a VnetRoute.
    next_hop_ip_address string
    The ip address of the next hop.
    addressPrefixes List<String>
    List of all address prefixes.
    name String
    The name of the StaticRoute that is unique within a VnetRoute.
    nextHopIpAddress String
    The ip address of the next hop.
    addressPrefixes string[]
    List of all address prefixes.
    name string
    The name of the StaticRoute that is unique within a VnetRoute.
    nextHopIpAddress string
    The ip address of the next hop.
    address_prefixes Sequence[str]
    List of all address prefixes.
    name str
    The name of the StaticRoute that is unique within a VnetRoute.
    next_hop_ip_address str
    The ip address of the next hop.
    addressPrefixes List<String>
    List of all address prefixes.
    name String
    The name of the StaticRoute that is unique within a VnetRoute.
    nextHopIpAddress String
    The ip address of the next hop.

    StaticRoutesConfigResponse

    PropagateStaticRoutes bool
    Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to.
    VnetLocalRouteOverrideCriteria string
    Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke.
    PropagateStaticRoutes bool
    Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to.
    VnetLocalRouteOverrideCriteria string
    Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke.
    propagate_static_routes bool
    Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to.
    vnet_local_route_override_criteria string
    Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke.
    propagateStaticRoutes Boolean
    Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to.
    vnetLocalRouteOverrideCriteria String
    Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke.
    propagateStaticRoutes boolean
    Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to.
    vnetLocalRouteOverrideCriteria string
    Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke.
    propagate_static_routes bool
    Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to.
    vnet_local_route_override_criteria str
    Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke.
    propagateStaticRoutes Boolean
    Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to.
    vnetLocalRouteOverrideCriteria String
    Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke.

    SubResourceResponse

    Id string
    Resource ID.
    Id string
    Resource ID.
    id string
    Resource ID.
    id String
    Resource ID.
    id string
    Resource ID.
    id str
    Resource ID.
    id String
    Resource ID.

    VnetRouteResponse

    BgpConnections []SubResourceResponse
    The list of references to HubBgpConnection objects.
    StaticRoutes []StaticRouteResponse
    List of all Static Routes.
    StaticRoutesConfig StaticRoutesConfigResponse
    Configuration for static routes on this HubVnetConnection.
    bgp_connections list(object)
    The list of references to HubBgpConnection objects.
    static_routes list(object)
    List of all Static Routes.
    static_routes_config object
    Configuration for static routes on this HubVnetConnection.
    bgpConnections List<SubResourceResponse>
    The list of references to HubBgpConnection objects.
    staticRoutes List<StaticRouteResponse>
    List of all Static Routes.
    staticRoutesConfig StaticRoutesConfigResponse
    Configuration for static routes on this HubVnetConnection.
    bgpConnections SubResourceResponse[]
    The list of references to HubBgpConnection objects.
    staticRoutes StaticRouteResponse[]
    List of all Static Routes.
    staticRoutesConfig StaticRoutesConfigResponse
    Configuration for static routes on this HubVnetConnection.
    bgp_connections Sequence[SubResourceResponse]
    The list of references to HubBgpConnection objects.
    static_routes Sequence[StaticRouteResponse]
    List of all Static Routes.
    static_routes_config StaticRoutesConfigResponse
    Configuration for static routes on this HubVnetConnection.
    bgpConnections List<Property Map>
    The list of references to HubBgpConnection objects.
    staticRoutes List<Property Map>
    List of all Static Routes.
    staticRoutesConfig Property Map
    Configuration for static routes on this HubVnetConnection.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Viewing docs for Azure Native v3.25.0
    published on Wednesday, Aug 5, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial