我试图从API网关的"API“中的API密钥中获取实际密钥。
AmazonApiGateway client = AmazonApiGatewayClientBuilder.standard().withRegion("my region").build();
GetApiKeysRequest req = new GetApiKeysRequest();
GetApiKeysResult keys = client.getApiKeys(req);
ApiKey key = keys.getItems().get(0); // just get the first one..
System.out.println(key.getId());
System.out.println(key.getName());
System.out.println(key.getValue());希望getValue()能提供实际的密钥,但它是空的。
发布于 2018-05-31 16:46:17
确保将includeValues设置为true
req.setIncludeValues(true);https://stackoverflow.com/questions/50625905
复制相似问题