Equinix v0.26.0 published on Friday, Aug 22, 2025 by Equinix
equinix.fabric.getMetros
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@pulumi/equinix";
const metros = equinix.fabric.getMetros({
pagination: {
limit: 12,
offset: 6,
},
});
export const numberOfReturnedMetros = metros.then(metros => metros.datas).length;
export const firstMetroType = metros.then(metros => metros.datas?.[0]?.type);
export const firstMetroCode = metros.then(metros => metros.datas?.[0]?.code);
export const firstMetroRegion = metros.then(metros => metros.datas?.[0]?.region);
export const firstMetroName = metros.then(metros => metros.datas?.[0]?.name);
export const firstMetroEquinixAsn = metros.then(metros => metros.datas?.[0]?.equinixAsn);
export const firstMetroLocalVcBandwidthMax = metros.then(metros => metros.datas?.[0]?.localVcBandwidthMax);
export const firstMetroGeoCoordinates = metros.then(metros => metros.datas?.[0]?.geoCoordinates);
export const firstMetroConnectedMetros = metros.then(metros => metros.datas?.[0]?.connectedMetros);
export const firstMetroGeoScopes = metros.then(metros => metros.datas?.[0]?.geoScopes);
import pulumi
import pulumi_equinix as equinix
metros = equinix.fabric.get_metros(pagination={
"limit": 12,
"offset": 6,
})
pulumi.export("numberOfReturnedMetros", len(metros.datas))
pulumi.export("firstMetroType", metros.datas[0].type)
pulumi.export("firstMetroCode", metros.datas[0].code)
pulumi.export("firstMetroRegion", metros.datas[0].region)
pulumi.export("firstMetroName", metros.datas[0].name)
pulumi.export("firstMetroEquinixAsn", metros.datas[0].equinix_asn)
pulumi.export("firstMetroLocalVcBandwidthMax", metros.datas[0].local_vc_bandwidth_max)
pulumi.export("firstMetroGeoCoordinates", metros.datas[0].geo_coordinates)
pulumi.export("firstMetroConnectedMetros", metros.datas[0].connected_metros)
pulumi.export("firstMetroGeoScopes", metros.datas[0].geo_scopes)
package main
import (
"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
metros, err := fabric.GetMetros(ctx, &fabric.GetMetrosArgs{
Pagination: fabric.GetMetrosPagination{
Limit: pulumi.IntRef(12),
Offset: pulumi.IntRef(6),
},
}, nil)
if err != nil {
return err
}
ctx.Export("numberOfReturnedMetros", pulumi.Int(len(metros.Datas)))
ctx.Export("firstMetroType", metros.Datas[0].Type)
ctx.Export("firstMetroCode", metros.Datas[0].Code)
ctx.Export("firstMetroRegion", metros.Datas[0].Region)
ctx.Export("firstMetroName", metros.Datas[0].Name)
ctx.Export("firstMetroEquinixAsn", metros.Datas[0].EquinixAsn)
ctx.Export("firstMetroLocalVcBandwidthMax", metros.Datas[0].LocalVcBandwidthMax)
ctx.Export("firstMetroGeoCoordinates", metros.Datas[0].GeoCoordinates)
ctx.Export("firstMetroConnectedMetros", metros.Datas[0].ConnectedMetros)
ctx.Export("firstMetroGeoScopes", metros.Datas[0].GeoScopes)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;
return await Deployment.RunAsync(() =>
{
var metros = Equinix.Fabric.GetMetros.Invoke(new()
{
Pagination = new Equinix.Fabric.Inputs.GetMetrosPaginationInputArgs
{
Limit = 12,
Offset = 6,
},
});
return new Dictionary<string, object?>
{
["numberOfReturnedMetros"] = metros.Apply(getMetrosResult => getMetrosResult.Datas).Length,
["firstMetroType"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.Type),
["firstMetroCode"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.Code),
["firstMetroRegion"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.Region),
["firstMetroName"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.Name),
["firstMetroEquinixAsn"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.EquinixAsn),
["firstMetroLocalVcBandwidthMax"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.LocalVcBandwidthMax),
["firstMetroGeoCoordinates"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.GeoCoordinates),
["firstMetroConnectedMetros"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.ConnectedMetros),
["firstMetroGeoScopes"] = metros.Apply(getMetrosResult => getMetrosResult.Datas[0]?.GeoScopes),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.equinix.fabric.FabricFunctions;
import com.pulumi.equinix.fabric.inputs.GetMetrosArgs;
import com.pulumi.equinix.fabric.inputs.GetMetrosPaginationArgs;
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 metros = FabricFunctions.getMetros(GetMetrosArgs.builder()
.pagination(GetMetrosPaginationArgs.builder()
.limit(12)
.offset(6)
.build())
.build());
ctx.export("numberOfReturnedMetros", metros.applyValue(getMetrosResult -> getMetrosResult.datas()).length());
ctx.export("firstMetroType", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].type()));
ctx.export("firstMetroCode", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].code()));
ctx.export("firstMetroRegion", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].region()));
ctx.export("firstMetroName", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].name()));
ctx.export("firstMetroEquinixAsn", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].equinixAsn()));
ctx.export("firstMetroLocalVcBandwidthMax", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].localVcBandwidthMax()));
ctx.export("firstMetroGeoCoordinates", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].geoCoordinates()));
ctx.export("firstMetroConnectedMetros", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].connectedMetros()));
ctx.export("firstMetroGeoScopes", metros.applyValue(getMetrosResult -> getMetrosResult.datas()[0].geoScopes()));
}
}
Example coming soon!
Using getMetros
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 getMetros(args: GetMetrosArgs, opts?: InvokeOptions): Promise<GetMetrosResult>
function getMetrosOutput(args: GetMetrosOutputArgs, opts?: InvokeOptions): Output<GetMetrosResult>
def get_metros(pagination: Optional[GetMetrosPagination] = None,
presence: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMetrosResult
def get_metros_output(pagination: Optional[pulumi.Input[GetMetrosPaginationArgs]] = None,
presence: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMetrosResult]
func GetMetros(ctx *Context, args *GetMetrosArgs, opts ...InvokeOption) (*GetMetrosResult, error)
func GetMetrosOutput(ctx *Context, args *GetMetrosOutputArgs, opts ...InvokeOption) GetMetrosResultOutput
> Note: This function is named GetMetros
in the Go SDK.
public static class GetMetros
{
public static Task<GetMetrosResult> InvokeAsync(GetMetrosArgs args, InvokeOptions? opts = null)
public static Output<GetMetrosResult> Invoke(GetMetrosInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMetrosResult> getMetros(GetMetrosArgs args, InvokeOptions options)
public static Output<GetMetrosResult> getMetros(GetMetrosArgs args, InvokeOptions options)
fn::invoke:
function: equinix:fabric/getMetros:getMetros
arguments:
# arguments dictionary
The following arguments are supported:
- Pagination
Get
Metros Pagination - Pagination details for the returned metro list
- Presence string
- User On Boarded Metros based on Fabric resource availability
- Pagination
Get
Metros Pagination - Pagination details for the returned metro list
- Presence string
- User On Boarded Metros based on Fabric resource availability
- pagination
Get
Metros Pagination - Pagination details for the returned metro list
- presence String
- User On Boarded Metros based on Fabric resource availability
- pagination
Get
Metros Pagination - Pagination details for the returned metro list
- presence string
- User On Boarded Metros based on Fabric resource availability
- pagination
Get
Metros Pagination - Pagination details for the returned metro list
- presence str
- User On Boarded Metros based on Fabric resource availability
- pagination Property Map
- Pagination details for the returned metro list
- presence String
- User On Boarded Metros based on Fabric resource availability
getMetros Result
The following output properties are available:
- Datas
List<Get
Metros Data> - Returned list of metro objects
- Id string
- The unique identifier of the resource
- Pagination
Get
Metros Pagination - Pagination details for the returned metro list
- Presence string
- User On Boarded Metros based on Fabric resource availability
- Datas
[]Get
Metros Data - Returned list of metro objects
- Id string
- The unique identifier of the resource
- Pagination
Get
Metros Pagination - Pagination details for the returned metro list
- Presence string
- User On Boarded Metros based on Fabric resource availability
- datas
List<Get
Metros Data> - Returned list of metro objects
- id String
- The unique identifier of the resource
- pagination
Get
Metros Pagination - Pagination details for the returned metro list
- presence String
- User On Boarded Metros based on Fabric resource availability
- datas
Get
Metros Data[] - Returned list of metro objects
- id string
- The unique identifier of the resource
- pagination
Get
Metros Pagination - Pagination details for the returned metro list
- presence string
- User On Boarded Metros based on Fabric resource availability
- datas
Sequence[Get
Metros Data] - Returned list of metro objects
- id str
- The unique identifier of the resource
- pagination
Get
Metros Pagination - Pagination details for the returned metro list
- presence str
- User On Boarded Metros based on Fabric resource availability
- datas List<Property Map>
- Returned list of metro objects
- id String
- The unique identifier of the resource
- pagination Property Map
- Pagination details for the returned metro list
- presence String
- User On Boarded Metros based on Fabric resource availability
Supporting Types
GetMetrosData
- Code string
- Code assigned to an Equinix IBX data center in a specified metropolitan area
- Connected
Metros List<GetMetros Data Connected Metro> - Arrays of objects containing latency data for the specified metro
- Equinix
Asn int - Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol.
- Geo
Coordinates GetMetros Data Geo Coordinates - Geographic location data of Fabric Metro
- Geo
Scopes List<string> - List of supported geographic boundaries of a Fabric Metro. Example values: CANADA, CONUS.
- Href string
- The canonical URL at which the resource resides
- Local
Vc intBandwidth Max - This field holds Max Connection speed within the metro.
- Name string
- Name of the region in which the data center is located
- Region string
- Board geographical area in which the data center is located
- Type string
- Indicator of a fabric metro
- Code string
- Code assigned to an Equinix IBX data center in a specified metropolitan area
- Connected
Metros []GetMetros Data Connected Metro - Arrays of objects containing latency data for the specified metro
- Equinix
Asn int - Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol.
- Geo
Coordinates GetMetros Data Geo Coordinates - Geographic location data of Fabric Metro
- Geo
Scopes []string - List of supported geographic boundaries of a Fabric Metro. Example values: CANADA, CONUS.
- Href string
- The canonical URL at which the resource resides
- Local
Vc intBandwidth Max - This field holds Max Connection speed within the metro.
- Name string
- Name of the region in which the data center is located
- Region string
- Board geographical area in which the data center is located
- Type string
- Indicator of a fabric metro
- code String
- Code assigned to an Equinix IBX data center in a specified metropolitan area
- connected
Metros List<GetMetros Data Connected Metro> - Arrays of objects containing latency data for the specified metro
- equinix
Asn Integer - Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol.
- geo
Coordinates GetMetros Data Geo Coordinates - Geographic location data of Fabric Metro
- geo
Scopes List<String> - List of supported geographic boundaries of a Fabric Metro. Example values: CANADA, CONUS.
- href String
- The canonical URL at which the resource resides
- local
Vc IntegerBandwidth Max - This field holds Max Connection speed within the metro.
- name String
- Name of the region in which the data center is located
- region String
- Board geographical area in which the data center is located
- type String
- Indicator of a fabric metro
- code string
- Code assigned to an Equinix IBX data center in a specified metropolitan area
- connected
Metros GetMetros Data Connected Metro[] - Arrays of objects containing latency data for the specified metro
- equinix
Asn number - Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol.
- geo
Coordinates GetMetros Data Geo Coordinates - Geographic location data of Fabric Metro
- geo
Scopes string[] - List of supported geographic boundaries of a Fabric Metro. Example values: CANADA, CONUS.
- href string
- The canonical URL at which the resource resides
- local
Vc numberBandwidth Max - This field holds Max Connection speed within the metro.
- name string
- Name of the region in which the data center is located
- region string
- Board geographical area in which the data center is located
- type string
- Indicator of a fabric metro
- code str
- Code assigned to an Equinix IBX data center in a specified metropolitan area
- connected_
metros Sequence[GetMetros Data Connected Metro] - Arrays of objects containing latency data for the specified metro
- equinix_
asn int - Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol.
- geo_
coordinates GetMetros Data Geo Coordinates - Geographic location data of Fabric Metro
- geo_
scopes Sequence[str] - List of supported geographic boundaries of a Fabric Metro. Example values: CANADA, CONUS.
- href str
- The canonical URL at which the resource resides
- local_
vc_ intbandwidth_ max - This field holds Max Connection speed within the metro.
- name str
- Name of the region in which the data center is located
- region str
- Board geographical area in which the data center is located
- type str
- Indicator of a fabric metro
- code String
- Code assigned to an Equinix IBX data center in a specified metropolitan area
- connected
Metros List<Property Map> - Arrays of objects containing latency data for the specified metro
- equinix
Asn Number - Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol.
- geo
Coordinates Property Map - Geographic location data of Fabric Metro
- geo
Scopes List<String> - List of supported geographic boundaries of a Fabric Metro. Example values: CANADA, CONUS.
- href String
- The canonical URL at which the resource resides
- local
Vc NumberBandwidth Max - This field holds Max Connection speed within the metro.
- name String
- Name of the region in which the data center is located
- region String
- Board geographical area in which the data center is located
- type String
- Indicator of a fabric metro
GetMetrosDataConnectedMetro
- Avg
Latency double - Code string
- Href string
- Remote
Vc intBandwidth Max
- Avg
Latency float64 - Code string
- Href string
- Remote
Vc intBandwidth Max
- avg
Latency Double - code String
- href String
- remote
Vc IntegerBandwidth Max
- avg
Latency number - code string
- href string
- remote
Vc numberBandwidth Max
- avg_
latency float - code str
- href str
- remote_
vc_ intbandwidth_ max
- avg
Latency Number - code String
- href String
- remote
Vc NumberBandwidth Max
GetMetrosDataGeoCoordinates
GetMetrosPagination
Package Details
- Repository
- equinix equinix/pulumi-equinix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
equinix
Terraform Provider.