Reference documentation and code samples for the Data Loss Prevention V2 Client class CloudSqlProperties.
Cloud SQL connection properties.
Generated from protobuf messagegoogle.privacy.dlp.v2.CloudSqlProperties
Namespace
Google \ Cloud \ Dlp \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ connection_name
string
Optional. Immutable. The Cloud SQL instance for which the connection is defined. Only one connection per instance is allowed. This can only be set at creation time, and cannot be updated. It is an error to use a connection_name from different project or region than the one that holds the connection. For example, a Connection resource for Cloud SQL connection_nameproject-id:us-central1:sql-instancemust be created under the parentprojects/project-id/locations/us-central1
Built-in IAM authentication (must be configured in Cloud SQL).
↳ max_connections
int
Required. The DLP API will limit its connections to max_connections. Must be 2 or greater.
↳ database_engine
int
Required. The database engine used by the Cloud SQL instance that this connection configures.
getConnectionName
Optional. Immutable. The Cloud SQL instance for which the connection is
defined. Only one connection per instance is allowed. This can only be set
at creation time, and cannot be updated.
It is an error to use a connection_name from different project or region
than the one that holds the connection.
For example, a Connection resource for Cloud SQL connection_nameproject-id:us-central1:sql-instancemust be created under the parentprojects/project-id/locations/us-central1
Returns
Type
Description
string
setConnectionName
Optional. Immutable. The Cloud SQL instance for which the connection is
defined. Only one connection per instance is allowed. This can only be set
at creation time, and cannot be updated.
It is an error to use a connection_name from different project or region
than the one that holds the connection.
For example, a Connection resource for Cloud SQL connection_nameproject-id:us-central1:sql-instancemust be created under the parentprojects/project-id/locations/us-central1
[[["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-09 UTC."],[],[],null,["# Data Loss Prevention V2 Client - Class CloudSqlProperties (2.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.1 (latest)](/php/docs/reference/cloud-dlp/latest/V2.CloudSqlProperties)\n- [2.6.0](/php/docs/reference/cloud-dlp/2.6.0/V2.CloudSqlProperties)\n- [2.4.1](/php/docs/reference/cloud-dlp/2.4.1/V2.CloudSqlProperties)\n- [2.3.0](/php/docs/reference/cloud-dlp/2.3.0/V2.CloudSqlProperties)\n- [2.2.3](/php/docs/reference/cloud-dlp/2.2.3/V2.CloudSqlProperties)\n- [2.1.0](/php/docs/reference/cloud-dlp/2.1.0/V2.CloudSqlProperties)\n- [2.0.0](/php/docs/reference/cloud-dlp/2.0.0/V2.CloudSqlProperties)\n- [1.19.0](/php/docs/reference/cloud-dlp/1.19.0/V2.CloudSqlProperties)\n- [1.18.0](/php/docs/reference/cloud-dlp/1.18.0/V2.CloudSqlProperties)\n- [1.17.0](/php/docs/reference/cloud-dlp/1.17.0/V2.CloudSqlProperties)\n- [1.16.0](/php/docs/reference/cloud-dlp/1.16.0/V2.CloudSqlProperties)\n- [1.15.1](/php/docs/reference/cloud-dlp/1.15.1/V2.CloudSqlProperties)\n- [1.14.0](/php/docs/reference/cloud-dlp/1.14.0/V2.CloudSqlProperties)\n- [1.13.2](/php/docs/reference/cloud-dlp/1.13.2/V2.CloudSqlProperties)\n- [1.12.0](/php/docs/reference/cloud-dlp/1.12.0/V2.CloudSqlProperties)\n- [1.11.0](/php/docs/reference/cloud-dlp/1.11.0/V2.CloudSqlProperties)\n- [1.10.2](/php/docs/reference/cloud-dlp/1.10.2/V2.CloudSqlProperties)\n- [1.9.0](/php/docs/reference/cloud-dlp/1.9.0/V2.CloudSqlProperties)\n- [1.8.6](/php/docs/reference/cloud-dlp/1.8.6/V2.CloudSqlProperties) \nReference documentation and code samples for the Data Loss Prevention V2 Client class CloudSqlProperties.\n\nCloud SQL connection properties.\n\nGenerated from protobuf message `google.privacy.dlp.v2.CloudSqlProperties`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dlp \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getConnectionName\n\nOptional. Immutable. The Cloud SQL instance for which the connection is\ndefined. Only one connection per instance is allowed. This can only be set\nat creation time, and cannot be updated.\n\nIt is an error to use a connection_name from different project or region\nthan the one that holds the connection.\nFor example, a Connection resource for Cloud SQL connection_name\n`project-id:us-central1:sql-instance`\nmust be created under the parent\n`projects/project-id/locations/us-central1`\n\n### setConnectionName\n\nOptional. Immutable. The Cloud SQL instance for which the connection is\ndefined. Only one connection per instance is allowed. This can only be set\nat creation time, and cannot be updated.\n\nIt is an error to use a connection_name from different project or region\nthan the one that holds the connection.\nFor example, a Connection resource for Cloud SQL connection_name\n`project-id:us-central1:sql-instance`\nmust be created under the parent\n`projects/project-id/locations/us-central1`\n\n### getUsernamePassword\n\nA username and password stored in Secret Manager.\n\n### hasUsernamePassword\n\n### setUsernamePassword\n\nA username and password stored in Secret Manager.\n\n### getCloudSqlIam\n\nBuilt-in IAM authentication (must be configured in Cloud SQL).\n\n### hasCloudSqlIam\n\n### setCloudSqlIam\n\nBuilt-in IAM authentication (must be configured in Cloud SQL).\n\n### getMaxConnections\n\nRequired. The DLP API will limit its connections to max_connections.\n\nMust be 2 or greater.\n\n### setMaxConnections\n\nRequired. The DLP API will limit its connections to max_connections.\n\nMust be 2 or greater.\n\n### getDatabaseEngine\n\nRequired. The database engine used by the Cloud SQL instance that this\nconnection configures.\n\n### setDatabaseEngine\n\nRequired. The database engine used by the Cloud SQL instance that this\nconnection configures.\n\n### getCredential"]]