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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠