Skip to main content

inspect_templates

Creates, updates, deletes, gets or lists an inspect_templates resource.

Overview

Nameinspect_templates
TypeResource
Idgoogle.dlp.inspect_templates

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The template name. The template will have one of the following formats: projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID OR organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID;
createTimestring (google-datetime)Output only. The creation timestamp of an inspectTemplate.
descriptionstringShort description (max 256 chars).
displayNamestringDisplay name (max 256 chars).
inspectConfigobjectThe core content of the template. Configuration of the scanning process. (id: GooglePrivacyDlpV2InspectConfig)
updateTimestring (google-datetime)Output only. The last update timestamp of an inspectTemplate.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_inspect_templates_getselectprojectsId, locationsId, inspectTemplatesIdGets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_locations_inspect_templates_getselectorganizationsId, locationsId, inspectTemplatesIdGets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_locations_inspect_templates_listselectprojectsId, locationsIdpageToken, pageSize, orderBy, locationIdLists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_getselectprojectsId, inspectTemplatesIdGets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_locations_inspect_templates_listselectorganizationsId, locationsIdpageToken, pageSize, orderBy, locationIdLists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_getselectorganizationsId, inspectTemplatesIdGets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_listselectprojectsIdpageToken, pageSize, orderBy, locationIdLists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_listselectorganizationsIdpageToken, pageSize, orderBy, locationIdLists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_locations_inspect_templates_createinsertprojectsId, locationsIdCreates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_locations_inspect_templates_createinsertorganizationsId, locationsIdCreates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_createinsertprojectsIdCreates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_createinsertorganizationsIdCreates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_locations_inspect_templates_patchupdateprojectsId, locationsId, inspectTemplatesIdUpdates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_locations_inspect_templates_patchupdateorganizationsId, locationsId, inspectTemplatesIdUpdates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_patchupdateprojectsId, inspectTemplatesIdUpdates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_patchupdateorganizationsId, inspectTemplatesIdUpdates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_locations_inspect_templates_deletedeleteprojectsId, locationsId, inspectTemplatesIdDeletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_locations_inspect_templates_deletedeleteorganizationsId, locationsId, inspectTemplatesIdDeletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_deletedeleteprojectsId, inspectTemplatesIdDeletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_deletedeleteorganizationsId, inspectTemplatesIdDeletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

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

SELECT examples

Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

SELECT
name,
createTime,
description,
displayName,
inspectConfig,
updateTime
FROM google.dlp.inspect_templates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND inspectTemplatesId = '{{ inspectTemplatesId }}' -- required;

INSERT examples

Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

INSERT INTO google.dlp.inspect_templates (
data__inspectTemplate,
data__templateId,
data__locationId,
projectsId,
locationsId
)
SELECT
'{{ inspectTemplate }}',
'{{ templateId }}',
'{{ locationId }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
description,
displayName,
inspectConfig,
updateTime
;

UPDATE examples

Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

UPDATE google.dlp.inspect_templates
SET
data__inspectTemplate = '{{ inspectTemplate }}',
data__updateMask = '{{ updateMask }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND inspectTemplatesId = '{{ inspectTemplatesId }}' --required
RETURNING
name,
createTime,
description,
displayName,
inspectConfig,
updateTime;

DELETE examples

Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

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