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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ