# Google Cloud Spanner Database Administration v1 API - Class RestoreDatabaseEncryptionConfig (5.13.0-beta07)

5.13.0-beta07 5.13.0-beta06 5.12.0 (latest) 5.11.0 5.10.0 5.9.0 5.8.0 5.7.0 5.6.0 5.5.0 5.4.0 5.3.0 5.2.0 5.1.0 5.0.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.15.1 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0

    public sealed class RestoreDatabaseEncryptionConfig : IMessage<RestoreDatabaseEncryptionConfig>, IEquatable<RestoreDatabaseEncryptionConfig>, IDeepCloneable<RestoreDatabaseEncryptionConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Spanner Database Administration v1 API class RestoreDatabaseEncryptionConfig.

Encryption configuration for the restored database.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> RestoreDatabaseEncryptionConfig

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RestoreDatabaseEncryptionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RestoreDatabaseEncryptionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RestoreDatabaseEncryptionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Spanner.Admin.Database.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1)

## Assembly

Google.Cloud.Spanner.Admin.Database.V1.dll

## Constructors

### RestoreDatabaseEncryptionConfig()

    public RestoreDatabaseEncryptionConfig()

### RestoreDatabaseEncryptionConfig(RestoreDatabaseEncryptionConfig)

    public RestoreDatabaseEncryptionConfig(RestoreDatabaseEncryptionConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfig` |

## Properties

### EncryptionType

    public RestoreDatabaseEncryptionConfig.Types.EncryptionType EncryptionType { get; set; }

Required. The encryption type of the restored database.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfig.Types.EncryptionType` |   |

### KmsKeyName

    public string KmsKeyName { get; set; }

Optional. The Cloud KMS key that will be used to encrypt/decrypt the
restored database. This field should be set only when
\[encryption_type\]\[google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type\]
is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
`projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### KmsKeyNameAsCryptoKeyName

    public CryptoKeyName KmsKeyNameAsCryptoKeyName { get; set; }

[CryptoKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.CryptoKeyName)-typed view over the [KmsKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfig#Google_Cloud_Spanner_Admin_Database_V1_RestoreDatabaseEncryptionConfig_KmsKeyName) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.CryptoKeyName` |   |

### KmsKeyNames

    public RepeatedField<string> KmsKeyNames { get; }

Optional. Specifies the KMS configuration for the one or more keys used to
encrypt the database. Values are of the form
`projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.

The keys referenced by kms_key_names must fully cover all
regions of the database instance configuration. Some examples:

- For single region database instance configs, specify a single regional location KMS key.
- For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
- For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### KmsKeyNamesAsCryptoKeyNames

    public ResourceNameList<CryptoKeyName> KmsKeyNamesAsCryptoKeyNames { get; }

[CryptoKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.CryptoKeyName)-typed view over the [KmsKeyNames](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.RestoreDatabaseEncryptionConfig#Google_Cloud_Spanner_Admin_Database_V1_RestoreDatabaseEncryptionConfig_KmsKeyNames) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNameList-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.CryptoKeyName` |   |