Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Core.getCrossConnectLocations
Explore with Pulumi AI
This data source provides the list of Cross Connect Locations in Oracle Cloud Infrastructure Core service.
Lists the available FastConnect locations for cross-connect installation. You need this information so you can specify your desired location when you create a cross-connect.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCrossConnectLocations = oci.Core.getCrossConnectLocations({
compartmentId: compartmentId,
});
import pulumi
import pulumi_oci as oci
test_cross_connect_locations = oci.Core.get_cross_connect_locations(compartment_id=compartment_id)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Core.GetCrossConnectLocations(ctx, &core.GetCrossConnectLocationsArgs{
CompartmentId: compartmentId,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testCrossConnectLocations = Oci.Core.GetCrossConnectLocations.Invoke(new()
{
CompartmentId = compartmentId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetCrossConnectLocationsArgs;
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 testCrossConnectLocations = CoreFunctions.getCrossConnectLocations(GetCrossConnectLocationsArgs.builder()
.compartmentId(compartmentId)
.build());
}
}
variables:
testCrossConnectLocations:
fn::invoke:
Function: oci:Core:getCrossConnectLocations
Arguments:
compartmentId: ${compartmentId}
Using getCrossConnectLocations
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 getCrossConnectLocations(args: GetCrossConnectLocationsArgs, opts?: InvokeOptions): Promise<GetCrossConnectLocationsResult>
function getCrossConnectLocationsOutput(args: GetCrossConnectLocationsOutputArgs, opts?: InvokeOptions): Output<GetCrossConnectLocationsResult>
def get_cross_connect_locations(compartment_id: Optional[str] = None,
filters: Optional[Sequence[_core.GetCrossConnectLocationsFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetCrossConnectLocationsResult
def get_cross_connect_locations_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetCrossConnectLocationsFilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCrossConnectLocationsResult]
func GetCrossConnectLocations(ctx *Context, args *GetCrossConnectLocationsArgs, opts ...InvokeOption) (*GetCrossConnectLocationsResult, error)
func GetCrossConnectLocationsOutput(ctx *Context, args *GetCrossConnectLocationsOutputArgs, opts ...InvokeOption) GetCrossConnectLocationsResultOutput
> Note: This function is named GetCrossConnectLocations
in the Go SDK.
public static class GetCrossConnectLocations
{
public static Task<GetCrossConnectLocationsResult> InvokeAsync(GetCrossConnectLocationsArgs args, InvokeOptions? opts = null)
public static Output<GetCrossConnectLocationsResult> Invoke(GetCrossConnectLocationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCrossConnectLocationsResult> getCrossConnectLocations(GetCrossConnectLocationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getCrossConnectLocations:getCrossConnectLocations
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Filters
List<Get
Cross Connect Locations Filter>
- Compartment
Id string - The OCID of the compartment.
- Filters
[]Get
Cross Connect Locations Filter
- compartment
Id String - The OCID of the compartment.
- filters
List<Get
Cross Connect Locations Filter>
- compartment
Id string - The OCID of the compartment.
- filters
Get
Cross Connect Locations Filter[]
- compartment_
id str - The OCID of the compartment.
- filters
Sequence[core.
Get Cross Connect Locations Filter]
- compartment
Id String - The OCID of the compartment.
- filters List<Property Map>
getCrossConnectLocations Result
The following output properties are available:
- Compartment
Id string - Cross
Connect List<GetLocations Cross Connect Locations Cross Connect Location> - The list of cross_connect_locations.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<Get
Cross Connect Locations Filter>
- Compartment
Id string - Cross
Connect []GetLocations Cross Connect Locations Cross Connect Location - The list of cross_connect_locations.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Cross Connect Locations Filter
- compartment
Id String - cross
Connect List<GetLocations Cross Connect Locations Cross Connect Location> - The list of cross_connect_locations.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<Get
Cross Connect Locations Filter>
- compartment
Id string - cross
Connect GetLocations Cross Connect Locations Cross Connect Location[] - The list of cross_connect_locations.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
Get
Cross Connect Locations Filter[]
- compartment_
id str - cross_
connect_ Sequence[core.locations Get Cross Connect Locations Cross Connect Location] - The list of cross_connect_locations.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[core.
Get Cross Connect Locations Filter]
- compartment
Id String - cross
Connect List<Property Map>Locations - The list of cross_connect_locations.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
Supporting Types
GetCrossConnectLocationsCrossConnectLocation
- Description string
- A description of the location.
- Name string
- The name of the location. Example:
CyrusOne, Chandler, AZ
- Description string
- A description of the location.
- Name string
- The name of the location. Example:
CyrusOne, Chandler, AZ
- description String
- A description of the location.
- name String
- The name of the location. Example:
CyrusOne, Chandler, AZ
- description string
- A description of the location.
- name string
- The name of the location. Example:
CyrusOne, Chandler, AZ
- description str
- A description of the location.
- name str
- The name of the location. Example:
CyrusOne, Chandler, AZ
- description String
- A description of the location.
- name String
- The name of the location. Example:
CyrusOne, Chandler, AZ
GetCrossConnectLocationsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.