1. Packages
  2. Ionoscloud
  3. API Docs
  4. compute
  5. getCrossconnect
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

ionoscloud.compute.getCrossconnect

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

    The Cross Connect data source can be used to search for and return existing cross connects. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    By ID

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.compute.getCrossconnect({
        id: "private_crossconnect_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_crossconnect(id="private_crossconnect_id")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.LookupCrossconnect(ctx, &compute.LookupCrossconnectArgs{
    			Id: pulumi.StringRef("private_crossconnect_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Compute.GetCrossconnect.Invoke(new()
        {
            Id = "private_crossconnect_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.compute.ComputeFunctions;
    import com.pulumi.ionoscloud.compute.inputs.GetCrossconnectArgs;
    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 = ComputeFunctions.getCrossconnect(GetCrossconnectArgs.builder()
                .id("private_crossconnect_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getCrossconnect
          arguments:
            id: private_crossconnect_id
    

    By Name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.compute.getCrossconnect({
        name: "Cross Connect Example",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_crossconnect(name="Cross Connect Example")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.LookupCrossconnect(ctx, &compute.LookupCrossconnectArgs{
    			Name: pulumi.StringRef("Cross Connect Example"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Compute.GetCrossconnect.Invoke(new()
        {
            Name = "Cross Connect Example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.compute.ComputeFunctions;
    import com.pulumi.ionoscloud.compute.inputs.GetCrossconnectArgs;
    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 = ComputeFunctions.getCrossconnect(GetCrossconnectArgs.builder()
                .name("Cross Connect Example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getCrossconnect
          arguments:
            name: Cross Connect Example
    

    Using getCrossconnect

    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 getCrossconnect(args: GetCrossconnectArgs, opts?: InvokeOptions): Promise<GetCrossconnectResult>
    function getCrossconnectOutput(args: GetCrossconnectOutputArgs, opts?: InvokeOptions): Output<GetCrossconnectResult>
    def get_crossconnect(description: Optional[str] = None,
                         id: Optional[str] = None,
                         name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCrossconnectResult
    def get_crossconnect_output(description: Optional[pulumi.Input[str]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCrossconnectResult]
    func LookupCrossconnect(ctx *Context, args *LookupCrossconnectArgs, opts ...InvokeOption) (*LookupCrossconnectResult, error)
    func LookupCrossconnectOutput(ctx *Context, args *LookupCrossconnectOutputArgs, opts ...InvokeOption) LookupCrossconnectResultOutput

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

    public static class GetCrossconnect 
    {
        public static Task<GetCrossconnectResult> InvokeAsync(GetCrossconnectArgs args, InvokeOptions? opts = null)
        public static Output<GetCrossconnectResult> Invoke(GetCrossconnectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCrossconnectResult> getCrossconnect(GetCrossconnectArgs args, InvokeOptions options)
    public static Output<GetCrossconnectResult> getCrossconnect(GetCrossconnectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:compute/getCrossconnect:getCrossconnect
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    Description of cross connect
    Id string

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    Name string
    Name of an existing cross connect that you want to search for.
    Description string
    Description of cross connect
    Id string

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    Name string
    Name of an existing cross connect that you want to search for.
    description String
    Description of cross connect
    id String

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    name String
    Name of an existing cross connect that you want to search for.
    description string
    Description of cross connect
    id string

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    name string
    Name of an existing cross connect that you want to search for.
    description str
    Description of cross connect
    id str

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    name str
    Name of an existing cross connect that you want to search for.
    description String
    Description of cross connect
    id String

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    name String
    Name of an existing cross connect that you want to search for.

    getCrossconnect Result

    The following output properties are available:

    ConnectableDatacenters List<Ionoscloud.GetCrossconnectConnectableDatacenter>
    Lists datacenters that can be joined to this cross connect
    Description string
    Description of cross connect
    Id string
    The UUID of the connectable datacenter
    Name string
    The name of the connectable datacenter
    Peers List<Ionoscloud.GetCrossconnectPeer>
    Lists LAN's joined to this cross connect
    ConnectableDatacenters []GetCrossconnectConnectableDatacenter
    Lists datacenters that can be joined to this cross connect
    Description string
    Description of cross connect
    Id string
    The UUID of the connectable datacenter
    Name string
    The name of the connectable datacenter
    Peers []GetCrossconnectPeer
    Lists LAN's joined to this cross connect
    connectableDatacenters List<GetCrossconnectConnectableDatacenter>
    Lists datacenters that can be joined to this cross connect
    description String
    Description of cross connect
    id String
    The UUID of the connectable datacenter
    name String
    The name of the connectable datacenter
    peers List<GetCrossconnectPeer>
    Lists LAN's joined to this cross connect
    connectableDatacenters GetCrossconnectConnectableDatacenter[]
    Lists datacenters that can be joined to this cross connect
    description string
    Description of cross connect
    id string
    The UUID of the connectable datacenter
    name string
    The name of the connectable datacenter
    peers GetCrossconnectPeer[]
    Lists LAN's joined to this cross connect
    connectable_datacenters Sequence[GetCrossconnectConnectableDatacenter]
    Lists datacenters that can be joined to this cross connect
    description str
    Description of cross connect
    id str
    The UUID of the connectable datacenter
    name str
    The name of the connectable datacenter
    peers Sequence[GetCrossconnectPeer]
    Lists LAN's joined to this cross connect
    connectableDatacenters List<Property Map>
    Lists datacenters that can be joined to this cross connect
    description String
    Description of cross connect
    id String
    The UUID of the connectable datacenter
    name String
    The name of the connectable datacenter
    peers List<Property Map>
    Lists LAN's joined to this cross connect

    Supporting Types

    GetCrossconnectConnectableDatacenter

    Id string

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    Location string
    The physical location of the connectable datacenter
    Name string
    Name of an existing cross connect that you want to search for.
    Id string

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    Location string
    The physical location of the connectable datacenter
    Name string
    Name of an existing cross connect that you want to search for.
    id String

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    location String
    The physical location of the connectable datacenter
    name String
    Name of an existing cross connect that you want to search for.
    id string

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    location string
    The physical location of the connectable datacenter
    name string
    Name of an existing cross connect that you want to search for.
    id str

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    location str
    The physical location of the connectable datacenter
    name str
    Name of an existing cross connect that you want to search for.
    id String

    ID of the cross connect you want to search for.

    Either name or id must be provided. If none, or both are provided, the datasource will return an error.

    location String
    The physical location of the connectable datacenter
    name String
    Name of an existing cross connect that you want to search for.

    GetCrossconnectPeer

    DatacenterId string
    The id of the cross-connected datacenter
    DatacenterName string
    The name of the cross-connected datacenter
    LanId string
    The id of the cross-connected LAN
    LanName string
    The name of the cross-connected LAN
    Location string
    The physical location of the connectable datacenter
    DatacenterId string
    The id of the cross-connected datacenter
    DatacenterName string
    The name of the cross-connected datacenter
    LanId string
    The id of the cross-connected LAN
    LanName string
    The name of the cross-connected LAN
    Location string
    The physical location of the connectable datacenter
    datacenterId String
    The id of the cross-connected datacenter
    datacenterName String
    The name of the cross-connected datacenter
    lanId String
    The id of the cross-connected LAN
    lanName String
    The name of the cross-connected LAN
    location String
    The physical location of the connectable datacenter
    datacenterId string
    The id of the cross-connected datacenter
    datacenterName string
    The name of the cross-connected datacenter
    lanId string
    The id of the cross-connected LAN
    lanName string
    The name of the cross-connected LAN
    location string
    The physical location of the connectable datacenter
    datacenter_id str
    The id of the cross-connected datacenter
    datacenter_name str
    The name of the cross-connected datacenter
    lan_id str
    The id of the cross-connected LAN
    lan_name str
    The name of the cross-connected LAN
    location str
    The physical location of the connectable datacenter
    datacenterId String
    The id of the cross-connected datacenter
    datacenterName String
    The name of the cross-connected datacenter
    lanId String
    The id of the cross-connected LAN
    lanName String
    The name of the cross-connected LAN
    location String
    The physical location of the connectable datacenter

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud