Skip to main content

scanning_groups

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

Overview

Namescanning_groups
TypeResource
Iddatadog.security.scanning_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringID of the configuration.
attributesobjectAttributes of the Sensitive Data configuration.
relationshipsobjectRelationships of the configuration.
typestringSensitive Data Scanner configuration type. (sensitive_data_scanner_configuration) (default: sensitive_data_scanner_configuration, example: sensitive_data_scanner_configuration)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_scanning_groupsselectList all the Scanning groups in your organization.
create_scanning_groupinsertCreate a scanning group.<br />The request MAY include a configuration relationship.<br />A rules relationship can be omitted entirely, but if it is included it MUST be<br />null or an empty array (rules cannot be created at the same time).<br />The new group will be ordered last within the configuration.
update_scanning_groupupdategroup_id, data, metaUpdate a group, including the order of the rules.<br />Rules within the group are reordered by including a rules relationship. If the rules<br />relationship is present, its data section MUST contain linkages for all of the rules<br />currently in the group, and MUST NOT contain any others.
delete_scanning_groupdeletegroup_idDelete a given group.
reorder_scanning_groupsexecdata, metaReorder the list of groups.

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
group_idstringThe ID of a group of rules.
sitestringThe 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.

SELECT examples

List all the Scanning groups in your organization.

SELECT
id,
attributes,
relationships,
type
FROM datadog.security.scanning_groups
;

INSERT examples

Create a scanning group.<br />The request MAY include a configuration relationship.<br />A rules relationship can be omitted entirely, but if it is included it MUST be<br />null or an empty array (rules cannot be created at the same time).<br />The new group will be ordered last within the configuration.

INSERT INTO datadog.security.scanning_groups (
data,
meta
)
SELECT
'{{ data }}',
'{{ meta }}'
RETURNING
data,
meta
;

UPDATE examples

Update a group, including the order of the rules.<br />Rules within the group are reordered by including a rules relationship. If the rules<br />relationship is present, its data section MUST contain linkages for all of the rules<br />currently in the group, and MUST NOT contain any others.

UPDATE datadog.security.scanning_groups
SET
data = '{{ data }}',
meta = '{{ meta }}'
WHERE
group_id = '{{ group_id }}' --required
AND data = '{{ data }}' --required
AND meta = '{{ meta }}' --required
RETURNING
meta;

DELETE examples

Delete a given group.

DELETE FROM datadog.security.scanning_groups
WHERE group_id = '{{ group_id }}' --required
;

Lifecycle Methods

EXEC variables use wire (API) names.

Reorder the list of groups.

EXEC datadog.security.scanning_groups.reorder_scanning_groups
@@json=
'{
"data": "{{ data }}",
"meta": "{{ meta }}"
}'
;