1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "records": [
10 {
11 "bill/BillingPeriodStartDate": "2026-10-01T00:00:00Z",
12 "lineItem/LineItemType": "Usage",
13 "lineItem/UsageAccountId": "111111111111",
14 "lineItem/ProductCode": "AmazonEC2",
15 "lineItem/UnblendedCost": "80.00",
16 "lineItem/ResourceId": "i-example-prod",
17 "lineItem/CurrencyCode": "USD",
18 "resourceTags/user:CostCenter": "Platform",
19 },
20 {
21 "bill/BillingPeriodStartDate": "2026-10-01T00:00:00Z",
22 "lineItem/LineItemType": "Usage",
23 "lineItem/UsageAccountId": "111111111111",
24 "lineItem/ProductCode": "AmazonEC2",
25 "lineItem/UnblendedCost": "20.00",
26 "lineItem/ResourceId": "i-example-review",
27 "lineItem/CurrencyCode": "USD",
28 "resourceTags/user:CostCenter": "",
29 },
30 {
31 "bill/BillingPeriodStartDate": "2026-10-01T00:00:00Z",
32 "lineItem/LineItemType": "Usage",
33 "lineItem/UsageAccountId": "111111111111",
34 "lineItem/ProductCode": "AmazonEC2",
35 "lineItem/UnblendedCost": "10.00",
36 "lineItem/ResourceId": "",
37 "lineItem/CurrencyCode": "USD",
38 "resourceTags/user:CostCenter": "",
39 },
40 {
41 "bill/BillingPeriodStartDate": "2026-10-01T00:00:00Z",
42 "lineItem/LineItemType": "Usage",
43 "lineItem/UsageAccountId": "222222222222",
44 "lineItem/ProductCode": "AmazonS3",
45 "lineItem/UnblendedCost": "5.00",
46 "lineItem/ResourceId": "bucket-example",
47 "lineItem/CurrencyCode": "USD",
48 "resourceTags/user:CostCenter": "",
49 },
50 {
51 "bill/BillingPeriodStartDate": "2026-10-01T00:00:00Z",
52 "lineItem/LineItemType": "Usage",
53 "lineItem/UsageAccountId": "222222222222",
54 "lineItem/ProductCode": "AmazonS3",
55 "lineItem/UnblendedCost": "1.00",
56 "lineItem/ResourceId": "bucket-tagged",
57 "lineItem/CurrencyCode": "USD",
58 "resourceTags/user:CostCenter": "Data",
59 },
60 {
61 "bill/BillingPeriodStartDate": "2026-10-01T00:00:00Z",
62 "lineItem/LineItemType": "SavingsPlanCoveredUsage",
63 "lineItem/UsageAccountId": "111111111111",
64 "lineItem/ProductCode": "AmazonEC2",
65 "lineItem/UnblendedCost": "40.00",
66 "lineItem/ResourceId": "i-sp-covered",
67 "lineItem/CurrencyCode": "USD",
68 "resourceTags/user:CostCenter": "",
69 },
70 {
71 "bill/BillingPeriodStartDate": "2026-10-01T00:00:00Z",
72 "lineItem/LineItemType": "Usage",
73 "lineItem/UsageAccountId": "333333333333",
74 "lineItem/ProductCode": "AmazonRDS",
75 "lineItem/UnblendedCost": "2.00",
76 "lineItem/ResourceId": "db-tagged",
77 "lineItem/CurrencyCode": "USD",
78 "resourceTags/user:CostCenter": "Team",
79 },
80 {
81 "bill/BillingPeriodStartDate": "2026-10-01T00:00:00Z",
82 "lineItem/LineItemType": "Usage",
83 "lineItem/UsageAccountId": "111111111111",
84 "lineItem/ProductCode": "AmazonEC2",
85 "lineItem/UnblendedCost": "0.00",
86 "lineItem/ResourceId": "i-zero",
87 "lineItem/CurrencyCode": "USD",
88 "resourceTags/user:CostCenter": "",
89 },
90 ],
91 "tagKey": "CostCenter",
92 "billingMonth": "2026-10",
93}
94
95
96run = client.actor("natstandridge/aws-cur-tag-coverage-audit").call(run_input=run_input)
97
98
99print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
100for item in client.dataset(run.default_dataset_id).iterate_items():
101 print(item)
102
103