slo_corrections
Creates, updates, deletes, gets or lists a slo_corrections resource.
Overview
| Name | slo_corrections |
| Type | Resource |
| Id | datadog.service_management.slo_corrections |
Fields
The following fields are returned by SELECT queries:
- get_slocorrection
- get_slocorrections
- list_slocorrection
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the SLO correction. |
attributes | object | The attribute object associated with the SLO correction. |
type | string | SLO correction resource type. (correction) (default: correction, example: correction) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the SLO correction. |
attributes | object | The attribute object associated with the SLO correction. |
type | string | SLO correction resource type. (correction) (default: correction, example: correction) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the SLO correction. |
attributes | object | The attribute object associated with the SLO correction. |
type | string | SLO correction resource type. (correction) (default: correction, example: correction) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_slocorrection | select | slo_correction_id | Get an SLO correction. | |
get_slocorrections | select | slo_id | Get corrections applied to an SLO | |
list_slocorrection | select | offset, limit | Get all Service Level Objective corrections. | |
create_slocorrection | insert | Create an SLO correction. Use slo_id to apply the correction to a single SLO, or slo_query to apply the<br />correction to SLOs that match a query. Exactly one of slo_id or slo_query is required. | ||
update_slocorrection | update | slo_correction_id | Update the specified SLO correction object. | |
delete_slocorrection | delete | slo_correction_id | Permanently delete the specified SLO correction object. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
slo_correction_id | string | The ID of the SLO correction object. |
slo_id | string | The ID of the service level objective object. |
limit | integer (int64) | The number of SLO corrections to return in the response. Default is 25. |
offset | integer (int64) | The specific offset to use as the beginning of the returned response. |
SELECT examples
- get_slocorrection
- get_slocorrections
- list_slocorrection
Get an SLO correction.
SELECT
id,
attributes,
type
FROM datadog.service_management.slo_corrections
WHERE slo_correction_id = '{{ slo_correction_id }}' -- required
;
Get corrections applied to an SLO
SELECT
id,
attributes,
type
FROM datadog.service_management.slo_corrections
WHERE slo_id = '{{ slo_id }}' -- required
;
Get all Service Level Objective corrections.
SELECT
id,
attributes,
type
FROM datadog.service_management.slo_corrections
WHERE offset = '{{ offset }}'
AND limit = '{{ limit }}'
;
INSERT examples
- create_slocorrection
- Manifest
Create an SLO correction. Use slo_id to apply the correction to a single SLO, or slo_query to apply the<br />correction to SLOs that match a query. Exactly one of slo_id or slo_query is required.
INSERT INTO datadog.service_management.slo_corrections (
data
)
SELECT
'{{ data }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: slo_corrections
props:
- name: data
description: |
The data object associated with the SLO correction to be created.
value:
attributes:
category: "{{ category }}"
description: "{{ description }}"
duration: {{ duration }}
end: {{ end }}
rrule: "{{ rrule }}"
slo_id: "{{ slo_id }}"
slo_query: "{{ slo_query }}"
start: {{ start }}
timezone: "{{ timezone }}"
type: "{{ type }}"
UPDATE examples
- update_slocorrection
Update the specified SLO correction object.
UPDATE datadog.service_management.slo_corrections
SET
data = '{{ data }}'
WHERE
slo_correction_id = '{{ slo_correction_id }}' --required
RETURNING
data;
DELETE examples
- delete_slocorrection
Permanently delete the specified SLO correction object.
DELETE FROM datadog.service_management.slo_corrections
WHERE slo_correction_id = '{{ slo_correction_id }}' --required
;