Is "BatchGetAssetPropertyValueHistory" AWS SiteWise API still available for use (either in lambda or cli)?

0

I am trying to call the "BatchGetAssetPropertyValueHistory" API from my lambda, and also from AWS CLI v2, but the response I get is as follows:

From CLI call:

Invalid choice: 'batch-get-asset-property-value-history', maybe you meant:

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

From Lambda code:

"errorType": "TypeError",
  "errorMessage": "iotsitewise.BatchGetAssetPropertyValueHistory is not a function",

Any clues here? Is this API deprecated by AWS?

已提問 2 年前檢視次數 323 次
2 個答案
1

Hi Roshan,

ensure you have an updated version of the CLI or the AWS SDK in case of Lambda function. The BatchGetAssetPropertyValueHistory has been introduced in v 2.5.8 of aws cli v2 (https://github.com/aws/aws-cli/blob/4fd94d871f109c551f4b23425c29c76fcf865615/CHANGELOG.rst#L529).

AWS
專家
已回答 2 年前
  • Thanks, it was actually the case of Old version, like just the one previous to version that contains the APIs

0
已接受的答案

Hi,

I assume you are using an AWS CLI version which does not support the newer BatchGet APIs. Try to use the most current AWS CLI version. You can find in the changelog from which version onwards the BatchGet APIs are supported.

The Lambda environment seems not to include an AWS SDK version which supports the BatchGet APIs. You can add a newer SDK version to your Lambda function. Either packaged with your Lambda function code or in case multiple functions use the newer APIs you can create a Lambda layer containing a current SDK version.

Cheers,
Philipp

AWS
專家
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南