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.
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-19 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)."]]