Reference documentation and code samples for the Data Loss Prevention V2 Client class DatabaseResourceRegex.
A pattern to match against one or more database resources. At least one
pattern must be specified. Regular expressions use RE2
syntax; a guide can be found
under the google/re2 repository on GitHub.
Generated from protobuf message google.privacy.dlp.v2.DatabaseResourceRegex
Namespace
Google \ Cloud \ Dlp \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ project_id_regex
string
For organizations, if unset, will match all projects. Has no effect for configurations created within a project.
↳ instance_regex
string
Regex to test the instance name against. If empty, all instances match.
↳ database_regex
string
Regex to test the database name against. If empty, all databases match.
↳ database_resource_name_regex
string
Regex to test the database resource's name against. An example of a database resource name is a table's name. Other database resource names like view names could be included in the future. If empty, all database resources match.
getProjectIdRegex
For organizations, if unset, will match all projects. Has no effect
for configurations created within a project.
Returns
Type
Description
string
setProjectIdRegex
For organizations, if unset, will match all projects. Has no effect
for configurations created within a project.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getInstanceRegex
Regex to test the instance name against. If empty, all instances match.
Returns
Type
Description
string
setInstanceRegex
Regex to test the instance name against. If empty, all instances match.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDatabaseRegex
Regex to test the database name against. If empty, all databases match.
Returns
Type
Description
string
setDatabaseRegex
Regex to test the database name against. If empty, all databases match.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDatabaseResourceNameRegex
Regex to test the database resource's name against. An example of a
database resource name is a table's name. Other database resource names
like view names could be included in the future. If empty, all database
resources match.
Returns
Type
Description
string
setDatabaseResourceNameRegex
Regex to test the database resource's name against. An example of a
database resource name is a table's name. Other database resource names
like view names could be included in the future. If empty, all database
resources match.
[[["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-09-04 UTC."],[],[],null,["# Data Loss Prevention V2 Client - Class DatabaseResourceRegex (2.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.1 (latest)](/php/docs/reference/cloud-dlp/latest/V2.DatabaseResourceRegex)\n- [2.6.0](/php/docs/reference/cloud-dlp/2.6.0/V2.DatabaseResourceRegex)\n- [2.4.1](/php/docs/reference/cloud-dlp/2.4.1/V2.DatabaseResourceRegex)\n- [2.3.0](/php/docs/reference/cloud-dlp/2.3.0/V2.DatabaseResourceRegex)\n- [2.2.3](/php/docs/reference/cloud-dlp/2.2.3/V2.DatabaseResourceRegex)\n- [2.1.0](/php/docs/reference/cloud-dlp/2.1.0/V2.DatabaseResourceRegex)\n- [2.0.0](/php/docs/reference/cloud-dlp/2.0.0/V2.DatabaseResourceRegex)\n- [1.19.0](/php/docs/reference/cloud-dlp/1.19.0/V2.DatabaseResourceRegex)\n- [1.18.0](/php/docs/reference/cloud-dlp/1.18.0/V2.DatabaseResourceRegex)\n- [1.17.0](/php/docs/reference/cloud-dlp/1.17.0/V2.DatabaseResourceRegex)\n- [1.16.0](/php/docs/reference/cloud-dlp/1.16.0/V2.DatabaseResourceRegex)\n- [1.15.1](/php/docs/reference/cloud-dlp/1.15.1/V2.DatabaseResourceRegex)\n- [1.14.0](/php/docs/reference/cloud-dlp/1.14.0/V2.DatabaseResourceRegex)\n- [1.13.2](/php/docs/reference/cloud-dlp/1.13.2/V2.DatabaseResourceRegex)\n- [1.12.0](/php/docs/reference/cloud-dlp/1.12.0/V2.DatabaseResourceRegex)\n- [1.11.0](/php/docs/reference/cloud-dlp/1.11.0/V2.DatabaseResourceRegex)\n- [1.10.2](/php/docs/reference/cloud-dlp/1.10.2/V2.DatabaseResourceRegex)\n- [1.9.0](/php/docs/reference/cloud-dlp/1.9.0/V2.DatabaseResourceRegex)\n- [1.8.6](/php/docs/reference/cloud-dlp/1.8.6/V2.DatabaseResourceRegex) \nReference documentation and code samples for the Data Loss Prevention V2 Client class DatabaseResourceRegex.\n\nA pattern to match against one or more database resources. At least one\npattern must be specified. Regular expressions use RE2\n[syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found\nunder the google/re2 repository on GitHub.\n\nGenerated from protobuf message `google.privacy.dlp.v2.DatabaseResourceRegex`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dlp \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getProjectIdRegex\n\nFor organizations, if unset, will match all projects. Has no effect\nfor configurations created within a project.\n\n### setProjectIdRegex\n\nFor organizations, if unset, will match all projects. Has no effect\nfor configurations created within a project.\n\n### getInstanceRegex\n\nRegex to test the instance name against. If empty, all instances match.\n\n### setInstanceRegex\n\nRegex to test the instance name against. If empty, all instances match.\n\n### getDatabaseRegex\n\nRegex to test the database name against. If empty, all databases match.\n\n### setDatabaseRegex\n\nRegex to test the database name against. If empty, all databases match.\n\n### getDatabaseResourceNameRegex\n\nRegex to test the database resource's name against. An example of a\ndatabase resource name is a table's name. Other database resource names\nlike view names could be included in the future. If empty, all database\nresources match.\n\n### setDatabaseResourceNameRegex\n\nRegex to test the database resource's name against. An example of a\ndatabase resource name is a table's name. Other database resource names\nlike view names could be included in the future. If empty, all database\nresources match."]]