scorecard_campaigns
Creates, updates, deletes, gets or lists a scorecard_campaigns resource.
Overview
| Name | scorecard_campaigns |
| Type | Resource |
| Id | datadog.apm.scorecard_campaigns |
Fields
The following fields are returned by SELECT queries:
- get_scorecard_campaign
- list_scorecard_campaigns
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the campaign. (example: c10ODp0VCrrIpXmz) |
attributes | object | Campaign attributes. |
type | string | The JSON:API type for campaigns. (campaign) (example: campaign) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the campaign. (example: c10ODp0VCrrIpXmz) |
attributes | object | Campaign attributes. |
type | string | The JSON:API type for campaigns. (campaign) (example: campaign) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_scorecard_campaign | select | campaign_id | include, include_meta | Fetches a single campaign by ID or key. |
list_scorecard_campaigns | select | page[limit], page[offset], filter[campaign][name], filter[campaign][status], filter[campaign][owner] | Fetches all scorecard campaigns. | |
create_scorecard_campaign | insert | data | Creates a new scorecard campaign. | |
update_scorecard_campaign | replace | campaign_id, data | Updates an existing campaign. | |
delete_scorecard_campaign | delete | campaign_id | Deletes a single campaign by ID or key. |
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 |
|---|---|---|
campaign_id | string | Campaign ID or key. |
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. |
filter[campaign][name] | string | Filter campaigns by name (full-text search). |
filter[campaign][owner] | string | Filter campaigns by owner UUID. |
filter[campaign][status] | string | Filter campaigns by status. |
include | string | Include related data (for example, scores). |
include_meta | boolean | Include metadata (entity and rule counts). |
page[limit] | integer (int64) | Maximum number of campaigns to return. |
page[offset] | integer (int64) | Offset for pagination. |
SELECT examples
- get_scorecard_campaign
- list_scorecard_campaigns
Fetches a single campaign by ID or key.
SELECT
id,
attributes,
type
FROM datadog.apm.scorecard_campaigns
WHERE campaign_id = '{{ campaign_id }}' -- required
AND include = '{{ include }}'
AND include_meta = '{{ include_meta }}'
;
Fetches all scorecard campaigns.
SELECT
id,
attributes,
type
FROM datadog.apm.scorecard_campaigns
WHERE page[limit] = '{{ page[limit] }}'
AND page[offset] = '{{ page[offset] }}'
AND filter[campaign][name] = '{{ filter[campaign][name] }}'
AND filter[campaign][status] = '{{ filter[campaign][status] }}'
AND filter[campaign][owner] = '{{ filter[campaign][owner] }}'
;
INSERT examples
- create_scorecard_campaign
- Manifest
Creates a new scorecard campaign.
INSERT INTO datadog.apm.scorecard_campaigns (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: scorecard_campaigns
props:
- name: data
description: |
Data for creating a new campaign.
value:
attributes:
description: "{{ description }}"
due_date: "{{ due_date }}"
entity_scope: "{{ entity_scope }}"
guidance: "{{ guidance }}"
key: "{{ key }}"
name: "{{ name }}"
owner_id: "{{ owner_id }}"
rule_ids:
- "{{ rule_ids }}"
start_date: "{{ start_date }}"
status: "{{ status }}"
type: "{{ type }}"
REPLACE examples
- update_scorecard_campaign
Updates an existing campaign.
REPLACE datadog.apm.scorecard_campaigns
SET
data = '{{ data }}'
WHERE
campaign_id = '{{ campaign_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_scorecard_campaign
Deletes a single campaign by ID or key.
DELETE FROM datadog.apm.scorecard_campaigns
WHERE campaign_id = '{{ campaign_id }}' --required
;