- [Resource: EncryptionConfig](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#EncryptionConfig)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#EncryptionConfig.SCHEMA_REPRESENTATION)
- [EncryptionState](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#EncryptionState)
- [FailureDetails](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#FailureDetails)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#FailureDetails.SCHEMA_REPRESENTATION)
- [ErrorCode](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#ErrorCode)
- [Methods](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#METHODS_SUMMARY)

## Resource: EncryptionConfig

A Resource designed to manage encryption configurations for customers to support Customer Managed Encryption Keys (CMEK).

| JSON representation |
|---|
| ``` { "name": string, "key": string, "createTime": string, "updateTime": string, "encryptionState": enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#EncryptionState`), "etag": string, "failureDetails": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#FailureDetails`) }, "enableMetastoreEncryption": boolean } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the EncryptionConfig. Format: organizations/{organization}/locations/{location}/encryptionConfigs/{encryptionConfig} Global location is not supported. |
| `key` | `string` Optional. If a key is chosen, it means that the customer is using CMEK. If a key is not chosen, it means that the customer is using Google managed encryption. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the Encryption configuration was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the Encryption configuration was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `encryptionState` | ``enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#EncryptionState`)`` Output only. The state of encryption of the databases. |
| `etag` | `string` Etag of the EncryptionConfig. This is a strong etag. |
| `failureDetails` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#FailureDetails`)`` Output only. Details of the failure if anything related to Cmek db fails. |
| `enableMetastoreEncryption` | `boolean` Optional. Represent the state of CMEK opt-in for metastore. |

## EncryptionState

State of encryption of the databases when EncryptionConfig is created or updated.

| Enums ||
|---|---|
| `ENCRYPTION_STATE_UNSPECIFIED` | State is not specified. |
| `ENCRYPTING` | The encryption state of the database when the EncryptionConfig is created or updated. If the encryption fails, it is retried indefinitely and the state is shown as ENCRYPTING. |
| `COMPLETED` | The encryption of data has completed successfully. |
| `FAILED` | The encryption of data has failed. The state is set to FAILED when the encryption fails due to reasons like permission issues, invalid key etc. |

## FailureDetails

Details of the failure if anything related to Cmek db fails.

| JSON representation |
|---|
| ``` { "errorCode": enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#ErrorCode`), "errorMessage": string } ``` |

| Fields ||
|---|---|
| `errorCode` | ``enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs#ErrorCode`)`` Output only. The error code for the failure. |
| `errorMessage` | `string` Output only. The error message will be shown to the user. Set only if the error code is REQUIRE_USER_ACTION. |

## ErrorCode

Error code for the failure if anything related to Cmek db fails.

| Enums ||
|---|---|
| `UNKNOWN` | The error code is not specified |
| `INTERNAL_ERROR` | Error because of internal server error, will be retried automatically. |
| `REQUIRE_USER_ACTION` | User action is required to resolve the error. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs/create` | Create an EncryptionConfig. |
| ### `https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs/delete` | Delete an EncryptionConfig. |
| ### `https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs/get` | Get an EncryptionConfig. |
| ### `https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs/list` | List EncryptionConfigs. |
| ### `https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/organizations.locations.encryptionConfigs/patch` | Update an EncryptionConfig. |