繁体   English   中英

JS AWS开发工具包中确实支持DynamoDb扫描的ConsistentRead参数吗?

[英]Is ConsistentRead param of DynamoDb scan really supported in JS AWS SDK?

当我使用ConsistentRead参数调用扫描时,会收到

“在参数中找到意外键'ConsistentRead'”,“名称”:“ UnexpectedParameter”,“堆栈”:“ UnexpectedParameter:在参数中发现意外键'ConsistentRead'

如我所见,dynamodb-2012-08-10.min.json中没有ConsistentRead参数

"Scan": {
  "input": {
    "type": "structure",
    "required": [
      "TableName"
    ],
    "members": {
      "TableName": {},
      "AttributesToGet": {
        "shape": "Sj"
      },
      "Limit": {
        "type": "integer"
      },
      "Select": {},
      "ScanFilter": {
        "shape": "S30"
      },
      "ConditionalOperator": {},
      "ExclusiveStartKey": {
        "shape": "S6"
      },
      "ReturnConsumedCapacity": {},
      "TotalSegments": {
        "type": "integer"
      },
      "Segment": {
        "type": "integer"
      },
      "ProjectionExpression": {},
      "FilterExpression": {},
      "ExpressionAttributeNames": {
        "shape": "Sm"
      },
      "ExpressionAttributeValues": {
        "shape": "S2g"
      }
   }
},

我刚刚在发行版中发现了这一点:适用于JavaScript的AWS开发工具包v2.1.39 AWS.DynamoDB API更新

提交者:Aditya @ AWS创建于:GMT 2015年7月14日晚上7:36 PM最后更新:GMT 2015年7月14日晚上7:36

更新了AWS.DynamoDB API,以通过Scan API操作添加对ConsistentRead参数的支持。

所以我需要更新aws-sdk

python boto3包对我来说也似乎发生这种异常。 尽管boto3文档指出可以将布尔参数“ ConsistentRead”添加到scan()方法中,但是当我使用客户端将此参数添加到请求中时,会收到以下异常:

botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in input: "ConsistentRead", must be one of: TableName, IndexName, 
AttributesToGet, Limit, Select, ScanFilter, ConditionalOperator, ExclusiveStartKey, 
ReturnConsumedCapacity, TotalSegments, Segment, ProjectionExpression, FilterExpression, 
ExpressionAttributeNames, ExpressionAttributeValues

由于AWS文档指示您可以包含ConsistentRead参数,因此我不确定这是我的问题,还是我用于测试的dynamodb本地构建,boto3或AWS api本身是否存在问题。 还有其他人可以使用此参数吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM