Sha256: 4593036101abd9b38ade71e0329e98cfbd9875f94546ded831a314eb46fbc348

Contents?: true

Size: 697 Bytes

Versions: 1

Compression:

Stored size: 697 Bytes

Contents

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::LogsMetricsAPI.new
metric_id = "metric_id_example" # String | The name of the log-based metric.
body = DatadogAPIClient::V2::LogsMetricUpdateRequest.new({ data: DatadogAPIClient::V2::LogsMetricUpdateData.new({ attributes: DatadogAPIClient::V2::LogsMetricUpdateAttributes.new, type: DatadogAPIClient::V2::LogsMetricType::LOGS_METRICS }) }) # LogsMetricUpdateRequest | New definition of the log-based metric.

begin
  # Update a log-based metric
  result = api_instance.update_logs_metric(metric_id, body)
  p result
rescue DatadogAPIClient::V2::APIError => e
  puts "Error when calling LogsMetricsAPI->update_logs_metric: #{e}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-1.7.0 examples/generated/v2/logs-metrics/UpdateLogsMetric.rb