DynamoDB Update API response filter

0

Is it possible to somehow filter the API response received after updating an item in DynamoDB? With filter I mean something similar to the ProjectionExpression capability with a query operation, for example.

Even though the ReturnValues option does however provide a number of "filtering" options, it does however not permit selective attribute inclusion.

Is there perhaps another way to achieve this?

질문됨 2년 전261회 조회
2개 답변
0

As you saw, you can only express what ReturnValues will accept: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW

For details: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#API_UpdateItem_RequestSyntax

Why are you worried about returning too much?

AWS
답변함 2년 전
0

Many thanks for the speedy reply.

The update is looped to a query that initiates the process. Once an item is queried, the update functionality updates an attribute that then conditionally prevents future queries.

Preferably I would like to limit the client's access to attributes that are of relevance. There are also attributes that I will be using to record activities in the background, which without a ProjectionExpression functionality, I will now be sharing with the client.

It does not sound feasible to superficially update all the attributes that I would like to share with the client, by going the ReturnValue: UPDATED_NEW route. If that is the only option...

답변함 2년 전

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

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

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

관련 콘텐츠