# Certificate Authority Service V1 API - Class Google::Cloud::Security::PrivateCA::V1::Certificate (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.1 2.5.0 2.4.1 2.3.0 2.2.0 2.1.0 2.0.1 1.2.0 1.1.0 1.0.1 0.13.0 0.12.0 0.11.0 0.10.2 0.9.0 0.8.1 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.6 Reference documentation and code samples for the Certificate Authority Service V1 API class Google::Cloud::Security::PrivateCA::V1::Certificate.

A [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)") corresponds
to a signed X.509 certificate issued by a
[CertificateAuthority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateAuthority "Google::Cloud::Security::PrivateCA::V1::CertificateAuthority (class)").

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #certificate_description

    def certificate_description() -> ::Google::Cloud::Security::PrivateCA::V1::CertificateDescription

**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1::CertificateDescription](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateDescription)) --- Output only. A structured description of the issued X.509 certificate.

### #certificate_template

    def certificate_template() -> ::String

**Returns**

- (::String) --- Immutable. The resource name for a [CertificateTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateTemplate "Google::Cloud::Security::PrivateCA::V1::CertificateTemplate (class)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)").

### #certificate_template=

    def certificate_template=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. The resource name for a [CertificateTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateTemplate "Google::Cloud::Security::PrivateCA::V1::CertificateTemplate (class)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)").
**Returns**

- (::String) --- Immutable. The resource name for a [CertificateTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateTemplate "Google::Cloud::Security::PrivateCA::V1::CertificateTemplate (class)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)").

### #config

    def config() -> ::Google::Cloud::Security::PrivateCA::V1::CertificateConfig

**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1::CertificateConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateConfig)) --- Immutable. A description of the certificate and key that does not require X.509 or ASN.1.


  Note: The following fields are mutually exclusive: `config`, `pem_csr`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #config=

    def config=(value) -> ::Google::Cloud::Security::PrivateCA::V1::CertificateConfig

**Parameter**

- **value** ([::Google::Cloud::Security::PrivateCA::V1::CertificateConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateConfig)) --- Immutable. A description of the certificate and key that does not require X.509 or ASN.1.


  Note: The following fields are mutually exclusive: `config`, `pem_csr`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1::CertificateConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateConfig)) --- Immutable. A description of the certificate and key that does not require X.509 or ASN.1.


  Note: The following fields are mutually exclusive: `config`, `pem_csr`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time at which this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)") was created.

### #issuer_certificate_authority

    def issuer_certificate_authority() -> ::String

**Returns**

- (::String) --- Output only. The resource name of the issuing [CertificateAuthority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateAuthority "Google::Cloud::Security::PrivateCA::V1::CertificateAuthority (class)") in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Labels with user-defined metadata.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Labels with user-defined metadata.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Labels with user-defined metadata.

### #lifetime

    def lifetime() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Protobuf-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.

### #lifetime=

    def lifetime=(value) -> ::Google::Protobuf::Duration

**Parameter**

- **value** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Protobuf-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.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Protobuf-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.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Identifier. The resource name for this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)") in the format `projects/*/locations/*/caPools/*/certificates/*`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. The resource name for this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)") in the format `projects/*/locations/*/caPools/*/certificates/*`.
**Returns**

- (::String) --- Identifier. The resource name for this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)") in the format `projects/*/locations/*/caPools/*/certificates/*`.

### #pem_certificate

    def pem_certificate() -> ::String

**Returns**

- (::String) --- Output only. The pem-encoded, signed X.509 certificate.

### #pem_certificate_chain

    def pem_certificate_chain() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- 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.

### #pem_csr

    def pem_csr() -> ::String

**Returns**

- (::String) --- Immutable. A pem-encoded X.509 certificate signing request (CSR).

  Note: The following fields are mutually exclusive: `pem_csr`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #pem_csr=

    def pem_csr=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. A pem-encoded X.509 certificate signing request (CSR).


  Note: The following fields are mutually exclusive: `pem_csr`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- Immutable. A pem-encoded X.509 certificate signing request (CSR).

  Note: The following fields are mutually exclusive: `pem_csr`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #requested_not_before_time

    def requested_not_before_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Protobuf-Timestamp)) --- Optional. The requested [not_before_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateDescription-SubjectDescription#Google__Cloud__Security__PrivateCA__V1__CertificateDescription__SubjectDescription_not_before_time_instance_ "Google::Cloud::Security::PrivateCA::V1::CertificateDescription::SubjectDescription#not_before_time (method)") of this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)"). This field may only be set if the [CaPool.IssuancePolicy.allow_requester_specified_not_before_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool-IssuancePolicy#Google__Cloud__Security__PrivateCA__V1__CaPool__IssuancePolicy_allow_requester_specified_not_before_time_instance_ "Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#allow_requester_specified_not_before_time (method)") field is set to true for the issuing [CaPool](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool "Google::Cloud::Security::PrivateCA::V1::CaPool (class)").


  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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool-IssuancePolicy#Google__Cloud__Security__PrivateCA__V1__CaPool__IssuancePolicy_backdate_duration_instance_ "Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration (method)")
  depending on the [CaPool](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool "Google::Cloud::Security::PrivateCA::V1::CaPool (class)")
  configuration.

### #requested_not_before_time=

    def requested_not_before_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Protobuf-Timestamp)) --- Optional. The requested [not_before_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateDescription-SubjectDescription#Google__Cloud__Security__PrivateCA__V1__CertificateDescription__SubjectDescription_not_before_time_instance_ "Google::Cloud::Security::PrivateCA::V1::CertificateDescription::SubjectDescription#not_before_time (method)") of this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)"). This field may only be set if the [CaPool.IssuancePolicy.allow_requester_specified_not_before_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool-IssuancePolicy#Google__Cloud__Security__PrivateCA__V1__CaPool__IssuancePolicy_allow_requester_specified_not_before_time_instance_ "Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#allow_requester_specified_not_before_time (method)") field is set to true for the issuing [CaPool](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool "Google::Cloud::Security::PrivateCA::V1::CaPool (class)").


  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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool-IssuancePolicy#Google__Cloud__Security__PrivateCA__V1__CaPool__IssuancePolicy_backdate_duration_instance_ "Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration (method)")
  depending on the [CaPool](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool "Google::Cloud::Security::PrivateCA::V1::CaPool (class)")
  configuration.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Protobuf-Timestamp)) --- Optional. The requested [not_before_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateDescription-SubjectDescription#Google__Cloud__Security__PrivateCA__V1__CertificateDescription__SubjectDescription_not_before_time_instance_ "Google::Cloud::Security::PrivateCA::V1::CertificateDescription::SubjectDescription#not_before_time (method)") of this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)"). This field may only be set if the [CaPool.IssuancePolicy.allow_requester_specified_not_before_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool-IssuancePolicy#Google__Cloud__Security__PrivateCA__V1__CaPool__IssuancePolicy_allow_requester_specified_not_before_time_instance_ "Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#allow_requester_specified_not_before_time (method)") field is set to true for the issuing [CaPool](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool "Google::Cloud::Security::PrivateCA::V1::CaPool (class)").


  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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool-IssuancePolicy#Google__Cloud__Security__PrivateCA__V1__CaPool__IssuancePolicy_backdate_duration_instance_ "Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration (method)")
  depending on the [CaPool](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CaPool "Google::Cloud::Security::PrivateCA::V1::CaPool (class)")
  configuration.

### #revocation_details

    def revocation_details() -> ::Google::Cloud::Security::PrivateCA::V1::Certificate::RevocationDetails

**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1::Certificate::RevocationDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate-RevocationDetails)) --- Output only. Details regarding the revocation of this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)"). This [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)") is considered revoked if and only if this field is present.

### #subject_mode

    def subject_mode() -> ::Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode

**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-SubjectRequestMode)) --- Immutable. Specifies how the [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)")'s identity fields are to be decided. If this is omitted, the `DEFAULT` subject mode will be used.

### #subject_mode=

    def subject_mode=(value) -> ::Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode

**Parameter**

- **value** ([::Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-SubjectRequestMode)) --- Immutable. Specifies how the [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)")'s identity fields are to be decided. If this is omitted, the `DEFAULT` subject mode will be used.
**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-SubjectRequestMode)) --- Immutable. Specifies how the [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)")'s identity fields are to be decided. If this is omitted, the `DEFAULT` subject mode will be used.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time at which this [Certificate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Certificate "Google::Cloud::Security::PrivateCA::V1::Certificate (class)") was updated.