问题描述
限时送ChatGPT账号..我正在编写一个 lambda 函数,我必须将日志写入亚马逊的 ElasticSearch 服务.后端是 Node.js
.我在 github 上遇到了这个例子:
I'm writing a lambda function where I have to write logs to Amazon's ElasticSearch Service. Backend is Node.js
. I came across this example on github:
https://github/awslabs/amazon-elasticsearch-lambda-samples/blob/master/src/s3_lambda_es.js
在第 91 行使用了 AWS.NodeHttpClient
.官方文档对此一无所知:
Which uses AWS.NodeHttpClient
on line 91. The official docs say nothing about it:
http://docs.aws.amazon/AWSJavaScriptSDK/latest/AWS.html
也没有提供关于 AWS.HttpClient
的任何内容(看起来像 AWS.NodeHttpClient
的姊妹类)
Nor is anything provided about AWS.HttpClient
(looks like a sister class of AWS.NodeHttpClient
)
那么,之前有人成功使用/修改过这段代码吗?我真的不想深入到 node_modules
文件夹中寻找类描述
So, has anyone used/modified this code successfully before? I really don't want to dig into the node_modules
folder hunting for the class description
推荐答案
示例代码有效.
AWS.NodeHttpClient
是一个私有 API.所以它是无证的.
AWS.NodeHttpClient
is a private API. So it's undocumented.
https://github/aws/aws-sdk-js/blob/8904e9c730fb2fccf9d201f66266a6e2cbb75348/lib/http/node.js#L10
这篇关于亚马逊的 AWS.NodeHttpClient - 没有文档:(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论