Categories:

System functions (System Information)

SYSTEM$GET_GCP_KMS_CMK_GRANT_ACCESS_CMD

返回 Google Cloud gcloud 命令,以获取 Google Cloud Key Management Service 的策略信息,以便与客户管理的密钥一起使用。

See also:

Understanding Encryption Key Management in Snowflake

语法

SYSTEM$GET_GCP_KMS_CMK_GRANT_ACCESS_CMD()

实参

无。

使用说明

  • 此函数仅适用于 Google Cloud Platform 上的 Snowflake 账户。
  • Only account administrators (i.e. users with the ACCOUNTADMIN role) or a role that is granted the MONITOR SECURITY privilege can call this function.

示例

返回 gcloud 命令,用于为客户管理的密钥获取 GCP KMS 策略信息。请注意,示例 gcloud 命令不包含实际选项值,其中一些值由尖括号取代。

For details about the gcloud command, see the documentation for gcloud kms (https://cloud.google.com/sdk/gcloud/reference/kms).

select SYSTEM$GET_GCP_KMS_CMK_GRANT_ACCESS_CMD();

返回:

gcloud kms keys add-iam-policy-binding <key-name> --project <project-id> --location <location> --keyring <key-ring> --member serviceAccount:<service-account-email> --role roles/cloudkms.cryptoKeyEncrypterDecrypter