Reference documentation and code samples for the Google Cloud Network Security V1 Client class ClientTlsPolicy.
ClientTlsPolicy is a resource that specifies how a client should authenticate
connections to backends of a service. This resource itself does not affect
configuration unless it is attached to a backend service resource.
Generated from protobuf messagegoogle.cloud.networksecurity.v1.ClientTlsPolicy
Namespace
Google \ Cloud \ NetworkSecurity \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. Name of the ClientTlsPolicy resource. It matches the patternprojects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}
Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS.
Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.
getName
Required. Name of the ClientTlsPolicy resource. It matches the patternprojects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}
Returns
Type
Description
string
setName
Required. Name of the ClientTlsPolicy resource. It matches the patternprojects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDescription
Optional. Free-text description of the resource.
Returns
Type
Description
string
setDescription
Optional. Free-text description of the resource.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getCreateTime
Output only. The timestamp when the resource was created.
Optional. Server Name Indication string to present to the server during TLS
handshake. E.g: "secure.example.com".
Returns
Type
Description
string
setSni
Optional. Server Name Indication string to present to the server during TLS
handshake. E.g: "secure.example.com".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getClientCertificate
Optional. Defines a mechanism to provision client identity (public and private keys)
for peer to peer authentication. The presence of this dictates mTLS.
Optional. Defines a mechanism to provision client identity (public and private keys)
for peer to peer authentication. The presence of this dictates mTLS.
Optional. Defines the mechanism to obtain the Certificate Authority certificate to
validate the server certificate. If empty, client does not validate the
server certificate.
Optional. Defines the mechanism to obtain the Certificate Authority certificate to
validate the server certificate. If empty, client does not validate the
server certificate.
[[["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 Network Security V1 Client - Class ClientTlsPolicy (1.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.4 (latest)](/php/docs/reference/cloud-network-security/latest/V1.ClientTlsPolicy)\n- [1.0.3](/php/docs/reference/cloud-network-security/1.0.3/V1.ClientTlsPolicy)\n- [0.6.5](/php/docs/reference/cloud-network-security/0.6.5/V1.ClientTlsPolicy)\n- [0.5.2](/php/docs/reference/cloud-network-security/0.5.2/V1.ClientTlsPolicy)\n- [0.4.1](/php/docs/reference/cloud-network-security/0.4.1/V1.ClientTlsPolicy)\n- [0.3.7](/php/docs/reference/cloud-network-security/0.3.7/V1.ClientTlsPolicy) \nReference documentation and code samples for the Google Cloud Network Security V1 Client class ClientTlsPolicy.\n\nClientTlsPolicy is a resource that specifies how a client should authenticate\nconnections to backends of a service. This resource itself does not affect\nconfiguration unless it is attached to a backend service resource.\n\nGenerated from protobuf message `google.cloud.networksecurity.v1.ClientTlsPolicy`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ NetworkSecurity \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. Name of the ClientTlsPolicy resource. It matches the pattern\n`projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`\n\n### setName\n\nRequired. Name of the ClientTlsPolicy resource. It matches the pattern\n`projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`\n\n### getDescription\n\nOptional. Free-text description of the resource.\n\n### setDescription\n\nOptional. Free-text description of the resource.\n\n### getCreateTime\n\nOutput only. The timestamp when the resource was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The timestamp when the resource was created.\n\n### getUpdateTime\n\nOutput only. The timestamp when the resource was updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The timestamp when the resource was updated.\n\n### getLabels\n\nOptional. Set of label tags associated with the resource.\n\n### setLabels\n\nOptional. Set of label tags associated with the resource.\n\n### getSni\n\nOptional. Server Name Indication string to present to the server during TLS\nhandshake. E.g: \"secure.example.com\".\n\n### setSni\n\nOptional. Server Name Indication string to present to the server during TLS\nhandshake. E.g: \"secure.example.com\".\n\n### getClientCertificate\n\nOptional. Defines a mechanism to provision client identity (public and private keys)\nfor peer to peer authentication. The presence of this dictates mTLS.\n\n### hasClientCertificate\n\n### clearClientCertificate\n\n### setClientCertificate\n\nOptional. Defines a mechanism to provision client identity (public and private keys)\nfor peer to peer authentication. The presence of this dictates mTLS.\n\n### getServerValidationCa\n\nOptional. Defines the mechanism to obtain the Certificate Authority certificate to\nvalidate the server certificate. If empty, client does not validate the\nserver certificate.\n\n### setServerValidationCa\n\nOptional. Defines the mechanism to obtain the Certificate Authority certificate to\nvalidate the server certificate. If empty, client does not validate the\nserver certificate."]]