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

The following fields are returned by SELECT queries:

Successful response

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

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
fetchselectprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdFetch 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.
getselectprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdReturns a CertificateAuthority.
listselectprojectsId, locationsId, caPoolsIdpageSize, pageToken, filter, orderByLists CertificateAuthorities.
createinsertprojectsId, locationsId, caPoolsIdcertificateAuthorityId, requestIdCreate a new CertificateAuthority in a given Project and Location.
patchupdateprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdupdateMask, requestIdUpdate a CertificateAuthority.
deletedeleteprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdrequestId, ignoreActiveCertificates, skipGracePeriod, ignoreDependentResourcesDelete a CertificateAuthority.
activateexecprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdActivate 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.
disableexecprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdDisable a CertificateAuthority.
enableexecprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdEnable a CertificateAuthority.
undeleteexecprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdUndelete a CertificateAuthority that has been deleted.

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
caPoolsIdstring
certificateAuthoritiesIdstring
locationsIdstring
projectsIdstring
certificateAuthorityIdstring
filterstring
ignoreActiveCertificatesboolean
ignoreDependentResourcesboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
skipGracePeriodboolean
updateMaskstring (google-fieldmask)

SELECT examples

Fetch 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.

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

INSERT examples

Create a new CertificateAuthority in a given Project and Location.

INSERT INTO google.privateca.certificate_authorities (
data__name,
data__type,
data__config,
data__lifetime,
data__keySpec,
data__subordinateConfig,
data__gcsBucket,
data__labels,
data__userDefinedAccessUrls,
projectsId,
locationsId,
caPoolsId,
certificateAuthorityId,
requestId
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ config }}',
'{{ lifetime }}',
'{{ keySpec }}',
'{{ subordinateConfig }}',
'{{ gcsBucket }}',
'{{ labels }}',
'{{ userDefinedAccessUrls }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ caPoolsId }}',
'{{ certificateAuthorityId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a CertificateAuthority.

UPDATE google.privateca.certificate_authorities
SET
data__name = '{{ name }}',
data__type = '{{ type }}',
data__config = '{{ config }}',
data__lifetime = '{{ lifetime }}',
data__keySpec = '{{ keySpec }}',
data__subordinateConfig = '{{ subordinateConfig }}',
data__gcsBucket = '{{ gcsBucket }}',
data__labels = '{{ labels }}',
data__userDefinedAccessUrls = '{{ userDefinedAccessUrls }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND caPoolsId = '{{ caPoolsId }}' --required
AND certificateAuthoritiesId = '{{ certificateAuthoritiesId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Delete a CertificateAuthority.

DELETE FROM google.privateca.certificate_authorities
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND caPoolsId = '{{ caPoolsId }}' --required
AND certificateAuthoritiesId = '{{ certificateAuthoritiesId }}' --required
AND requestId = '{{ requestId }}'
AND ignoreActiveCertificates = '{{ ignoreActiveCertificates }}'
AND skipGracePeriod = '{{ skipGracePeriod }}'
AND ignoreDependentResources = '{{ ignoreDependentResources }}';

Lifecycle Methods

Activate 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.

EXEC google.privateca.certificate_authorities.activate 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@caPoolsId='{{ caPoolsId }}' --required,
@certificateAuthoritiesId='{{ certificateAuthoritiesId }}' --required
@@json=
'{
"pemCaCertificate": "{{ pemCaCertificate }}",
"subordinateConfig": "{{ subordinateConfig }}",
"requestId": "{{ requestId }}"
}';