diff --git a/manifest.json b/manifest.json index b8e8ccfb7..9de641c1c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.369.35" + "${LATEST}": "3.370.1" }, "endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json", "services": { diff --git a/src/Service/DynamoDb/CHANGELOG.md b/src/Service/DynamoDb/CHANGELOG.md index f5680ecfb..17b33bb9e 100644 --- a/src/Service/DynamoDb/CHANGELOG.md +++ b/src/Service/DynamoDb/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: This change supports the creation of multi-account global tables. It adds one new arguments to UpdateTable, GlobalTableSettingsReplicationMode. + ## 3.10.0 ### Added diff --git a/src/Service/DynamoDb/composer.json b/src/Service/DynamoDb/composer.json index f9022b2dd..d76bd0454 100644 --- a/src/Service/DynamoDb/composer.json +++ b/src/Service/DynamoDb/composer.json @@ -36,7 +36,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.10-dev" + "dev-master": "3.11-dev" } } } diff --git a/src/Service/DynamoDb/src/DynamoDbClient.php b/src/Service/DynamoDb/src/DynamoDbClient.php index b22bf12de..a0b786838 100644 --- a/src/Service/DynamoDb/src/DynamoDbClient.php +++ b/src/Service/DynamoDb/src/DynamoDbClient.php @@ -620,6 +620,9 @@ public function listTables($input = []): ListTablesOutput * > every record must contain that attribute, the `attribute_not_exists` function will only succeed if no matching item * > exists. * + * > To determine whether `PutItem` overwrote an existing item, use `ReturnValues` set to `ALL_OLD`. If the response + * > includes the `Attributes` element, an existing item was overwritten. + * * For more information about `PutItem`, see Working with Items [^1] in the *Amazon DynamoDB Developer Guide*. * * [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html @@ -1036,6 +1039,7 @@ public function updateItem($input): UpdateItemOutput * GlobalTableWitnessUpdates?: array|null, * OnDemandThroughput?: OnDemandThroughput|array|null, * WarmThroughput?: WarmThroughput|array|null, + * GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null, * '@region'?: string|null, * }|UpdateTableInput $input * diff --git a/src/Service/DynamoDb/src/Input/UpdateItemInput.php b/src/Service/DynamoDb/src/Input/UpdateItemInput.php index 9073b7725..5f90baa5f 100644 --- a/src/Service/DynamoDb/src/Input/UpdateItemInput.php +++ b/src/Service/DynamoDb/src/Input/UpdateItemInput.php @@ -150,8 +150,7 @@ final class UpdateItemInput extends Input * Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the * `Value` must also be a set of strings. * - * ! The `ADD` action only supports Number and set data types. In addition, `ADD` can only be used on top-level - * ! attributes, not nested attributes. + * ! The `ADD` action only supports Number and set data types. * * - `DELETE` - Deletes an element from a set. * @@ -159,8 +158,7 @@ final class UpdateItemInput extends Input * value was the set `[a,b,c]` and the `DELETE` action specifies `[a,c]`, then the final attribute value is `[b]`. * Specifying an empty set is an error. * - * ! The `DELETE` action only supports set data types. In addition, `DELETE` can only be used on top-level attributes, - * ! not nested attributes. + * ! The `DELETE` action only supports set data types. * * * You can have many actions in a single expression, such as the following: `SET a=:value1, b=:value2 DELETE :value3, diff --git a/src/Service/DynamoDb/src/Input/UpdateTableInput.php b/src/Service/DynamoDb/src/Input/UpdateTableInput.php index ad176b407..9ba7aad72 100644 --- a/src/Service/DynamoDb/src/Input/UpdateTableInput.php +++ b/src/Service/DynamoDb/src/Input/UpdateTableInput.php @@ -7,6 +7,7 @@ use AsyncAws\Core\Request; use AsyncAws\Core\Stream\StreamFactory; use AsyncAws\DynamoDb\Enum\BillingMode; +use AsyncAws\DynamoDb\Enum\GlobalTableSettingsReplicationMode; use AsyncAws\DynamoDb\Enum\MultiRegionConsistency; use AsyncAws\DynamoDb\Enum\TableClass; use AsyncAws\DynamoDb\ValueObject\AttributeDefinition; @@ -177,6 +178,19 @@ final class UpdateTableInput extends Input */ private $warmThroughput; + /** + * Controls the settings replication mode for a global table replica. This attribute can be defined using UpdateTable + * operation only on a regional table with values: + * + * - `ENABLED`: Defines settings replication on a regional table to be used as a source table for creating Multi-Account + * Global Table. + * - `DISABLED`: Remove settings replication on a regional table. Settings replication needs to be defined to ENABLED + * again in order to create a Multi-Account Global Table using this table. + * + * @var GlobalTableSettingsReplicationMode::*|null + */ + private $globalTableSettingsReplicationMode; + /** * @param array{ * AttributeDefinitions?: array|null, @@ -193,6 +207,7 @@ final class UpdateTableInput extends Input * GlobalTableWitnessUpdates?: array|null, * OnDemandThroughput?: OnDemandThroughput|array|null, * WarmThroughput?: WarmThroughput|array|null, + * GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null, * '@region'?: string|null, * } $input */ @@ -212,6 +227,7 @@ public function __construct(array $input = []) $this->globalTableWitnessUpdates = isset($input['GlobalTableWitnessUpdates']) ? array_map([GlobalTableWitnessGroupUpdate::class, 'create'], $input['GlobalTableWitnessUpdates']) : null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; $this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null; + $this->globalTableSettingsReplicationMode = $input['GlobalTableSettingsReplicationMode'] ?? null; parent::__construct($input); } @@ -231,6 +247,7 @@ public function __construct(array $input = []) * GlobalTableWitnessUpdates?: array|null, * OnDemandThroughput?: OnDemandThroughput|array|null, * WarmThroughput?: WarmThroughput|array|null, + * GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null, * '@region'?: string|null, * }|UpdateTableInput $input */ @@ -268,6 +285,14 @@ public function getGlobalSecondaryIndexUpdates(): array return $this->globalSecondaryIndexUpdates ?? []; } + /** + * @return GlobalTableSettingsReplicationMode::*|null + */ + public function getGlobalTableSettingsReplicationMode(): ?string + { + return $this->globalTableSettingsReplicationMode; + } + /** * @return GlobalTableWitnessGroupUpdate[] */ @@ -393,6 +418,16 @@ public function setGlobalSecondaryIndexUpdates(array $value): self return $this; } + /** + * @param GlobalTableSettingsReplicationMode::*|null $value + */ + public function setGlobalTableSettingsReplicationMode(?string $value): self + { + $this->globalTableSettingsReplicationMode = $value; + + return $this; + } + /** * @param GlobalTableWitnessGroupUpdate[] $value */ @@ -553,6 +588,13 @@ private function requestBody(): array if (null !== $v = $this->warmThroughput) { $payload['WarmThroughput'] = $v->requestBody(); } + if (null !== $v = $this->globalTableSettingsReplicationMode) { + if (!GlobalTableSettingsReplicationMode::exists($v)) { + /** @psalm-suppress NoValue */ + throw new InvalidArgument(\sprintf('Invalid parameter "GlobalTableSettingsReplicationMode" for "%s". The value "%s" is not a valid "GlobalTableSettingsReplicationMode".', __CLASS__, $v)); + } + $payload['GlobalTableSettingsReplicationMode'] = $v; + } return $payload; }