Skip to main content

certificate_authorities

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

Overview

Namecertificate_authorities
TypeResource
Idgoogle.privateca.certificate_authorities

Fields

NameDatatypeDescription
pemCsrstringOutput only. The PEM-encoded signed certificate signing request (CSR).

Methods

NameAccessible byRequired ParamsDescription
fetchSELECTcaPoolsId, certificateAuthoritiesId, locationsId, projectsIdFetch a certificate signing request (CSR) from a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another CertificateAuthority resource, or could be an on-prem certificate authority. See also ActivateCertificateAuthority.
getSELECTcaPoolsId, certificateAuthoritiesId, locationsId, projectsIdReturns a CertificateAuthority.
listSELECTcaPoolsId, locationsId, projectsIdLists CertificateAuthorities.
createINSERTcaPoolsId, locationsId, projectsIdCreate a new CertificateAuthority in a given Project and Location.
deleteDELETEcaPoolsId, certificateAuthoritiesId, locationsId, projectsIdDelete a CertificateAuthority.
patchUPDATEcaPoolsId, certificateAuthoritiesId, locationsId, projectsIdUpdate a CertificateAuthority.
activateEXECcaPoolsId, certificateAuthoritiesId, locationsId, projectsIdActivate a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.
disableEXECcaPoolsId, certificateAuthoritiesId, locationsId, projectsIdDisable a CertificateAuthority.
enableEXECcaPoolsId, certificateAuthoritiesId, locationsId, projectsIdEnable a CertificateAuthority.
undeleteEXECcaPoolsId, certificateAuthoritiesId, locationsId, projectsIdUndelete a CertificateAuthority that has been deleted.

SELECT examples

Lists CertificateAuthorities.

SELECT
pemCsr
FROM google.privateca.certificate_authorities
WHERE caPoolsId = '{{ caPoolsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.privateca.certificate_authorities (
caPoolsId,
locationsId,
projectsId,
type,
config,
lifetime,
keySpec,
subordinateConfig,
gcsBucket,
labels
)
SELECT
'{{ caPoolsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ type }}',
'{{ config }}',
'{{ lifetime }}',
'{{ keySpec }}',
'{{ subordinateConfig }}',
'{{ gcsBucket }}',
'{{ labels }}'
;

UPDATE example

Updates a certificate_authorities resource.

/*+ update */
UPDATE google.privateca.certificate_authorities
SET
type = '{{ type }}',
config = '{{ config }}',
lifetime = '{{ lifetime }}',
keySpec = '{{ keySpec }}',
subordinateConfig = '{{ subordinateConfig }}',
gcsBucket = '{{ gcsBucket }}',
labels = '{{ labels }}'
WHERE
caPoolsId = '{{ caPoolsId }}'
AND certificateAuthoritiesId = '{{ certificateAuthoritiesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified certificate_authorities resource.

/*+ delete */
DELETE FROM google.privateca.certificate_authorities
WHERE caPoolsId = '{{ caPoolsId }}'
AND certificateAuthoritiesId = '{{ certificateAuthoritiesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';