# CertificateConfig

- [JSON representation](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/CertificateConfig#SCHEMA_REPRESENTATION)
- [SubjectConfig](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/CertificateConfig#SubjectConfig)
  - [JSON representation](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/CertificateConfig#SubjectConfig.SCHEMA_REPRESENTATION)

A `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/CertificateConfig` describes an X.509 certificate or CSR that is to be created, as an alternative to using ASN.1.

| JSON representation ||
|---|---|
| ``` { "subjectConfig": { object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/CertificateConfig#SubjectConfig`) }, "reusableConfig": { object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/ReusableConfigWrapper`) }, "publicKey": { object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/PublicKey`) } } ``` |

| Fields ||
|---|---|
| `subjectConfig` | ``object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/CertificateConfig#SubjectConfig`)`` Required. Specifies some of the values in a certificate that are related to the subject. |
| `reusableConfig` | ``object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/ReusableConfigWrapper`)`` Required. Describes how some of the technical fields in a certificate should be populated. |
| `publicKey` | ``object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/PublicKey`)`` Optional. The public key that corresponds to this config. This is, for example, used when issuing `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities.certificates#Certificate`, but not when creating a self-signed `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities#CertificateAuthority` or `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities#CertificateAuthority` CSR. |

## SubjectConfig

These values are used to create the distinguished name and subject alternative name fields in an X.509 certificate.

| JSON representation ||
|---|---|
| ``` { "subject": { object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/Subject`) }, "commonName": string, "subjectAltName": { object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/SubjectAltNames`) } } ``` |

| Fields ||
|---|---|
| `subject` | ``object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/Subject`)`` Required. Contains distinguished name fields such as the location and organization. |
| `commonName` | `string` Optional. The "common name" of the distinguished name. |
| `subjectAltName` | ``object (`https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/SubjectAltNames`)`` Optional. The subject alternative name fields. |