Reference documentation and code samples for the Cloud Workstations V1BETA API class Google::Cloud::Workstations::V1beta::WorkstationConfig::CustomerEncryptionKey.
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.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#kms_key
defkms_key()->::String
Returns
(::String) — 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.
#kms_key=
defkms_key=(value)->::String
Parameter
value (::String) — 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.
Returns
(::String) — 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.
#kms_key_service_account
defkms_key_service_account()->::String
Returns
(::String) — 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.
#kms_key_service_account=
defkms_key_service_account=(value)->::String
Parameter
value (::String) — 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.
Returns
(::String) — 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Workstations V1BETA API - Class Google::Cloud::Workstations::V1beta::WorkstationConfig::CustomerEncryptionKey (v0.5.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.5.1 (latest)](/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-CustomerEncryptionKey)\n- [0.5.0](/ruby/docs/reference/google-cloud-workstations-v1beta/0.5.0/Google-Cloud-Workstations-V1beta-WorkstationConfig-CustomerEncryptionKey)\n- [0.4.1](/ruby/docs/reference/google-cloud-workstations-v1beta/0.4.1/Google-Cloud-Workstations-V1beta-WorkstationConfig-CustomerEncryptionKey)\n- [0.3.0](/ruby/docs/reference/google-cloud-workstations-v1beta/0.3.0/Google-Cloud-Workstations-V1beta-WorkstationConfig-CustomerEncryptionKey)\n- [0.2.0](/ruby/docs/reference/google-cloud-workstations-v1beta/0.2.0/Google-Cloud-Workstations-V1beta-WorkstationConfig-CustomerEncryptionKey)\n- [0.1.3](/ruby/docs/reference/google-cloud-workstations-v1beta/0.1.3/Google-Cloud-Workstations-V1beta-WorkstationConfig-CustomerEncryptionKey) \nReference documentation and code samples for the Cloud Workstations V1BETA API class Google::Cloud::Workstations::V1beta::WorkstationConfig::CustomerEncryptionKey.\n\nA customer-managed encryption key (CMEK) for the Compute Engine\nresources of the associated workstation configuration. Specify the name of\nyour Cloud KMS encryption key and the default service account.\nWe recommend that you use a separate service account and follow\n[Cloud KMS best\npractices](https://cloud.google.com/kms/docs/separation-of-duties). \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #kms_key\n\n def kms_key() -\u003e ::String\n\n**Returns**\n\n- (::String) --- 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.\n\n### #kms_key=\n\n def kms_key=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- 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. \n**Returns**\n\n- (::String) --- 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.\n\n### #kms_key_service_account\n\n def kms_key_service_account() -\u003e ::String\n\n**Returns**\n\n- (::String) --- 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\n duties](https://cloud.google.com/kms/docs/separation-of-duties) and `gcloud kms keys add-iam-policy-binding` [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).\n\n### #kms_key_service_account=\n\n def kms_key_service_account=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- 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\nduties](https://cloud.google.com/kms/docs/separation-of-duties) and `gcloud kms keys add-iam-policy-binding` [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). \n**Returns**\n\n- (::String) --- 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\n duties](https://cloud.google.com/kms/docs/separation-of-duties) and `gcloud kms keys add-iam-policy-binding` [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member)."]]