Created
March 23, 2015 06:11
-
-
Save kskb/ed1b7ccfc95e4df04b70 to your computer and use it in GitHub Desktop.
AWS SDK for Ruby v2 Aws::CloudWatch::Client#get_metric_statistics sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aws-sdk-core' | |
require 'active_support' | |
require 'active_support/core_ext' | |
cw = Aws::CloudWatch::Client.new( region: 'us-east-1') | |
resp = cw.get_metric_statistics( | |
namespace: "AWS/Billing", | |
metric_name: "EstimatedCharges", | |
dimensions: [ | |
{name: "Currency", value: "USD"} | |
], | |
start_time: Time.now - 1.days, | |
end_time: Time.now, | |
period: 60*60*6, | |
statistics: ["Maximum"], | |
) | |
p resp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
啊啊啊