Skip to main content

discovery_configs

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

Overview

Namediscovery_configs
TypeResource
Idgoogle.dlp.discovery_configs

Fields

NameDatatypeDescription
namestringUnique resource name for the DiscoveryConfig, assigned by the service when the DiscoveryConfig is created, for example projects/dlp-test-project/locations/global/discoveryConfigs/53234423.
actionsarrayActions to execute at the completion of scanning.
createTimestringOutput only. The creation timestamp of a DiscoveryConfig.
displayNamestringDisplay name (max 100 chars)
errorsarrayOutput only. A stream of errors encountered when the config was activated. Repeated errors may result in the config automatically being paused. Output only field. Will return the last 100 errors. Whenever the config is modified this list will be cleared.
inspectTemplatesarrayDetection logic for profile generation. Not all template features are used by Discovery. FindingLimits, include_quote and exclude_info_types have no impact on Discovery. Multiple templates may be provided if there is data in multiple regions. At most one template must be specified per-region (including "global"). Each region is scanned using the applicable template. If no region-specific template is specified, but a "global" template is specified, it will be copied to that region and used instead. If no global or region-specific template is provided for a region with data, that region's data will not be scanned. For more information, see https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency.
lastRunTimestringOutput only. The timestamp of the last time this config was executed.
orgConfigobjectProject and scan location information. Only set when the parent is an org.
statusstringRequired. A status for this configuration.
targetsarrayTarget to match against for determining what to scan and how frequently.
updateTimestringOutput only. The last update timestamp of a DiscoveryConfig.

Methods

NameAccessible byRequired ParamsDescription
organizations_locations_discovery_configs_getSELECTdiscoveryConfigsId, locationsId, organizationsIdGets a discovery configuration.
organizations_locations_discovery_configs_listSELECTlocationsId, organizationsIdLists discovery configurations.
projects_locations_discovery_configs_getSELECTdiscoveryConfigsId, locationsId, projectsIdGets a discovery configuration.
projects_locations_discovery_configs_listSELECTlocationsId, projectsIdLists discovery configurations.
organizations_locations_discovery_configs_createINSERTlocationsId, organizationsIdCreates a config for discovery to scan and profile storage.
projects_locations_discovery_configs_createINSERTlocationsId, projectsIdCreates a config for discovery to scan and profile storage.
organizations_locations_discovery_configs_deleteDELETEdiscoveryConfigsId, locationsId, organizationsIdDeletes a discovery configuration.
projects_locations_discovery_configs_deleteDELETEdiscoveryConfigsId, locationsId, projectsIdDeletes a discovery configuration.
organizations_locations_discovery_configs_patchUPDATEdiscoveryConfigsId, locationsId, organizationsIdUpdates a discovery configuration.
projects_locations_discovery_configs_patchUPDATEdiscoveryConfigsId, locationsId, projectsIdUpdates a discovery configuration.

SELECT examples

Lists discovery configurations.

SELECT
name,
actions,
createTime,
displayName,
errors,
inspectTemplates,
lastRunTime,
orgConfig,
status,
targets,
updateTime
FROM google.dlp.discovery_configs
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new discovery_configs resource.

/*+ create */
INSERT INTO google.dlp.discovery_configs (
locationsId,
projectsId,
configId,
discoveryConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ configId }}',
'{{ discoveryConfig }}'
;

UPDATE example

Updates a discovery_configs resource.

/*+ update */
UPDATE google.dlp.discovery_configs
SET
updateMask = '{{ updateMask }}',
discoveryConfig = '{{ discoveryConfig }}'
WHERE
discoveryConfigsId = '{{ discoveryConfigsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified discovery_configs resource.

/*+ delete */
DELETE FROM google.dlp.discovery_configs
WHERE discoveryConfigsId = '{{ discoveryConfigsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';