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 réponses
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
EXPERT
répondu il y a 2 ans
  • Thanks, it was actually the case of Old version, like just the one previous to version that contains the APIs

0
Réponse acceptée

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
EXPERT
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions