Skip to main content

certificates

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

Overview

Namecertificates
TypeResource
Idgoogle.integrations.certificates

Fields

NameDatatypeDescription
namestringOutput only. Auto generated primary key
descriptionstringDescription of the certificate
certificateStatusstringStatus of the certificate
credentialIdstringImmutable. Credential id that will be used to register with trawler
displayNamestringRequired. Name of the certificate
rawCertificateobjectContains client certificate information
requestorIdstringImmutable. Requestor ID to be used to register certificate with trawler
validEndTimestringOutput only. The timestamp after which certificate will expire
validStartTimestringOutput only. The timestamp after which certificate will be valid

Methods

NameAccessible byRequired ParamsDescription
projects_locations_certificates_getSELECTcertificatesId, locationsId, projectsIdGet a certificates in the specified project.
projects_locations_certificates_listSELECTlocationsId, projectsIdList all the certificates that match the filter. Restrict to certificate of current client only.
projects_locations_products_certificates_getSELECTcertificatesId, locationsId, productsId, projectsIdGet a certificates in the specified project.
projects_locations_products_certificates_listSELECTlocationsId, productsId, projectsIdList all the certificates that match the filter. Restrict to certificate of current client only.
projects_locations_certificates_createINSERTlocationsId, projectsIdCreates a new certificate. The certificate will be registered to the trawler service and will be encrypted using cloud KMS and stored in Spanner Returns the certificate.
projects_locations_products_certificates_createINSERTlocationsId, productsId, projectsIdCreates a new certificate. The certificate will be registered to the trawler service and will be encrypted using cloud KMS and stored in Spanner Returns the certificate.
projects_locations_certificates_deleteDELETEcertificatesId, locationsId, projectsIdDelete a certificate
projects_locations_products_certificates_deleteDELETEcertificatesId, locationsId, productsId, projectsIdDelete a certificate
projects_locations_certificates_patchUPDATEcertificatesId, locationsId, projectsIdUpdates the certificate by id. If new certificate file is updated, it will register with the trawler service, re-encrypt with cloud KMS and update the Spanner record. Other fields will directly update the Spanner record. Returns the Certificate.
projects_locations_products_certificates_patchUPDATEcertificatesId, locationsId, productsId, projectsIdUpdates the certificate by id. If new certificate file is updated, it will register with the trawler service, re-encrypt with cloud KMS and update the Spanner record. Other fields will directly update the Spanner record. Returns the Certificate.

SELECT examples

List all the certificates that match the filter. Restrict to certificate of current client only.

SELECT
name,
description,
certificateStatus,
credentialId,
displayName,
rawCertificate,
requestorId,
validEndTime,
validStartTime
FROM google.integrations.certificates
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.integrations.certificates (
locationsId,
projectsId,
credentialId,
rawCertificate,
description,
requestorId,
displayName,
certificateStatus
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ credentialId }}',
'{{ rawCertificate }}',
'{{ description }}',
'{{ requestorId }}',
'{{ displayName }}',
'{{ certificateStatus }}'
;

UPDATE example

Updates a certificates resource.

/*+ update */
UPDATE google.integrations.certificates
SET
credentialId = '{{ credentialId }}',
rawCertificate = '{{ rawCertificate }}',
description = '{{ description }}',
requestorId = '{{ requestorId }}',
displayName = '{{ displayName }}',
certificateStatus = '{{ certificateStatus }}'
WHERE
certificatesId = '{{ certificatesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified certificates resource.

/*+ delete */
DELETE FROM google.integrations.certificates
WHERE certificatesId = '{{ certificatesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';