# Certificate Authority Service V1 API - Module Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode (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 module Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode.

Describes the way in which 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)")'s
[Subject](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Subject "Google::Cloud::Security::PrivateCA::V1::Subject (class)") and/or
[SubjectAltNames](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-SubjectAltNames "Google::Cloud::Security::PrivateCA::V1::SubjectAltNames (class)") will be
resolved.

## Constants

### SUBJECT_REQUEST_MODE_UNSPECIFIED

**value:** 0  
Not specified.

### DEFAULT

**value:** 1  
The default mode used in most cases. Indicates that the certificate's
[Subject](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Subject "Google::Cloud::Security::PrivateCA::V1::Subject (class)") and/or
[SubjectAltNames](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-SubjectAltNames "Google::Cloud::Security::PrivateCA::V1::SubjectAltNames (class)") are
specified in the certificate request. This mode requires the caller to have
the `privateca.certificates.create` permission.

### RDN_SEQUENCE

**value:** 3  
A mode used to get an accurate representation of the Subject
field's distinguished name. Indicates that the certificate's
[Subject](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Subject "Google::Cloud::Security::PrivateCA::V1::Subject (class)") and/or
[SubjectAltNames](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-SubjectAltNames "Google::Cloud::Security::PrivateCA::V1::SubjectAltNames (class)") are
specified in the certificate request. When parsing a PEM CSR this mode will
maintain the sequence of RDNs found in the CSR's subject field in the
issued [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
mode requires the caller to have the `privateca.certificates.create`
permission.

### REFLECTED_SPIFFE

**value:** 2  
A mode reserved for special cases. Indicates that the certificate should
have one SPIFFE
[SubjectAltNames](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-SubjectAltNames "Google::Cloud::Security::PrivateCA::V1::SubjectAltNames (class)") set
by the service based on the caller's identity. This mode will ignore any
explicitly specified [Subject](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-Subject "Google::Cloud::Security::PrivateCA::V1::Subject (class)")
and/or
[SubjectAltNames](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-SubjectAltNames "Google::Cloud::Security::PrivateCA::V1::SubjectAltNames (class)") in
the certificate request. This mode requires the caller to have the
`privateca.certificates.createForSelf` permission.