Interface CloudProviderConnectionAdapter<T>

Type Parameters:
T - the type of the cloud provider SDK object being adapted
All Known Implementing Classes:
AwsDirectConnectAdapter, AzureExpressRouteAdapter, GoogleCloudInterconnectAdapter, OracleFastConnectAdapter

public interface CloudProviderConnectionAdapter<T>
Adapter interface for bridging cloud provider SDK objects with Equinix Fabric connection creation.

Cloud providers like AWS, Microsoft Azure, Google Cloud, and Oracle Cloud each have their own SDKs for managing direct connectivity (AWS Direct Connect, Azure ExpressRoute, Google Cloud Interconnect, Oracle FastConnect). This interface defines a contract that allows objects from those SDKs to supply the connection parameters needed by the Equinix Fabric API.

Design Pattern

This uses the Adapter Pattern to bridge the gap between cloud provider SDK objects and the Equinix Fabric ConnectionOperator.ConnectionBuilder. Implementors wrap a cloud provider object (e.g., an AWS Connection or Azure ExpressRouteCircuit) and extract the fields required by Equinix's API:

  • getServiceProfileUuid() — The Equinix service profile for this cloud provider
  • getAuthenticationKey() — The cloud provider's authentication key (e.g., AWS Account ID, Azure Service Key, GCP Pairing Key)
  • getSellerRegion() — The cloud provider's region (e.g., "us-east-1", "us-east1"); null for Azure
  • getMetroCode() — The Equinix metro the provider is reached in (required live)

Quick Start

Using a built-in reference adapter with AWS Direct Connect:

// Wrap an AWS Direct Connect connection object
AwsDirectConnectAdapter adapter = new AwsDirectConnectAdapter(
    awsConnection,                           // AWS SDK Connection object
    "equinix-aws-service-profile-uuid",       // Equinix service profile for AWS
    "SV"                                      // Equinix metro of the provider port
);

// Use it directly in the Equinix connection builder
Connection connection = fabric.connections()
    .define(ConnectionType.EVPL_VC)
    .name("My-AWS-Connection")
    .bandwidth(100)
    .aSideAccessPointPort(myPortUuid, LinkProtocol.dot1q().vlanTag(1000).create())
    .zSideCloudProvider(adapter)
    .notification("ops@example.com")
    .create();

Custom Adapter

Implement this interface for any cloud provider or custom service profile:

public class MyCloudAdapter implements CloudProviderConnectionAdapter<MyCloudObject> {

    private final MyCloudObject cloudObject;
    private final String equinixProfileUuid;

    public MyCloudAdapter(MyCloudObject cloudObject, String equinixProfileUuid) {
        this.cloudObject = cloudObject;
        this.equinixProfileUuid = equinixProfileUuid;
    }

    public String getServiceProfileUuid()  { return equinixProfileUuid; }
    public String getAuthenticationKey()   { return cloudObject.getApiKey(); }
    public String getSellerRegion()        { return cloudObject.getRegion(); }
    public MyCloudObject getSource()       { return cloudObject; }
}
Author:
ianjones
See Also:
  • Method Details

    • getServiceProfileUuid

      String getServiceProfileUuid()
      Returns the Equinix Fabric service profile UUID for this cloud provider.

      Each cloud provider has a corresponding Equinix service profile that defines the connectivity parameters. This UUID can be found in the Equinix Developer Portal or by querying fabric.serviceProfiles().search() for the provider's profile.

      Returns:
      the UUID of the Equinix service profile for this cloud provider
    • getAuthenticationKey

      String getAuthenticationKey()
      Returns the authentication key required by the cloud provider to authorize the connection.

      The meaning of this key varies by provider:

      • AWS Direct Connect: The AWS Account ID (12-digit number)
      • Azure ExpressRoute: The ExpressRoute Service Key (GUID)
      • Google Cloud Interconnect: The GCP Pairing Key
      • Oracle FastConnect: The Oracle OCID of the virtual circuit
      Returns:
      the provider-specific authentication key
    • getSellerRegion

      String getSellerRegion()
      Returns the cloud provider's region where the connection will terminate.

      The region string follows the provider's naming convention:

      • AWS: "us-east-1", "eu-west-1", etc.
      • Azure: not sent; AzureExpressRouteAdapter returns null
      • Google Cloud: "us-east1", "europe-west1", etc.
      • Oracle Cloud: "us-ashburn-1", "uk-london-1", etc.
      Returns:
      the provider-specific region identifier
    • getSource

      T getSource()
      Returns the underlying cloud provider SDK object that was adapted.

      Provides access to the original provider object for cases where additional provider-specific properties are needed beyond what the adapter interface exposes.

      Returns:
      the original cloud provider SDK object
    • getProviderType

      CloudProviderType getProviderType()
      Returns the cloud provider type for this adapter.

      Used for logging, diagnostics, and provider-specific defaults. Implementations should return the appropriate CloudProviderType constant.

      Returns:
      the cloud provider type
    • getPreferredConnectionType

      default ConnectionType getPreferredConnectionType()
      Returns the preferred connection type for this cloud provider.

      Most cloud provider connections use ConnectionType.EVPL_VC, but implementations can override this to return a different default. The user can always override the connection type when calling the builder.

      Returns:
      the preferred connection type; defaults to ConnectionType.EVPL_VC
    • getPreferredLinkProtocol

      default LinkProtocol getPreferredLinkProtocol()
      Returns the preferred link protocol for this cloud provider connection.

      Most cloud provider connections use DOT1Q encapsulation. Implementations can override this to provide a provider-specific default. Returns null to indicate no default (the user must specify the link protocol explicitly).

      Returns:
      the preferred link protocol, or null if none
    • getPreferredPeeringType

      default PeeringType getPreferredPeeringType()
      Returns the preferred peering type for this cloud provider connection.

      Relevant for providers that support multiple peering types (e.g., Azure ExpressRoute supports PRIVATE and MICROSOFT peering). Returns null to indicate no preference.

      Returns:
      the preferred peering type, or null if not applicable
    • getActivationKey

      default String getActivationKey()
      Returns the activation key to send as AccessPoint.activationKey, or null to omit that property.

      This is a separate wire property from getAuthenticationKey(). An adapter that returns a value here still returns its authentication key from getAuthenticationKey(); AccessPointBuilder.fromCloudProvider(...) copies each to its own property and never substitutes one for the other.

      The default returns null. AwsDirectConnectAdapter, AzureExpressRouteAdapter, GoogleCloudInterconnectAdapter and OracleFastConnectAdapter do not override it, so requests built from them are unchanged.

      Beta: activationKey is defined on the Fabric v4 catalog's AccessPoint schema (fetched 2026-09-21) with no connection-create example. The catalog marks the related ProviderEnvironment and ActivationKeyDetails schemas Beta, not this property. Which service profiles accept it is unverified.

      Returns:
      the provider-encoded activation key, or null if this adapter has none
    • getMetroCode

      default String getMetroCode()
      Returns the metro code to send as AccessPoint.location.metroCode on the provider side. Fabric rejects a service-provider z-side without it (HTTP 400 EQ-3142501, live-confirmed 2026-11-11), so the four built-in adapters require it at construction. The default returns null; a custom adapter that returns null must be used with ConnectionBuilder.zSideCloudProvider(adapter, linkProtocol, metroCode), and the other cloud-provider builder paths reject it.
      Returns:
      the metro code (for example "SV"), or null
    • describe

      default String describe()
      Returns a human-readable description of the cloud provider connection for use in logging and diagnostics.
      Returns:
      a description string such as "AWS Direct Connect to us-east-1"