1515use AsyncAws \DynamoDb \ValueObject \GlobalSecondaryIndex ;
1616use AsyncAws \DynamoDb \ValueObject \KeySchemaElement ;
1717use AsyncAws \DynamoDb \ValueObject \LocalSecondaryIndex ;
18+ use AsyncAws \DynamoDb \ValueObject \OnDemandThroughput ;
1819use AsyncAws \DynamoDb \ValueObject \Projection ;
1920use AsyncAws \DynamoDb \ValueObject \ProvisionedThroughput ;
2021use AsyncAws \DynamoDb \ValueObject \SSESpecification ;
@@ -221,19 +222,26 @@ final class CreateTableInput extends Input
221222 /**
222223 * An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.
223224 *
224- * When you attach a resource-based policy while creating a table, the policy creation is *strongly consistent*.
225+ * When you attach a resource-based policy while creating a table, the policy application is *strongly consistent*.
225226 *
226227 * The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when
227- * calculating the size of a policy against this limit. You can’t request an increase for this limit. For a full list
228- * of all considerations that you should keep in mind while attaching a resource-based policy, see Resource-based policy
229- * considerations [^1].
228+ * calculating the size of a policy against this limit. For a full list of all considerations that apply for
229+ * resource-based policies, see Resource-based policy considerations [^1].
230230 *
231231 * [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html
232232 *
233233 * @var string|null
234234 */
235235 private $ resourcePolicy ;
236236
237+ /**
238+ * Sets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this
239+ * parameter, you must specify `MaxReadRequestUnits`, `MaxWriteRequestUnits`, or both.
240+ *
241+ * @var OnDemandThroughput|null
242+ */
243+ private $ onDemandThroughput ;
244+
237245 /**
238246 * @param array{
239247 * AttributeDefinitions?: array<AttributeDefinition|array>,
@@ -249,6 +257,7 @@ final class CreateTableInput extends Input
249257 * TableClass?: null|TableClass::*,
250258 * DeletionProtectionEnabled?: null|bool,
251259 * ResourcePolicy?: null|string,
260+ * OnDemandThroughput?: null|OnDemandThroughput|array,
252261 * '@region'?: string|null,
253262 * } $input
254263 */
@@ -267,6 +276,7 @@ public function __construct(array $input = [])
267276 $ this ->tableClass = $ input ['TableClass ' ] ?? null ;
268277 $ this ->deletionProtectionEnabled = $ input ['DeletionProtectionEnabled ' ] ?? null ;
269278 $ this ->resourcePolicy = $ input ['ResourcePolicy ' ] ?? null ;
279+ $ this ->onDemandThroughput = isset ($ input ['OnDemandThroughput ' ]) ? OnDemandThroughput::create ($ input ['OnDemandThroughput ' ]) : null ;
270280 parent ::__construct ($ input );
271281 }
272282
@@ -285,6 +295,7 @@ public function __construct(array $input = [])
285295 * TableClass?: null|TableClass::*,
286296 * DeletionProtectionEnabled?: null|bool,
287297 * ResourcePolicy?: null|string,
298+ * OnDemandThroughput?: null|OnDemandThroughput|array,
288299 * '@region'?: string|null,
289300 * }|CreateTableInput $input
290301 */
@@ -338,6 +349,11 @@ public function getLocalSecondaryIndexes(): array
338349 return $ this ->localSecondaryIndexes ?? [];
339350 }
340351
352+ public function getOnDemandThroughput (): ?OnDemandThroughput
353+ {
354+ return $ this ->onDemandThroughput ;
355+ }
356+
341357 public function getProvisionedThroughput (): ?ProvisionedThroughput
342358 {
343359 return $ this ->provisionedThroughput ;
@@ -461,6 +477,13 @@ public function setLocalSecondaryIndexes(array $value): self
461477 return $ this ;
462478 }
463479
480+ public function setOnDemandThroughput (?OnDemandThroughput $ value ): self
481+ {
482+ $ this ->onDemandThroughput = $ value ;
483+
484+ return $ this ;
485+ }
486+
464487 public function setProvisionedThroughput (?ProvisionedThroughput $ value ): self
465488 {
466489 $ this ->provisionedThroughput = $ value ;
@@ -596,6 +619,9 @@ private function requestBody(): array
596619 if (null !== $ v = $ this ->resourcePolicy ) {
597620 $ payload ['ResourcePolicy ' ] = $ v ;
598621 }
622+ if (null !== $ v = $ this ->onDemandThroughput ) {
623+ $ payload ['OnDemandThroughput ' ] = $ v ->requestBody ();
624+ }
599625
600626 return $ payload ;
601627 }
0 commit comments