@@ -71,26 +71,22 @@ public static async Task<DescribeTableResponse> CreateTableProductCatalog(IAmazo
7171 {
7272 TableName = tableName ,
7373 AttributeDefinitions = new List < AttributeDefinition > ( )
74- {
75- new AttributeDefinition
76- {
77- AttributeName = "Id" ,
78- AttributeType = ScalarAttributeType . N ,
79- } ,
80- } ,
74+ {
75+ new AttributeDefinition
76+ {
77+ AttributeName = "Id" ,
78+ AttributeType = ScalarAttributeType . N ,
79+ } ,
80+ } ,
8181 KeySchema = new List < KeySchemaElement > ( )
82- {
83- new KeySchemaElement
84- {
85- AttributeName = "Id" ,
86- KeyType = KeyType . HASH ,
87- } ,
88- } ,
89- ProvisionedThroughput = new ProvisionedThroughput
82+ {
83+ new KeySchemaElement
9084 {
91- ReadCapacityUnits = 10 ,
92- WriteCapacityUnits = 5 ,
85+ AttributeName = "Id" ,
86+ KeyType = KeyType . HASH ,
9387 } ,
88+ } ,
89+ BillingMode = BillingMode . PAY_PER_REQUEST ,
9490 } ) ;
9591
9692 var result = await WaitTillTableCreated ( client , tableName , response ) ;
@@ -112,26 +108,22 @@ public static async Task<DescribeTableResponse> CreateTableForum(IAmazonDynamoDB
112108 {
113109 TableName = tableName ,
114110 AttributeDefinitions = new List < AttributeDefinition > ( )
115- {
116- new AttributeDefinition
117- {
118- AttributeName = "Name" ,
119- AttributeType = ScalarAttributeType . S ,
120- } ,
121- } ,
111+ {
112+ new AttributeDefinition
113+ {
114+ AttributeName = "Name" ,
115+ AttributeType = ScalarAttributeType . S ,
116+ } ,
117+ } ,
122118 KeySchema = new List < KeySchemaElement > ( )
123- {
124- new KeySchemaElement
125- {
126- AttributeName = "Name" ,
127- KeyType = KeyType . HASH ,
128- } ,
129- } ,
130- ProvisionedThroughput = new ProvisionedThroughput
119+ {
120+ new KeySchemaElement
131121 {
132- ReadCapacityUnits = 10 ,
133- WriteCapacityUnits = 5 ,
122+ AttributeName = "Name" ,
123+ KeyType = KeyType . HASH ,
134124 } ,
125+ } ,
126+ BillingMode = BillingMode . PAY_PER_REQUEST ,
135127 } ) ;
136128
137129 var result = await WaitTillTableCreated ( client , tableName , response ) ;
@@ -154,36 +146,32 @@ public static async Task<DescribeTableResponse> CreateTableThread(IAmazonDynamoD
154146 {
155147 TableName = tableName ,
156148 AttributeDefinitions = new List < AttributeDefinition > ( )
157- {
158- new AttributeDefinition
159- {
160- AttributeName = "ForumName" , // Hash attribute.
161- AttributeType = ScalarAttributeType . S ,
162- } ,
163- new AttributeDefinition
164- {
165- AttributeName = "Subject" ,
166- AttributeType = ScalarAttributeType . S ,
167- } ,
168- } ,
149+ {
150+ new AttributeDefinition
151+ {
152+ AttributeName = "ForumName" , // Hash attribute.
153+ AttributeType = ScalarAttributeType . S ,
154+ } ,
155+ new AttributeDefinition
156+ {
157+ AttributeName = "Subject" ,
158+ AttributeType = ScalarAttributeType . S ,
159+ } ,
160+ } ,
169161 KeySchema = new List < KeySchemaElement > ( )
170- {
171- new KeySchemaElement
172- {
173- AttributeName = "ForumName" , // Hash attribute
174- KeyType = KeyType . HASH ,
175- } ,
176- new KeySchemaElement
177- {
178- AttributeName = "Subject" , // Range attribute
179- KeyType = KeyType . RANGE ,
180- } ,
181- } ,
182- ProvisionedThroughput = new ProvisionedThroughput
162+ {
163+ new KeySchemaElement
164+ {
165+ AttributeName = "ForumName" , // Hash attribute
166+ KeyType = KeyType . HASH ,
167+ } ,
168+ new KeySchemaElement
183169 {
184- ReadCapacityUnits = 10 ,
185- WriteCapacityUnits = 5 ,
170+ AttributeName = "Subject" , // Range attribute
171+ KeyType = KeyType . RANGE ,
186172 } ,
173+ } ,
174+ BillingMode = BillingMode . PAY_PER_REQUEST ,
187175 } ) ;
188176
189177 var result = await WaitTillTableCreated ( client , tableName , response ) ;
@@ -256,11 +244,7 @@ public static async Task<DescribeTableResponse> CreateTableReply(IAmazonDynamoDB
256244 } ,
257245 } ,
258246 } ,
259- ProvisionedThroughput = new ProvisionedThroughput
260- {
261- ReadCapacityUnits = 10 ,
262- WriteCapacityUnits = 5 ,
263- } ,
247+ BillingMode = BillingMode . PAY_PER_REQUEST ,
264248 } ) ;
265249
266250 var result = await WaitTillTableCreated ( client , tableName , response ) ;
0 commit comments