Skip to content

Commit 67a5249

Browse files
Update generated code (#2040)
update generated code
1 parent f1b01ad commit 67a5249

5 files changed

Lines changed: 53 additions & 5 deletions

File tree

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 change supports the creation of multi-account global tables. It adds one new arguments to UpdateTable, GlobalTableSettingsReplicationMode.
8+
59
## 3.10.0
610

711
### Added

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"extra": {
3838
"branch-alias": {
39-
"dev-master": "3.10-dev"
39+
"dev-master": "3.11-dev"
4040
}
4141
}
4242
}

src/DynamoDbClient.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,9 @@ public function listTables($input = []): ListTablesOutput
620620
* > every record must contain that attribute, the `attribute_not_exists` function will only succeed if no matching item
621621
* > exists.
622622
*
623+
* > To determine whether `PutItem` overwrote an existing item, use `ReturnValues` set to `ALL_OLD`. If the response
624+
* > includes the `Attributes` element, an existing item was overwritten.
625+
*
623626
* For more information about `PutItem`, see Working with Items [^1] in the *Amazon DynamoDB Developer Guide*.
624627
*
625628
* [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html
@@ -1036,6 +1039,7 @@ public function updateItem($input): UpdateItemOutput
10361039
* GlobalTableWitnessUpdates?: array<GlobalTableWitnessGroupUpdate|array>|null,
10371040
* OnDemandThroughput?: OnDemandThroughput|array|null,
10381041
* WarmThroughput?: WarmThroughput|array|null,
1042+
* GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null,
10391043
* '@region'?: string|null,
10401044
* }|UpdateTableInput $input
10411045
*

src/Input/UpdateItemInput.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,15 @@ final class UpdateItemInput extends Input
150150
* Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the
151151
* `Value` must also be a set of strings.
152152
*
153-
* ! The `ADD` action only supports Number and set data types. In addition, `ADD` can only be used on top-level
154-
* ! attributes, not nested attributes.
153+
* ! The `ADD` action only supports Number and set data types.
155154
*
156155
* - `DELETE` - Deletes an element from a set.
157156
*
158157
* If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute
159158
* value was the set `[a,b,c]` and the `DELETE` action specifies `[a,c]`, then the final attribute value is `[b]`.
160159
* Specifying an empty set is an error.
161160
*
162-
* ! The `DELETE` action only supports set data types. In addition, `DELETE` can only be used on top-level attributes,
163-
* ! not nested attributes.
161+
* ! The `DELETE` action only supports set data types.
164162
*
165163
*
166164
* You can have many actions in a single expression, such as the following: `SET a=:value1, b=:value2 DELETE :value3,

src/Input/UpdateTableInput.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use AsyncAws\Core\Request;
88
use AsyncAws\Core\Stream\StreamFactory;
99
use AsyncAws\DynamoDb\Enum\BillingMode;
10+
use AsyncAws\DynamoDb\Enum\GlobalTableSettingsReplicationMode;
1011
use AsyncAws\DynamoDb\Enum\MultiRegionConsistency;
1112
use AsyncAws\DynamoDb\Enum\TableClass;
1213
use AsyncAws\DynamoDb\ValueObject\AttributeDefinition;
@@ -177,6 +178,19 @@ final class UpdateTableInput extends Input
177178
*/
178179
private $warmThroughput;
179180

181+
/**
182+
* Controls the settings replication mode for a global table replica. This attribute can be defined using UpdateTable
183+
* operation only on a regional table with values:
184+
*
185+
* - `ENABLED`: Defines settings replication on a regional table to be used as a source table for creating Multi-Account
186+
* Global Table.
187+
* - `DISABLED`: Remove settings replication on a regional table. Settings replication needs to be defined to ENABLED
188+
* again in order to create a Multi-Account Global Table using this table.
189+
*
190+
* @var GlobalTableSettingsReplicationMode::*|null
191+
*/
192+
private $globalTableSettingsReplicationMode;
193+
180194
/**
181195
* @param array{
182196
* AttributeDefinitions?: array<AttributeDefinition|array>|null,
@@ -193,6 +207,7 @@ final class UpdateTableInput extends Input
193207
* GlobalTableWitnessUpdates?: array<GlobalTableWitnessGroupUpdate|array>|null,
194208
* OnDemandThroughput?: OnDemandThroughput|array|null,
195209
* WarmThroughput?: WarmThroughput|array|null,
210+
* GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null,
196211
* '@region'?: string|null,
197212
* } $input
198213
*/
@@ -212,6 +227,7 @@ public function __construct(array $input = [])
212227
$this->globalTableWitnessUpdates = isset($input['GlobalTableWitnessUpdates']) ? array_map([GlobalTableWitnessGroupUpdate::class, 'create'], $input['GlobalTableWitnessUpdates']) : null;
213228
$this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null;
214229
$this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null;
230+
$this->globalTableSettingsReplicationMode = $input['GlobalTableSettingsReplicationMode'] ?? null;
215231
parent::__construct($input);
216232
}
217233

@@ -231,6 +247,7 @@ public function __construct(array $input = [])
231247
* GlobalTableWitnessUpdates?: array<GlobalTableWitnessGroupUpdate|array>|null,
232248
* OnDemandThroughput?: OnDemandThroughput|array|null,
233249
* WarmThroughput?: WarmThroughput|array|null,
250+
* GlobalTableSettingsReplicationMode?: GlobalTableSettingsReplicationMode::*|null,
234251
* '@region'?: string|null,
235252
* }|UpdateTableInput $input
236253
*/
@@ -268,6 +285,14 @@ public function getGlobalSecondaryIndexUpdates(): array
268285
return $this->globalSecondaryIndexUpdates ?? [];
269286
}
270287

288+
/**
289+
* @return GlobalTableSettingsReplicationMode::*|null
290+
*/
291+
public function getGlobalTableSettingsReplicationMode(): ?string
292+
{
293+
return $this->globalTableSettingsReplicationMode;
294+
}
295+
271296
/**
272297
* @return GlobalTableWitnessGroupUpdate[]
273298
*/
@@ -393,6 +418,16 @@ public function setGlobalSecondaryIndexUpdates(array $value): self
393418
return $this;
394419
}
395420

421+
/**
422+
* @param GlobalTableSettingsReplicationMode::*|null $value
423+
*/
424+
public function setGlobalTableSettingsReplicationMode(?string $value): self
425+
{
426+
$this->globalTableSettingsReplicationMode = $value;
427+
428+
return $this;
429+
}
430+
396431
/**
397432
* @param GlobalTableWitnessGroupUpdate[] $value
398433
*/
@@ -553,6 +588,13 @@ private function requestBody(): array
553588
if (null !== $v = $this->warmThroughput) {
554589
$payload['WarmThroughput'] = $v->requestBody();
555590
}
591+
if (null !== $v = $this->globalTableSettingsReplicationMode) {
592+
if (!GlobalTableSettingsReplicationMode::exists($v)) {
593+
/** @psalm-suppress NoValue */
594+
throw new InvalidArgument(\sprintf('Invalid parameter "GlobalTableSettingsReplicationMode" for "%s". The value "%s" is not a valid "GlobalTableSettingsReplicationMode".', __CLASS__, $v));
595+
}
596+
$payload['GlobalTableSettingsReplicationMode'] = $v;
597+
}
556598

557599
return $payload;
558600
}

0 commit comments

Comments
 (0)