Class DeploymentWizard.Builder

java.lang.Object
com.eqixiac.equinix.design.optimizer.wizard.DeploymentWizard.Builder
Enclosing class:
DeploymentWizard

public static final class DeploymentWizard.Builder extends Object
Fluent builder for configuring a deployment plan. Provides methods to set Cloud Router package, connection types, backbone topology, bandwidth strategy, routing protocol settings, and account details.
  • Method Details

    • routerPackage

      public DeploymentWizard.Builder routerPackage(String packageCode)
      Sets the Cloud Router package code from its string form, leniently: the value is trimmed and upper-cased before being resolved (so "standard" and " Premium " both work). Defaults to GatewayPackageCode.STANDARD.

      The code is validated here - once, at plan time - so a bad value fails fast instead of surfacing as an IllegalArgumentException mid-deployment in DeploymentPlan.execute() after some routers have already been provisioned.

      Parameters:
      packageCode - the router package code (case-insensitive)
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if the code does not name a deployable package tier
    • routerPackage

      public DeploymentWizard.Builder routerPackage(GatewayPackageCode packageCode)
      Sets the Cloud Router package code. Defaults to GatewayPackageCode.STANDARD.
      Parameters:
      packageCode - the router package tier
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if the code is null or GatewayPackageCode.UNKNOWN (a placeholder that must never be sent to the API)
    • routerNamePrefix

      public DeploymentWizard.Builder routerNamePrefix(String prefix)
      Sets the naming prefix for Cloud Routers and the connection / routing-protocol names derived from them. Each router is named "{prefix}-{metroCode}" (e.g. "FCR-DC") and a provider connection "{prefix}-{metroCode}-to-{token}" (e.g. "FCR-DC-to-aws"). Defaults to "FCR".

      The prefix is the stem of every generated name, and Fabric rejects any name of 24 or more characters. The prefix is therefore trimmed, reduced to name-safe characters, and bounded to a short budget at plan time: a prefix longer than that budget is truncated (the composed names always stay within the limit), and a blank prefix is rejected with an IllegalArgumentException when plan() runs, because there is no stem to build on.

      Parameters:
      prefix - the router name prefix
      Returns:
      this builder for method chaining
    • providerConnectionType

      public DeploymentWizard.Builder providerConnectionType(ConnectionType type)
      Sets the Fabric connection type for provider connections. Defaults to IP_VC - the only type Fabric accepts for a connection whose A-side is a Cloud Router, which every wizard-planned provider connection has. Setting a type incompatible with an FCR A-side (e.g. the port-based EVPL_VC) is flagged by the plan's Layer-1 validation (FCR A-side => IP_VC) rather than 400ing live.
      Parameters:
      type - the connection type for provider connections
      Returns:
      this builder for method chaining
    • backboneConnectionType

      public DeploymentWizard.Builder backboneConnectionType(ConnectionType type)
      Sets the Fabric connection type for backbone links. Defaults to IP_VC - a backbone link is Cloud Router to Cloud Router, and Fabric accepts an FCR-originated virtual connection only as IP_VC. An incompatible type is flagged by the plan's Layer-1 validation (FCR A-side => IP_VC).
      Parameters:
      type - the connection type for backbone links
      Returns:
      this builder for method chaining
    • backboneBandwidthMbps

      public DeploymentWizard.Builder backboneBandwidthMbps(int mbps)
      Sets the bandwidth for inter-metro backbone links in Mbps. Defaults to 10,000 Mbps.
      Parameters:
      mbps - the backbone bandwidth in megabits per second
      Returns:
      this builder for method chaining
    • backboneTopology

      public DeploymentWizard.Builder backboneTopology(BackboneTopology topology)
      Sets the backbone topology for inter-metro connections. Defaults to BackboneTopology.FULL_MESH.
      Parameters:
      topology - the inter-metro backbone topology
      Returns:
      this builder for method chaining
      See Also:
    • bandwidthStrategy

      public DeploymentWizard.Builder bandwidthStrategy(BandwidthStrategy strategy)
      Sets the bandwidth sizing strategy for provider connections. Defaults to BandwidthStrategy.PER_WORKLOAD.
      Parameters:
      strategy - the bandwidth sizing strategy
      Returns:
      this builder for method chaining
      See Also:
    • customBandwidthMap

      public DeploymentWizard.Builder customBandwidthMap(Map<String,Integer> bandwidthMap)
      Sets a custom bandwidth map for BandwidthStrategy.CUSTOM. Values are bandwidth in Mbps; keys are matched per (metro, provider) most-specific-first as either "<metroId>-<providerLabel>" (a per-metro-per-provider override, e.g. "DC-Amazon Web Services") or "<providerLabel>" (that provider in every metro, e.g. "Amazon Web Services"). A (metro, provider) connection with no matching key is sized by the normal per-workload aggregation instead of a fabricated default.
      Parameters:
      bandwidthMap - the custom bandwidth mapping
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if the map is null or any of its values is null - a null bandwidth cannot size a connection, so it fails fast here naming the offending key instead of surfacing as an NPE mid-plan
    • customerAsn

      public DeploymentWizard.Builder customerAsn(long asn)
      Sets the customer ASN for BGP peering. Defaults to 65100.
      Parameters:
      asn - the customer autonomous system number
      Returns:
      this builder for method chaining
    • subnetBase

      public DeploymentWizard.Builder subnetBase(String subnetBase)
      Sets the base network the plan's /30 peering subnets are allocated from. Defaults to "10.100.0.0": the first connection peers on 10.100.0.1/30 / 10.100.0.2/30, and each further connection advances the third octet.

      Cross-plan reuse caveat: allocation is scoped to a single plan, so every plan restarts from this base. Plans executed into the same project would therefore reuse the same peering addresses - give each such plan a distinct base (e.g. .subnetBase("10.200.0.0")) to keep their /30s disjoint.

      Parameters:
      subnetBase - an IPv4 dotted-quad base network, e.g. "10.200.0.0" (the fourth octet is ignored; allocation advances the third)
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if the value is not a valid IPv4 dotted-quad
    • withBFD

      public DeploymentWizard.Builder withBFD(boolean enabled, int intervalMs)
      Configures BFD (Bidirectional Forwarding Detection) for routing protocols. Defaults to enabled with 300ms interval.
      Parameters:
      enabled - whether BFD is enabled
      intervalMs - the BFD interval in milliseconds
      Returns:
      this builder for method chaining
    • accountNumber

      public DeploymentWizard.Builder accountNumber(long accountNumber)
      Sets the account number for billing. Applied to all created resources.
      Parameters:
      accountNumber - the Equinix account number
      Returns:
      this builder for method chaining
    • projectId

      public DeploymentWizard.Builder projectId(String projectId)
      Sets the project UUID for resource grouping. Applied to all created resources.
      Parameters:
      projectId - the Equinix project UUID
      Returns:
      this builder for method chaining
    • notifications

      public DeploymentWizard.Builder notifications(String... emails)
      Adds notification email addresses for provisioning updates. Every address is applied to every planned Cloud Router and connection (Fabric mandates at least one recipient per Cloud Router, error EQ-3040013) - all of them are sent on the wire bodies and rendered into exported HCL, never just the first.

      Repeated calls accumulate - addresses from every call are kept, none replaced. A plan built with no recipient at all fails Layer-1 validation.

      Parameters:
      emails - one or more email addresses
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if an address is null or blank
      NullPointerException - if the array itself is null
    • rateCard

      public DeploymentWizard.Builder rateCard(RateCard rateCard)
      Sets the rate card used to price the plan. When omitted, the wizard defaults to live Equinix pricing (EquinixRateCard.of(fabric)), falling back to a built-in heuristic for any resource the live catalogue cannot price.

      Supply a CustomRateCard (or a layered card) to price against your own negotiated rates instead.

      Parameters:
      rateCard - the rate card to price the plan with
      Returns:
      this builder for method chaining
    • term

      public DeploymentWizard.Builder term(Term term)
      Sets the commitment term used when resolving rates. Defaults to Term.MONTH_12.
      Parameters:
      term - the commitment term
      Returns:
      this builder for method chaining
    • currency

      public DeploymentWizard.Builder currency(String currency)
      Sets the currency the plan is priced in. Every Cloud Router, connection and backbone price quoted in another currency (live Fabric pricing quotes London in GBP and Frankfurt in EUR) is restated in it through CurrencyConverters: rates pinned in the design spec, then currencyConverter, then the default sources (live ECB rates, then the bundled table). Each converted line keeps its original amount and currency, the rate, its source and date (PlanPricing.getLines()). A price whose currency no source covers stays in its own currency and the plan reports per-currency subtotals. Defaults to the design spec's commercial.currency (designSpec, else the optimisation result's spec), else USD.
      Parameters:
      currency - an ISO 4217 code
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if currency is not an ISO 4217 code
    • currencyConverter

      public DeploymentWizard.Builder currencyConverter(CurrencyConverter converter)
      Supplies exchange rates ranked below rates pinned in the design spec and above the default sources.
      Parameters:
      converter - the converter, or null for none
      Returns:
      this builder for method chaining
    • defaultRates

      public DeploymentWizard.Builder defaultRates(CurrencyConverter defaults)
      Replaces the default rate sources (live ECB rates via Frankfurter, then the bundled table), for example with CurrencyConverters.bundledOnly() offline, or CurrencyConverters.none() to convert nothing (prices in other currencies are then reported as per-currency subtotals).
      Parameters:
      defaults - the fallback converter; null restores the default
      Returns:
      this builder for method chaining
    • cloudToCloudStrategy

      public DeploymentWizard.Builder cloudToCloudStrategy(CloudToCloudStrategy strategy)
      Sets how the plan treats a flow between two clouds (a workload that depends on both). Defaults to CloudToCloudStrategy.COMPARE. Beta.

      COMPARE changes no Cloud Router, connection, backbone link, routing protocol or Equinix price relative to EQUINIX_ONLY; it adds entries to DeploymentPlan.getMulticloudLinks(), one skipped-validation note per entry, and the native-link fields of PlanPricing. NATIVE_WHEN_AVAILABLE and NATIVE_ONLY can omit Cloud Router to cloud connections under the replacement rule documented on CloudToCloudStrategy.

      Parameters:
      strategy - the strategy
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if strategy is null
    • multicloudEnvironments

      public DeploymentWizard.Builder multicloudEnvironments(MulticloudEnvironmentCatalog catalog)
      Sets the catalog of native multicloud environments the wizard matches region pairs against. Beta. When not set, the wizard uses the catalog carried by the optimization request (MetroOptimizer.Builder.multicloudEnvironments(...)), and otherwise MulticloudEnvironmentCatalog.standard(). The bundled catalog is a dated copy of provider documentation and goes stale; pass MulticloudEnvironmentCatalog.standard().with(...) to add region pairs the providers have launched since, or MulticloudEnvironmentCatalog.empty() to match nothing.
      Parameters:
      catalog - the catalog to match against
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if catalog is null
    • multicloudPathTier

      public DeploymentWizard.Builder multicloudPathTier(int pathTier)
      Sets the AWS connectivity-scope tier used to price the AWS side of a native multicloud link: 1 local (default), 2 regional, 3 continental, 4 long-haul, 5 maximum scope. Beta. An input, never derived: AWS publishes no path-to-tier table. Providers without a tier concept ignore it.
      Parameters:
      pathTier - the tier, 1-5
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if outside 1-5
    • designSpec

      public DeploymentWizard.Builder designSpec(DesignSpec spec)
      Records the design spec the plan is derived from: its fingerprint() is stamped on the plan, and its name becomes the deployment name unless deploymentName(String) sets one.
      Parameters:
      spec - the design spec
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if spec is null
    • specFingerprint

      public DeploymentWizard.Builder specFingerprint(String fingerprint)
      Records the fingerprint of the design spec the plan is derived from, when the spec itself is not at hand (for example one carried on an optimization result).
      Parameters:
      fingerprint - the DesignSpec.fingerprint()
      Returns:
      this builder for method chaining
    • deploymentName

      public DeploymentWizard.Builder deploymentName(String name)
      Sets the deployment name: the identity that survives edits of the plan. Checkpoints are kept under it and every connection the plan creates carries it in additionalInfo, so two deployments in one project must use different names. Defaults to the design spec's name, else the router name prefix.
      Parameters:
      name - a non-blank name
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if name is blank
    • interconnect

      public DeploymentWizard.Builder interconnect(PlannedInterconnect interconnect)
      Adds a Fabric Interconnect to the plan. It is rendered and priced as unknown and is never executed: the public API has no endpoint that creates one (see PlannedInterconnect). A key is assigned when the element has none.
      Parameters:
      interconnect - the planned Interconnect
      Returns:
      this builder for method chaining
      Throws:
      IllegalArgumentException - if interconnect is null
    • plan

      public DeploymentPlan plan()
      Generates the deployment plan from the optimization result using the configured settings. The plan can be reviewed via DeploymentPlan.toMarkdown(), validated with DeploymentPlan.dryRun(), or executed with DeploymentPlan.execute().
      Returns:
      the complete deployment plan
    • reprice

      public DeploymentPlan reprice(DeploymentPlan plan)
      Reprices a plan whose connections changed (e.g. an MCP profile choice altered a billable tier) and returns the result as a new DeploymentPlan: the argument is never mutated (plans are immutable values), so callers must use the returned copy - whose monthly and setup totals match the plan's current connections rather than the tiers they were originally priced at.

      The plan's current Cloud Routers, provider connections and backbone links are re-priced against this builder's rate card and commitment term - the same configuration the plan was built with - through the wizard's single pricing authority (PlanPricer.estimatePricing), so per-metro currency reconciliation is preserved exactly as at plan time. The plan's pricing is replaced and, when the plan carries native multicloud links, so is each link's pricing and recommendation (Beta): the native quote, the Equinix-path cost for the same flow and the break-even rate are resolved again against this builder's rate card, term and path tier. A link's environment, role, bandwidth and reasoning are not re-planned. Every other field is carried through unchanged. Repricing a plan whose connections did not change yields the same figures (a no-op-equivalent).

      Parameters:
      plan - the plan whose pricing is stale relative to its current connections; left untouched by this call
      Returns:
      a new copy of the plan with pricing recomputed from its current connections