Class AwsPriceListRateCard
- All Implemented Interfaces:
RateCard
RateCard that sources AWS data-egress rates from the public
AWS Price List Bulk API.
Both bulk offers it reads are unauthenticated, so this adapter needs no credentials or request
signing. Every rate it returns is tagged PriceSource.PROVIDER_API.
EgressPath.INTERNET→ theAWSDataTransferoffer'sAWS Outbound/Externalproducts, resolved by source region. The per-GB figure is the first paid on-demand tier (the headline rate; the free-tier dimension, if any, is skipped).EgressPath.PRIVATE→ theAWSDirectConnectoffer'sData Transferproducts with an*Outboundtransfer type for the region. The per-GB figure is the lowest positive on-demand rate (the best-case / local Direct Connect egress rate — the savings-relevant figure).
The offer files are large; each is fetched once on first success and cached for the
adapter's lifetime — a failed fetch is never memoized, so a transient outage is retried on the
next lookup rather than pinning "no rate" forever. The adapter is fault-tolerant — any fetch or
parse failure yields no rate rather than an exception. A null region yields empty, since
AWS egress pricing is region-specific.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe publicAWSDirectConnectbulk-offer URL (private-egress rates); the default Direct Connect source unless overridden viacreate(String, String).static final StringThe publicAWSDataTransferbulk-offer URL (internet-egress rates); the default data-transfer source forcreate()andcreate(String). -
Method Summary
Modifier and TypeMethodDescriptioncloudRouter(String packageCode, MetroCode metro, Term term) Resolves the price of a single Fabric Cloud Router instance.connection(ConnectionType type, int bandwidthMbps, MetroCode metro, Term term) Resolves the price of a single Fabric connection / virtual connection.static AwsPriceListRateCardcreate()Creates an adapter over the public AWS bulk-offer URLs (DEFAULT_OFFER_URL/DEFAULT_DIRECT_CONNECT_OFFER_URL).static AwsPriceListRateCardCreates an adapter with a custom data-transfer offer URL (Direct Connect uses the default) — for a mirror, a proxy, or testing.static AwsPriceListRateCardCreates an adapter with custom data-transfer and Direct Connect offer URLs.egress(CloudProviderType provider, String region, EgressPath path, Term term) Resolves the per-GB data-egress rate for a cloud provider over a given path.source()The dominant provenance of prices this card produces.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RateCard
colocation
-
Field Details
-
DEFAULT_OFFER_URL
The publicAWSDataTransferbulk-offer URL (internet-egress rates); the default data-transfer source forcreate()andcreate(String).- See Also:
-
DEFAULT_DIRECT_CONNECT_OFFER_URL
The publicAWSDirectConnectbulk-offer URL (private-egress rates); the default Direct Connect source unless overridden viacreate(String, String).- See Also:
-
-
Method Details
-
create
Creates an adapter over the public AWS bulk-offer URLs (DEFAULT_OFFER_URL/DEFAULT_DIRECT_CONNECT_OFFER_URL). No credentials or request signing required; the offers are fetched lazily on first lookup.- Returns:
- a new AWS pricing adapter
-
create
Creates an adapter with a custom data-transfer offer URL (Direct Connect uses the default) — for a mirror, a proxy, or testing.- Parameters:
offerUrl- the full URL of theAWSDataTransferindex.json
-
create
Creates an adapter with custom data-transfer and Direct Connect offer URLs.- Parameters:
offerUrl- the full URL of theAWSDataTransferindex.jsondirectConnectOfferUrl- the full URL of theAWSDirectConnectindex.json
-
connection
public Optional<PriceQuote> connection(ConnectionType type, int bandwidthMbps, MetroCode metro, Term term) Description copied from interface:RateCardResolves the price of a single Fabric connection / virtual connection.Implementation contract. The matching strategy is implementation-specific, and a card whose data lacks an axis (metro, term, type) still returns its best figure — or empty — rather than failing; callers must not assume every card is sensitive to every parameter. Of the bundled cards:
CustomRateCardresolves the most specific declared entry (exact metro+term down to metro/term-agnostic, then a declared default);EquinixRateCardmatches bandwidth and type against the live catalogue, honours a requested metro strictly (a wrong-metro row is never returned), and prefers a term-matched row — a different-term row is only ever returned with a note naming the substitution;ReferenceRateCardmatches on bandwidth alone (smallest tabulated tier at or above the request, linearly extrapolated with anEXTRAPOLATEDnote above the top tier) and ignores type, metro, and term entirely.- Specified by:
connectionin interfaceRateCard- Parameters:
type- the connection type (e.g.EVPL_VC); may benullfor any typebandwidthMbps- the provisioned bandwidth in Mbpsmetro- the metro the connection originates in (may benullif metro-agnostic)term- the commitment term (may benullif term-agnostic)- Returns:
- the resolved quote, or
Optional.empty()if this card cannot price the connection
-
cloudRouter
Description copied from interface:RateCardResolves the price of a single Fabric Cloud Router instance.Implementation contract. As with
RateCard.connection(ConnectionType, int, MetroCode, Term), matching is implementation-specific and cards without a metro/term axis return their best figure regardless. Of the bundled cards:CustomRateCardresolves the most specific declared(packageCode, metro, term)entry;EquinixRateCardmatches the package code and metro structurally against the row's own descriptor (exact package equality, the row's own metro code) and prefers a term-matched row, labelling any term substitution;ReferenceRateCardignores metro and term, and substitutes its STANDARD figure for an unlisted package with a note naming the substitution.- Specified by:
cloudRouterin interfaceRateCard- Parameters:
packageCode- the router package / tier code (e.g."STANDARD"); may benullfor anymetro- the metro the router is deployed in (may benullif metro-agnostic)term- the commitment term (may benullif term-agnostic)- Returns:
- the resolved quote, or
Optional.empty()if this card cannot price the router
-
egress
public Optional<EgressRate> egress(CloudProviderType provider, String region, EgressPath path, Term term) Description copied from interface:RateCardResolves the per-GB data-egress rate for a cloud provider over a given path.Equinix does not sell cloud egress, so
EquinixRateCardreturnsOptional.empty()here (the default); egress rates come from aCustomRateCard(your figures), aReferenceRateCard(bundled indicative figures), or a provider-pricing-API card. The default returns empty so cards that do not model egress need not override it. Cards whose data has no region or term axis ignore those parameters — the custom and reference cards match on provider + path alone; only the provider-API adapters are region-sensitive.- Specified by:
egressin interfaceRateCard- Parameters:
provider- the cloud provider the data is leavingregion- the provider region (may benullfor a provider-wide rate)path- internet vs. private interconnectterm- the commitment term (may benull; ignored by term-agnostic cards)- Returns:
- the resolved egress rate, or
Optional.empty()if this card cannot price it
-
source
Description copied from interface:RateCardThe dominant provenance of prices this card produces. Aggregating cards reportPriceSource.COMPOSITE.
-