AWS CLI版本支援 AWS SiteWise API “BatchGetAssetPropertyValueHistory”

0

【以下的问题经过翻译处理】 我正在尝试从我的Lambda和AWS CLI v2中调用“BatchGetAssetPropertyValueHistory”API,但我得到的响应如下:

从CLI调用:

无效的选项:“batch-get-asset-property-value-history”,也许您的意思是:

* get-asset-property-value-history 
  * batch-put-asset-property-value

从Lambda代码:

“errorType”:“TypeError”,
  “errorMessage”:“iotsitewise.BatchGetAssetPropertyValueHistory不是函数”,

有任何提示吗?AWS是否已经废弃了这个API?

profile picture
EXPERT
asked 5 months ago26 views
1 Answer
0

【以下的回答经过翻译处理】 你好,

我猜你使用的AWS CLI版本不支持新版的BatchGet APIs。请尝试使用最新的AWS CLI版本。你可以在更改日志中查找支持BatchGet APIs的版本。

Lambda环境似乎没有包含支持BatchGet APIs的AWS SDK版本。你可以在Lambda函数中添加一个新的SDK版本。将SDK版本与Lambda函数代码一起打包,或者如果多个函数使用新版API,则可以创建一个Lambda层,其中包含当前的SDK版本。

祝好,

Philipp

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions