当我运行以下代码时(KEY_ID 是我从 client.list_keys() 返回的列表中复制并粘贴的 key_id):
import boto3
client = boto3.client("kms")
client.list_keys()
client.get_public_key(KeyId = "KEY_ID")
# I've also tried:
client.get_public_key(KeyId = "KEY_ID", GrantTokens = [])
我收到以下错误:
raise error_class(parsed_response, operation_name)
botocore.errorfactory.UnsupportedOperationException: An error occurred (UnsupportedOperationException) when calling the GetPublicKey operation:
任何人都知道我在 get_public_key() 方法中缺少哪些参数?