Class: Google::Apis::WorkstationsV1::CustomerEncryptionKey

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/workstations_v1/classes.rb,
lib/google/apis/workstations_v1/representations.rb,
lib/google/apis/workstations_v1/representations.rb

Overview

A customer-managed encryption key (CMEK) for the Compute Engine resources of the associated workstation configuration. Specify the name of your Cloud KMS encryption key and the default service account. We recommend that you use a separate service account and follow Cloud KMS best practices.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CustomerEncryptionKey

Returns a new instance of CustomerEncryptionKey.



319
320
321
# File 'lib/google/apis/workstations_v1/classes.rb', line 319

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#kms_keyString

Immutable. The name of the Google Cloud KMS encryption key. For example, " projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME". The key must be in the same region as the workstation configuration. Corresponds to the JSON property kmsKey

Returns:

  • (String)


307
308
309
# File 'lib/google/apis/workstations_v1/classes.rb', line 307

def kms_key
  @kms_key
end

#kms_key_service_accountString

Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see Separation of duties and gcloud kms keys add-iam-policy-binding --member. Corresponds to the JSON property kmsKeyServiceAccount

Returns:

  • (String)


317
318
319
# File 'lib/google/apis/workstations_v1/classes.rb', line 317

def 
  @kms_key_service_account
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



324
325
326
327
# File 'lib/google/apis/workstations_v1/classes.rb', line 324

def update!(**args)
  @kms_key = args[:kms_key] if args.key?(:kms_key)
  @kms_key_service_account = args[:kms_key_service_account] if args.key?(:kms_key_service_account)
end