Skip to content

Commit cf2c2de

Browse files
committed
Updates to metadata
1 parent ed47139 commit cf2c2de

10 files changed

Lines changed: 269 additions & 65 deletions

File tree

.doc_gen/metadata/dynamodb_metadata.yaml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ dynamodb_Hello:
1616
- dynamodb.java2.list_tables.main
1717
.NET:
1818
versions:
19-
- sdk_version: 3
20-
github: dotnetv3/dynamodb
19+
- sdk_version: 4
20+
github: dotnetv4/DynamoDB
2121
excerpts:
2222
- description:
2323
snippet_tags:
24-
- DynamoDB.dotnetv3.HelloDynamoDB
24+
- DynamoDB.dotnetv4.HelloDynamoDB
2525
JavaScript:
2626
versions:
2727
- sdk_version: 3
@@ -66,12 +66,12 @@ dynamodb_CreateTable:
6666
languages:
6767
.NET:
6868
versions:
69-
- sdk_version: 3
70-
github: dotnetv3/dynamodb
69+
- sdk_version: 4
70+
github: dotnetv4/DynamoDB
7171
excerpts:
7272
- description:
7373
snippet_tags:
74-
- DynamoDB.dotnetv3.dynamodb-basics.CreateTable
74+
- DynamoDB.dotnetv4.dynamodb-basics.CreateTable
7575
C++:
7676
versions:
7777
- sdk_version: 1
@@ -379,12 +379,12 @@ dynamodb_BatchWriteItem:
379379
languages:
380380
.NET:
381381
versions:
382-
- sdk_version: 3
383-
github: dotnetv3/dynamodb
382+
- sdk_version: 4
383+
github: dotnetv4/DynamoDB
384384
excerpts:
385385
- description: Writes a batch of items to the movie table.
386386
snippet_tags:
387-
- DynamoDB.dotnetv3.dynamodb-basics.BatchWriteItem
387+
- DynamoDB.dotnetv4.dynamodb-basics.BatchWriteItem
388388
Go:
389389
versions:
390390
- sdk_version: 2
@@ -490,12 +490,12 @@ dynamodb_DeleteTable:
490490
languages:
491491
.NET:
492492
versions:
493-
- sdk_version: 3
494-
github: dotnetv3/dynamodb
493+
- sdk_version: 4
494+
github: dotnetv4/DynamoDB
495495
excerpts:
496496
- description:
497497
snippet_tags:
498-
- DynamoDB.dotnetv3.dynamodb-basics.DeleteTableExample
498+
- DynamoDB.dotnetv4.dynamodb-basics.DeleteTableExample
499499
C++:
500500
versions:
501501
- sdk_version: 1
@@ -619,12 +619,12 @@ dynamodb_PutItem:
619619
languages:
620620
.NET:
621621
versions:
622-
- sdk_version: 3
623-
github: dotnetv3/dynamodb
622+
- sdk_version: 4
623+
github: dotnetv4/DynamoDB
624624
excerpts:
625625
- description:
626626
snippet_tags:
627-
- DynamoDB.dotnetv3.dynamodb-basics.PutItem
627+
- DynamoDB.dotnetv4.dynamodb-basics.PutItem
628628
C++:
629629
versions:
630630
- sdk_version: 1
@@ -760,12 +760,12 @@ dynamodb_GetItem:
760760
languages:
761761
.NET:
762762
versions:
763-
- sdk_version: 3
764-
github: dotnetv3/dynamodb
763+
- sdk_version: 4
764+
github: dotnetv4/DynamoDB
765765
excerpts:
766766
- description:
767767
snippet_tags:
768-
- DynamoDB.dotnetv3.dynamodb-basics.GetItem
768+
- DynamoDB.dotnetv4.dynamodb-basics.GetItem
769769
C++:
770770
versions:
771771
- sdk_version: 1
@@ -887,12 +887,12 @@ dynamodb_UpdateItem:
887887
languages:
888888
.NET:
889889
versions:
890-
- sdk_version: 3
891-
github: dotnetv3/dynamodb
890+
- sdk_version: 4
891+
github: dotnetv4/DynamoDB
892892
excerpts:
893893
- description:
894894
snippet_tags:
895-
- DynamoDB.dotnetv3.dynamodb-basics.UpdateItem
895+
- DynamoDB.dotnetv4.dynamodb-basics.UpdateItem
896896
C++:
897897
versions:
898898
- sdk_version: 1
@@ -1017,12 +1017,12 @@ dynamodb_DeleteItem:
10171017
languages:
10181018
.NET:
10191019
versions:
1020-
- sdk_version: 3
1021-
github: dotnetv3/dynamodb
1020+
- sdk_version: 4
1021+
github: dotnetv4/DynamoDB
10221022
excerpts:
10231023
- description:
10241024
snippet_tags:
1025-
- DynamoDB.dotnetv3.dynamodb-basics.DeleteItem
1025+
- DynamoDB.dotnetv4.dynamodb-basics.DeleteItem
10261026
Go:
10271027
versions:
10281028
- sdk_version: 2
@@ -1295,12 +1295,12 @@ dynamodb_Query:
12951295
languages:
12961296
.NET:
12971297
versions:
1298-
- sdk_version: 3
1299-
github: dotnetv3/dynamodb
1298+
- sdk_version: 4
1299+
github: dotnetv4/DynamoDB
13001300
excerpts:
13011301
- description:
13021302
snippet_tags:
1303-
- DynamoDB.dotnetv3.dynamodb-basics.QueryItems
1303+
- DynamoDB.dotnetv4.dynamodb-basics.QueryItems
13041304
C++:
13051305
versions:
13061306
- sdk_version: 1
@@ -1436,12 +1436,12 @@ dynamodb_Scan:
14361436
languages:
14371437
.NET:
14381438
versions:
1439-
- sdk_version: 3
1440-
github: dotnetv3/dynamodb
1439+
- sdk_version: 4
1440+
github: dotnetv4/DynamoDB
14411441
excerpts:
14421442
- description:
14431443
snippet_tags:
1444-
- DynamoDB.dotnetv3.dynamodb-basics.ScanTable
1444+
- DynamoDB.dotnetv4.dynamodb-basics.ScanTable
14451445
C++:
14461446
versions:
14471447
- sdk_version: 1
@@ -1872,39 +1872,39 @@ dynamodb_Scenario_GettingStartedMovies:
18721872
languages:
18731873
.NET:
18741874
versions:
1875-
- sdk_version: 3
1876-
github: dotnetv3/dynamodb
1875+
- sdk_version: 4
1876+
github: dotnetv4/DynamoDB
18771877
excerpts:
18781878
- description:
18791879
snippet_tags:
18801880
- DynamoDB.dotnetv3.DynamoDB_Basics_Scenario
18811881
- description: Creates a table to contain movie data.
18821882
snippet_tags:
1883-
- DynamoDB.dotnetv3.dynamodb-basics.CreateTable
1883+
- DynamoDB.dotnetv4.dynamodb-basics.CreateTable
18841884
- description: Adds a single movie to the table.
18851885
snippet_tags:
1886-
- DynamoDB.dotnetv3.dynamodb-basics.PutItem
1886+
- DynamoDB.dotnetv4.dynamodb-basics.PutItem
18871887
- description: Updates a single item in a table.
18881888
snippet_tags:
1889-
- DynamoDB.dotnetv3.dynamodb-basics.UpdateItem
1889+
- DynamoDB.dotnetv4.dynamodb-basics.UpdateItem
18901890
- description: Retrieves a single item from the movie table.
18911891
snippet_tags:
1892-
- DynamoDB.dotnetv3.dynamodb-basics.GetItem
1892+
- DynamoDB.dotnetv4.dynamodb-basics.GetItem
18931893
- description: Writes a batch of items to the movie table.
18941894
snippet_tags:
1895-
- DynamoDB.dotnetv3.dynamodb-basics.BatchWriteItem
1895+
- DynamoDB.dotnetv4.dynamodb-basics.BatchWriteItem
18961896
- description: Deletes a single item from the table.
18971897
snippet_tags:
1898-
- DynamoDB.dotnetv3.dynamodb-basics.DeleteItem
1898+
- DynamoDB.dotnetv4.dynamodb-basics.DeleteItem
18991899
- description: Queries the table for movies released in a particular year.
19001900
snippet_tags:
1901-
- DynamoDB.dotnetv3.dynamodb-basics.QueryItems
1901+
- DynamoDB.dotnetv4.dynamodb-basics.QueryItems
19021902
- description: Scans the table for movies released in a range of years.
19031903
snippet_tags:
1904-
- DynamoDB.dotnetv3.dynamodb-basics.ScanTable
1904+
- DynamoDB.dotnetv4.dynamodb-basics.ScanTable
19051905
- description: Deletes the movie table.
19061906
snippet_tags:
1907-
- DynamoDB.dotnetv3.dynamodb-basics.DeleteTableExample
1907+
- DynamoDB.dotnetv4.dynamodb-basics.DeleteTableExample
19081908
Go:
19091909
versions:
19101910
- sdk_version: 2

dotnetv4/DotNetV4Examples.sln

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlTowerBasics", "Contr
141141
EndProject
142142
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlTowerActions", "ControlTower\Actions\ControlTowerActions.csproj", "{9D601495-FDBA-C852-4ACB-EC54EDC9B3E5}"
143143
EndProject
144+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DynamoDB", "DynamoDB", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}"
145+
EndProject
146+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamoDBTests", "DynamoDB\Tests\DynamoDBTests.csproj", "{F578CA07-E74F-4F47-9203-C67777D9BB78}"
147+
EndProject
148+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basics", "DynamoDB\Scenarios\DynamoDB_Basics\Basics.csproj", "{E10920BB-6409-41BB-9A9D-813BC37CC3C0}"
149+
EndProject
150+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamoDBActions", "DynamoDB\Actions\DynamoDBActions.csproj", "{B0F91FE2-6AC5-4FA8-B321-54623A516D4D}"
151+
EndProject
152+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scenarios", "Scenarios", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
153+
EndProject
144154
Global
145155
GlobalSection(SolutionConfigurationPlatforms) = preSolution
146156
Debug|Any CPU = Debug|Any CPU
@@ -343,6 +353,18 @@ Global
343353
{9D601495-FDBA-C852-4ACB-EC54EDC9B3E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
344354
{9D601495-FDBA-C852-4ACB-EC54EDC9B3E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
345355
{9D601495-FDBA-C852-4ACB-EC54EDC9B3E5}.Release|Any CPU.Build.0 = Release|Any CPU
356+
{F578CA07-E74F-4F47-9203-C67777D9BB78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
357+
{F578CA07-E74F-4F47-9203-C67777D9BB78}.Debug|Any CPU.Build.0 = Debug|Any CPU
358+
{F578CA07-E74F-4F47-9203-C67777D9BB78}.Release|Any CPU.ActiveCfg = Release|Any CPU
359+
{F578CA07-E74F-4F47-9203-C67777D9BB78}.Release|Any CPU.Build.0 = Release|Any CPU
360+
{E10920BB-6409-41BB-9A9D-813BC37CC3C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
361+
{E10920BB-6409-41BB-9A9D-813BC37CC3C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
362+
{E10920BB-6409-41BB-9A9D-813BC37CC3C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
363+
{E10920BB-6409-41BB-9A9D-813BC37CC3C0}.Release|Any CPU.Build.0 = Release|Any CPU
364+
{B0F91FE2-6AC5-4FA8-B321-54623A516D4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
365+
{B0F91FE2-6AC5-4FA8-B321-54623A516D4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
366+
{B0F91FE2-6AC5-4FA8-B321-54623A516D4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
367+
{B0F91FE2-6AC5-4FA8-B321-54623A516D4D}.Release|Any CPU.Build.0 = Release|Any CPU
346368
EndGlobalSection
347369
GlobalSection(SolutionProperties) = preSolution
348370
HideSolutionNode = FALSE
@@ -407,6 +429,10 @@ Global
407429
{6BE1D9A4-1832-49F5-8682-6DEE4A7D6232} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
408430
{6B1F00FF-7F1D-C5D8-A8D3-E0EF2886B8C6} = {6BE1D9A4-1832-49F5-8682-6DEE4A7D6232}
409431
{9D601495-FDBA-C852-4ACB-EC54EDC9B3E5} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
432+
{F578CA07-E74F-4F47-9203-C67777D9BB78} = {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
433+
{E10920BB-6409-41BB-9A9D-813BC37CC3C0} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
434+
{B0F91FE2-6AC5-4FA8-B321-54623A516D4D} = {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
435+
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
410436
EndGlobalSection
411437
GlobalSection(ExtensibilityGlobals) = postSolution
412438
SolutionGuid = {08502818-E8E1-4A91-A51C-4C8C8D4FF9CA}

dotnetv4/DynamoDB/Actions/DynamoDbWrapper.cs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public DynamoDbWrapper(IAmazonDynamoDB amazonDynamoDB)
3030
/// Creates a new Amazon DynamoDB table and then waits for the new
3131
/// table to become active.
3232
/// </summary>
33-
/// <param name="client">An initialized Amazon DynamoDB client object.</param>
3433
/// <param name="tableName">The name of the table to create.</param>
3534
/// <returns>A Boolean value indicating the success of the operation.</returns>
3635
public async Task<bool> CreateMovieTableAsync(string tableName)
@@ -118,7 +117,6 @@ public async Task<bool> CreateMovieTableAsync(string tableName)
118117
/// <summary>
119118
/// Adds a new item to the table.
120119
/// </summary>
121-
/// <param name="client">An initialized Amazon DynamoDB client object.</param>
122120
/// <param name="newMovie">A Movie object containing informtation for
123121
/// the movie to add to the table.</param>
124122
/// <param name="tableName">The name of the table where the item will be added.</param>
@@ -166,7 +164,6 @@ public async Task<bool> PutItemAsync(Movie newMovie, string tableName)
166164
/// <summary>
167165
/// Updates an existing item in the movies table.
168166
/// </summary>
169-
/// <param name="client">An initialized Amazon DynamoDB client object.</param>
170167
/// <param name="newMovie">A Movie object containing information for
171168
/// the movie to update.</param>
172169
/// <param name="newInfo">A MovieInfo object that contains the
@@ -234,7 +231,6 @@ public async Task<bool> UpdateItemAsync(
234231
/// <summary>
235232
/// Gets information about an existing movie from the table.
236233
/// </summary>
237-
/// <param name="client">An initialized Amazon DynamoDB client object.</param>
238234
/// <param name="newMovie">A Movie object containing information about
239235
/// the movie to retrieve.</param>
240236
/// <param name="tableName">The name of the table containing the movie.</param>
@@ -284,7 +280,7 @@ public async Task<Dictionary<string, AttributeValue>> GetItemAsync(Movie newMovi
284280
/// Loads the contents of a JSON file into a list of movies to be
285281
/// added to the DynamoDB table.
286282
/// </summary>
287-
/// <param name="movieFileName">The full path to the JSON file.</param>
283+
/// <param name="movieFileName">The name of the JSON file.</param>
288284
/// <returns>A generic list of movie objects.</returns>
289285
public List<Movie> ImportMovies(string movieFileName)
290286
{
@@ -314,9 +310,9 @@ public List<Movie> ImportMovies(string movieFileName)
314310
/// <summary>
315311
/// Writes 250 items to the movie table.
316312
/// </summary>
317-
/// <param name="client">The initialized DynamoDB client object.</param>
318313
/// <param name="movieFileName">A string containing the full path to
319314
/// the JSON file containing movie data.</param>
315+
/// <param name="tableName">The name of the table to write items to.</param>
320316
/// <returns>A long integer value representing the number of movies
321317
/// imported from the JSON file.</returns>
322318
public async Task<long> BatchWriteItemsAsync(
@@ -372,7 +368,6 @@ public async Task<long> BatchWriteItemsAsync(
372368
/// <summary>
373369
/// Deletes a single item from a DynamoDB table.
374370
/// </summary>
375-
/// <param name="client">The initialized DynamoDB client object.</param>
376371
/// <param name="tableName">The name of the table from which the item
377372
/// will be deleted.</param>
378373
/// <param name="movieToDelete">A movie object containing the title and
@@ -421,7 +416,6 @@ public async Task<bool> DeleteItemAsync(
421416
/// Queries the table for movies released in a particular year and
422417
/// then displays the information for the movies returned.
423418
/// </summary>
424-
/// <param name="client">The initialized DynamoDB client object.</param>
425419
/// <param name="tableName">The name of the table to query.</param>
426420
/// <param name="year">The release year for which we want to
427421
/// view movies.</param>
@@ -491,6 +485,13 @@ public async Task<int> QueryMoviesAsync(string tableName, int year)
491485
// snippet-end:[DynamoDB.dotnetv4.dynamodb-basics.QueryItems]
492486

493487
// snippet-start:[DynamoDB.dotnetv4.dynamodb-basics.ScanTable]
488+
/// <summary>
489+
/// Scans the table for movies released between the specified years.
490+
/// </summary>
491+
/// <param name="tableName">The name of the table to scan.</param>
492+
/// <param name="startYear">The starting year for the range.</param>
493+
/// <param name="endYear">The ending year for the range.</param>
494+
/// <returns>The number of movies found in the specified year range.</returns>
494495
public async Task<int> ScanTableAsync(
495496
string tableName,
496497
int startYear,
@@ -549,6 +550,11 @@ public async Task<int> ScanTableAsync(
549550
// snippet-end:[DynamoDB.dotnetv4.dynamodb-basics.ScanTable]
550551

551552
// snippet-start:[DynamoDB.dotnetv4.dynamodb-basics.DeleteTableExample]
553+
/// <summary>
554+
/// Deletes a DynamoDB table.
555+
/// </summary>
556+
/// <param name="tableName">The name of the table to delete.</param>
557+
/// <returns>A Boolean value indicating the success of the operation.</returns>
552558
public async Task<bool> DeleteTableAsync(string tableName)
553559
{
554560
try

dotnetv4/DynamoDB/Actions/HelloDynamoDB.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace DynamoDBActions;
1111

12+
/// <summary>
13+
/// A simple example that demonstrates basic DynamoDB operations.
14+
/// </summary>
1215
public class HelloDynamoDB
1316
{
1417
/// <summary>

dotnetv4/DynamoDB/Actions/Movie.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,29 @@
55

66
namespace DynamoDBActions;
77

8+
/// <summary>
9+
/// Represents a movie entity for DynamoDB operations.
10+
/// </summary>
811
[DynamoDBTable("movie_table")]
912
public class Movie
1013
{
14+
/// <summary>
15+
/// Gets or sets the year the movie was released. This serves as the hash key.
16+
/// </summary>
1117
[DynamoDBHashKey]
1218
[DynamoDBProperty("year")]
1319
public int Year { get; set; }
1420

21+
/// <summary>
22+
/// Gets or sets the title of the movie. This serves as the range key.
23+
/// </summary>
1524
[DynamoDBRangeKey]
1625
[DynamoDBProperty("title")]
1726
public string Title { get; set; } = null!;
1827

28+
/// <summary>
29+
/// Gets or sets additional information about the movie.
30+
/// </summary>
1931
[DynamoDBProperty("info")]
2032
public MovieInfo Info { get; set; } = null!;
2133
}

0 commit comments

Comments
 (0)