# Class Certificate (1.19.0)

1.19.0 (latest) 1.18.0 1.17.0 1.16.0 1.15.0 1.14.3 1.13.1 1.12.2 1.11.0 1.10.3 1.9.0 1.8.1 1.7.1 1.6.1 1.5.0 1.4.3 1.3.2 1.2.4 1.1.0 1.0.6 0.4.0 0.3.0 0.1.1

    Certificate(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A Certificate
corresponds to a signed X.509 certificate issued by a
CertificateAuthority.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` Identifier. The resource name for this Certificate in the format `projects/*/locations/*/caPools/*/certificates/*`. |
| `pem_csr` | `str` Immutable. A pem-encoded X.509 certificate signing request (CSR). This field is a member of `oneof`_ `certificate_config`. |
| `config` | `https://docs.cloud.google.com/python/docs/reference/privateca/latest/google.cloud.security.privateca_v1.types.CertificateConfig` Immutable. A description of the certificate and key that does not require X.509 or ASN.1. This field is a member of `oneof`_ `certificate_config`. |
| `issuer_certificate_authority` | `str` Output only. The resource name of the issuing CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. |
| `lifetime` | `google.protobuf.duration_pb2.Duration` 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` | `str` Immutable. The resource name for a CertificateTemplate used to issue this certificate, in the format `projects/*/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 the Certificate. |
| `subject_mode` | `https://docs.cloud.google.com/python/docs/reference/privateca/latest/google.cloud.security.privateca_v1.types.SubjectRequestMode` Immutable. Specifies how the Certificate's identity fields are to be decided. If this is omitted, the `DEFAULT` subject mode will be used. |
| `revocation_details` | `https://docs.cloud.google.com/python/docs/reference/privateca/latest/google.cloud.security.privateca_v1.types.Certificate.RevocationDetails` Output only. Details regarding the revocation of this Certificate. This Certificate is considered revoked if and only if this field is present. |
| `pem_certificate` | `str` Output only. The pem-encoded, signed X.509 certificate. |
| `certificate_description` | `https://docs.cloud.google.com/python/docs/reference/privateca/latest/google.cloud.security.privateca_v1.types.CertificateDescription` Output only. A structured description of the issued X.509 certificate. |
| `pem_certificate_chain` | `MutableSequence[str]` Output only. The chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246. |
| `create_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The time at which this Certificate was created. |
| `update_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The time at which this Certificate was updated. |
| `labels` | `MutableMapping[str, str]` Optional. Labels with user-defined metadata. |
| `requested_not_before_time` | `google.protobuf.timestamp_pb2.Timestamp` Optional. The requested not_before_time of this Certificate. This field may only be set if the CaPool.IssuancePolicy.allow_requester_specified_not_before_time field is set to true for the issuing CaPool. If this field is specified, the certificate will be issued with this 'not_before_time'. If this is not specified, the 'not_before_time' will be set to the issuance time or issuance time minus backdate_duration depending on the CaPool configuration. |

## Classes

### LabelsEntry

    LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |

### RevocationDetails

    RevocationDetails(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Describes fields that are relavent to the revocation of a
Certificate.