Class Fabric

All Implemented Interfaces:
FabricGateway, Closeable, AutoCloseable

public final class Fabric extends EquinixClient implements FabricGateway
The primary entry point for accessing the Equinix Fabric APIs.

Equinix Fabric provides interconnection services that enable direct, private connectivity between infrastructure and applications. This class offers typed access to all Fabric resources including connections, ports, service tokens, cloud routers, routing protocols, route filters, streams, precision time services, networks, and more.

All resource accessors use lazy initialization - internal clients are created on first access and reused for subsequent calls.

Quick Start

BasicEquinixCredentials credentials = new BasicEquinixCredentials("clientId", "clientSecret");
Fabric fabric = new Fabric(credentials);

// List all connections
PaginatedFilteredList<Connection> connections = fabric.connections().search();

// Create a connection with dry-run validation
Connection validated = fabric.connections()
    .define(ConnectionType.EVPL_VC)
    .withName("My-Connection")
    .withBandwidth(100)
    .dryRun()
    .create();

// Check Fabric API health
HealthStatus health = fabric.health();

Resource Chaining

// Connection -> Metrics (POST /metrics/search; subject and name are required)
List<Metric> usage = fabric.metrics().forConnection(connectionUuid, startTime, endTime,
    "equinix.fabric.connection.bandwidth_tx.usage");

// Cloud Router -> Routing Protocol -> Route Filter chain
PaginatedFilteredList<CloudRouter> routers = fabric.cloudRouters().search();
PaginatedList<RoutingProtocol> protocols = fabric.routingProtocols().list(connectionId);
PaginatedFilteredList<RouteFilter> filters = fabric.routeFilters().search();
Author:
ianjones
See Also:
  • Constructor Details

    • Fabric

      public Fabric(EquinixCredentials equinixCredentials)
      Creates a new Fabric client using the provided credentials. Authentication occurs automatically on the first API call.
      Parameters:
      equinixCredentials - the OAuth2 credentials for authenticating with Equinix APIs
    • Fabric

      public Fabric(EquinixCredentials equinixCredentials, boolean isSandBoxed)
      Creates a new Fabric client with optional sandbox mode.
      Parameters:
      equinixCredentials - the OAuth2 credentials for authenticating with Equinix APIs
      isSandBoxed - true to use the sandbox environment for testing; false for production
    • Fabric

      public Fabric(EquinixCredentials equinixCredentials, EquinixConfig config)
      Creates a new Fabric client with explicit EquinixConfig options (sandbox, retry, metro auto-loading).
      Parameters:
      equinixCredentials - the OAuth2 credentials for authenticating with Equinix APIs
      config - the construction-time options
    • Fabric

      public Fabric(EquinixCredentialsProvider credentialsProvider)
      Creates a new Fabric client whose credentials are resolved through the given provider. Authentication occurs automatically on the first API call.
      Parameters:
      credentialsProvider - supplies the OAuth2 credentials for authenticating with Equinix APIs
    • Fabric

      public Fabric(EquinixCredentialsProvider credentialsProvider, boolean isSandBoxed)
      Creates a new Fabric client over a custom credentials provider, with optional sandbox mode.
      Parameters:
      credentialsProvider - supplies the OAuth2 credentials for authenticating with Equinix APIs
      isSandBoxed - true to use the sandbox environment for testing; false for production
    • Fabric

      public Fabric(EquinixCredentialsProvider credentialsProvider, EquinixConfig config)
      Creates a new Fabric client over a custom credentials provider with explicit EquinixConfig options.
      Parameters:
      credentialsProvider - supplies the OAuth2 credentials for authenticating with Equinix APIs
      config - the construction-time options
  • Method Details

    • authenticate

      public void authenticate() throws EquinixClientException
      Performs OAuth2 authentication and, when metro auto-loading is enabled (the default - see EquinixConfig.isAutoLoadMetros() on EquinixConfig), eagerly loads the metroRegistry() so the full metro catalogue (metros, their IBXs, coordinates, region, and inter-metro latencies) is resolved up front rather than lazily on first access. The catalogue load is best-effort: a failure there does not fail authentication, and the registry stays lazily loadable on demand.
      Overrides:
      authenticate in class EquinixClient
      Throws:
      EquinixClientException - if authentication itself fails
    • metros

      public Metros metros()
      Returns the client for managing Equinix metro locations. Metros represent geographic areas where Equinix data centers are located.
      Specified by:
      metros in interface FabricGateway
      Returns:
      the Metros client for listing and querying available metros
    • metroRegistry

      public MetroRegistry metroRegistry()
      Returns a cached, in-memory registry of every metro the Metros API reports (and the IBX data centers within each), keyed by MetroId so it covers metros the MetroCode enum does not list. Loaded lazily on first access from metros(); call reloadMetroRegistry() to refresh it.

      When EquinixConfig.enrichMetroRegistry is enabled, the load also pulls the EIA per-IBX catalogue (the only Equinix API with per-data-center coordinates) over this client's own transport and exposes it via MetroRegistry.ibx(String) - see EquinixConfig.isEnrichMetroRegistry().

      Returns:
      the metro registry
    • reloadMetroRegistry

      public MetroRegistry reloadMetroRegistry()
      Refreshes the metroRegistry() in place from a fresh Metros API call (re-running EIA enrichment when configured), picking up any metros or IBXes added since it was last loaded. Existing references to the registry see the fresh data - this delegates to MetroRegistry.refresh().
      Returns:
      the refreshed metro registry
    • serviceTokens

      public ServiceTokens serviceTokens()
      Returns the client for managing Fabric service tokens. Service tokens enable secure, delegated provisioning of connections between parties. Supports dry-run validation via the fluent builder.
      Returns:
      the ServiceTokens client for creating, listing, and managing service tokens
    • ports

      public Ports ports()
      Returns the client for managing Fabric ports (port metrics: metrics()). Ports represent physical network interfaces at Equinix data centers and serve as access points for Fabric connections.
      Returns:
      the Ports client for listing and managing ports
    • connections

      public Connections connections()
      Returns the client for managing Fabric connections (connection metrics: metrics()). Connections are the core resource in Fabric, representing virtual circuits between two access points (ports, service profiles, cloud providers, or network endpoints). Supports dry-run validation and fluent builder creation.
      Specified by:
      connections in interface FabricGateway
      Returns:
      the Connections client for creating, searching, and managing connections
    • metrics

      public Metrics metrics()
      Returns the client for querying Equinix Fabric metrics. The Metrics API provides time-series measurements (such as bandwidth usage) for Fabric connections, ports and metros through POST /metrics/search.
      Returns:
      the Metrics client for searching Fabric metrics
    • prices

      public Prices prices()
      Returns the client for querying Fabric pricing information. Provides access to pricing details for various Fabric connection types and configurations.
      Specified by:
      prices in interface FabricGateway
      Returns:
      the Prices client for searching and filtering pricing data
    • serviceProfiles

      public ServiceProfiles serviceProfiles()
      Returns the client for managing Fabric service profiles. Service profiles define how third-party providers (such as cloud providers) expose their services for Fabric connections.
      Specified by:
      serviceProfiles in interface FabricGateway
      Returns:
      the ServiceProfiles client for searching and managing service profiles
    • cloudRouters

      public CloudRouters cloudRouters()
      Returns the client for managing Fabric Cloud Routers and their associated packages. Cloud Routers enable dynamic routing between Fabric connections using BGP.
      Specified by:
      cloudRouters in interface FabricGateway
      Returns:
      the CloudRouters client for creating, searching, and managing cloud routers
    • routingProtocols

      public RoutingProtocols routingProtocols()
      Returns the client for managing routing protocols on Fabric connections. Routing protocols (such as BGP) define how routes are exchanged between connected endpoints through Cloud Routers.
      Specified by:
      routingProtocols in interface FabricGateway
      Returns:
      the RoutingProtocols client for configuring routing protocols on connections
    • routeFilters

      public RouteFilters routeFilters()
      Returns the client for managing Fabric route filters. Route filters control which routes are advertised or accepted through routing protocols, enabling fine-grained traffic engineering.
      Returns:
      the RouteFilters client for creating, searching, and managing route filters
    • eiaServices

      public EiaServices eiaServices()
      Returns the client for managing Equinix Internet Access (EIA) services. EIA services provide dedicated internet connectivity (single or dual) over Equinix Fabric, with configurable bandwidth, billing, and routing protocol (BGP/DIRECT/STATIC).
      Returns:
      the EiaServices client for creating, searching, and managing EIA services
    • routeFilterRules

      public RouteFilterRules routeFilterRules()
      Returns the client for managing individual rules within Fabric route filters. Each rule specifies a prefix and action (permit/deny) that determines how matching routes are handled.
      Returns:
      the RouteFilterRules client for CRUD operations on route filter rules
    • routeAggregations

      public RouteAggregations routeAggregations()
      Returns the client for managing Fabric route aggregations. Route aggregations summarize multiple specific routes into a single aggregated route, reducing the routing table size and simplifying network management.
      Returns:
      the RouteAggregations client for creating, searching, and managing route aggregations
    • routeAggregationRules

      public RouteAggregationRules routeAggregationRules()
      Returns the client for managing individual rules within Fabric route aggregations. Each rule specifies which prefixes are included in the aggregated route.
      Returns:
      the RouteAggregationRules client for CRUD operations on route aggregation rules
    • networks

      public Networks networks()
      Returns the client for managing Fabric networks. Networks are logical groupings of connections that enable multi-point connectivity and simplified management of related interconnection resources.
      Returns:
      the Networks client for creating, searching, and managing networks
    • streams

      public Streams streams()
      Returns the client for managing Fabric event streams. Streams provide real-time event delivery for Fabric resources, enabling observability and automation workflows.
      Returns:
      the Streams client for creating and managing event streams
    • streamSubscriptions

      public StreamSubscriptions streamSubscriptions()
      Returns the client for managing Fabric stream subscriptions. Stream subscriptions define how events from a stream are delivered to consumers, supporting various delivery mechanisms.
      Returns:
      the StreamSubscriptions client for creating and managing stream subscriptions
    • precisionTimes

      public PrecisionTimes precisionTimes()
      Returns the client for managing Equinix Precision Time services. Precision Time provides accurate time synchronization (NTP/PTP) for network infrastructure connected through Fabric.
      Returns:
      the PrecisionTimes client for creating and managing precision time services
    • cloudEvents

      public CloudEvents cloudEvents()
      Returns the client for accessing Fabric cloud events. Cloud events provide audit and operational event data for Fabric resources.
      Returns:
      the CloudEvents client for listing and searching cloud events
    • marketplaceSubscriptions

      public MarketplaceSubscriptions marketplaceSubscriptions()
      Returns the client for managing Fabric marketplace subscriptions. Marketplace subscriptions represent active subscriptions to services offered through the Equinix Fabric marketplace.
      Returns:
      the MarketplaceSubscriptions client for managing marketplace subscriptions
    • ipBlocks

      public IpBlocks ipBlocks()
      Returns the client for managing Fabric IP blocks (BYOIP / Equinix-owned IPv4 and IPv6 prefixes).
      Returns:
      the IpBlocks client for submitting, searching, and managing IP blocks
    • portPackages

      public PortPackages portPackages()
      Returns the client for querying Fabric port packages.
      Returns:
      the PortPackages client for listing port packages
    • streamAlertRules

      public StreamAlertRules streamAlertRules()
      Returns the client for managing alert rules attached to Fabric streams.
      Returns:
      the StreamAlertRules client for creating and managing stream alert rules
    • streamAssets

      public StreamAssets streamAssets()
      Returns the client for attaching and detaching assets to and from Fabric streams.
      Returns:
      the StreamAssets client for managing stream asset attachments
    • agents

      public Agents agents()
      Returns the client for managing Fabric agents (for example Autonomous Network Operations agents).
      Returns:
      the Agents client for creating, listing, and managing agents
    • agentTemplates

      public AgentTemplates agentTemplates()
      Returns the client for querying Fabric agent templates.
      Returns:
      the AgentTemplates client for listing agent templates
    • companyProfiles

      public CompanyProfiles companyProfiles()
      Returns the client for managing Fabric company profiles and their service-profile / tag attachments.
      Returns:
      the CompanyProfiles client for creating, searching, and managing company profiles
    • tags

      public Tags tags()
      Returns the client for managing Fabric resource tags.
      Returns:
      the Tags client for listing and creating tags
    • beta

      public FabricBeta beta()
      Returns the hub for the Fabric v4 families the spec marks Beta (ASNs, Internet Exchange services, Application Connect, Optical Metro Connects, cross connects, digital LOAs, tag lookup and logos), one typed client per family. Beta endpoints may change without notice and need the account to be entitled to them.
      Returns:
      the FabricBeta hub
    • optimizeMetros

      public MetroOptimizer.Builder optimizeMetros()
      Begins a metro optimization session. Returns a fluent builder for defining workforce locations, provider requirements, workloads, and constraints, then computes optimal Equinix metro placements with ranked recommendations.
      OptimizationResult result = fabric.optimizeMetros()
          .addSite("NYC HQ").nearestMetro(MetroCode.NY).role(SiteRole.HEADQUARTERS).headcount(500).done()
          .requireProvider(CloudProviderType.AWS).done()
          .addWorkload("ML Training").type(WorkloadType.AI_ML_TRAINING).bandwidthMbps(10_000).done()
          .strategy(OptimizationStrategy.BALANCED)
          .optimize();
      
      System.out.println(result.toMarkdown());
      
      Returns:
      a MetroOptimizer.Builder for configuring the optimization request
    • deploymentWizard

      public DeploymentWizard.Builder deploymentWizard(OptimizationResult optimizationResult)
      Creates a Deployment Wizard from a completed optimization result. The wizard generates an executable deployment plan with Cloud Routers, provider connections, inter-metro backbone links, and routing protocol configurations - all with bandwidth sizing that drives accurate pricing.
      DeploymentPlan plan = fabric.deploymentWizard(optimizationResult)
          .routerPackage("STANDARD")
          .routerNamePrefix("FCR")
          .backboneBandwidthMbps(10_000)
          .backboneTopology(BackboneTopology.FULL_MESH)
          .bandwidthStrategy(BandwidthStrategy.PER_WORKLOAD)
          .customerAsn(65100L)
          .withBFD(true, 300)
          .notifications("noc@example.com")   // required: Fabric mandates a recipient on every resource
          .plan();
      
      System.out.println(plan.toMarkdown());
      DeploymentOutcome outcome = plan.execute();
      
      Parameters:
      optimizationResult - the completed optimization result to convert into a deployment plan
      Returns:
      a DeploymentWizard.Builder for configuring the deployment plan
    • peeringIntelligence

      public PeeringIntelligence.Builder peeringIntelligence(String peeringDbApiKey)
      Begins a Peering Intelligence analysis session with PeeringDB API key authentication. Returns a fluent builder for specifying target ASNs, customer metro locations, and analysis options, then queries PeeringDB and Equinix Fabric to produce presence matrices, resiliency assessments, and peering opportunity discovery.
      PeeringIntelligenceResult result = fabric.peeringIntelligence("your-peeringdb-api-key")
          .addAsn(16509, "AWS")
          .addAsn(8075, "Microsoft")
          .addAsn(15169, "Google")
          .customerMetros(MetroCode.DC, MetroCode.DA, MetroCode.SG)
          .customerAsn(65100L)
          .includeResiliency(true)
          .analyze();
      
      System.out.println(result.presenceMatrix().toTableString());
      System.out.println(result.toMarkdown());
      
      Parameters:
      peeringDbApiKey - the PeeringDB API key for authenticated access
      Returns:
      a PeeringIntelligence.Builder for configuring the analysis
      See Also:
    • peeringIntelligence

      public PeeringIntelligence.Builder peeringIntelligence()
      Begins a Peering Intelligence analysis session, resolving the PeeringDB credential from the client's configuration: the EquinixConfig.peeringDbApiKey option if one was set, else the PEERINGDB_API_KEY environment variable, else anonymous access. Anonymous access is rate-limited by PeeringDB to approximately 20 requests per minute.
      Returns:
      a PeeringIntelligence.Builder for configuring the analysis
      See Also:
    • savingsCalculator

      public SavingsCalculator.Builder savingsCalculator()
      Begins a value-realization savings analysis: how much routing cloud egress over an Equinix private interconnect saves versus the public internet. Equinix interconnect costs default to live Fabric pricing; egress rates come from the supplied rate card (a ReferenceRateCard or a CustomRateCard).
      SavingsEstimate s = fabric.savingsCalculator()
          .egress(50, DataUnit.TERABYTE)
          .fromCloud(CloudProviderType.AWS).inRegion("us-east-1")
          .viaMetro(MetroCode.DC).bandwidthMbps(10_000)
          .calculate();
      
      System.out.println(s.toMarkdown());
      
      Returns:
      a SavingsCalculator.Builder for configuring the analysis
    • tcoComparison

      public TcoCalculator.Builder tcoComparison()
      Begins a total-cost-of-ownership comparison across the three deployment archetypes - public cloud over the internet, on-prem, and Equinix- interconnected - for a given egress/bandwidth workload.
      TcoComparison tco = fabric.tcoComparison()
          .egress(100, DataUnit.TERABYTE)
          .fromCloud(CloudProviderType.AWS).inRegion("us-east-1")
          .viaMetro(MetroCode.DC).bandwidthMbps(10_000)
          .compare();
      
      System.out.println(tco.toMarkdown());
      
      Returns:
      a TcoCalculator.Builder for configuring the comparison
    • health

      public HealthStatus health()
      Retrieves the current health status of the Equinix Fabric API. This is a direct call (not a lazy-initialized client) that returns the current API availability and status information.
      Returns:
      the current HealthStatus of the Fabric API