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

+4
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

+1-1
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

+3-2
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

+2-2
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

+2-2
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

+35-1
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

+2-1
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

+1-1
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

+2-1
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

+2-1
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
*

src/Input/PutItemInput.php

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

src/Input/QueryInput.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
final class QueryInput extends Input
1919
{
2020
/**
21-
* The name of the table containing the requested items.
21+
* The name of the table containing the requested items. You can also provide the Amazon Resource Name (ARN) of the
22+
* table in this parameter.
2223
*
2324
* @required
2425
*

src/Input/ScanInput.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
final class ScanInput extends Input
1919
{
2020
/**
21-
* The name of the table containing the requested items; or, if you provide `IndexName`, the name of the table to which
21+
* The name of the table containing the requested items or if you provide `IndexName`, the name of the table to which
2222
* that index belongs.
2323
*
24+
* You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
25+
*
2426
* @required
2527
*
2628
* @var string|null

src/Input/UpdateItemInput.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
final class UpdateItemInput extends Input
2222
{
2323
/**
24-
* The name of the table containing the item to update.
24+
* The name of the table containing the item to update. You can also provide the Amazon Resource Name (ARN) of the table
25+
* in this parameter.
2526
*
2627
* @required
2728
*

src/Input/UpdateTableInput.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ final class UpdateTableInput extends Input
2929
private $attributeDefinitions;
3030

3131
/**
32-
* The name of the table to be updated.
32+
* The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this
33+
* parameter.
3334
*
3435
* @required
3536
*

src/Input/UpdateTimeToLiveInput.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
final class UpdateTimeToLiveInput extends Input
1515
{
1616
/**
17-
* The name of the table to be configured.
17+
* The name of the table to be configured. You can also provide the Amazon Resource Name (ARN) of the table in this
18+
* parameter.
1819
*
1920
* @required
2021
*

src/Result/BatchGetItemOutput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
class BatchGetItemOutput extends Result implements \IteratorAggregate
2121
{
2222
/**
23-
* A map of table name to a list of items. Each object in `Responses` consists of a table name, along with a map of
24-
* attribute data consisting of the data type and attribute value.
23+
* A map of table name or table ARN to a list of items. Each object in `Responses` consists of a table name or ARN,
24+
* along with a map of attribute data consisting of the data type and attribute value.
2525
*
2626
* @var array<string, array<string, AttributeValue>[]>
2727
*/

src/Result/BatchWriteItemOutput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class BatchWriteItemOutput extends Result
2222
* same form as `RequestItems`, so you can provide this value directly to a subsequent `BatchWriteItem` operation. For
2323
* more information, see `RequestItems` in the Request Parameters section.
2424
*
25-
* Each `UnprocessedItems` entry consists of a table name and, for that table, a list of operations to perform
26-
* (`DeleteRequest` or `PutRequest`).
25+
* Each `UnprocessedItems` entry consists of a table name or table ARN and, for that table, a list of operations to
26+
* perform (`DeleteRequest` or `PutRequest`).
2727
*
2828
* - `DeleteRequest` - Perform a `DeleteItem` operation on the specified item. The item to be deleted is identified by a
2929
* `Key` subelement:

src/ValueObject/ConditionCheck.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ final class ConditionCheck
1919
private $key;
2020

2121
/**
22-
* Name of the table for the check item request.
22+
* Name of the table for the check item request. You can also provide the Amazon Resource Name (ARN) of the table in
23+
* this parameter.
2324
*
2425
* @var string
2526
*/

src/ValueObject/ConsumedCapacity.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
final class ConsumedCapacity
1414
{
1515
/**
16-
* The name of the table that was affected by the operation.
16+
* The name of the table that was affected by the operation. If you had specified the Amazon Resource Name (ARN) of a
17+
* table in the input, you'll see the table ARN in the response.
1718
*
1819
* @var string|null
1920
*/

src/ValueObject/Delete.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ final class Delete
1818
private $key;
1919

2020
/**
21-
* Name of the table in which the item to be deleted resides.
21+
* Name of the table in which the item to be deleted resides. You can also provide the Amazon Resource Name (ARN) of the
22+
* table in this parameter.
2223
*
2324
* @var string
2425
*/

src/ValueObject/Put.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ final class Put
2121
private $item;
2222

2323
/**
24-
* Name of the table in which to write the item.
24+
* Name of the table in which to write the item. You can also provide the Amazon Resource Name (ARN) of the table in
25+
* this parameter.
2526
*
2627
* @var string
2728
*/

src/ValueObject/Update.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ final class Update
2626
private $updateExpression;
2727

2828
/**
29-
* Name of the table for the `UpdateItem` request.
29+
* Name of the table for the `UpdateItem` request. You can also provide the Amazon Resource Name (ARN) of the table in
30+
* this parameter.
3031
*
3132
* @var string
3233
*/

0 commit comments

Comments
 (0)