diff --git a/dotnetv3/DotNetV3Examples.sln b/dotnetv3/DotNetV3Examples.sln index c6f351d608b..908a808da58 100644 --- a/dotnetv3/DotNetV3Examples.sln +++ b/dotnetv3/DotNetV3Examples.sln @@ -839,6 +839,22 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "S3ObjectLockTests", "S3\sce EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConverseToolScenario", "Bedrock-runtime\Scenarios\ConverseToolScenario\ConverseToolScenario.csproj", "{83ED7BBE-5C9A-47AC-805B-351270069570}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DynamoDB_Actions", "DynamoDB_Actions", "{72466F30-810F-4963-B748-5154A6C49926}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamoDB_Actions", "dynamodb\scenarios\DynamoDB_Basics\DynamoDB_Actions\DynamoDB_Actions.csproj", "{B8843CE1-23AF-4E54-A916-C3FD94B4FF9A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AmazonNova", "AmazonNova", "{9FB5136B-F426-454C-B32D-855E07DBC0FE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AmazonNovaText", "AmazonNovaText", "{6EA5F10D-C016-4AB0-B551-099DBFD74F95}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConverseStream", "Bedrock-runtime\Models\AmazonNova\AmazonNovaText\ConverseStream\ConverseStream.csproj", "{C0AC14E2-54E9-426E-8A4A-7B64946A4715}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Converse", "Bedrock-runtime\Models\AmazonNova\AmazonNovaText\Converse\Converse.csproj", "{FD901D0E-B970-42A3-B6E2-219BDA882F19}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AmazonNovaCanvas", "AmazonNovaCanvas", "{CDA2FA21-36E1-4847-A5A8-AF921C4BBBD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InvokeModel", "Bedrock-runtime\Models\AmazonNova\AmazonNovaCanvas\InvokeModel\InvokeModel.csproj", "{1D2CF12A-F46E-4293-ABB3-2FD70D84328F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1921,6 +1937,22 @@ Global {83ED7BBE-5C9A-47AC-805B-351270069570}.Debug|Any CPU.Build.0 = Debug|Any CPU {83ED7BBE-5C9A-47AC-805B-351270069570}.Release|Any CPU.ActiveCfg = Release|Any CPU {83ED7BBE-5C9A-47AC-805B-351270069570}.Release|Any CPU.Build.0 = Release|Any CPU + {B8843CE1-23AF-4E54-A916-C3FD94B4FF9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8843CE1-23AF-4E54-A916-C3FD94B4FF9A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8843CE1-23AF-4E54-A916-C3FD94B4FF9A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8843CE1-23AF-4E54-A916-C3FD94B4FF9A}.Release|Any CPU.Build.0 = Release|Any CPU + {C0AC14E2-54E9-426E-8A4A-7B64946A4715}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0AC14E2-54E9-426E-8A4A-7B64946A4715}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0AC14E2-54E9-426E-8A4A-7B64946A4715}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0AC14E2-54E9-426E-8A4A-7B64946A4715}.Release|Any CPU.Build.0 = Release|Any CPU + {FD901D0E-B970-42A3-B6E2-219BDA882F19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD901D0E-B970-42A3-B6E2-219BDA882F19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD901D0E-B970-42A3-B6E2-219BDA882F19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD901D0E-B970-42A3-B6E2-219BDA882F19}.Release|Any CPU.Build.0 = Release|Any CPU + {1D2CF12A-F46E-4293-ABB3-2FD70D84328F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D2CF12A-F46E-4293-ABB3-2FD70D84328F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D2CF12A-F46E-4293-ABB3-2FD70D84328F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D2CF12A-F46E-4293-ABB3-2FD70D84328F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2303,6 +2335,14 @@ Global {93588ED1-A248-4F6C-85A4-27E9E65D8AC7} = {7EC94891-9A5F-47EF-9C97-8A280754525C} {BCCFBED0-E800-46C5-975B-7D404486F00F} = {7EC94891-9A5F-47EF-9C97-8A280754525C} {83ED7BBE-5C9A-47AC-805B-351270069570} = {BA23BB28-EC63-4330-8CA7-DEB1B6489580} + {72466F30-810F-4963-B748-5154A6C49926} = {3F9C4507-5BD7-4AA5-9EE0-538DE08FAF43} + {B8843CE1-23AF-4E54-A916-C3FD94B4FF9A} = {72466F30-810F-4963-B748-5154A6C49926} + {9FB5136B-F426-454C-B32D-855E07DBC0FE} = {6520EB28-F7B4-4581-B3D8-A06E9303B16B} + {6EA5F10D-C016-4AB0-B551-099DBFD74F95} = {9FB5136B-F426-454C-B32D-855E07DBC0FE} + {C0AC14E2-54E9-426E-8A4A-7B64946A4715} = {6EA5F10D-C016-4AB0-B551-099DBFD74F95} + {FD901D0E-B970-42A3-B6E2-219BDA882F19} = {6EA5F10D-C016-4AB0-B551-099DBFD74F95} + {CDA2FA21-36E1-4847-A5A8-AF921C4BBBD7} = {9FB5136B-F426-454C-B32D-855E07DBC0FE} + {1D2CF12A-F46E-4293-ABB3-2FD70D84328F} = {CDA2FA21-36E1-4847-A5A8-AF921C4BBBD7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {08502818-E8E1-4A91-A51C-4C8C8D4FF9CA} diff --git a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs index 4c822237176..c1db8de3c26 100644 --- a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs +++ b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs @@ -71,26 +71,22 @@ public static async Task CreateTableProductCatalog(IAmazo { TableName = tableName, AttributeDefinitions = new List() - { - new AttributeDefinition - { - AttributeName = "Id", - AttributeType = ScalarAttributeType.N, - }, - }, + { + new AttributeDefinition + { + AttributeName = "Id", + AttributeType = ScalarAttributeType.N, + }, + }, KeySchema = new List() - { - new KeySchemaElement - { - AttributeName = "Id", - KeyType = KeyType.HASH, - }, - }, - ProvisionedThroughput = new ProvisionedThroughput + { + new KeySchemaElement { - ReadCapacityUnits = 10, - WriteCapacityUnits = 5, + AttributeName = "Id", + KeyType = KeyType.HASH, }, + }, + BillingMode = BillingMode.PAY_PER_REQUEST, }); var result = await WaitTillTableCreated(client, tableName, response); @@ -112,26 +108,22 @@ public static async Task CreateTableForum(IAmazonDynamoDB { TableName = tableName, AttributeDefinitions = new List() - { - new AttributeDefinition - { - AttributeName = "Name", - AttributeType = ScalarAttributeType.S, - }, - }, + { + new AttributeDefinition + { + AttributeName = "Name", + AttributeType = ScalarAttributeType.S, + }, + }, KeySchema = new List() - { - new KeySchemaElement - { - AttributeName = "Name", - KeyType = KeyType.HASH, - }, - }, - ProvisionedThroughput = new ProvisionedThroughput + { + new KeySchemaElement { - ReadCapacityUnits = 10, - WriteCapacityUnits = 5, + AttributeName = "Name", + KeyType = KeyType.HASH, }, + }, + BillingMode = BillingMode.PAY_PER_REQUEST, }); var result = await WaitTillTableCreated(client, tableName, response); @@ -154,36 +146,32 @@ public static async Task CreateTableThread(IAmazonDynamoD { TableName = tableName, AttributeDefinitions = new List() - { - new AttributeDefinition - { - AttributeName = "ForumName", // Hash attribute. - AttributeType = ScalarAttributeType.S, - }, - new AttributeDefinition - { - AttributeName = "Subject", - AttributeType = ScalarAttributeType.S, - }, - }, + { + new AttributeDefinition + { + AttributeName = "ForumName", // Hash attribute. + AttributeType = ScalarAttributeType.S, + }, + new AttributeDefinition + { + AttributeName = "Subject", + AttributeType = ScalarAttributeType.S, + }, + }, KeySchema = new List() - { - new KeySchemaElement - { - AttributeName = "ForumName", // Hash attribute - KeyType = KeyType.HASH, - }, - new KeySchemaElement - { - AttributeName = "Subject", // Range attribute - KeyType = KeyType.RANGE, - }, - }, - ProvisionedThroughput = new ProvisionedThroughput + { + new KeySchemaElement + { + AttributeName = "ForumName", // Hash attribute + KeyType = KeyType.HASH, + }, + new KeySchemaElement { - ReadCapacityUnits = 10, - WriteCapacityUnits = 5, + AttributeName = "Subject", // Range attribute + KeyType = KeyType.RANGE, }, + }, + BillingMode = BillingMode.PAY_PER_REQUEST, }); var result = await WaitTillTableCreated(client, tableName, response); @@ -256,11 +244,7 @@ public static async Task CreateTableReply(IAmazonDynamoDB }, }, }, - ProvisionedThroughput = new ProvisionedThroughput - { - ReadCapacityUnits = 10, - WriteCapacityUnits = 5, - }, + BillingMode = BillingMode.PAY_PER_REQUEST, }); var result = await WaitTillTableCreated(client, tableName, response); diff --git a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadDataExample.csproj b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadDataExample.csproj index a6f7af21bee..06fcb8c73d3 100644 --- a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadDataExample.csproj +++ b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadDataExample.csproj @@ -6,8 +6,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/dotnetv3/dynamodb/README.md b/dotnetv3/dynamodb/README.md index 407ad563340..0f18a83e129 100644 --- a/dotnetv3/dynamodb/README.md +++ b/dotnetv3/dynamodb/README.md @@ -47,18 +47,18 @@ Code excerpts that show you how to call individual service functions. - [BatchExecuteStatement](scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs#L10) - [BatchGetItem](low-level-api/LowLevelBatchGet/LowLevelBatchGet.cs#L4) -- [BatchWriteItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L202) +- [BatchWriteItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L198) - [CreateTable](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L14) -- [DeleteItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L262) -- [DeleteTable](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L391) -- [DescribeTable](low-level-api/LowLevelTableExample/LowLevelTableExample.cs#L126) +- [DeleteItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L258) +- [DeleteTable](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L387) +- [DescribeTable](low-level-api/LowLevelTableExample/LowLevelTableExample.cs#L120) - [ExecuteStatement](scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLMethods.cs#L163) -- [GetItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L171) -- [ListTables](low-level-api/LowLevelTableExample/LowLevelTableExample.cs#L102) -- [PutItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L89) -- [Query](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L297) -- [Scan](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L350) -- [UpdateItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L119) +- [GetItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L167) +- [ListTables](low-level-api/LowLevelTableExample/LowLevelTableExample.cs#L96) +- [PutItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L85) +- [Query](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L293) +- [Scan](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L346) +- [UpdateItem](scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs#L115) ### Scenarios @@ -240,4 +240,4 @@ in the `dotnetv3` folder. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 \ No newline at end of file +SPDX-License-Identifier: Apache-2.0 diff --git a/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs b/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs index 39254ea9468..3a7de3b81b7 100644 --- a/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs +++ b/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs @@ -80,18 +80,12 @@ private static async Task CreateExampleTable() KeyType = KeyType.RANGE //Sort key } }, - ProvisionedThroughput = new ProvisionedThroughput - { - ReadCapacityUnits = 5, - WriteCapacityUnits = 6 - }, - TableName = ExampleTableName + TableName = ExampleTableName, + BillingMode = BillingMode.PAY_PER_REQUEST, }); var tableDescription = response.TableDescription; - Console.WriteLine($"{tableDescription.TableName}: {tableDescription.TableStatus} \t " + - $"ReadsPerSec: {tableDescription.ProvisionedThroughput.ReadCapacityUnits} \t " + - $"WritesPerSec: {tableDescription.ProvisionedThroughput.WriteCapacityUnits}"); + Console.WriteLine($"{tableDescription.TableName}: {tableDescription.TableStatus}"); Console.WriteLine($"{ExampleTableName} - {tableDescription.TableStatus}"); @@ -136,21 +130,19 @@ private static async Task GetTableInformation() var table = response.Table; Console.WriteLine($"Name: {table.TableName}"); Console.WriteLine($"# of items: {table.ItemCount}"); - Console.WriteLine($"Provision Throughput (reads/sec): " + - $"{table.ProvisionedThroughput.ReadCapacityUnits}"); - Console.WriteLine($"Provision Throughput (writes/sec): " + - $"{table.ProvisionedThroughput.WriteCapacityUnits}"); + } // snippet-end:[dynamodb.dotnetv3.DescribeTableExample] // snippet-start:[dynamodb.dotnetv3.UpdateExampleTable] private static async Task UpdateExampleTable() { - Console.WriteLine("\n*** Updating table ***"); + Console.WriteLine("\n*** Updating table billing mode ***"); await Client.UpdateTableAsync(new UpdateTableRequest { TableName = ExampleTableName, + BillingMode = BillingMode.PROVISIONED, ProvisionedThroughput = new ProvisionedThroughput { ReadCapacityUnits = 6, diff --git a/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs b/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs index 99334150307..a2ec50ad485 100644 --- a/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs +++ b/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Actions/DynamoDbMethods.cs @@ -51,11 +51,7 @@ public static async Task CreateMovieTableAsync(AmazonDynamoDBClient client KeyType = KeyType.RANGE, }, }, - ProvisionedThroughput = new ProvisionedThroughput - { - ReadCapacityUnits = 5, - WriteCapacityUnits = 5, - }, + BillingMode = BillingMode.PAY_PER_REQUEST, }); // Wait until the table is ACTIVE and then report success. diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/DynamoDBMethods.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/DynamoDBMethods.cs index aeb7a4562e2..fbfb7a52799 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/DynamoDBMethods.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/DynamoDBMethods.cs @@ -49,11 +49,7 @@ public static async Task CreateMovieTableAsync(string tableName) KeyType = KeyType.RANGE, }, }, - ProvisionedThroughput = new ProvisionedThroughput - { - ReadCapacityUnits = 5, - WriteCapacityUnits = 5, - }, + BillingMode = BillingMode.PAY_PER_REQUEST, }); // Wait until the table is ACTIVE and then report success. diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLBasics.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLBasics.cs index c06c822ca2e..4568b22ab86 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLBasics.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLBasics.cs @@ -3,14 +3,10 @@ // snippet-start:[PartiQL.dotnetv3.PartiQLBasicsScenario] -// Before you run this example, download 'movies.json' from -// https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.Js.02.html, -// and put it in the same folder as the example. - // Separator for the console display. var SepBar = new string('-', 80); const string tableName = "movie_table"; -const string movieFileName = "moviedata.json"; +const string movieFileName = @"..\..\..\..\..\..\..\..\resources\sample_files\movies.json"; var client = new AmazonDynamoDBClient(); diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/DynamoDBMethods.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/DynamoDBMethods.cs index f674bc0bc7a..86878a0ea36 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/DynamoDBMethods.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/DynamoDBMethods.cs @@ -49,11 +49,7 @@ public static async Task CreateMovieTableAsync(string tableName) KeyType = KeyType.RANGE, }, }, - ProvisionedThroughput = new ProvisionedThroughput - { - ReadCapacityUnits = 5, - WriteCapacityUnits = 5, - }, + BillingMode = BillingMode.PAY_PER_REQUEST, }); // Wait until the table is ACTIVE and then report success. diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatch.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatch.cs index 46c7325d57b..1cd917a8c5f 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatch.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatch.cs @@ -10,7 +10,7 @@ // Separator for the console display. var SepBar = new string('-', 80); const string tableName = "movie_table"; -const string movieFileName = "moviedata.json"; +const string movieFileName = @"..\..\..\..\..\..\..\..\resources\sample_files\movies.json"; DisplayInstructions(); diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs index 6468cb86b83..c13d20c33ce 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs @@ -120,7 +120,7 @@ public static async Task GetBatch( int year1, int year2) { - var getBatch = $"SELECT FROM {tableName} WHERE title = ? AND year = ?"; + var getBatch = $"SELECT * FROM {tableName} WHERE title = ? AND year = ?"; var statements = new List { new BatchStatementRequest @@ -153,7 +153,10 @@ public static async Task GetBatch( { response.Responses.ForEach(r => { - Console.WriteLine($"{r.Item["title"]}\t{r.Item["year"]}"); + if (r.Item.Any()) + { + Console.WriteLine($"{r.Item["title"]}\t{r.Item["year"]}"); + } }); return true; }