Skip to main content

deidentify_templates

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

Overview

Namedeidentify_templates
TypeResource
Idgoogle.dlp.deidentify_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/deidentifyTemplates/TEMPLATE_ID OR organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID
createTimestring (google-datetime)Output only. The creation timestamp of an inspectTemplate.
deidentifyConfigobjectThe core content of the template. (id: GooglePrivacyDlpV2DeidentifyConfig)
descriptionstringShort description (max 256 chars).
displayNamestringDisplay name (max 256 chars).
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_deidentify_templates_getselectprojectsId, locationsId, deidentifyTemplatesIdGets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_locations_deidentify_templates_getselectorganizationsId, locationsId, deidentifyTemplatesIdGets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_locations_deidentify_templates_listselectprojectsId, locationsIdpageToken, pageSize, orderBy, locationIdLists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_deidentify_templates_getselectprojectsId, deidentifyTemplatesIdGets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_locations_deidentify_templates_listselectorganizationsId, locationsIdpageToken, pageSize, orderBy, locationIdLists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_deidentify_templates_getselectorganizationsId, deidentifyTemplatesIdGets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_deidentify_templates_listselectprojectsIdpageToken, pageSize, orderBy, locationIdLists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_deidentify_templates_listselectorganizationsIdpageToken, pageSize, orderBy, locationIdLists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_locations_deidentify_templates_createinsertprojectsId, locationsIdCreates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_locations_deidentify_templates_createinsertorganizationsId, locationsIdCreates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_deidentify_templates_createinsertprojectsIdCreates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_deidentify_templates_createinsertorganizationsIdCreates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_locations_deidentify_templates_patchupdateprojectsId, locationsId, deidentifyTemplatesIdUpdates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_locations_deidentify_templates_patchupdateorganizationsId, locationsId, deidentifyTemplatesIdUpdates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_deidentify_templates_patchupdateprojectsId, deidentifyTemplatesIdUpdates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_deidentify_templates_patchupdateorganizationsId, deidentifyTemplatesIdUpdates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_locations_deidentify_templates_deletedeleteprojectsId, locationsId, deidentifyTemplatesIdDeletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_locations_deidentify_templates_deletedeleteorganizationsId, locationsId, deidentifyTemplatesIdDeletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
projects_deidentify_templates_deletedeleteprojectsId, deidentifyTemplatesIdDeletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
organizations_deidentify_templates_deletedeleteorganizationsId, deidentifyTemplatesIdDeletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid 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
deidentifyTemplatesIdstring
locationsIdstring
organizationsIdstring
projectsIdstring
locationIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.

SELECT
name,
createTime,
deidentifyConfig,
description,
displayName,
updateTime
FROM google.dlp.deidentify_templates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND deidentifyTemplatesId = '{{ deidentifyTemplatesId }}' -- required;

INSERT examples

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.

INSERT INTO google.dlp.deidentify_templates (
data__deidentifyTemplate,
data__templateId,
data__locationId,
projectsId,
locationsId
)
SELECT
'{{ deidentifyTemplate }}',
'{{ templateId }}',
'{{ locationId }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
deidentifyConfig,
description,
displayName,
updateTime
;

UPDATE examples

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

UPDATE google.dlp.deidentify_templates
SET
data__deidentifyTemplate = '{{ deidentifyTemplate }}',
data__updateMask = '{{ updateMask }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND deidentifyTemplatesId = '{{ deidentifyTemplatesId }}' --required
RETURNING
name,
createTime,
deidentifyConfig,
description,
displayName,
updateTime;

DELETE examples

Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.

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