-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
96 lines (87 loc) · 3.06 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import datetime
from dateutil.relativedelta import relativedelta
now = datetime.datetime.now()
first_day_this_month_raw = datetime.datetime(now.year, now.month, 1)
first_day_prev_month_raw = first_day_this_month_raw - relativedelta(months=1)
# If set to false, script will not get any data.
GET_SAVINGS_PLANS_INFO = True
GET_RESERVED_INSTANCES_INFO = True
MISSING_DATA_PLACEHOLDER = ""
# Start and end dates for getting data for Savings Plans & Reserved Instances
# Now it defaults to the first day of the current month and the first day of the previous month.
# You can change the dates to whatever you want, but if range would be more
# than 30 days, Savings Plans utilization info would be duplicated for each month.
FIRST_DAY_THIS_MONTH = first_day_this_month_raw.strftime("%Y-%m-%d")
FIRST_DAY_PREV_MONTH = first_day_prev_month_raw.strftime("%Y-%m-%d")
# List of services for which you want to get in reservations coverage report
LIST_OF_SERVICES_FOR_RESERVATIONS_COVERAGE = [
"Amazon Elastic Compute Cloud - Compute",
"Amazon Relational Database Service",
# "Amazon ElastiCache",
# "Amazon Redshift",
# "Amazon Elasticsearch Service",
# "Amazon OpenSearch Service",
# "Amazon MemoryDB",
]
# Configuration for getting purchase recommendations for Savings Plans
SP_CONFIG = [
{
"SavingsPlansType": "COMPUTE_SP",
"LookbackPeriodInDays": "THIRTY_DAYS",
"TermInYears": "ONE_YEAR",
"PaymentOption": "NO_UPFRONT",
"AccountScope": "PAYER",
},
{
"SavingsPlansType": "EC2_INSTANCE_SP",
"LookbackPeriodInDays": "THIRTY_DAYS",
"TermInYears": "ONE_YEAR",
"PaymentOption": "NO_UPFRONT",
"AccountScope": "PAYER",
},
{
"SavingsPlansType": "SAGEMAKER_SP",
"LookbackPeriodInDays": "THIRTY_DAYS",
"TermInYears": "ONE_YEAR",
"PaymentOption": "NO_UPFRONT",
"AccountScope": "PAYER",
},
]
# Configuration for getting purchase recommendations for Reserved Instances
RPR_CONFIG = [
{
"Service": "Amazon Elastic Compute Cloud - Compute",
"LookbackPeriodInDays": "THIRTY_DAYS",
"TermInYears": "ONE_YEAR",
"PaymentOption": "NO_UPFRONT",
"AccountScope": "PAYER",
},
{
"Service": "Amazon Relational Database Service",
"LookbackPeriodInDays": "THIRTY_DAYS",
"TermInYears": "ONE_YEAR",
"PaymentOption": "NO_UPFRONT",
"AccountScope": "PAYER",
},
{
"Service": "Amazon ElastiCache",
"LookbackPeriodInDays": "THIRTY_DAYS",
"TermInYears": "ONE_YEAR",
"PaymentOption": "NO_UPFRONT",
"AccountScope": "PAYER",
},
{
"Service": "Amazon Redshift",
"LookbackPeriodInDays": "THIRTY_DAYS",
"TermInYears": "ONE_YEAR",
"PaymentOption": "NO_UPFRONT",
"AccountScope": "PAYER",
},
{
"Service": "Amazon Elasticsearch Service",
"LookbackPeriodInDays": "THIRTY_DAYS",
"TermInYears": "ONE_YEAR",
"PaymentOption": "NO_UPFRONT",
"AccountScope": "PAYER",
},
]