1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "scenarios": [
12 {
13 "id": "object-storage-monthly",
14 "workloadLabel": "Object storage monthly capacity",
15 "comparisonAssumptions": "Compare the first public storage tier for the same monthly capacity. Requests, retrieval, replication, egress, discounts, tax, support, credits, and free tiers are excluded.",
16 "normalizedUsage": {
17 "unit": "storage-gb-month",
18 "quantity": 1000
19 },
20 "aws": {
21 "serviceCode": "AmazonS3",
22 "region": "us-east-1",
23 "selectors": {
24 "productFamily": "Storage",
25 "unit": "GB-Mo",
26 "descriptionIncludes": [
27 "first 50 TB"
28 ],
29 "attributes": {
30 "storageClass": "General Purpose",
31 "volumeType": "Standard"
32 }
33 },
34 "usage": {
35 "quantity": 1000,
36 "unit": "GB-Mo",
37 "mappingNote": "One thousand GB-months is the normalized monthly capacity for this example."
38 }
39 },
40 "azure": {
41 "serviceName": "Storage",
42 "armRegionName": "eastus",
43 "selectors": {
44 "meterName": "Hot LRS Data Stored",
45 "productName": "Blob Storage",
46 "priceType": "Consumption",
47 "tierMinimumUnits": 0
48 },
49 "usage": {
50 "quantity": 1000,
51 "unit": "1 GB/Month",
52 "mappingNote": "The Azure first storage tier is mapped to the same one thousand storage GB-months."
53 }
54 }
55 }
56 ]
57};
58
59
60const run = await client.actor("taroyamada/multi-cloud-pricing-cost-impact-report").call(input);
61
62
63console.log('Results from dataset');
64console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
65const { items } = await client.dataset(run.defaultDatasetId).listItems();
66items.forEach((item) => {
67 console.dir(item);
68});
69
70