Class: Google::Apis::DlpV2::GooglePrivacyDlpV2CryptoKey
- Inherits:
-
Object
- Object
- Google::Apis::DlpV2::GooglePrivacyDlpV2CryptoKey
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/dlp_v2/classes.rb,
lib/google/apis/dlp_v2/representations.rb,
lib/google/apis/dlp_v2/representations.rb
Overview
This is a data encryption key (DEK) (as opposed to a key encryption key (KEK) stored by Cloud Key Management Service (Cloud KMS). When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate IAM policy on the KEK to ensure an attacker cannot unwrap the DEK.
Instance Attribute Summary collapse
-
#kms_wrapped ⇒ Google::Apis::DlpV2::GooglePrivacyDlpV2KmsWrappedCryptoKey
Include to use an existing data crypto key wrapped by KMS.
-
#transient ⇒ Google::Apis::DlpV2::GooglePrivacyDlpV2TransientCryptoKey
Use this to have a random data crypto key generated.
-
#unwrapped ⇒ Google::Apis::DlpV2::GooglePrivacyDlpV2UnwrappedCryptoKey
Using raw keys is prone to security risks due to accidentally leaking the key.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GooglePrivacyDlpV2CryptoKey
constructor
A new instance of GooglePrivacyDlpV2CryptoKey.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GooglePrivacyDlpV2CryptoKey
Returns a new instance of GooglePrivacyDlpV2CryptoKey.
1456 1457 1458 |
# File 'lib/google/apis/dlp_v2/classes.rb', line 1456 def initialize(**args) update!(**args) end |
Instance Attribute Details
#kms_wrapped ⇒ Google::Apis::DlpV2::GooglePrivacyDlpV2KmsWrappedCryptoKey
Include to use an existing data crypto key wrapped by KMS. The wrapped key
must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM
permissions when sending a request to perform a crypto transformation using a
KMS-wrapped crypto key: dlp.kms.encrypt For more information, see Creating a
wrapped key. Note:
When you use Cloud KMS for cryptographic operations, charges apply.
Corresponds to the JSON property kmsWrapped
1442 1443 1444 |
# File 'lib/google/apis/dlp_v2/classes.rb', line 1442 def kms_wrapped @kms_wrapped end |
#transient ⇒ Google::Apis::DlpV2::GooglePrivacyDlpV2TransientCryptoKey
Use this to have a random data crypto key generated. It will be discarded
after the request finishes.
Corresponds to the JSON property transient
1448 1449 1450 |
# File 'lib/google/apis/dlp_v2/classes.rb', line 1448 def transient @transient end |
#unwrapped ⇒ Google::Apis::DlpV2::GooglePrivacyDlpV2UnwrappedCryptoKey
Using raw keys is prone to security risks due to accidentally leaking the key.
Choose another type of key if possible.
Corresponds to the JSON property unwrapped
1454 1455 1456 |
# File 'lib/google/apis/dlp_v2/classes.rb', line 1454 def unwrapped @unwrapped end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1461 1462 1463 1464 1465 |
# File 'lib/google/apis/dlp_v2/classes.rb', line 1461 def update!(**args) @kms_wrapped = args[:kms_wrapped] if args.key?(:kms_wrapped) @transient = args[:transient] if args.key?(:transient) @unwrapped = args[:unwrapped] if args.key?(:unwrapped) end |