e2e-fabric-cost-estimation
Telemetry β MANDATORY. Every
api.fabric.microsoft.comcall must carryx-ms-fabric-skill: e2e-fabric-cost-estimation(az rest:--headers "x-ms-fabric-skill=e2e-fabric-cost-estimation"), including every LRO poll,fabric_lroand retry. Snippets omit it β add it anyway.
CRITICAL NOTES
- To find the workspace details (including its ID) from workspace name: list all workspaces and, then, use JMESPath filtering
- To find the item details (including its ID) from workspace ID, item type, and item name: list all items of that type in that workspace and, then, use JMESPath filtering
- Pricing is region-specific. Always resolve the capacity's Azure region (via the Fabric REST
GET /v1/capacities, which returnsregion/sku/state, or via ARM) or ask the user before any price lookup, and state the region with every quoted figure.
π΄ MANDATORY LIVE-PRICING FETCH β whenever your answer contains a dollar figure. Before presenting any dollar amount, cost, break-even point, billing-mode comparison, RI-vs-PAYG analysis, migration cost, or cost worksheet, you must run a shell command (
bash/powershell) that calls the Azure Retail Prices API athttps://prices.azure.com/api/retail/prices. This applies without exception to every priced answer β Databricks/Synapse migration cost, Autoscale vs. base-SKU break-even, RI-vs-PAYG break-even, cost worksheets, and billing-mode strategy. Fetch the live per-CU-hour PAYG rate (priceType eq 'Consumption',* Capacity Usage CUmeters), the reservation term totals, and theautoscale for Spark Capacity Usage CUrate first, then compute. Never answer a priced question from memorized or hardcoded rates, and never reason about break-even purely from formulas. If the meter lookup returns no rows, surface that to the user β never silently fall back to a hardcoded rate (e.g., do not assume$0.18/CU-hrfor Autoscale; the Autoscale meter is a distinct rate that must be fetched). Exception β pure capacity sizing: a question answered purely in capacity units with no dollar figure (e.g., "which SKU fits 80 CUs?" or "how many CUs does a P2 map to?") is CU math, not pricing, and does not require a fetch. The moment you attach a dollar amount to that sizing answer, the fetch becomes mandatory.
π CLARIFY FIRST, THEN ACT β do not assume defaults. A priced request needs two inputs before you can fetch or compute: the Azure region and the workload profile (e.g. CU-hours/day, node/job details, or the source cluster sizes for a migration). If either is missing, your first response must ask the user for the missing input(s) and STOP β do not pick a default region (never assume
East USor any other region to "get started"), do not call the pricing API, and do not produce estimates from assumed values. Only after the user supplies the missing inputs do you fetch live prices and compute. Asking is the correct behavior even though the mandatory-fetch rule applies to the eventual priced answer.
π΄ AUTOSCALE RATE IS A DISTINCT METER β never reuse the base/PAYG rate for it. The
autoscale for Spark Capacity Usage CUmeter is a separate price from the base* Capacity Usage CUPAYG rate. You must fetch it with its own API call and read the returnedretailPrice. It is a correctness bug to assign the base/PAYG rate (or a memorized figure such as0.18) to an autoscale variable β e.g.autoscaleRate = paygRateorautoscaleRate = 0.18is forbidden. If the autoscale meter lookup returns no rows, list all Fabric Spark meters for the region and surface that to the user; never substitute the base rate.