@@ -36,7 +36,7 @@ final class CreateTableInput extends Input
3636 private $ attributeDefinitions ;
3737
3838 /**
39- * The name of the table to create.
39+ * The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
4040 *
4141 * @required
4242 *
@@ -218,6 +218,22 @@ final class CreateTableInput extends Input
218218 */
219219 private $ deletionProtectionEnabled ;
220220
221+ /**
222+ * An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.
223+ *
224+ * When you attach a resource-based policy while creating a table, the policy creation is *strongly consistent*.
225+ *
226+ * 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].
230+ *
231+ * [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html
232+ *
233+ * @var string|null
234+ */
235+ private $ resourcePolicy ;
236+
221237 /**
222238 * @param array{
223239 * AttributeDefinitions?: array<AttributeDefinition|array>,
@@ -232,6 +248,7 @@ final class CreateTableInput extends Input
232248 * Tags?: null|array<Tag|array>,
233249 * TableClass?: null|TableClass::*,
234250 * DeletionProtectionEnabled?: null|bool,
251+ * ResourcePolicy?: null|string,
235252 * '@region'?: string|null,
236253 * } $input
237254 */
@@ -249,6 +266,7 @@ public function __construct(array $input = [])
249266 $ this ->tags = isset ($ input ['Tags ' ]) ? array_map ([Tag::class, 'create ' ], $ input ['Tags ' ]) : null ;
250267 $ this ->tableClass = $ input ['TableClass ' ] ?? null ;
251268 $ this ->deletionProtectionEnabled = $ input ['DeletionProtectionEnabled ' ] ?? null ;
269+ $ this ->resourcePolicy = $ input ['ResourcePolicy ' ] ?? null ;
252270 parent ::__construct ($ input );
253271 }
254272
@@ -266,6 +284,7 @@ public function __construct(array $input = [])
266284 * Tags?: null|array<Tag|array>,
267285 * TableClass?: null|TableClass::*,
268286 * DeletionProtectionEnabled?: null|bool,
287+ * ResourcePolicy?: null|string,
269288 * '@region'?: string|null,
270289 * }|CreateTableInput $input
271290 */
@@ -324,6 +343,11 @@ public function getProvisionedThroughput(): ?ProvisionedThroughput
324343 return $ this ->provisionedThroughput ;
325344 }
326345
346+ public function getResourcePolicy (): ?string
347+ {
348+ return $ this ->resourcePolicy ;
349+ }
350+
327351 public function getSseSpecification (): ?SSESpecification
328352 {
329353 return $ this ->sseSpecification ;
@@ -444,6 +468,13 @@ public function setProvisionedThroughput(?ProvisionedThroughput $value): self
444468 return $ this ;
445469 }
446470
471+ public function setResourcePolicy (?string $ value ): self
472+ {
473+ $ this ->resourcePolicy = $ value ;
474+
475+ return $ this ;
476+ }
477+
447478 public function setSseSpecification (?SSESpecification $ value ): self
448479 {
449480 $ this ->sseSpecification = $ value ;
@@ -562,6 +593,9 @@ private function requestBody(): array
562593 if (null !== $ v = $ this ->deletionProtectionEnabled ) {
563594 $ payload ['DeletionProtectionEnabled ' ] = (bool ) $ v ;
564595 }
596+ if (null !== $ v = $ this ->resourcePolicy ) {
597+ $ payload ['ResourcePolicy ' ] = $ v ;
598+ }
565599
566600 return $ payload ;
567601 }
0 commit comments