1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getPrivateCrossconnect
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getPrivateCrossconnect

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 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.getPrivateCrossconnect({
        id: "private_crossconnect_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_private_crossconnect(id="private_crossconnect_id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.LookupPrivateCrossconnect(ctx, &ionoscloud.LookupPrivateCrossconnectArgs{
    			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.GetPrivateCrossconnect.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.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetPrivateCrossconnectArgs;
    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 = IonoscloudFunctions.getPrivateCrossconnect(GetPrivateCrossconnectArgs.builder()
                .id("private_crossconnect_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getPrivateCrossconnect
          arguments:
            id: private_crossconnect_id
    

    By Name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.getPrivateCrossconnect({
        name: "Cross Connect Example",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_private_crossconnect(name="Cross Connect Example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.LookupPrivateCrossconnect(ctx, &ionoscloud.LookupPrivateCrossconnectArgs{
    			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.GetPrivateCrossconnect.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.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetPrivateCrossconnectArgs;
    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 = IonoscloudFunctions.getPrivateCrossconnect(GetPrivateCrossconnectArgs.builder()
                .name("Cross Connect Example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getPrivateCrossconnect
          arguments:
            name: Cross Connect Example
    

    Using getPrivateCrossconnect

    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 getPrivateCrossconnect(args: GetPrivateCrossconnectArgs, opts?: InvokeOptions): Promise<GetPrivateCrossconnectResult>
    function getPrivateCrossconnectOutput(args: GetPrivateCrossconnectOutputArgs, opts?: InvokeOptions): Output<GetPrivateCrossconnectResult>
    def get_private_crossconnect(description: Optional[str] = None,
                                 id: Optional[str] = None,
                                 name: Optional[str] = None,
                                 timeouts: Optional[GetPrivateCrossconnectTimeouts] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetPrivateCrossconnectResult
    def get_private_crossconnect_output(description: Optional[pulumi.Input[str]] = None,
                                 id: Optional[pulumi.Input[str]] = None,
                                 name: Optional[pulumi.Input[str]] = None,
                                 timeouts: Optional[pulumi.Input[GetPrivateCrossconnectTimeoutsArgs]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetPrivateCrossconnectResult]
    func LookupPrivateCrossconnect(ctx *Context, args *LookupPrivateCrossconnectArgs, opts ...InvokeOption) (*LookupPrivateCrossconnectResult, error)
    func LookupPrivateCrossconnectOutput(ctx *Context, args *LookupPrivateCrossconnectOutputArgs, opts ...InvokeOption) LookupPrivateCrossconnectResultOutput

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

    public static class GetPrivateCrossconnect 
    {
        public static Task<GetPrivateCrossconnectResult> InvokeAsync(GetPrivateCrossconnectArgs args, InvokeOptions? opts = null)
        public static Output<GetPrivateCrossconnectResult> Invoke(GetPrivateCrossconnectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPrivateCrossconnectResult> getPrivateCrossconnect(GetPrivateCrossconnectArgs args, InvokeOptions options)
    public static Output<GetPrivateCrossconnectResult> getPrivateCrossconnect(GetPrivateCrossconnectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:index/getPrivateCrossconnect:getPrivateCrossconnect
      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.
    Timeouts GetPrivateCrossconnectTimeouts
    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.
    Timeouts GetPrivateCrossconnectTimeouts
    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.
    timeouts GetPrivateCrossconnectTimeouts
    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.
    timeouts GetPrivateCrossconnectTimeouts
    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.
    timeouts GetPrivateCrossconnectTimeouts
    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.
    timeouts Property Map

    getPrivateCrossconnect Result

    The following output properties are available:

    ConnectableDatacenters List<GetPrivateCrossconnectConnectableDatacenter>
    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<GetPrivateCrossconnectPeer>
    Lists LAN's joined to this cross connect
    Timeouts GetPrivateCrossconnectTimeouts
    ConnectableDatacenters []GetPrivateCrossconnectConnectableDatacenter
    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 []GetPrivateCrossconnectPeer
    Lists LAN's joined to this cross connect
    Timeouts GetPrivateCrossconnectTimeouts
    connectableDatacenters List<GetPrivateCrossconnectConnectableDatacenter>
    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<GetPrivateCrossconnectPeer>
    Lists LAN's joined to this cross connect
    timeouts GetPrivateCrossconnectTimeouts
    connectableDatacenters GetPrivateCrossconnectConnectableDatacenter[]
    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 GetPrivateCrossconnectPeer[]
    Lists LAN's joined to this cross connect
    timeouts GetPrivateCrossconnectTimeouts
    connectable_datacenters Sequence[GetPrivateCrossconnectConnectableDatacenter]
    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[GetPrivateCrossconnectPeer]
    Lists LAN's joined to this cross connect
    timeouts GetPrivateCrossconnectTimeouts
    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
    timeouts Property Map

    Supporting Types

    GetPrivateCrossconnectConnectableDatacenter

    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.

    GetPrivateCrossconnectPeer

    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

    GetPrivateCrossconnectTimeouts

    Create string
    Default string
    Delete string
    Update string
    Create string
    Default string
    Delete string
    Update string
    create String
    default_ String
    delete String
    update String
    create string
    default string
    delete string
    update string
    create String
    default String
    delete String
    update String

    Package Details

    Repository
    ionoscloud ionos-cloud/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud