Sha256: 9a61c75da29e3314a413e9827a64b91983c7fea8f620ad19d0d333cadea336a4

Contents?: true

Size: 885 Bytes

Versions: 1

Compression:

Stored size: 885 Bytes

Contents

# Create a new dashboard with free_text widget

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

body = DatadogAPIClient::V1::Dashboard.new({
  title: "Example-Dashboard",
  description: nil,
  widgets: [
    DatadogAPIClient::V1::Widget.new({
      layout: DatadogAPIClient::V1::WidgetLayout.new({
        x: 0,
        y: 0,
        width: 24,
        height: 6,
      }),
      definition: DatadogAPIClient::V1::FreeTextWidgetDefinition.new({
        type: DatadogAPIClient::V1::FreeTextWidgetDefinitionType::FREE_TEXT,
        text: "Example free text",
        color: "#4d4d4d",
        font_size: "auto",
        text_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
      }),
    }),
  ],
  template_variables: [],
  layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE,
  notify_list: [],
})
p api_instance.create_dashboard(body)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v1/dashboards/CreateDashboard_1738608750.rb