Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class SslMode.
The SSL options for database connections.
Protobuf type google.cloud.sql.v1.IpConfiguration.SslMode
Namespace
Google \ Cloud \ Sql \ V1 \ IpConfiguration
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
SSL_MODE_UNSPECIFIED
Value: 0
The SSL mode is unknown.
Generated from protobuf enum SSL_MODE_UNSPECIFIED = 0;
ALLOW_UNENCRYPTED_AND_ENCRYPTED
Value: 1
Allow non-SSL/non-TLS and SSL/TLS connections.
For SSL connections to MySQL and PostgreSQL, the client certificate
isn't verified.
When this value is used, the legacy require_ssl flag must be false or
cleared to avoid a conflict between the values of the two flags.
Generated from protobuf enum ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1;
ENCRYPTED_ONLY
Value: 2
Only allow connections encrypted with SSL/TLS.
For SSL connections to MySQL and PostgreSQL, the client certificate
isn't verified.
When this value is used, the legacy require_ssl flag must be false or
cleared to avoid a conflict between the values of the two flags.
Generated from protobuf enum ENCRYPTED_ONLY = 2;
TRUSTED_CLIENT_CERTIFICATE_REQUIRED
Value: 3
Only allow connections encrypted with SSL/TLS and with valid
client certificates.
When this value is used, the legacy require_ssl flag must be true or
cleared to avoid the conflict between values of two flags.
PostgreSQL clients or users that connect using IAM database
authentication must use either the
Cloud SQL Auth
Proxy or
Cloud SQL
Connectors
to enforce client identity verification.
Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server.
Generated from protobuf enum TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3;
[[["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,["# Google Cloud Sql Admin V1 Client - Class SslMode (1.2.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.6 (latest)](/php/docs/reference/cloud-sql-admin/latest/V1.IpConfiguration.SslMode)\n- [1.2.5](/php/docs/reference/cloud-sql-admin/1.2.5/V1.IpConfiguration.SslMode)\n- [1.1.0](/php/docs/reference/cloud-sql-admin/1.1.0/V1.IpConfiguration.SslMode)\n- [1.0.0](/php/docs/reference/cloud-sql-admin/1.0.0/V1.IpConfiguration.SslMode)\n- [0.19.0](/php/docs/reference/cloud-sql-admin/0.19.0/V1.IpConfiguration.SslMode)\n- [0.18.0](/php/docs/reference/cloud-sql-admin/0.18.0/V1.IpConfiguration.SslMode)\n- [0.17.1](/php/docs/reference/cloud-sql-admin/0.17.1/V1.IpConfiguration.SslMode)\n- [0.16.1](/php/docs/reference/cloud-sql-admin/0.16.1/V1.IpConfiguration.SslMode)\n- [0.12.0](/php/docs/reference/cloud-sql-admin/0.12.0/V1.IpConfiguration.SslMode)\n- [0.11.0](/php/docs/reference/cloud-sql-admin/0.11.0/V1.IpConfiguration.SslMode)\n- [0.10.0](/php/docs/reference/cloud-sql-admin/0.10.0/V1.IpConfiguration.SslMode)\n- [0.9.0](/php/docs/reference/cloud-sql-admin/0.9.0/V1.IpConfiguration.SslMode)\n- [0.8.0](/php/docs/reference/cloud-sql-admin/0.8.0/V1.IpConfiguration.SslMode)\n- [0.7.0](/php/docs/reference/cloud-sql-admin/0.7.0/V1.IpConfiguration.SslMode)\n- [0.6.0](/php/docs/reference/cloud-sql-admin/0.6.0/V1.IpConfiguration.SslMode)\n- [0.5.0](/php/docs/reference/cloud-sql-admin/0.5.0/V1.IpConfiguration.SslMode)\n- [0.4.1](/php/docs/reference/cloud-sql-admin/0.4.1/V1.IpConfiguration.SslMode)\n- [0.3.1](/php/docs/reference/cloud-sql-admin/0.3.1/V1.IpConfiguration.SslMode)\n- [0.2.12](/php/docs/reference/cloud-sql-admin/0.2.12/V1.IpConfiguration.SslMode) \nReference documentation and code samples for the Google Cloud Sql Admin V1 Client class SslMode.\n\nThe SSL options for database connections.\n\nProtobuf type `google.cloud.sql.v1.IpConfiguration.SslMode`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Sql \\\\ V1 \\\\ IpConfiguration\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### SSL_MODE_UNSPECIFIED\n\n Value: 0\n\nThe SSL mode is unknown.\n\nGenerated from protobuf enum `SSL_MODE_UNSPECIFIED = 0;`\n\n### ALLOW_UNENCRYPTED_AND_ENCRYPTED\n\n Value: 1\n\nAllow non-SSL/non-TLS and SSL/TLS connections.\n\nFor SSL connections to MySQL and PostgreSQL, the client certificate\nisn't verified.\nWhen this value is used, the legacy `require_ssl` flag must be false or\ncleared to avoid a conflict between the values of the two flags.\n\nGenerated from protobuf enum `ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1;`\n\n### ENCRYPTED_ONLY\n\n Value: 2\n\nOnly allow connections encrypted with SSL/TLS.\n\nFor SSL connections to MySQL and PostgreSQL, the client certificate\nisn't verified.\nWhen this value is used, the legacy `require_ssl` flag must be false or\ncleared to avoid a conflict between the values of the two flags.\n\nGenerated from protobuf enum `ENCRYPTED_ONLY = 2;`\n\n### TRUSTED_CLIENT_CERTIFICATE_REQUIRED\n\n Value: 3\n\nOnly allow connections encrypted with SSL/TLS and with valid\nclient certificates.\n\nWhen this value is used, the legacy `require_ssl` flag must be true or\ncleared to avoid the conflict between values of two flags.\nPostgreSQL clients or users that connect using IAM database\nauthentication must use either the\n[Cloud SQL Auth\nProxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or\n[Cloud SQL\nConnectors](https://cloud.google.com/sql/docs/postgres/connect-connectors)\nto enforce client identity verification.\nOnly applicable to MySQL and PostgreSQL. Not applicable to SQL Server.\n\nGenerated from protobuf enum `TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3;`"]]