server_tls_policies
Creates, updates, deletes, gets or lists a server_tls_policies
resource.
Overview
Name | server_tls_policies |
Type | Resource |
Id | google.networksecurity.server_tls_policies |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Required. Name of the ServerTlsPolicy resource. It matches the pattern projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy} |
description | string | Free-text description of the resource. |
allowOpen | boolean | This 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. |
createTime | string | Output only. The timestamp when the resource was created. |
labels | object | Set of label tags associated with the resource. |
mtlsPolicy | object | Specification of the MTLSPolicy. |
serverCertificate | object | Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication. |
updateTime | string | Output only. The timestamp when the resource was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_server_tls_policies_get | SELECT | locationsId, projectsId, serverTlsPoliciesId | Gets details of a single ServerTlsPolicy. |
projects_locations_server_tls_policies_list | SELECT | locationsId, projectsId | Lists ServerTlsPolicies in a given project and location. |
projects_locations_server_tls_policies_create | INSERT | locationsId, projectsId | Creates a new ServerTlsPolicy in a given project and location. |
projects_locations_server_tls_policies_delete | DELETE | locationsId, projectsId, serverTlsPoliciesId | Deletes a single ServerTlsPolicy. |
projects_locations_server_tls_policies_patch | UPDATE | locationsId, projectsId, serverTlsPoliciesId | Updates 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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: allowOpen
value: boolean
- name: serverCertificate
value:
- name: grpcEndpoint
value:
- name: targetUri
value: string
- name: certificateProviderInstance
value:
- name: pluginInstance
value: string
- name: mtlsPolicy
value:
- name: clientValidationMode
value: string
- name: clientValidationCa
value:
- []
- name: clientValidationTrustConfig
value: string
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 }}';