Required. Immutable. The desired lifetime of a certificate. Used to create the "not_before_time" and "not_after_time" fields inside an X.509 certificate. Note that the lifetime may be truncated if it would extend past the life of any certificate authority in the issuing chain.
↳ certificate_template
string
Immutable. The resource name for aCertificateTemplateused to issue this certificate, in the formatprojects/*/locations/*/certificateTemplates/*. If this is specified, the caller must have the necessary permission to use this template. If this is omitted, no template will be used. This template must be in the same location as theCertificate.
↳ subject_mode
int
Immutable. Specifies how theCertificate's identity fields are to be decided. If this is omitted, theDEFAULTsubject mode will be used.
Output only. The resource name of the issuingCertificateAuthorityin the formatprojects/*/locations/*/caPools/*/certificateAuthorities/*.
Returns
Type
Description
string
setIssuerCertificateAuthority
Output only. The resource name of the issuingCertificateAuthorityin the formatprojects/*/locations/*/caPools/*/certificateAuthorities/*.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLifetime
Required. Immutable. The desired lifetime of a certificate. Used to create
the "not_before_time" and "not_after_time" fields inside an X.509
certificate. Note that the lifetime may be truncated if it would extend
past the life of any certificate authority in the issuing chain.
Required. Immutable. The desired lifetime of a certificate. Used to create
the "not_before_time" and "not_after_time" fields inside an X.509
certificate. Note that the lifetime may be truncated if it would extend
past the life of any certificate authority in the issuing chain.
Immutable. The resource name for aCertificateTemplateused to issue this certificate, in the formatprojects/*/locations/*/certificateTemplates/*.
If this is specified, the caller must have the necessary permission to
use this template. If this is omitted, no template will be used.
This template must be in the same location as theCertificate.
Returns
Type
Description
string
setCertificateTemplate
Immutable. The resource name for aCertificateTemplateused to issue this certificate, in the formatprojects/*/locations/*/certificateTemplates/*.
If this is specified, the caller must have the necessary permission to
use this template. If this is omitted, no template will be used.
This template must be in the same location as theCertificate.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSubjectMode
Immutable. Specifies how theCertificate's identity
fields are to be decided. If this is omitted, theDEFAULTsubject mode
will be used.
Returns
Type
Description
int
setSubjectMode
Immutable. Specifies how theCertificate's identity
fields are to be decided. If this is omitted, theDEFAULTsubject mode
will be used.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getRevocationDetails
Output only. Details regarding the revocation of thisCertificate. ThisCertificateis considered
revoked if and only if this field is present.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Certificate Authority Service V1 Client - Class Certificate (2.1.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.1 (latest)](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate)\n- [2.1.0](/php/docs/reference/cloud-security-private-ca/2.1.0/V1.Certificate)\n- [2.0.3](/php/docs/reference/cloud-security-private-ca/2.0.3/V1.Certificate)\n- [1.7.3](/php/docs/reference/cloud-security-private-ca/1.7.3/V1.Certificate)\n- [1.5.0](/php/docs/reference/cloud-security-private-ca/1.5.0/V1.Certificate)\n- [1.4.2](/php/docs/reference/cloud-security-private-ca/1.4.2/V1.Certificate)\n- [1.3.1](/php/docs/reference/cloud-security-private-ca/1.3.1/V1.Certificate)\n- [1.2.2](/php/docs/reference/cloud-security-private-ca/1.2.2/V1.Certificate)\n- [1.1.0](/php/docs/reference/cloud-security-private-ca/1.1.0/V1.Certificate)\n- [1.0.3](/php/docs/reference/cloud-security-private-ca/1.0.3/V1.Certificate) \nReference documentation and code samples for the Google Certificate Authority Service V1 Client class Certificate.\n\nA [Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) corresponds\nto a signed X.509 certificate issued by a\n[CertificateAuthority](/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority).\n\nGenerated from protobuf message `google.cloud.security.privateca.v1.Certificate`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Security \\\\ PrivateCA \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. The resource name for this\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) in the format\n`projects/*/locations/*/caPools/*/certificates/*`.\n\n### setName\n\nIdentifier. The resource name for this\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) in the format\n`projects/*/locations/*/caPools/*/certificates/*`.\n\n### getPemCsr\n\nImmutable. A pem-encoded X.509 certificate signing request (CSR).\n\n### hasPemCsr\n\n### setPemCsr\n\nImmutable. A pem-encoded X.509 certificate signing request (CSR).\n\n### getConfig\n\nImmutable. A description of the certificate and key that does not require\nX.509 or ASN.1.\n\n### hasConfig\n\n### setConfig\n\nImmutable. A description of the certificate and key that does not require\nX.509 or ASN.1.\n\n### getIssuerCertificateAuthority\n\nOutput only. The resource name of the issuing\n[CertificateAuthority](/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)\nin the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.\n\n### setIssuerCertificateAuthority\n\nOutput only. The resource name of the issuing\n[CertificateAuthority](/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateAuthority)\nin the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.\n\n### getLifetime\n\nRequired. Immutable. The desired lifetime of a certificate. Used to create\nthe \"not_before_time\" and \"not_after_time\" fields inside an X.509\ncertificate. Note that the lifetime may be truncated if it would extend\npast the life of any certificate authority in the issuing chain.\n\n### hasLifetime\n\n### clearLifetime\n\n### setLifetime\n\nRequired. Immutable. The desired lifetime of a certificate. Used to create\nthe \"not_before_time\" and \"not_after_time\" fields inside an X.509\ncertificate. Note that the lifetime may be truncated if it would extend\npast the life of any certificate authority in the issuing chain.\n\n### getCertificateTemplate\n\nImmutable. The resource name for a\n[CertificateTemplate](/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateTemplate)\nused to issue this certificate, in the format\n`projects/*/locations/*/certificateTemplates/*`.\n\nIf this is specified, the caller must have the necessary permission to\nuse this template. If this is omitted, no template will be used.\nThis template must be in the same location as the\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate).\n\n### setCertificateTemplate\n\nImmutable. The resource name for a\n[CertificateTemplate](/php/docs/reference/cloud-security-private-ca/latest/V1.CertificateTemplate)\nused to issue this certificate, in the format\n`projects/*/locations/*/certificateTemplates/*`.\n\nIf this is specified, the caller must have the necessary permission to\nuse this template. If this is omitted, no template will be used.\nThis template must be in the same location as the\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate).\n\n### getSubjectMode\n\nImmutable. Specifies how the\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate)'s identity\nfields are to be decided. If this is omitted, the `DEFAULT` subject mode\nwill be used.\n\n### setSubjectMode\n\nImmutable. Specifies how the\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate)'s identity\nfields are to be decided. If this is omitted, the `DEFAULT` subject mode\nwill be used.\n\n### getRevocationDetails\n\nOutput only. Details regarding the revocation of this\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). This\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) is considered\nrevoked if and only if this field is present.\n\n### hasRevocationDetails\n\n### clearRevocationDetails\n\n### setRevocationDetails\n\nOutput only. Details regarding the revocation of this\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate). This\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) is considered\nrevoked if and only if this field is present.\n\n### getPemCertificate\n\nOutput only. The pem-encoded, signed X.509 certificate.\n\n### setPemCertificate\n\nOutput only. The pem-encoded, signed X.509 certificate.\n\n### getCertificateDescription\n\nOutput only. A structured description of the issued X.509 certificate.\n\n### hasCertificateDescription\n\n### clearCertificateDescription\n\n### setCertificateDescription\n\nOutput only. A structured description of the issued X.509 certificate.\n\n### getPemCertificateChain\n\nOutput only. The chain that may be used to verify the X.509 certificate.\n\nExpected to be in issuer-to-root order according to RFC 5246.\n\n### setPemCertificateChain\n\nOutput only. The chain that may be used to verify the X.509 certificate.\n\nExpected to be in issuer-to-root order according to RFC 5246.\n\n### getCreateTime\n\nOutput only. The time at which this\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The time at which this\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) was created.\n\n### getUpdateTime\n\nOutput only. The time at which this\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) was updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The time at which this\n[Certificate](/php/docs/reference/cloud-security-private-ca/latest/V1.Certificate) was updated.\n\n### getLabels\n\nOptional. Labels with user-defined metadata.\n\n### setLabels\n\nOptional. Labels with user-defined metadata.\n\n### getCertificateConfig"]]