Sha256: db6b1c157a25c37bddd424319062b060ca483121a8fc4bff279ea3ac4fb8c0f5

Contents?: true

Size: 753 Bytes

Versions: 1

Compression:

Stored size: 753 Bytes

Contents

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
body = DatadogAPIClient::V1::Dashboard.new({ layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED, title: "title_example", widgets: [DatadogAPIClient::V1::Widget.new({ definition: DatadogAPIClient::V1::AlertGraphWidgetDefinition.new({ alert_id: "alert_id_example", type: DatadogAPIClient::V1::AlertGraphWidgetDefinitionType::ALERT_GRAPH, viz_type: DatadogAPIClient::V1::WidgetVizType::TIMESERIES }) })] }) # Dashboard | Create a dashboard request body.

begin
  # Create a new dashboard
  result = api_instance.create_dashboard(body)
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling DashboardsAPI->create_dashboard: #{e}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-1.7.0 examples/generated/v1/dashboards/CreateDashboard.rb