Sha256: 9be5619f9de69fea92abf3a55d5823c1b0483a83f2033468d9bcc1aa3aec0080
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
require "datadog_api_client" DatadogAPIClient::V1.configure do |config| config.unstable_operations[:get_hourly_usage_attribution] = true end api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new start_hr = Time.parse("2013-10-20T19:20:30+01:00") # Time | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. usage_type = DatadogAPIClient::V1::HourlyUsageAttributionUsageType::API_USAGE # HourlyUsageAttributionUsageType | Usage type to retrieve. opts = { end_hr: Time.parse("2013-10-20T19:20:30+01:00"), # Time | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. next_record_id: "next_record_id_example", # String | List following results with a next_record_id provided in the previous query. tag_breakdown_keys: "tag_breakdown_keys_example", # String | Comma separated list of tags used to group usage. If no value is provided the usage will not be broken down by tags. } begin # Get Hourly Usage Attribution result = api_instance.get_hourly_usage_attribution(start_hr, usage_type, opts) p result rescue DatadogAPIClient::V1::APIError => e puts "Error when calling UsageMeteringAPI->get_hourly_usage_attribution: #{e}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
datadog_api_client-1.7.0 | examples/generated/v1/usage-metering/GetHourlyUsageAttribution.rb |