Sha256: d89f57d068b16e082c957d80d0ad50f57c9aae2469e4a7a5e84ac1c1702dc7e6

Contents?: true

Size: 521 Bytes

Versions: 18

Compression:

Stored size: 521 Bytes

Contents

# Schedule a monitor downtime returns "OK" response

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

# there is a valid "monitor" in the system
MONITOR_ID = ENV["MONITOR_ID"]

body = DatadogAPIClient::V1::Downtime.new({
  message: "Example-Schedule_a_monitor_downtime_returns_OK_response",
  start: Time.now.to_i,
  timezone: "Etc/UTC",
  scope: [
    "test:examplescheduleamonitordowntimereturnsokresponse",
  ],
  monitor_id: MONITOR_ID.to_i,
})
p api_instance.create_downtime(body)

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
datadog_api_client-2.9.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.8.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.7.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.6.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.5.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.4.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.3.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.2.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.1.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.0.2 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.0.1 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-2.0.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-1.11.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-1.10.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-1.9.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-1.8.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-1.7.0 examples/v1/downtimes/CreateDowntime_3355644446.rb
datadog_api_client-1.6.0 examples/v1/downtimes/CreateDowntime_3355644446.rb