Sha256: 90ccf8dbd55b7a8c1bf4ad3b6bc5e6a805be46be5877c6070ba7fb9e51702301
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
require "datadog_api_client" DatadogAPIClient::V1.configure do |config| config.unstable_operations[:get_slo_history] = true end api_instance = DatadogAPIClient::V1::ServiceLevelObjectivesAPI.new slo_id = "slo_id_example" # String | The ID of the service level objective object. from_ts = 789 # Integer | The `from` timestamp for the query window in epoch seconds. to_ts = 789 # Integer | The `to` timestamp for the query window in epoch seconds. opts = { target: 1.2, # Float | The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`. apply_correction: true, # Boolean | Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`, then the corrections will not be applied and the SLI values will not be affected. } begin # Get an SLO's history result = api_instance.get_slo_history(slo_id, from_ts, to_ts, opts) p result rescue DatadogAPIClient::V1::APIError => e puts "Error when calling ServiceLevelObjectivesAPI->get_slo_history: #{e}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
datadog_api_client-1.7.0 | examples/generated/v1/service-level-objectives/GetSLOHistory.rb |