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. (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_groupsselectregionList all the Scanning groups in your organization.
create_scanning_groupinsertregionCreate a scanning group.
The request MAY include a configuration relationship.
A rules relationship can be omitted entirely, but if it is included it MUST be
null or an empty array (rules cannot be created at the same time).
The new group will be ordered last within the configuration.
update_scanning_groupupdategroup_id, region, data__data, data__metaUpdate a group, including the order of the rules.
Rules within the group are reordered by including a rules relationship. If the rules
relationship is present, its data section MUST contain linkages for all of the rules
currently in the group, and MUST NOT contain any others.
delete_scanning_groupdeletegroup_id, regionDelete a given group.
reorder_scanning_groupsexecregion, data, 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.
regionstring(default: datadoghq.com)

SELECT examples

List all the Scanning groups in your organization.

SELECT
id,
attributes,
relationships,
type
FROM datadog.security.scanning_groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

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

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

UPDATE examples

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

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

DELETE examples

Delete a given group.

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

Lifecycle Methods

Reorder the list of groups.

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