Sha256: cce342e9e05889ff4a253ab41494af435ac74face1b5f80409dd87c80f570a79

Contents?: true

Size: 776 Bytes

Versions: 16

Compression:

Stored size: 776 Bytes

Contents

# Schedule a downtime returns "OK" response

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

body = DatadogAPIClient::V2::DowntimeCreateRequest.new({
  data: DatadogAPIClient::V2::DowntimeCreateRequestData.new({
    attributes: DatadogAPIClient::V2::DowntimeCreateRequestAttributes.new({
      message: "dark forest",
      monitor_identifier: DatadogAPIClient::V2::DowntimeMonitorIdentifierTags.new({
        monitor_tags: [
          "cat:hat",
        ],
      }),
      scope: "test:exampledowntime",
      schedule: DatadogAPIClient::V2::DowntimeScheduleOneTimeCreateUpdateRequest.new({
        start: nil,
      }),
    }),
    type: DatadogAPIClient::V2::DowntimeResourceType::DOWNTIME,
  }),
})
p api_instance.create_downtime(body)

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
datadog_api_client-2.30.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.29.1 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.28.1 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.27.1 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.26.1 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.26.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.25.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.24.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.22.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.21.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.20.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.19.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.18.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.17.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.16.0 examples/v2/downtimes/CreateDowntime.rb
datadog_api_client-2.15.0 examples/v2/downtimes/CreateDowntime.rb