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:

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;
allowLimitedAvailabilityInfoTypesbooleanOptional. Enables the use of limited-availability built-in infoTypes in inspect_config. These infoTypes are supported only in specific regions and can cause scanning errors if used elsewhere.
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
organizations_locations_inspect_templates_getselectorganizationsId, locationsId, inspectTemplatesIdGets an InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_locations_inspect_templates_getselectprojectsId, locationsId, inspectTemplatesIdGets an InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_getselectorganizationsId, inspectTemplatesIdGets an InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_locations_inspect_templates_listselectorganizationsId, locationsIdlocationId, orderBy, pageSize, pageTokenLists InspectTemplates. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_getselectprojectsId, inspectTemplatesIdGets an InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_locations_inspect_templates_listselectprojectsId, locationsIdlocationId, orderBy, pageSize, pageTokenLists InspectTemplates. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_listselectorganizationsIdlocationId, orderBy, pageSize, pageTokenLists InspectTemplates. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_listselectprojectsIdlocationId, orderBy, pageSize, pageTokenLists InspectTemplates. See https://docs.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://docs.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://docs.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://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_locations_inspect_templates_patchupdateorganizationsId, locationsId, inspectTemplatesIdUpdates the InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_locations_inspect_templates_patchupdateprojectsId, locationsId, inspectTemplatesIdUpdates the InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_patchupdateorganizationsId, inspectTemplatesIdUpdates the InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_patchupdateprojectsId, inspectTemplatesIdUpdates the InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_locations_inspect_templates_deletedeleteorganizationsId, locationsId, inspectTemplatesIdDeletes an InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_locations_inspect_templates_deletedeleteprojectsId, locationsId, inspectTemplatesIdDeletes an InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
organizations_inspect_templates_deletedeleteorganizationsId, inspectTemplatesIdDeletes an InspectTemplate. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
projects_inspect_templates_deletedeleteprojectsId, inspectTemplatesIdDeletes an InspectTemplate. See https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

SELECT
name,
allowLimitedAvailabilityInfoTypes,
createTime,
description,
displayName,
inspectConfig,
updateTime
FROM google.dlp.inspect_templates
WHERE organizationsId = '{{ organizationsId }}' -- 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://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.

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

UPDATE examples​

Updates the InspectTemplate. See https://docs.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
organizationsId = '{{ organizationsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND inspectTemplatesId = '{{ inspectTemplatesId }}' --required
RETURNING
name,
allowLimitedAvailabilityInfoTypes,
createTime,
description,
displayName,
inspectConfig,
updateTime;

DELETE examples​

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

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