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
namestringIdentifier. The resource name for this CertificateAuthority in the format projects/*/locations/*/caPools/*/certificateAuthorities/*.
accessUrlsobjectOutput only. URLs for accessing content published by this CA, such as the CA certificate and CRLs. (id: AccessUrls)
caCertificateDescriptionsarrayOutput only. A structured description of this CertificateAuthority's CA certificate and its issuers. Ordered as self-to-root.
configobjectRequired. Immutable. The config used to create a self-signed X.509 certificate or CSR. (id: CertificateConfig)
createTimestring (google-datetime)Output only. The time at which this CertificateAuthority was created.
deleteTimestring (google-datetime)Output only. The time at which this CertificateAuthority was soft deleted, if it is in the DELETED state.
expireTimestring (google-datetime)Output only. The time at which this CertificateAuthority will be permanently purged, if it is in the DELETED state.
gcsBucketstringImmutable. The name of a Cloud Storage bucket where this CertificateAuthority will publish content, such as the CA certificate and CRLs. This must be a bucket name, without any prefixes (such as gs://) or suffixes (such as .googleapis.com). For example, to use a bucket named my-bucket, you would simply specify my-bucket. If not specified, a managed bucket will be created.
keySpecobjectRequired. Immutable. Used when issuing certificates for this CertificateAuthority. If this CertificateAuthority is a self-signed CertificateAuthority, this key is also used to sign the self-signed CA certificate. Otherwise, it is used to sign a CSR. (id: KeyVersionSpec)
labelsobjectOptional. Labels with user-defined metadata.
lifetimestring (google-duration)Required. Immutable. The desired lifetime of the CA certificate. Used to create the "not_before_time" and "not_after_time" fields inside an X.509 certificate.
pemCaCertificatesarrayOutput only. This CertificateAuthority's certificate chain, including the current CertificateAuthority's certificate. Ordered such that the root issuer is the final element (consistent with RFC 5246). For a self-signed CA, this will only list the current CertificateAuthority's certificate.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
statestringOutput only. The State for this CertificateAuthority.
subordinateConfigobjectOptional. If this is a subordinate CertificateAuthority, this field will be set with the subordinate configuration, which describes its issuers. This may be updated, but this CertificateAuthority must continue to validate. (id: SubordinateConfig)
tierstringOutput only. The CaPool.Tier of the CaPool that includes this CertificateAuthority.
typestringRequired. Immutable. The Type of this CertificateAuthority.
updateTimestring (google-datetime)Output only. The time at which this CertificateAuthority was last updated.
userDefinedAccessUrlsobjectOptional. User-defined URLs for CA certificate and CRLs. The service does not publish content to these URLs. It is up to the user to mirror content to these URLs. (id: UserDefinedAccessUrls)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdReturns a CertificateAuthority.
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.
listselectprojectsId, locationsId, caPoolsIdpageSize, orderBy, filter, pageTokenLists CertificateAuthorities.
createinsertprojectsId, locationsId, caPoolsIdrequestId, certificateAuthorityIdCreate a new CertificateAuthority in a given Project and Location.
patchupdateprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdrequestId, updateMaskUpdate a CertificateAuthority.
deletedeleteprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdignoreActiveCertificates, skipGracePeriod, requestId, ignoreDependentResourcesDelete a CertificateAuthority.
undeleteexecprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdUndelete a CertificateAuthority that has been deleted.
disableexecprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdDisable 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.
enableexecprojectsId, locationsId, caPoolsId, certificateAuthoritiesIdEnable a CertificateAuthority.

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

Returns a CertificateAuthority.

SELECT
name,
accessUrls,
caCertificateDescriptions,
config,
createTime,
deleteTime,
expireTime,
gcsBucket,
keySpec,
labels,
lifetime,
pemCaCertificates,
satisfiesPzi,
satisfiesPzs,
state,
subordinateConfig,
tier,
type,
updateTime,
userDefinedAccessUrls
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__gcsBucket,
data__labels,
data__config,
data__lifetime,
data__type,
data__subordinateConfig,
data__keySpec,
data__name,
data__userDefinedAccessUrls,
projectsId,
locationsId,
caPoolsId,
requestId,
certificateAuthorityId
)
SELECT
'{{ gcsBucket }}',
'{{ labels }}',
'{{ config }}',
'{{ lifetime }}',
'{{ type }}',
'{{ subordinateConfig }}',
'{{ keySpec }}',
'{{ name }}',
'{{ userDefinedAccessUrls }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ caPoolsId }}',
'{{ requestId }}',
'{{ certificateAuthorityId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a CertificateAuthority.

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

Lifecycle Methods

Undelete a CertificateAuthority that has been deleted.

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