Skip to main content

ssl_policies

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

Overview

Namessl_policies
TypeResource
Idgoogle.compute.ssl_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uint64)Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestringName of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. (pattern: [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)
creationTimestampstringOutput only. [Output Only] Creation timestamp inRFC3339 text format.
customFeaturesarrayA list of features enabled when the selected profile is CUSTOM. The method returns the set of features that can be specified in this list. This field must be empty if the profile is notCUSTOM.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
enabledFeaturesarrayOutput only. [Output Only] The list of features enabled in the SSL policy.
fingerprintstring (byte)Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an SslPolicy.
kindstringOutput only. [Output only] Type of the resource. Alwayscompute#sslPolicyfor SSL policies. (default: compute#sslPolicy)
minTlsVersionstringThe minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer. This can be one ofTLS_1_0, TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the profile field must be set to RESTRICTED. (TLS_1_0, TLS_1_1, TLS_1_2, TLS_1_3)
postQuantumKeyExchangestringOne of DEFAULT, ENABLED, orDEFERRED. Controls whether the load balancer negotiates X25519MLKEM768 key exchange when clients advertise support for it. When set to DEFAULT, or if no SSL Policy is attached to the target proxy, the load balancer disallows X25519MLKEM768 key exchange before October 2026, and allows it afterward. When set to ENABLED, the load balancer allows X25519MLKEM768 key exchange. When set toDEFERRED, the load balancer disallows X25519MLKEM768 key exchange until October 2027, and allows it afterward. (DEFAULT, DEFERRED, ENABLED)
profilestringProfile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. This can be one ofCOMPATIBLE, MODERN, RESTRICTED,FIPS_202205, or CUSTOM. If usingCUSTOM, the set of SSL features to enable must be specified in the customFeatures field. If using FIPS_202205, the min_tls_version field must be set to TLS_1_2. (COMPATIBLE, CUSTOM, FIPS_202205, MODERN, RESTRICTED)
regionstringOutput only. [Output Only] URL of the region where the regional SSL policy resides. This field is not applicable to global SSL policies.
selfLinkstringOutput only. [Output Only] Server-defined URL for the resource.
warningsarrayOutput only. [Output Only] If potential misconfigurations are detected for this SSL policy, this field will be populated with warning messages.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, region, sslPolicyLists all of the ordered rules present in a single specified policy.
listselectproject, regionreturnPartialSuccess, filter, maxResults, pageToken, orderByLists all the SSL policies that have been configured for the specified
project and region.
aggregated_listselectprojectreturnPartialSuccess, maxResults, pageToken, filter, serviceProjectNumber, includeAllScopes, orderByRetrieves the list of all SslPolicy resources, regional and global,
available to the specified project.

To prevent failure, Google recommends that you set the
returnPartialSuccess parameter to true.
insertinsertproject, regionrequestIdCreates a new policy in the specified project and region using the data
included in the request.
patchupdateproject, region, sslPolicyrequestIdPatches the specified SSL policy with the data included in the request.
deletedeleteproject, region, sslPolicyrequestIdDeletes the specified SSL policy. The SSL policy resource can be deleted
only if it is not in use by any TargetHttpsProxy or TargetSslProxy
resources.

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
projectstring
regionstring
sslPolicystring
filterstring
includeAllScopesboolean
maxResultsinteger (uint32)
orderBystring
pageTokenstring
requestIdstring
returnPartialSuccessboolean
serviceProjectNumberstring (int64)

SELECT examples

Lists all of the ordered rules present in a single specified policy.

SELECT
id,
name,
creationTimestamp,
customFeatures,
description,
enabledFeatures,
fingerprint,
kind,
minTlsVersion,
postQuantumKeyExchange,
profile,
region,
selfLink,
warnings
FROM google.compute.ssl_policies
WHERE project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND sslPolicy = '{{ sslPolicy }}' -- required
;

INSERT examples

Creates a new policy in the specified project and region using the data
included in the request.

INSERT INTO google.compute.ssl_policies (
data__profile,
data__customFeatures,
data__postQuantumKeyExchange,
data__fingerprint,
data__description,
data__minTlsVersion,
data__name,
project,
region,
requestId
)
SELECT
'{{ profile }}',
'{{ customFeatures }}',
'{{ postQuantumKeyExchange }}',
'{{ fingerprint }}',
'{{ description }}',
'{{ minTlsVersion }}',
'{{ name }}',
'{{ project }}',
'{{ region }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;

UPDATE examples

Patches the specified SSL policy with the data included in the request.

UPDATE google.compute.ssl_policies
SET
data__profile = '{{ profile }}',
data__customFeatures = '{{ customFeatures }}',
data__postQuantumKeyExchange = '{{ postQuantumKeyExchange }}',
data__fingerprint = '{{ fingerprint }}',
data__description = '{{ description }}',
data__minTlsVersion = '{{ minTlsVersion }}',
data__name = '{{ name }}'
WHERE
project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND sslPolicy = '{{ sslPolicy }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;

DELETE examples

Deletes the specified SSL policy. The SSL policy resource can be deleted
only if it is not in use by any TargetHttpsProxy or TargetSslProxy
resources.

DELETE FROM google.compute.ssl_policies
WHERE project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND sslPolicy = '{{ sslPolicy }}' --required
AND requestId = '{{ requestId }}'
;