Sha256: 9ffe05faf1fb5aaf0dff40844776d9f4a1d1841c55b7d1fde7a506d8d476929a

Contents?: true

Size: 822 Bytes

Versions: 19

Compression:

Stored size: 822 Bytes

Contents

# Update an SLO correction returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::ServiceLevelObjectiveCorrectionsAPI.new

# there is a valid "correction" for "slo"
CORRECTION_DATA_ID = ENV["CORRECTION_DATA_ID"]

body = DatadogAPIClient::V1::SLOCorrectionUpdateRequest.new({
  data: DatadogAPIClient::V1::SLOCorrectionUpdateData.new({
    attributes: DatadogAPIClient::V1::SLOCorrectionUpdateRequestAttributes.new({
      category: DatadogAPIClient::V1::SLOCorrectionCategory::DEPLOYMENT,
      description: "Example-Service-Level-Objective-Correction",
      _end: (Time.now + 1 * 3600).to_i,
      start: Time.now.to_i,
      timezone: "UTC",
    }),
    type: DatadogAPIClient::V1::SLOCorrectionType::CORRECTION,
  }),
})
p api_instance.update_slo_correction(CORRECTION_DATA_ID, body)

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
datadog_api_client-2.28.1 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.27.1 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.26.1 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.26.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.25.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.24.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.22.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.21.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.20.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.19.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.18.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.17.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.16.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.15.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.14.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.13.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.12.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.11.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb
datadog_api_client-2.10.0 examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb