ionoscloud.compute.getCrossconnect
Explore with Pulumi AI
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
orid
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
orid
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
orid
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
orid
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
orid
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
orid
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:
- Connectable
Datacenters List<Ionoscloud.Get Crossconnect Connectable Datacenter> - 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.
Get Crossconnect Peer> - Lists LAN's joined to this cross connect
- Connectable
Datacenters []GetCrossconnect Connectable Datacenter - 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
[]Get
Crossconnect Peer - Lists LAN's joined to this cross connect
- connectable
Datacenters List<GetCrossconnect Connectable Datacenter> - 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<Get
Crossconnect Peer> - Lists LAN's joined to this cross connect
- connectable
Datacenters GetCrossconnect Connectable Datacenter[] - 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
Get
Crossconnect Peer[] - Lists LAN's joined to this cross connect
- connectable_
datacenters Sequence[GetCrossconnect Connectable Datacenter] - 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[Get
Crossconnect Peer] - Lists LAN's joined to this cross connect
- connectable
Datacenters 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
GetCrossconnectPeer
- Datacenter
Id string - The id of the cross-connected datacenter
- Datacenter
Name string - The name of the cross-connected datacenter
- Lan
Id string - The id of the cross-connected LAN
- Lan
Name string - The name of the cross-connected LAN
- Location string
- The physical location of the connectable datacenter
- Datacenter
Id string - The id of the cross-connected datacenter
- Datacenter
Name string - The name of the cross-connected datacenter
- Lan
Id string - The id of the cross-connected LAN
- Lan
Name string - The name of the cross-connected LAN
- Location string
- The physical location of the connectable datacenter
- datacenter
Id String - The id of the cross-connected datacenter
- datacenter
Name String - The name of the cross-connected datacenter
- lan
Id String - The id of the cross-connected LAN
- lan
Name String - The name of the cross-connected LAN
- location String
- The physical location of the connectable datacenter
- datacenter
Id string - The id of the cross-connected datacenter
- datacenter
Name string - The name of the cross-connected datacenter
- lan
Id string - The id of the cross-connected LAN
- lan
Name 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
- datacenter
Id String - The id of the cross-connected datacenter
- datacenter
Name String - The name of the cross-connected datacenter
- lan
Id String - The id of the cross-connected LAN
- lan
Name 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.