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

The following fields are returned by SELECT queries:

Successful response

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.
createTimestring (google-datetime)Output 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.
lastRunTimestring (google-datetime)Output only. The timestamp of the last time this config was executed.
orgConfigobjectOnly set when the parent is an org. (id: GooglePrivacyDlpV2OrgConfig)
otherCloudStartingLocationobjectMust be set only when scanning other clouds. (id: GooglePrivacyDlpV2OtherCloudDiscoveryStartingLocation)
processingLocationobjectOptional. Processing location configuration. Vertex AI dataset scanning will set processing_location.image_fallback_type to MultiRegionProcessing by default. (id: GooglePrivacyDlpV2ProcessingLocation)
statusstringRequired. A status for this configuration.
targetsarrayTarget to match against for determining what to scan and how frequently.
updateTimestring (google-datetime)Output only. The last update timestamp of a DiscoveryConfig.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_discovery_configs_getselectprojectsId, locationsId, discoveryConfigsIdGets a discovery configuration.
organizations_locations_discovery_configs_getselectorganizationsId, locationsId, discoveryConfigsIdGets a discovery configuration.
projects_locations_discovery_configs_listselectprojectsId, locationsIdpageToken, pageSize, orderByLists discovery configurations.
organizations_locations_discovery_configs_listselectorganizationsId, locationsIdpageToken, pageSize, orderByLists discovery configurations.
projects_locations_discovery_configs_createinsertprojectsId, locationsIdCreates a config for discovery to scan and profile storage.
organizations_locations_discovery_configs_createinsertorganizationsId, locationsIdCreates a config for discovery to scan and profile storage.
projects_locations_discovery_configs_patchupdateprojectsId, locationsId, discoveryConfigsIdUpdates a discovery configuration.
organizations_locations_discovery_configs_patchupdateorganizationsId, locationsId, discoveryConfigsIdUpdates a discovery configuration.
projects_locations_discovery_configs_deletedeleteprojectsId, locationsId, discoveryConfigsIdDeletes a discovery configuration.
organizations_locations_discovery_configs_deletedeleteorganizationsId, locationsId, discoveryConfigsIdDeletes a discovery configuration.

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
discoveryConfigsIdstring
locationsIdstring
organizationsIdstring
projectsIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a discovery configuration.

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

INSERT examples

Creates a config for discovery to scan and profile storage.

INSERT INTO google.dlp.discovery_configs (
data__discoveryConfig,
data__configId,
projectsId,
locationsId
)
SELECT
'{{ discoveryConfig }}',
'{{ configId }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
actions,
createTime,
displayName,
errors,
inspectTemplates,
lastRunTime,
orgConfig,
otherCloudStartingLocation,
processingLocation,
status,
targets,
updateTime
;

UPDATE examples

Updates a discovery configuration.

UPDATE google.dlp.discovery_configs
SET
data__discoveryConfig = '{{ discoveryConfig }}',
data__updateMask = '{{ updateMask }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND discoveryConfigsId = '{{ discoveryConfigsId }}' --required
RETURNING
name,
actions,
createTime,
displayName,
errors,
inspectTemplates,
lastRunTime,
orgConfig,
otherCloudStartingLocation,
processingLocation,
status,
targets,
updateTime;

DELETE examples

Deletes a discovery configuration.

DELETE FROM google.dlp.discovery_configs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND discoveryConfigsId = '{{ discoveryConfigsId }}' --required;