GetPriceListFileUrl
Source:
src/AWS/Pricing/GetPriceListFileUrl.ts
Runtime binding for pricing:GetPriceListFileUrl — resolve a presigned
download URL for one bulk Price List file.
Takes a PriceListArn and FileFormat (csv or json) obtained from
ListPriceLists and returns the URL the full offer file can be fetched
from. The binding takes no arguments and grants the function
pricing:GetPriceListFileUrl (the action has no resource-level IAM).
Calls are pinned to us-east-1, the region that serves the Price List
API. Provide the implementation with
Effect.provide(AWS.Pricing.GetPriceListFileUrlHttp).
Downloading Price List Files
Section titled “Downloading Price List Files”// initconst listPriceLists = yield* AWS.Pricing.ListPriceLists();const getPriceListFileUrl = yield* AWS.Pricing.GetPriceListFileUrl();
// runtimeconst lists = yield* listPriceLists({ ServiceCode: "AmazonEC2", CurrencyCode: "USD", EffectiveDate: new Date(), RegionCode: "us-east-1",});const arn = lists.PriceLists?.[0]?.PriceListArn;if (arn !== undefined) { const { Url } = yield* getPriceListFileUrl({ PriceListArn: arn, FileFormat: "json", });}