Skip to main content

client_tls_policies

Creates, updates, deletes, gets or lists a client_tls_policies resource.

Overview

Nameclient_tls_policies
TypeResource
Idgoogle.networksecurity.client_tls_policies

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. Name of the ClientTlsPolicy resource. It matches the pattern projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}
clientCertificateobjectOptional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS. (id: GoogleCloudNetworksecurityV1CertificateProvider)
createTimestring (google-datetime)Output only. The timestamp when the resource was created.
descriptionstringOptional. Free-text description of the resource.
labelsobjectOptional. Set of label tags associated with the resource.
serverValidationCaarrayOptional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.
snistringOptional. Server Name Indication string to present to the server during TLS handshake. E.g: "secure.example.com".
updateTimestring (google-datetime)Output only. The timestamp when the resource was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_client_tls_policies_getselectprojectsId, locationsId, clientTlsPoliciesIdGets details of a single ClientTlsPolicy.
projects_locations_client_tls_policies_listselectprojectsId, locationsIdpageSize, pageTokenLists ClientTlsPolicies in a given project and location.
projects_locations_client_tls_policies_createinsertprojectsId, locationsIdclientTlsPolicyIdCreates a new ClientTlsPolicy in a given project and location.
projects_locations_client_tls_policies_patchupdateprojectsId, locationsId, clientTlsPoliciesIdupdateMaskUpdates the parameters of a single ClientTlsPolicy.
projects_locations_client_tls_policies_deletedeleteprojectsId, locationsId, clientTlsPoliciesIdDeletes a single ClientTlsPolicy.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
clientTlsPoliciesIdstring
locationsIdstring
projectsIdstring
clientTlsPolicyIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single ClientTlsPolicy.

SELECT
name,
clientCertificate,
createTime,
description,
labels,
serverValidationCa,
sni,
updateTime
FROM google.networksecurity.client_tls_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clientTlsPoliciesId = '{{ clientTlsPoliciesId }}' -- required;

INSERT examples

Creates a new ClientTlsPolicy in a given project and location.

INSERT INTO google.networksecurity.client_tls_policies (
data__name,
data__description,
data__labels,
data__sni,
data__clientCertificate,
data__serverValidationCa,
projectsId,
locationsId,
clientTlsPolicyId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ labels }}',
'{{ sni }}',
'{{ clientCertificate }}',
'{{ serverValidationCa }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ clientTlsPolicyId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single ClientTlsPolicy.

UPDATE google.networksecurity.client_tls_policies
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__sni = '{{ sni }}',
data__clientCertificate = '{{ clientCertificate }}',
data__serverValidationCa = '{{ serverValidationCa }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clientTlsPoliciesId = '{{ clientTlsPoliciesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single ClientTlsPolicy.

DELETE FROM google.networksecurity.client_tls_policies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clientTlsPoliciesId = '{{ clientTlsPoliciesId }}' --required;