1.64.1 (latest) 1.64.0 1.63.1 1.62.0 1.61.1 1.60.0 1.59.0 1.58.0 1.57.0 1.56.0 1.55.0 1.54.0 1.53.0 1.52.1 1.51.1 1.50.0 1.49.1 1.48.1 1.47.0 1.46.1 1.45.0 1.44.2 1.43.1 1.42.0 1.41.0 1.40.0 1.39.0 1.38.1 Reference documentation and code samples for the BigQuery API class Google::Cloud::Bigquery::EncryptionConfiguration.

## Encryption Configuration

A builder for BigQuery table encryption configurations, passed to block
arguments to [Dataset#create_table](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Dataset#Google__Cloud__Bigquery__Dataset_create_table_instance_ "Google::Cloud::Bigquery::Dataset#create_table (method)") and [Table#encryption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Table#Google__Cloud__Bigquery__Table_encryption_instance_ "Google::Cloud::Bigquery::Table#encryption (method)").

## Inherits

- Object

## Example

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
key_name = "projects/a/locations/b/keyRings/c/cryptoKeys/d"
encrypt_config = bigquery.encryption kms_key: key_name
table = dataset.create_table "my_table" do |updater|
  updater.encryption = encrypt_config
end
```

## Methods

### #kms_key

    def kms_key() -> String

The Cloud KMS encryption key that will be used to protect the table.
For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d`
The default value is `nil`, which means default encryption is used.
**Returns**

- (String)
**Example**

```ruby
require "google/cloud/bigquery"

config = Google::Cloud::Bigquery::EncryptionConfiguration.new
key_name = "projects/a/locations/b/keyRings/c/cryptoKeys/d"
config.kms_key = key_name
```

### #kms_key=

    def kms_key=(new_kms_key_name)

Set the Cloud KMS encryption key that will be used to protect the
table. For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d`
The default value is `nil`, which means default encryption is used.
**Parameter**

- **new_kms_key_name** (String) --- New Cloud KMS key name
**Example**

```ruby
require "google/cloud/bigquery"

config = Google::Cloud::Bigquery::EncryptionConfiguration.new
key_name = "projects/a/locations/b/keyRings/c/cryptoKeys/d"
config.kms_key = key_name
```