Sha256: 735016a88911fb3bc0de19371de7055bd6afb6e4ac0a25aa0abebbfa8dfa7ffd

Contents?: true

Size: 466 Bytes

Versions: 4

Compression:

Stored size: 466 Bytes

Contents

# Schedule a downtime once a year

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

body = DatadogAPIClient::V1::Downtime.new({
  message: "Example-Schedule_a_downtime_once_a_year",
  recurrence: DatadogAPIClient::V1::DowntimeRecurrence.new({
    period: 1,
    type: "years",
  }),
  scope: [
    "*",
  ],
  start: Time.now.to_i,
  _end: (Time.now + 1 * 3600).to_i,
  timezone: "Etc/UTC",
})
p api_instance.create_downtime(body)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
datadog_api_client-1.9.0 examples/v1/downtimes/CreateDowntime_3059354445.rb
datadog_api_client-1.8.0 examples/v1/downtimes/CreateDowntime_3059354445.rb
datadog_api_client-1.7.0 examples/v1/downtimes/CreateDowntime_3059354445.rb
datadog_api_client-1.6.0 examples/v1/downtimes/CreateDowntime_3059354445.rb