1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. getExpressRouteCircuit

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

azure.network.getExpressRouteCircuit

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

    Use this data source to access information about an existing ExpressRoute circuit.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.network.getExpressRouteCircuit({
        resourceGroupName: exampleAzurermResourceGroup.name,
        name: exampleAzurermExpressRouteCircuit.name,
    });
    export const expressRouteCircuitId = example.then(example => example.id);
    export const serviceKey = example.then(example => example.serviceKey);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.network.get_express_route_circuit(resource_group_name=example_azurerm_resource_group["name"],
        name=example_azurerm_express_route_circuit["name"])
    pulumi.export("expressRouteCircuitId", example.id)
    pulumi.export("serviceKey", example.service_key)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := network.LookupExpressRouteCircuit(ctx, &network.LookupExpressRouteCircuitArgs{
    			ResourceGroupName: exampleAzurermResourceGroup.Name,
    			Name:              exampleAzurermExpressRouteCircuit.Name,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("expressRouteCircuitId", example.Id)
    		ctx.Export("serviceKey", example.ServiceKey)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Network.GetExpressRouteCircuit.Invoke(new()
        {
            ResourceGroupName = exampleAzurermResourceGroup.Name,
            Name = exampleAzurermExpressRouteCircuit.Name,
        });
    
        return new Dictionary<string, object?>
        {
            ["expressRouteCircuitId"] = example.Apply(getExpressRouteCircuitResult => getExpressRouteCircuitResult.Id),
            ["serviceKey"] = example.Apply(getExpressRouteCircuitResult => getExpressRouteCircuitResult.ServiceKey),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.network.NetworkFunctions;
    import com.pulumi.azure.network.inputs.GetExpressRouteCircuitArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = NetworkFunctions.getExpressRouteCircuit(GetExpressRouteCircuitArgs.builder()
                .resourceGroupName(exampleAzurermResourceGroup.name())
                .name(exampleAzurermExpressRouteCircuit.name())
                .build());
    
            ctx.export("expressRouteCircuitId", example.applyValue(getExpressRouteCircuitResult -> getExpressRouteCircuitResult.id()));
            ctx.export("serviceKey", example.applyValue(getExpressRouteCircuitResult -> getExpressRouteCircuitResult.serviceKey()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:network:getExpressRouteCircuit
          Arguments:
            resourceGroupName: ${exampleAzurermResourceGroup.name}
            name: ${exampleAzurermExpressRouteCircuit.name}
    outputs:
      expressRouteCircuitId: ${example.id}
      serviceKey: ${example.serviceKey}
    

    Using getExpressRouteCircuit

    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 getExpressRouteCircuit(args: GetExpressRouteCircuitArgs, opts?: InvokeOptions): Promise<GetExpressRouteCircuitResult>
    function getExpressRouteCircuitOutput(args: GetExpressRouteCircuitOutputArgs, opts?: InvokeOptions): Output<GetExpressRouteCircuitResult>
    def get_express_route_circuit(name: Optional[str] = None,
                                  resource_group_name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetExpressRouteCircuitResult
    def get_express_route_circuit_output(name: Optional[pulumi.Input[str]] = None,
                                  resource_group_name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetExpressRouteCircuitResult]
    func LookupExpressRouteCircuit(ctx *Context, args *LookupExpressRouteCircuitArgs, opts ...InvokeOption) (*LookupExpressRouteCircuitResult, error)
    func LookupExpressRouteCircuitOutput(ctx *Context, args *LookupExpressRouteCircuitOutputArgs, opts ...InvokeOption) LookupExpressRouteCircuitResultOutput

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

    public static class GetExpressRouteCircuit 
    {
        public static Task<GetExpressRouteCircuitResult> InvokeAsync(GetExpressRouteCircuitArgs args, InvokeOptions? opts = null)
        public static Output<GetExpressRouteCircuitResult> Invoke(GetExpressRouteCircuitInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetExpressRouteCircuitResult> getExpressRouteCircuit(GetExpressRouteCircuitArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:network/getExpressRouteCircuit:getExpressRouteCircuit
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the ExpressRoute circuit.
    ResourceGroupName string
    The Name of the Resource Group where the ExpressRoute circuit exists.
    Name string
    The name of the ExpressRoute circuit.
    ResourceGroupName string
    The Name of the Resource Group where the ExpressRoute circuit exists.
    name String
    The name of the ExpressRoute circuit.
    resourceGroupName String
    The Name of the Resource Group where the ExpressRoute circuit exists.
    name string
    The name of the ExpressRoute circuit.
    resourceGroupName string
    The Name of the Resource Group where the ExpressRoute circuit exists.
    name str
    The name of the ExpressRoute circuit.
    resource_group_name str
    The Name of the Resource Group where the ExpressRoute circuit exists.
    name String
    The name of the ExpressRoute circuit.
    resourceGroupName String
    The Name of the Resource Group where the ExpressRoute circuit exists.

    getExpressRouteCircuit Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure location where the ExpressRoute circuit exists
    Name string
    Peerings List<GetExpressRouteCircuitPeering>
    A peerings block for the ExpressRoute circuit as documented below
    ResourceGroupName string
    ServiceKey string
    The string needed by the service provider to provision the ExpressRoute circuit.
    ServiceProviderProperties List<GetExpressRouteCircuitServiceProviderProperty>
    A service_provider_properties block for the ExpressRoute circuit as documented below
    ServiceProviderProvisioningState string
    The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned, Provisioning, Provisioned, and Deprovisioning.
    Sku GetExpressRouteCircuitSku
    A sku block for the ExpressRoute circuit as documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure location where the ExpressRoute circuit exists
    Name string
    Peerings []GetExpressRouteCircuitPeeringType
    A peerings block for the ExpressRoute circuit as documented below
    ResourceGroupName string
    ServiceKey string
    The string needed by the service provider to provision the ExpressRoute circuit.
    ServiceProviderProperties []GetExpressRouteCircuitServiceProviderProperty
    A service_provider_properties block for the ExpressRoute circuit as documented below
    ServiceProviderProvisioningState string
    The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned, Provisioning, Provisioned, and Deprovisioning.
    Sku GetExpressRouteCircuitSku
    A sku block for the ExpressRoute circuit as documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure location where the ExpressRoute circuit exists
    name String
    peerings List<GetExpressRouteCircuitPeering>
    A peerings block for the ExpressRoute circuit as documented below
    resourceGroupName String
    serviceKey String
    The string needed by the service provider to provision the ExpressRoute circuit.
    serviceProviderProperties List<GetExpressRouteCircuitServiceProviderProperty>
    A service_provider_properties block for the ExpressRoute circuit as documented below
    serviceProviderProvisioningState String
    The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned, Provisioning, Provisioned, and Deprovisioning.
    sku GetExpressRouteCircuitSku
    A sku block for the ExpressRoute circuit as documented below.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Azure location where the ExpressRoute circuit exists
    name string
    peerings GetExpressRouteCircuitPeering[]
    A peerings block for the ExpressRoute circuit as documented below
    resourceGroupName string
    serviceKey string
    The string needed by the service provider to provision the ExpressRoute circuit.
    serviceProviderProperties GetExpressRouteCircuitServiceProviderProperty[]
    A service_provider_properties block for the ExpressRoute circuit as documented below
    serviceProviderProvisioningState string
    The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned, Provisioning, Provisioned, and Deprovisioning.
    sku GetExpressRouteCircuitSku
    A sku block for the ExpressRoute circuit as documented below.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Azure location where the ExpressRoute circuit exists
    name str
    peerings Sequence[GetExpressRouteCircuitPeering]
    A peerings block for the ExpressRoute circuit as documented below
    resource_group_name str
    service_key str
    The string needed by the service provider to provision the ExpressRoute circuit.
    service_provider_properties Sequence[GetExpressRouteCircuitServiceProviderProperty]
    A service_provider_properties block for the ExpressRoute circuit as documented below
    service_provider_provisioning_state str
    The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned, Provisioning, Provisioned, and Deprovisioning.
    sku GetExpressRouteCircuitSku
    A sku block for the ExpressRoute circuit as documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure location where the ExpressRoute circuit exists
    name String
    peerings List<Property Map>
    A peerings block for the ExpressRoute circuit as documented below
    resourceGroupName String
    serviceKey String
    The string needed by the service provider to provision the ExpressRoute circuit.
    serviceProviderProperties List<Property Map>
    A service_provider_properties block for the ExpressRoute circuit as documented below
    serviceProviderProvisioningState String
    The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned, Provisioning, Provisioned, and Deprovisioning.
    sku Property Map
    A sku block for the ExpressRoute circuit as documented below.

    Supporting Types

    GetExpressRouteCircuitPeering

    AzureAsn int
    The Either a 16-bit or a 32-bit ASN for Azure.
    PeerAsn int
    The Either a 16-bit or a 32-bit ASN. Can either be public or private.
    PeeringType string
    The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering, AzurePublicPeering and MicrosoftPeering. Changing this forces a new resource to be created.
    PrimaryPeerAddressPrefix string
    A /30 subnet for the primary link.
    SecondaryPeerAddressPrefix string
    A /30 subnet for the secondary link.
    SharedKey string
    The shared key. Can be a maximum of 25 characters.
    VlanId int
    A valid VLAN ID to establish this peering on.
    AzureAsn int
    The Either a 16-bit or a 32-bit ASN for Azure.
    PeerAsn int
    The Either a 16-bit or a 32-bit ASN. Can either be public or private.
    PeeringType string
    The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering, AzurePublicPeering and MicrosoftPeering. Changing this forces a new resource to be created.
    PrimaryPeerAddressPrefix string
    A /30 subnet for the primary link.
    SecondaryPeerAddressPrefix string
    A /30 subnet for the secondary link.
    SharedKey string
    The shared key. Can be a maximum of 25 characters.
    VlanId int
    A valid VLAN ID to establish this peering on.
    azureAsn Integer
    The Either a 16-bit or a 32-bit ASN for Azure.
    peerAsn Integer
    The Either a 16-bit or a 32-bit ASN. Can either be public or private.
    peeringType String
    The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering, AzurePublicPeering and MicrosoftPeering. Changing this forces a new resource to be created.
    primaryPeerAddressPrefix String
    A /30 subnet for the primary link.
    secondaryPeerAddressPrefix String
    A /30 subnet for the secondary link.
    sharedKey String
    The shared key. Can be a maximum of 25 characters.
    vlanId Integer
    A valid VLAN ID to establish this peering on.
    azureAsn number
    The Either a 16-bit or a 32-bit ASN for Azure.
    peerAsn number
    The Either a 16-bit or a 32-bit ASN. Can either be public or private.
    peeringType string
    The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering, AzurePublicPeering and MicrosoftPeering. Changing this forces a new resource to be created.
    primaryPeerAddressPrefix string
    A /30 subnet for the primary link.
    secondaryPeerAddressPrefix string
    A /30 subnet for the secondary link.
    sharedKey string
    The shared key. Can be a maximum of 25 characters.
    vlanId number
    A valid VLAN ID to establish this peering on.
    azure_asn int
    The Either a 16-bit or a 32-bit ASN for Azure.
    peer_asn int
    The Either a 16-bit or a 32-bit ASN. Can either be public or private.
    peering_type str
    The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering, AzurePublicPeering and MicrosoftPeering. Changing this forces a new resource to be created.
    primary_peer_address_prefix str
    A /30 subnet for the primary link.
    secondary_peer_address_prefix str
    A /30 subnet for the secondary link.
    shared_key str
    The shared key. Can be a maximum of 25 characters.
    vlan_id int
    A valid VLAN ID to establish this peering on.
    azureAsn Number
    The Either a 16-bit or a 32-bit ASN for Azure.
    peerAsn Number
    The Either a 16-bit or a 32-bit ASN. Can either be public or private.
    peeringType String
    The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering, AzurePublicPeering and MicrosoftPeering. Changing this forces a new resource to be created.
    primaryPeerAddressPrefix String
    A /30 subnet for the primary link.
    secondaryPeerAddressPrefix String
    A /30 subnet for the secondary link.
    sharedKey String
    The shared key. Can be a maximum of 25 characters.
    vlanId Number
    A valid VLAN ID to establish this peering on.

    GetExpressRouteCircuitServiceProviderProperty

    BandwidthInMbps int
    The bandwidth in Mbps of the ExpressRoute circuit.
    PeeringLocation string
    The name of the peering location and not the Azure resource location.
    ServiceProviderName string
    The name of the ExpressRoute Service Provider.
    BandwidthInMbps int
    The bandwidth in Mbps of the ExpressRoute circuit.
    PeeringLocation string
    The name of the peering location and not the Azure resource location.
    ServiceProviderName string
    The name of the ExpressRoute Service Provider.
    bandwidthInMbps Integer
    The bandwidth in Mbps of the ExpressRoute circuit.
    peeringLocation String
    The name of the peering location and not the Azure resource location.
    serviceProviderName String
    The name of the ExpressRoute Service Provider.
    bandwidthInMbps number
    The bandwidth in Mbps of the ExpressRoute circuit.
    peeringLocation string
    The name of the peering location and not the Azure resource location.
    serviceProviderName string
    The name of the ExpressRoute Service Provider.
    bandwidth_in_mbps int
    The bandwidth in Mbps of the ExpressRoute circuit.
    peering_location str
    The name of the peering location and not the Azure resource location.
    service_provider_name str
    The name of the ExpressRoute Service Provider.
    bandwidthInMbps Number
    The bandwidth in Mbps of the ExpressRoute circuit.
    peeringLocation String
    The name of the peering location and not the Azure resource location.
    serviceProviderName String
    The name of the ExpressRoute Service Provider.

    GetExpressRouteCircuitSku

    Family string
    The billing mode for bandwidth. Possible values are MeteredData or UnlimitedData.
    Tier string
    The service tier. Possible values are Basic, Local, Standard or Premium.
    Family string
    The billing mode for bandwidth. Possible values are MeteredData or UnlimitedData.
    Tier string
    The service tier. Possible values are Basic, Local, Standard or Premium.
    family String
    The billing mode for bandwidth. Possible values are MeteredData or UnlimitedData.
    tier String
    The service tier. Possible values are Basic, Local, Standard or Premium.
    family string
    The billing mode for bandwidth. Possible values are MeteredData or UnlimitedData.
    tier string
    The service tier. Possible values are Basic, Local, Standard or Premium.
    family str
    The billing mode for bandwidth. Possible values are MeteredData or UnlimitedData.
    tier str
    The service tier. Possible values are Basic, Local, Standard or Premium.
    family String
    The billing mode for bandwidth. Possible values are MeteredData or UnlimitedData.
    tier String
    The service tier. Possible values are Basic, Local, Standard or Premium.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi