Skip to content

Commit 5ab4b1a

Browse files
Update generated code (#1691)
* update generated code * Update src/Service/DynamoDb/CHANGELOG.md --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent 80fc408 commit 5ab4b1a

23 files changed

+81
-27
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: This release modifies the existing 'CreateTable' API for the resource-based policy support. It also modifies several APIs to accept a 'TableArn' for the 'TableName' parameter.
8+
59
### Changed
610

711
- AWS enhancement: Documentation updates.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"extra": {
3434
"branch-alias": {
35-
"dev-master": "3.1-dev"
35+
"dev-master": "3.2-dev"
3636
}
3737
}
3838
}

src/DynamoDbClient.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ public function batchWriteItem($input): BatchWriteItemOutput
278278
* Tags?: null|array<Tag|array>,
279279
* TableClass?: null|TableClass::*,
280280
* DeletionProtectionEnabled?: null|bool,
281+
* ResourcePolicy?: null|string,
281282
* '@region'?: string|null,
282283
* }|CreateTableInput $input
283284
*
@@ -976,8 +977,8 @@ public function updateItem($input): UpdateItemOutput
976977
* perform other operations.
977978
*
978979
* `UpdateTable` is an asynchronous operation; while it's executing, the table status changes from `ACTIVE` to
979-
* `UPDATING`. While it's `UPDATING`, you can't issue another `UpdateTable` request on the base table nor any replicas.
980-
* When the table returns to the `ACTIVE` state, the `UpdateTable` operation is complete.
980+
* `UPDATING`. While it's `UPDATING`, you can't issue another `UpdateTable` request. When the table returns to the
981+
* `ACTIVE` state, the `UpdateTable` operation is complete.
981982
*
982983
* [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html
983984
*

src/Input/BatchGetItemInput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
final class BatchGetItemInput extends Input
1616
{
1717
/**
18-
* A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that
19-
* table. Each table name can be used only once per `BatchGetItem` request.
18+
* A map of one or more table names or table ARNs and, for each table, a map that describes one or more items to
19+
* retrieve from that table. Each table name or ARN can be used only once per `BatchGetItem` request.
2020
*
2121
* Each element in the map of items to retrieve consists of the following:
2222
*

src/Input/BatchWriteItemInput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
final class BatchWriteItemInput extends Input
1717
{
1818
/**
19-
* A map of one or more table names and, for each table, a list of operations to be performed (`DeleteRequest` or
20-
* `PutRequest`). Each element in the map consists of the following:
19+
* A map of one or more table names or table ARNs and, for each table, a list of operations to be performed
20+
* (`DeleteRequest` or `PutRequest`). Each element in the map consists of the following:
2121
*
2222
* - `DeleteRequest` - Perform a `DeleteItem` operation on the specified item. The item to be deleted is identified by a
2323
* `Key` subelement:

src/Input/CreateTableInput.php

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
}

src/Input/DeleteItemInput.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
final class DeleteItemInput extends Input
2121
{
2222
/**
23-
* The name of the table from which to delete the item.
23+
* The name of the table from which to delete the item. You can also provide the Amazon Resource Name (ARN) of the table
24+
* in this parameter.
2425
*
2526
* @required
2627
*

src/Input/DeleteTableInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
final class DeleteTableInput extends Input
1414
{
1515
/**
16-
* The name of the table to delete.
16+
* The name of the table to delete. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
1717
*
1818
* @required
1919
*

src/Input/DescribeTableInput.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
final class DescribeTableInput extends Input
1414
{
1515
/**
16-
* The name of the table to describe.
16+
* The name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this
17+
* parameter.
1718
*
1819
* @required
1920
*

src/Input/GetItemInput.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
final class GetItemInput extends Input
1616
{
1717
/**
18-
* The name of the table containing the requested item.
18+
* The name of the table containing the requested item. You can also provide the Amazon Resource Name (ARN) of the table
19+
* in this parameter.
1920
*
2021
* @required
2122
*

0 commit comments

Comments
 (0)