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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则