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.369.35"
"${LATEST}": "3.370.1"
},
"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 change supports the creation of multi-account global tables. It adds one new arguments to UpdateTable, GlobalTableSettingsReplicationMode.

## 3.10.0

### Added
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 @@ -36,7 +36,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.10-dev"
"dev-master": "3.11-dev"
}
}
}
4 changes: 4 additions & 0 deletions src/Service/DynamoDb/src/DynamoDbClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1036,6 +1039,7 @@ public function updateItem($input): UpdateItemOutput
* GlobalTableWitnessUpdates?: array<GlobalTableWitnessGroupUpdate|array>|null,
* OnDemandThroughput?: OnDemandThroughput|array|null,
* WarmThroughput?: WarmThroughput|array|null,
* GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null,
* '@region'?: string|null,
* }|UpdateTableInput $input
*
Expand Down
6 changes: 2 additions & 4 deletions src/Service/DynamoDb/src/Input/UpdateItemInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,15 @@ 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.
*
* If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute
* 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,
Expand Down
42 changes: 42 additions & 0 deletions src/Service/DynamoDb/src/Input/UpdateTableInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<AttributeDefinition|array>|null,
Expand All @@ -193,6 +207,7 @@ final class UpdateTableInput extends Input
* GlobalTableWitnessUpdates?: array<GlobalTableWitnessGroupUpdate|array>|null,
* OnDemandThroughput?: OnDemandThroughput|array|null,
* WarmThroughput?: WarmThroughput|array|null,
* GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null,
* '@region'?: string|null,
* } $input
*/
Expand All @@ -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);
}

Expand All @@ -231,6 +247,7 @@ public function __construct(array $input = [])
* GlobalTableWitnessUpdates?: array<GlobalTableWitnessGroupUpdate|array>|null,
* OnDemandThroughput?: OnDemandThroughput|array|null,
* WarmThroughput?: WarmThroughput|array|null,
* GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null,
* '@region'?: string|null,
* }|UpdateTableInput $input
*/
Expand Down Expand Up @@ -268,6 +285,14 @@ public function getGlobalSecondaryIndexUpdates(): array
return $this->globalSecondaryIndexUpdates ?? [];
}

/**
* @return GlobalTableSettingsReplicationMode::*|null
*/
public function getGlobalTableSettingsReplicationMode(): ?string
{
return $this->globalTableSettingsReplicationMode;
}

/**
* @return GlobalTableWitnessGroupUpdate[]
*/
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;
}
Expand Down