Amazon dynamodb 如何解决此异常:“引用;选择获取所有“U属性”时无法指定AttributesToGet;?

Amazon dynamodb 如何解决此异常:“引用;选择获取所有“U属性”时无法指定AttributesToGet;?,amazon-dynamodb,Amazon Dynamodb,当我试图扫描dynamoDb表并使用AWS页面中的以下示例代码返回特定列时: string tableName = "Thread"; Table ThreadTable = Table.LoadTable(client, tableName); ScanFilter scanFilter = new ScanFilter(); scanFilter.AddCondition("ForumId", ScanOperator.Equal, forumId); scanFilt

当我试图扫描dynamoDb表并使用AWS页面中的以下示例代码返回特定列时:

  string tableName = "Thread";
  Table ThreadTable = Table.LoadTable(client, tableName);

  ScanFilter scanFilter = new ScanFilter();
  scanFilter.AddCondition("ForumId", ScanOperator.Equal, forumId);
  scanFilter.AddCondition("Tags", ScanOperator.Contains, "sortkey");

  ScanOperationConfig config = new ScanOperationConfig()
  {
    AttributesToGet = new List<string> { "Subject", "Message" } ,
    Filter = scanFilter
  };

  Search search = ThreadTable.Scan(config); 
string tableName=“Thread”;
Table ThreadTable=Table.LoadTable(客户端,表名);
ScanFilter ScanFilter=新的ScanFilter();
scanFilter.AddCondition(“ForumId”,ScanOperator.Equal,ForumId);
scanFilter.AddCondition(“Tags”,ScanOperator.Contains,“sortkey”);
ScanOperationConfig=新的ScanOperationConfig()
{
AttributesToGet=新列表{“主题”,“消息”},
过滤器=扫描过滤器
};
Search=ThreadTable.Scan(配置);
我得到以下异常:

消息:Amazon.DynamoDBv2.amazondynamodexception:选择获取所有_属性时,无法指定AttributesToGet ----Amazon.Runtime.Internal.HttpErrorResponseException:引发了类型为“Amazon.Runtime.Internal.HttpErrorResponseException”的异常

如何解决它?

我必须补充:

Select = SelectValues.SpecificAttributes
扫描操作配置

像这样:

 ScanOperationConfig config = new ScanOperationConfig
 {
   AttributesToGet = new List<string> { "Subject", "Message" } ,
   Filter = scanFilter
   Select = SelectValues.SpecificAttributes
 };
ScanOperationConfig配置=新建ScanOperationConfig
{
AttributesToGet=新列表{“主题”,“消息”},
过滤器=扫描过滤器
Select=SelectValues.specifictattributes
};