Skip to main content

server_tls_policies

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

Overview

Nameserver_tls_policies
TypeResource
Idgoogle.networksecurity.server_tls_policies

Fields

NameDatatypeDescription
namestringRequired. Name of the ServerTlsPolicy resource. It matches the pattern projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}
descriptionstringFree-text description of the resource.
allowOpenbooleanThis field applies only for Traffic Director policies. It is must be set to false for Application Load Balancer policies. Determines if server allows plaintext connections. If set to true, server allows plain text connections. By default, it is set to false. This setting is not exclusive of other encryption modes. For example, if allow_open and mtls_policy are set, server allows both plain text and mTLS connections. See documentation of other encryption modes to confirm compatibility. Consider using it if you wish to upgrade in place your deployment to TLS while having mixed TLS and non-TLS traffic reaching port :80.
createTimestringOutput only. The timestamp when the resource was created.
labelsobjectSet of label tags associated with the resource.
mtlsPolicyobjectSpecification of the MTLSPolicy.
serverCertificateobjectSpecification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.
updateTimestringOutput only. The timestamp when the resource was updated.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_server_tls_policies_getSELECTlocationsId, projectsId, serverTlsPoliciesIdGets details of a single ServerTlsPolicy.
projects_locations_server_tls_policies_listSELECTlocationsId, projectsIdLists ServerTlsPolicies in a given project and location.
projects_locations_server_tls_policies_createINSERTlocationsId, projectsIdCreates a new ServerTlsPolicy in a given project and location.
projects_locations_server_tls_policies_deleteDELETElocationsId, projectsId, serverTlsPoliciesIdDeletes a single ServerTlsPolicy.
projects_locations_server_tls_policies_patchUPDATElocationsId, projectsId, serverTlsPoliciesIdUpdates the parameters of a single ServerTlsPolicy.

SELECT examples

Lists ServerTlsPolicies in a given project and location.

SELECT
name,
description,
allowOpen,
createTime,
labels,
mtlsPolicy,
serverCertificate,
updateTime
FROM google.networksecurity.server_tls_policies
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new server_tls_policies resource.

/*+ create */
INSERT INTO google.networksecurity.server_tls_policies (
locationsId,
projectsId,
name,
description,
labels,
allowOpen,
serverCertificate,
mtlsPolicy
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ labels }}',
{{ allowOpen }},
'{{ serverCertificate }}',
'{{ mtlsPolicy }}'
;

UPDATE example

Updates a server_tls_policies resource.

/*+ update */
UPDATE google.networksecurity.server_tls_policies
SET
name = '{{ name }}',
description = '{{ description }}',
labels = '{{ labels }}',
allowOpen = true|false,
serverCertificate = '{{ serverCertificate }}',
mtlsPolicy = '{{ mtlsPolicy }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND serverTlsPoliciesId = '{{ serverTlsPoliciesId }}';

DELETE example

Deletes the specified server_tls_policies resource.

/*+ delete */
DELETE FROM google.networksecurity.server_tls_policies
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND serverTlsPoliciesId = '{{ serverTlsPoliciesId }}';