Skip to main content

scorecard_outcomes

Creates, updates, deletes, gets or lists a scorecard_outcomes resource.

Overview

Namescorecard_outcomes
TypeResource
Iddatadog.apm.scorecard_outcomes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique ID for a rule outcome.
attributesobjectThe JSON:API attributes for an outcome.
relationshipsobjectThe JSON:API relationship to a scorecard rule.
typestringThe JSON:API type for an outcome. (default: outcome, example: outcome)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_scorecard_outcomesselectregionpage[size], page[offset], include, fields[outcome], fields[rule], filter[outcome][service_name], filter[outcome][state], filter[rule][enabled], filter[rule][id], filter[rule][name]Fetches all rule outcomes.
create_scorecard_outcomes_batchinsertregionSets multiple service-rule outcomes in a single batched request.
update_scorecard_outcomes_asyncexecregionUpdates multiple scorecard rule outcomes in a single batched request.

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.

NameDatatypeDescription
regionstring(default: datadoghq.com)
fields[outcome]stringReturn only specified values in the outcome attributes.
fields[rule]stringReturn only specified values in the included rule details.
filter[outcome][service_name]stringFilter the outcomes on a specific service name.
filter[outcome][state]stringFilter the outcomes by a specific state.
filter[rule][enabled]booleanFilter outcomes on whether a rule is enabled/disabled.
filter[rule][id]stringFilter outcomes based on rule ID.
filter[rule][name]stringFilter outcomes based on rule name.
includestringInclude related rule details in the response.
page[offset]integer (int64)Specific offset to use as the beginning of the returned page.
page[size]integer (int64)Size for a given page. The maximum allowed value is 100.

SELECT examples

Fetches all rule outcomes.

SELECT
id,
attributes,
relationships,
type
FROM datadog.apm.scorecard_outcomes
WHERE region = '{{ region }}' -- required
AND page[size] = '{{ page[size] }}'
AND page[offset] = '{{ page[offset] }}'
AND include = '{{ include }}'
AND fields[outcome] = '{{ fields[outcome] }}'
AND fields[rule] = '{{ fields[rule] }}'
AND filter[outcome][service_name] = '{{ filter[outcome][service_name] }}'
AND filter[outcome][state] = '{{ filter[outcome][state] }}'
AND filter[rule][enabled] = '{{ filter[rule][enabled] }}'
AND filter[rule][id] = '{{ filter[rule][id] }}'
AND filter[rule][name] = '{{ filter[rule][name] }}'
;

INSERT examples

Sets multiple service-rule outcomes in a single batched request.

INSERT INTO datadog.apm.scorecard_outcomes (
data__data,
region
)
SELECT
'{{ data }}',
'{{ region }}'
RETURNING
data,
meta
;

Lifecycle Methods

Updates multiple scorecard rule outcomes in a single batched request.

EXEC datadog.apm.scorecard_outcomes.update_scorecard_outcomes_async 
@region='{{ region }}' --required
@@json=
'{
"data": "{{ data }}"
}'
;