Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"variables": {
"${LATEST}": "3.301.3"
"${LATEST}": "3.301.4"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
4 changes: 4 additions & 0 deletions src/Service/DynamoDb/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Added

- 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.

### Changed

- AWS enhancement: Documentation updates.
Expand Down
2 changes: 1 addition & 1 deletion src/Service/DynamoDb/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
"dev-master": "3.2-dev"
}
}
}
5 changes: 3 additions & 2 deletions src/Service/DynamoDb/src/DynamoDbClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ public function batchWriteItem($input): BatchWriteItemOutput
* Tags?: null|array<Tag|array>,
* TableClass?: null|TableClass::*,
* DeletionProtectionEnabled?: null|bool,
* ResourcePolicy?: null|string,
* '@region'?: string|null,
* }|CreateTableInput $input
*
Expand Down Expand Up @@ -976,8 +977,8 @@ public function updateItem($input): UpdateItemOutput
* perform other operations.
*
* `UpdateTable` is an asynchronous operation; while it's executing, the table status changes from `ACTIVE` to
* `UPDATING`. While it's `UPDATING`, you can't issue another `UpdateTable` request on the base table nor any replicas.
* When the table returns to the `ACTIVE` state, the `UpdateTable` operation is complete.
* `UPDATING`. While it's `UPDATING`, you can't issue another `UpdateTable` request. When the table returns to the
* `ACTIVE` state, the `UpdateTable` operation is complete.
*
* [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html
*
Expand Down
4 changes: 2 additions & 2 deletions src/Service/DynamoDb/src/Input/BatchGetItemInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
final class BatchGetItemInput extends Input
{
/**
* A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that
* table. Each table name can be used only once per `BatchGetItem` request.
* A map of one or more table names or table ARNs and, for each table, a map that describes one or more items to
* retrieve from that table. Each table name or ARN can be used only once per `BatchGetItem` request.
*
* Each element in the map of items to retrieve consists of the following:
*
Expand Down
4 changes: 2 additions & 2 deletions src/Service/DynamoDb/src/Input/BatchWriteItemInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
final class BatchWriteItemInput extends Input
{
/**
* A map of one or more table names and, for each table, a list of operations to be performed (`DeleteRequest` or
* `PutRequest`). Each element in the map consists of the following:
* A map of one or more table names or table ARNs and, for each table, a list of operations to be performed
* (`DeleteRequest` or `PutRequest`). Each element in the map consists of the following:
*
* - `DeleteRequest` - Perform a `DeleteItem` operation on the specified item. The item to be deleted is identified by a
* `Key` subelement:
Expand Down
36 changes: 35 additions & 1 deletion src/Service/DynamoDb/src/Input/CreateTableInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class CreateTableInput extends Input
private $attributeDefinitions;

/**
* The name of the table to create.
* The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
*
* @required
*
Expand Down Expand Up @@ -218,6 +218,22 @@ final class CreateTableInput extends Input
*/
private $deletionProtectionEnabled;

/**
* An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.
*
* When you attach a resource-based policy while creating a table, the policy creation is *strongly consistent*.
*
* The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when
* calculating the size of a policy against this limit. You can’t request an increase for this limit. For a full list
* of all considerations that you should keep in mind while attaching a resource-based policy, see Resource-based policy
* considerations [^1].
*
* [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html
*
* @var string|null
*/
private $resourcePolicy;

/**
* @param array{
* AttributeDefinitions?: array<AttributeDefinition|array>,
Expand All @@ -232,6 +248,7 @@ final class CreateTableInput extends Input
* Tags?: null|array<Tag|array>,
* TableClass?: null|TableClass::*,
* DeletionProtectionEnabled?: null|bool,
* ResourcePolicy?: null|string,
* '@region'?: string|null,
* } $input
*/
Expand All @@ -249,6 +266,7 @@ public function __construct(array $input = [])
$this->tags = isset($input['Tags']) ? array_map([Tag::class, 'create'], $input['Tags']) : null;
$this->tableClass = $input['TableClass'] ?? null;
$this->deletionProtectionEnabled = $input['DeletionProtectionEnabled'] ?? null;
$this->resourcePolicy = $input['ResourcePolicy'] ?? null;
parent::__construct($input);
}

Expand All @@ -266,6 +284,7 @@ public function __construct(array $input = [])
* Tags?: null|array<Tag|array>,
* TableClass?: null|TableClass::*,
* DeletionProtectionEnabled?: null|bool,
* ResourcePolicy?: null|string,
* '@region'?: string|null,
* }|CreateTableInput $input
*/
Expand Down Expand Up @@ -324,6 +343,11 @@ public function getProvisionedThroughput(): ?ProvisionedThroughput
return $this->provisionedThroughput;
}

public function getResourcePolicy(): ?string
{
return $this->resourcePolicy;
}

public function getSseSpecification(): ?SSESpecification
{
return $this->sseSpecification;
Expand Down Expand Up @@ -444,6 +468,13 @@ public function setProvisionedThroughput(?ProvisionedThroughput $value): self
return $this;
}

public function setResourcePolicy(?string $value): self
{
$this->resourcePolicy = $value;

return $this;
}

public function setSseSpecification(?SSESpecification $value): self
{
$this->sseSpecification = $value;
Expand Down Expand Up @@ -562,6 +593,9 @@ private function requestBody(): array
if (null !== $v = $this->deletionProtectionEnabled) {
$payload['DeletionProtectionEnabled'] = (bool) $v;
}
if (null !== $v = $this->resourcePolicy) {
$payload['ResourcePolicy'] = $v;
}

return $payload;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/Input/DeleteItemInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
final class DeleteItemInput extends Input
{
/**
* The name of the table from which to delete the item.
* The name of the table from which to delete the item. You can also provide the Amazon Resource Name (ARN) of the table
* in this parameter.
*
* @required
*
Expand Down
2 changes: 1 addition & 1 deletion src/Service/DynamoDb/src/Input/DeleteTableInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
final class DeleteTableInput extends Input
{
/**
* The name of the table to delete.
* The name of the table to delete. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
*
* @required
*
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/Input/DescribeTableInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
final class DescribeTableInput extends Input
{
/**
* The name of the table to describe.
* The name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this
* parameter.
*
* @required
*
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/Input/GetItemInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
final class GetItemInput extends Input
{
/**
* The name of the table containing the requested item.
* The name of the table containing the requested item. You can also provide the Amazon Resource Name (ARN) of the table
* in this parameter.
*
* @required
*
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/Input/PutItemInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
final class PutItemInput extends Input
{
/**
* The name of the table to contain the item.
* The name of the table to contain the item. You can also provide the Amazon Resource Name (ARN) of the table in this
* parameter.
*
* @required
*
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/Input/QueryInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
final class QueryInput extends Input
{
/**
* The name of the table containing the requested items.
* The name of the table containing the requested items. You can also provide the Amazon Resource Name (ARN) of the
* table in this parameter.
*
* @required
*
Expand Down
4 changes: 3 additions & 1 deletion src/Service/DynamoDb/src/Input/ScanInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
final class ScanInput extends Input
{
/**
* The name of the table containing the requested items; or, if you provide `IndexName`, the name of the table to which
* The name of the table containing the requested items or if you provide `IndexName`, the name of the table to which
* that index belongs.
*
* You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
*
* @required
*
* @var string|null
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/Input/UpdateItemInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
final class UpdateItemInput extends Input
{
/**
* The name of the table containing the item to update.
* The name of the table containing the item to update. You can also provide the Amazon Resource Name (ARN) of the table
* in this parameter.
*
* @required
*
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/Input/UpdateTableInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ final class UpdateTableInput extends Input
private $attributeDefinitions;

/**
* The name of the table to be updated.
* The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this
* parameter.
*
* @required
*
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/Input/UpdateTimeToLiveInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
final class UpdateTimeToLiveInput extends Input
{
/**
* The name of the table to be configured.
* The name of the table to be configured. You can also provide the Amazon Resource Name (ARN) of the table in this
* parameter.
*
* @required
*
Expand Down
4 changes: 2 additions & 2 deletions src/Service/DynamoDb/src/Result/BatchGetItemOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
class BatchGetItemOutput extends Result implements \IteratorAggregate
{
/**
* A map of table name to a list of items. Each object in `Responses` consists of a table name, along with a map of
* attribute data consisting of the data type and attribute value.
* A map of table name or table ARN to a list of items. Each object in `Responses` consists of a table name or ARN,
* along with a map of attribute data consisting of the data type and attribute value.
*
* @var array<string, array<string, AttributeValue>[]>
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Service/DynamoDb/src/Result/BatchWriteItemOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class BatchWriteItemOutput extends Result
* same form as `RequestItems`, so you can provide this value directly to a subsequent `BatchWriteItem` operation. For
* more information, see `RequestItems` in the Request Parameters section.
*
* Each `UnprocessedItems` entry consists of a table name and, for that table, a list of operations to perform
* (`DeleteRequest` or `PutRequest`).
* Each `UnprocessedItems` entry consists of a table name or table ARN and, for that table, a list of operations to
* perform (`DeleteRequest` or `PutRequest`).
*
* - `DeleteRequest` - Perform a `DeleteItem` operation on the specified item. The item to be deleted is identified by a
* `Key` subelement:
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/ValueObject/ConditionCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ final class ConditionCheck
private $key;

/**
* Name of the table for the check item request.
* Name of the table for the check item request. You can also provide the Amazon Resource Name (ARN) of the table in
* this parameter.
*
* @var string
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/ValueObject/ConsumedCapacity.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
final class ConsumedCapacity
{
/**
* The name of the table that was affected by the operation.
* The name of the table that was affected by the operation. If you had specified the Amazon Resource Name (ARN) of a
* table in the input, you'll see the table ARN in the response.
*
* @var string|null
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/ValueObject/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ final class Delete
private $key;

/**
* Name of the table in which the item to be deleted resides.
* Name of the table in which the item to be deleted resides. You can also provide the Amazon Resource Name (ARN) of the
* table in this parameter.
*
* @var string
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/ValueObject/Put.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ final class Put
private $item;

/**
* Name of the table in which to write the item.
* Name of the table in which to write the item. You can also provide the Amazon Resource Name (ARN) of the table in
* this parameter.
*
* @var string
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Service/DynamoDb/src/ValueObject/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ final class Update
private $updateExpression;

/**
* Name of the table for the `UpdateItem` request.
* Name of the table for the `UpdateItem` request. You can also provide the Amazon Resource Name (ARN) of the table in
* this parameter.
*
* @var string
*/
Expand Down