@@ -36,7 +36,7 @@ final class CreateTableInput extends Input
36
36
private $ attributeDefinitions ;
37
37
38
38
/**
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.
40
40
*
41
41
* @required
42
42
*
@@ -218,6 +218,22 @@ final class CreateTableInput extends Input
218
218
*/
219
219
private $ deletionProtectionEnabled ;
220
220
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
+
221
237
/**
222
238
* @param array{
223
239
* AttributeDefinitions?: array<AttributeDefinition|array>,
@@ -232,6 +248,7 @@ final class CreateTableInput extends Input
232
248
* Tags?: null|array<Tag|array>,
233
249
* TableClass?: null|TableClass::*,
234
250
* DeletionProtectionEnabled?: null|bool,
251
+ * ResourcePolicy?: null|string,
235
252
* '@region'?: string|null,
236
253
* } $input
237
254
*/
@@ -249,6 +266,7 @@ public function __construct(array $input = [])
249
266
$ this ->tags = isset ($ input ['Tags ' ]) ? array_map ([Tag::class, 'create ' ], $ input ['Tags ' ]) : null ;
250
267
$ this ->tableClass = $ input ['TableClass ' ] ?? null ;
251
268
$ this ->deletionProtectionEnabled = $ input ['DeletionProtectionEnabled ' ] ?? null ;
269
+ $ this ->resourcePolicy = $ input ['ResourcePolicy ' ] ?? null ;
252
270
parent ::__construct ($ input );
253
271
}
254
272
@@ -266,6 +284,7 @@ public function __construct(array $input = [])
266
284
* Tags?: null|array<Tag|array>,
267
285
* TableClass?: null|TableClass::*,
268
286
* DeletionProtectionEnabled?: null|bool,
287
+ * ResourcePolicy?: null|string,
269
288
* '@region'?: string|null,
270
289
* }|CreateTableInput $input
271
290
*/
@@ -324,6 +343,11 @@ public function getProvisionedThroughput(): ?ProvisionedThroughput
324
343
return $ this ->provisionedThroughput ;
325
344
}
326
345
346
+ public function getResourcePolicy (): ?string
347
+ {
348
+ return $ this ->resourcePolicy ;
349
+ }
350
+
327
351
public function getSseSpecification (): ?SSESpecification
328
352
{
329
353
return $ this ->sseSpecification ;
@@ -444,6 +468,13 @@ public function setProvisionedThroughput(?ProvisionedThroughput $value): self
444
468
return $ this ;
445
469
}
446
470
471
+ public function setResourcePolicy (?string $ value ): self
472
+ {
473
+ $ this ->resourcePolicy = $ value ;
474
+
475
+ return $ this ;
476
+ }
477
+
447
478
public function setSseSpecification (?SSESpecification $ value ): self
448
479
{
449
480
$ this ->sseSpecification = $ value ;
@@ -562,6 +593,9 @@ private function requestBody(): array
562
593
if (null !== $ v = $ this ->deletionProtectionEnabled ) {
563
594
$ payload ['DeletionProtectionEnabled ' ] = (bool ) $ v ;
564
595
}
596
+ if (null !== $ v = $ this ->resourcePolicy ) {
597
+ $ payload ['ResourcePolicy ' ] = $ v ;
598
+ }
565
599
566
600
return $ payload ;
567
601
}
0 commit comments