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:

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, caPoolsIdfilter, orderBy, pageSize, pageTokenLists CertificateAuthorities.
createinsertprojectsId, locationsId, caPoolsIdcertificateAuthorityId, requestIdCreate a new CertificateAuthority in a given Project and Location.
patchupdateprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdrequestId, updateMaskUpdate a CertificateAuthority.
deletedeleteprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdignoreActiveCertificates, ignoreDependentResources, requestId, skipGracePeriodDelete 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__config,
data__gcsBucket,
data__keySpec,
data__labels,
data__lifetime,
data__name,
data__subordinateConfig,
data__type,
data__userDefinedAccessUrls,
projectsId,
locationsId,
caPoolsId,
certificateAuthorityId,
requestId
)
SELECT
'{{ config }}',
'{{ gcsBucket }}',
'{{ keySpec }}',
'{{ labels }}',
'{{ lifetime }}',
'{{ name }}',
'{{ subordinateConfig }}',
'{{ type }}',
'{{ userDefinedAccessUrls }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ caPoolsId }}',
'{{ certificateAuthorityId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Update a CertificateAuthority.

UPDATE google.privateca.certificate_authorities
SET
data__config = '{{ config }}',
data__gcsBucket = '{{ gcsBucket }}',
data__keySpec = '{{ keySpec }}',
data__labels = '{{ labels }}',
data__lifetime = '{{ lifetime }}',
data__name = '{{ name }}',
data__subordinateConfig = '{{ subordinateConfig }}',
data__type = '{{ type }}',
data__userDefinedAccessUrls = '{{ userDefinedAccessUrls }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND caPoolsId = '{{ caPoolsId }}' --required
AND certificateAuthoritiesId = '{{ certificateAuthoritiesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
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 ignoreActiveCertificates = '{{ ignoreActiveCertificates }}'
AND ignoreDependentResources = '{{ ignoreDependentResources }}'
AND requestId = '{{ requestId }}'
AND skipGracePeriod = '{{ skipGracePeriod }}'
;

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 }}",
"requestId": "{{ requestId }}",
"subordinateConfig": "{{ subordinateConfig }}"
}'
;