|
@@ -1,5 +1,21 @@
|
|
|
|
+import time
|
|
|
|
+
|
|
import boto3
|
|
import boto3
|
|
|
|
|
|
-client = boto3.client('cloudwatch')
|
|
|
|
-response = client.get_dashboard()
|
|
|
|
-print(response)
|
|
|
|
|
|
+from AnsjerPush.config import AWS_SES_ACCESS_ID, AWS_SES_ACCESS_SECRET
|
|
|
|
+
|
|
|
|
+# client = boto3.client('cloudwatch', region_name='us-east-1', aws_access_key_id=AWS_SES_ACCESS_ID, aws_secret_access_key=AWS_SES_ACCESS_SECRET)
|
|
|
|
+# response = client.get_dashboard(DashboardName='string')
|
|
|
|
+# print(response)
|
|
|
|
+
|
|
|
|
+localtime = time.localtime()
|
|
|
|
+current_month = localtime.tm_mon
|
|
|
|
+print(current_month)
|
|
|
|
+
|
|
|
|
+time_struct = [localtime.tm_year, localtime.tm_mon, 1, 0, 0, 0, 0, 0, 0]
|
|
|
|
+start_time = int(time.mktime(tuple(time_struct)))
|
|
|
|
+print(start_time)
|
|
|
|
+
|
|
|
|
+time_struct[1] = current_month + 1
|
|
|
|
+end_time = int(time.mktime(tuple(time_struct)))
|
|
|
|
+print(end_time)
|