Sha256: 47b4b1ae4ecb7597202a04f683b4d2863076cb76f55a4b4bfb9e296be0bc292a
Contents?: true
Size: 1018 Bytes
Versions: 20
Compression:
Stored size: 1018 Bytes
Contents
# Create an SLO object returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V1::ServiceLevelObjectivesAPI.new body = DatadogAPIClient::V1::ServiceLevelObjectiveRequest.new({ type: DatadogAPIClient::V1::SLOType::METRIC, description: "string", groups: [ "env:test", "role:mysql", ], monitor_ids: [], name: "Example-Service-Level-Objective", query: DatadogAPIClient::V1::ServiceLevelObjectiveQuery.new({ denominator: "sum:httpservice.hits{!code:3xx}.as_count()", numerator: "sum:httpservice.hits{code:2xx}.as_count()", }), tags: [ "env:prod", "app:core", ], thresholds: [ DatadogAPIClient::V1::SLOThreshold.new({ target: 97.0, target_display: "97.0", timeframe: DatadogAPIClient::V1::SLOTimeframe::SEVEN_DAYS, warning: 98, warning_display: "98.0", }), ], timeframe: DatadogAPIClient::V1::SLOTimeframe::SEVEN_DAYS, target_threshold: 97.0, warning_threshold: 98, }) p api_instance.create_slo(body)
Version data entries
20 entries across 20 versions & 1 rubygems