■Interrupt
On/Off
string get_item(string table_name,string item_name,string attribute_name) { const Aws::String table=table_name;//(argv[1]); const Aws::String name=item_name;//(argv[2]); const Aws::String projection="";//(argc > 3 ? argv[3] : ""); // snippet-start:[dynamodb.cpp.get_item.code] Aws::Client::ClientConfiguration clientConfig; Aws::DynamoDB::DynamoDBClient dynamoClient(clientConfig); Aws::DynamoDB::Model::GetItemRequest req; // Set up the request req.SetTableName(table); Aws::DynamoDB::Model::AttributeValue hashKey; hashKey.SetS(name); req.AddKey("Name", hashKey); if (!projection.empty()) req.SetProjectionExpression(projection); // Retrieve the item's fields and values const Aws::DynamoDB::Model::GetItemOutcome& result = dynamoClient.GetItem(req); if (result.IsSuccess()) { // Reference the retrieved fields/values const Aws::Map
0 件のコメント:
コメントを投稿