eqixiacEquinix Infrastructure as Code

Streaming and assets

Streaming subscriptions that push SmartView data to an external system, and the location, power and asset hierarchy.

Streaming subscriptions#

A streaming subscription pushes readings and alerts to a channel.

Java
import com.eqixiac.equinix.ibxsmartview.enums.ChannelType;
import com.eqixiac.equinix.ibxsmartview.model.StreamingSubscription;
import com.eqixiac.equinix.ibxsmartview.model.implementation.Channel;
import com.eqixiac.equinix.ibxsmartview.model.implementation.EnvironmentalMessageType;
import com.eqixiac.equinix.ibxsmartview.model.implementation.MessageType;
import com.eqixiac.equinix.ibxsmartview.model.implementation.WebhookChannelConfiguration;

StreamingSubscription subscription = smartView.streamingSubscriptions().define()
    .withChannel(Channel.builder()
        .channelType(ChannelType.WEBHOOK)
        .webhookChannelConfiguration(WebhookChannelConfiguration.builder()
            .url("https://telemetry.example.com/equinix/smartview").build())
        .build())
    .withMessageType(MessageType.builder()
        .environmental(List.of(EnvironmentalMessageType.builder()
            .accountNumber(accountNo).ibx(List.of("DC6", "DC11")).build()))
        .build())
    .create();

smartView.streamingSubscriptions().getSubscriptionData(subscription.getId());
subscription.delete();

The message types select what is delivered: environmental readings, metered power, power events and system alerts, each scoped to an account and a list of IBXs.

getCertificate(subscriptionId) returns the certificate of a subscription, and list() and getByUuid(id) read existing subscriptions. Streaming needs an account entitlement.

Hierarchy and assets#

The v1 calls require the account number, and the service answers HTTP 400 without it. The asset calls also require the IBX and the asset classification, and the SDK rejects a call with any of the three missing before it is sent.

Java
import com.eqixiac.equinix.ibxsmartview.model.implementation.HierarchyNode;

List<HierarchyNode> locations = smartView.hierarchy().getLocationHierarchy(accountNo, "DC6");
smartView.hierarchy().getPowerHierarchy(accountNo, "DC6");
smartView.smartViewAssets().getAffectedAssets(accountNo, "DC6", "Electrical", "DC6.UPS-1A");

getAffectedAssets returns the cages and cabinets that depend on a piece of infrastructure, which during a power event identifies the affected part of the facility. The classification and asset identifier in the block are illustrative, and smartViewAssets().list(...) returns the values that exist for an account.

MethodReturns
hierarchy().getLocationHierarchy(accountNo, ibx)The IBX, cages and cabinets of the account
hierarchy().getPowerHierarchy(accountNo, ibx)The power chain that feeds them
smartViewAssets().list(...), search(...)Assets by classification
smartViewAssets().getAssetDetails(...), getMultipleAssetDetails(request)Details of one or several assets
smartViewAssets().getAffectedAssets(...)The cages and cabinets that depend on an asset
smartViewAssets().getCurrentTagPoint(...), getMultipleCurrentTagPoints(request)Current values of tag points. Needs an entitlement: 403 without it.