Skip to main content

certificates

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

Overview

Namecertificates
TypeResource
Idgoogle.certificatemanager.certificates

Fields

NameDatatypeDescription
namestringIdentifier. A user-defined name of the certificate. Certificate names must be unique globally and match pattern projects/*/locations/*/certificates/*.
descriptionstringOptional. One or more paragraphs of text description of a certificate.
createTimestringOutput only. The creation timestamp of a Certificate.
expireTimestringOutput only. The expiry timestamp of a Certificate.
labelsobjectOptional. Set of labels associated with a Certificate.
managedobjectConfiguration and state of a Managed Certificate. Certificate Manager provisions and renews Managed Certificates automatically, for as long as it's authorized to do so.
pemCertificatestringOutput only. The PEM-encoded certificate chain.
sanDnsnamesarrayOutput only. The list of Subject Alternative Names of dnsName type defined in the certificate (see RFC 5280 4.2.1.6). Managed certificates that haven't been provisioned yet have this field populated with a value of the managed.domains field.
scopestringOptional. Immutable. The scope of the certificate.
selfManagedobjectCertificate data for a SelfManaged Certificate. SelfManaged Certificates are uploaded by the user. Updating such certificates before they expire remains the user's responsibility.
updateTimestringOutput only. The last update timestamp of a Certificate.

Methods

NameAccessible byRequired ParamsDescription
getSELECTcertificatesId, locationsId, projectsIdGets details of a single Certificate.
listSELECTlocationsId, projectsIdLists Certificates in a given project and location.
createINSERTlocationsId, projectsIdCreates a new Certificate in a given project and location.
deleteDELETEcertificatesId, locationsId, projectsIdDeletes a single Certificate.
patchUPDATEcertificatesId, locationsId, projectsIdUpdates a Certificate.

SELECT examples

Lists Certificates in a given project and location.

SELECT
name,
description,
createTime,
expireTime,
labels,
managed,
pemCertificate,
sanDnsnames,
scope,
selfManaged,
updateTime
FROM google.certificatemanager.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.certificatemanager.certificates (
locationsId,
projectsId,
name,
description,
labels,
selfManaged,
managed,
scope
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ labels }}',
'{{ selfManaged }}',
'{{ managed }}',
'{{ scope }}'
;

UPDATE example

Updates a certificates resource.

/*+ update */
UPDATE google.certificatemanager.certificates
SET
name = '{{ name }}',
description = '{{ description }}',
labels = '{{ labels }}',
selfManaged = '{{ selfManaged }}',
managed = '{{ managed }}',
scope = '{{ scope }}'
WHERE
certificatesId = '{{ certificatesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified certificates resource.

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