Cloud Data Loss Prevention (Cloud DLP) is now a part of Sensitive Data Protection. The API name remains the same: Cloud Data Loss Prevention API (DLP API). For information about the services that make up Sensitive Data Protection, see Sensitive Data Protection overview.
Stay organized with collections
Save and categorize content based on your preferences.
Create a Sensitive Data Protection inspection template
This quickstart shows you how to create and use a Sensitive Data Protection inspection
template in the Google Cloud console. Sensitive Data Protection inspection templates
let you create and persist configuration information in Sensitive Data Protection.
To complete this quickstart, you need to have data that you can scan in
Cloud Storage, BigQuery, or Firestore in Datastore mode (Datastore).
To follow step-by-step guidance for this task directly in the
Google Cloud console, click Guide me:
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
On the Create template page, define the following options:
For Template type, use the default setting Inspect (find sensitive
data).
For Template ID, enter quickstart-template.
For Display name, enter Quickstart template.
For Description, leave the field empty.
For Resource location, use the default setting Global (any
region).
Click Continue.
Configure detection
You now configure the template to detect for an infoType such as credit card numbers.
In the Configure detection section of the Create template page, do
the following:
In the InfoTypes section, click Manage infoTypes, select the
infoTypes that you want to scan for, and then click Done.
In the Confidence threshold section, select Possible
from the Likelihood list.
The default value Possible is sufficient for most purposes. If
you routinely get matches that are too broad when you use this
template, move the slider up. If you get too few matches, move the
slider down.
To create the template, click Create.
The template's summary information page appears. To return to the main
Sensitive Data Protection page, click arrow_backUp to Template list.
Use the template
The following steps describe how to configure the template for use in a scan:
In the Google Cloud console, go to the Create job or job trigger
page.
Follow the prompts to create an inspection job or job trigger (a recurring
job). When you are prompted to configure the detection, select the template
that you created.
Clean up
To avoid incurring charges to your Google Cloud account for
the resources used on this page, follow these steps.
Delete the project
The easiest way to eliminate billing is to delete the project that you
created for the tutorial.
To delete the project:
In the Google Cloud console, go to the Manage resources page.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Quickstart: Create a Sensitive Data Protection inspection template\n\nCreate a Sensitive Data Protection inspection template\n======================================================\n\nThis quickstart shows you how to create and use a Sensitive Data Protection inspection\ntemplate in the Google Cloud console. [Sensitive Data Protection inspection templates](/sensitive-data-protection/docs/concepts-templates)\nlet you create and persist configuration information in Sensitive Data Protection.\n\nTo complete this quickstart, you need to have data that you can scan in\nCloud Storage, BigQuery, or Firestore in Datastore mode (Datastore).\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=dlp--quickstart-create-template-inspect)\n\n*** ** * ** ***\n\nBefore you begin\n----------------\n\nSign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n\nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\n| **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n[Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n\n[Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n\nEnable the Sensitive Data Protection API.\n\n\n[Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dlp.googleapis.com) \nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\n| **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n[Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n\n[Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n\nEnable the Sensitive Data Protection API.\n\n\n[Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dlp.googleapis.com)\n1.\n\n\n Enable the Sensitive Data Protection API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dlp.googleapis.com)\n\nCreate a template\n-----------------\n\nIn the following sections, you configure and create an inspection template.\n\n### Define template\n\n1. In the Sensitive Data Protection section of the Google Cloud console, go\n to the **Create template** page.\n\n [Go to Create template](https://console.cloud.google.com/security/sensitive-data-protection/create/template;source=7)\n2. On the **Create template** page, define the following options:\n\n - For **Template type** , use the default setting **Inspect (find sensitive\n data)**.\n\n - For **Template ID** , enter `quickstart-template`.\n\n - For **Display name** , enter `Quickstart template`.\n\n - For **Description**, leave the field empty.\n\n - For **Resource location** , use the default setting **Global (any\n region)**.\n\n3. Click **Continue**.\n\n### Configure detection\n\nYou now configure the template to detect for an infoType such as credit card numbers.\n\n1. In the **Configure detection** section of the **Create template** page, do\n the following:\n\n - In the **InfoTypes** section, click **Manage infoTypes** , select the\n infoTypes that you want to scan for, and then click **Done**.\n\n - In the **Confidence threshold** section, select **Possible**\n from the **Likelihood** list.\n\n The default value **Possible** is sufficient for most purposes. If\n you routinely get matches that are too broad when you use this\n template, move the slider up. If you get too few matches, move the\n slider down.\n2. To create the template, click **Create**.\n\n The template's summary information page appears. To return to the main\n Sensitive Data Protection page, click arrow_back\n **Up to Template list**.\n\nUse the template\n----------------\n\nThe following steps describe how to configure the template for use in a scan:\n\n1. In the Google Cloud console, go to the **Create job or job trigger**\n page.\n\n [Go to Create job or job trigger](https://console.cloud.google.com/security/sensitive-data-protection/create/job;source=7)\n2. Follow the prompts to create an inspection job or job trigger (a recurring\n job). When you are prompted to configure the detection, select the template\n that you created.\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n### Delete the project\n\n\nThe easiest way to eliminate billing is to delete the project that you\ncreated for the tutorial.\n\nTo delete the project:\n\n| **Caution** : Deleting a project has the following effects:\n|\n| - **Everything in the project is deleted.** If you used an existing project for the tasks in this document, when you delete it, you also delete any other work you've done in the project.\n| - **Custom project IDs are lost.** When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as an `appspot.com` URL, delete selected resources inside the project instead of deleting the whole project.\n|\n|\n| If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects\n| can help you avoid exceeding project quota limits.\n1. In the Google Cloud console, go to the **Manage resources** page.\n\n [Go to Manage resources](https://console.cloud.google.com/iam-admin/projects)\n2. In the project list, select the project that you want to delete, and then click **Delete**.\n3. In the dialog, type the project ID, and then click **Shut down** to delete the project.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### Delete the template\n\nThere are no costs associated with creating and storing templates. However, if\nyou want to delete a template, follow these steps:\n\n1. In the Google Cloud console, go to the **Configuration** page of\n Sensitive Data Protection.\n\n [Go to Configuration](https://console.cloud.google.com/security/sensitive-data-protection/landing/configuration;source=7)\n2. Select the project that contains the inspection template that you want to\n delete.\n\n3. Click the **Templates** tab. The\n Google Cloud console displays a list of all templates for the current\n project.\n\n4. In the **Actions** column for the template you want to delete, click the\n trigger actions menu (more_vert),\n click **Delete** , and then click **Confirm**.\n\nWhat's next\n-----------\n\n- Learn more about [creating and scheduling Sensitive Data Protection inspection\n jobs](/sensitive-data-protection/docs/creating-job-triggers).\n\n- Learn more about [creating Sensitive Data Protection inspection templates](/sensitive-data-protection/docs/creating-templates-inspect).\n\n- Learn more about the [infoType detector reference](/sensitive-data-protection/docs/infotypes-reference).\n\n- Learn more about how Sensitive Data Protection matches your content using the\n [likelihood value](/sensitive-data-protection/docs/likelihood)."]]