Skip to content

Commit daffedb

Browse files
Update generated code (#801)
* update generated code * Update src/Service/DynamoDb/CHANGELOG.md Co-authored-by: Tobias Nyholm <[email protected]>
1 parent 11f8b6b commit daffedb

8 files changed

+24
-1
lines changed

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 release adds a new ReplicaStatus REGION DISABLED for the Table description. This state indicates that the AWS Region for the replica is inaccessible because the AWS Region is disabled.
8+
59
## 0.3.1
610

711
### Added

src/Enum/ReplicaStatus.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ final class ReplicaStatus
88
public const CREATING = 'CREATING';
99
public const CREATION_FAILED = 'CREATION_FAILED';
1010
public const DELETING = 'DELETING';
11+
public const REGION_DISABLED = 'REGION_DISABLED';
1112
public const UPDATING = 'UPDATING';
1213

1314
public static function exists(string $value): bool
@@ -17,6 +18,7 @@ public static function exists(string $value): bool
1718
self::CREATING => true,
1819
self::CREATION_FAILED => true,
1920
self::DELETING => true,
21+
self::REGION_DISABLED => true,
2022
self::UPDATING => true,
2123
][$value]);
2224
}

src/Result/CreateTableOutput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ private function populateResultReplicaDescriptionList(array $json): array
209209
'ReadCapacityUnits' => isset($item['ProvisionedThroughputOverride']['ReadCapacityUnits']) ? (string) $item['ProvisionedThroughputOverride']['ReadCapacityUnits'] : null,
210210
]),
211211
'GlobalSecondaryIndexes' => empty($item['GlobalSecondaryIndexes']) ? [] : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($item['GlobalSecondaryIndexes']),
212+
'ReplicaInaccessibleDateTime' => (isset($item['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $item['ReplicaInaccessibleDateTime'])))) ? $d : null,
212213
]);
213214
}
214215

src/Result/DeleteTableOutput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ private function populateResultReplicaDescriptionList(array $json): array
209209
'ReadCapacityUnits' => isset($item['ProvisionedThroughputOverride']['ReadCapacityUnits']) ? (string) $item['ProvisionedThroughputOverride']['ReadCapacityUnits'] : null,
210210
]),
211211
'GlobalSecondaryIndexes' => empty($item['GlobalSecondaryIndexes']) ? [] : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($item['GlobalSecondaryIndexes']),
212+
'ReplicaInaccessibleDateTime' => (isset($item['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $item['ReplicaInaccessibleDateTime'])))) ? $d : null,
212213
]);
213214
}
214215

src/Result/DescribeTableOutput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ private function populateResultReplicaDescriptionList(array $json): array
209209
'ReadCapacityUnits' => isset($item['ProvisionedThroughputOverride']['ReadCapacityUnits']) ? (string) $item['ProvisionedThroughputOverride']['ReadCapacityUnits'] : null,
210210
]),
211211
'GlobalSecondaryIndexes' => empty($item['GlobalSecondaryIndexes']) ? [] : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($item['GlobalSecondaryIndexes']),
212+
'ReplicaInaccessibleDateTime' => (isset($item['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $item['ReplicaInaccessibleDateTime'])))) ? $d : null,
212213
]);
213214
}
214215

src/Result/UpdateTableOutput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ private function populateResultReplicaDescriptionList(array $json): array
209209
'ReadCapacityUnits' => isset($item['ProvisionedThroughputOverride']['ReadCapacityUnits']) ? (string) $item['ProvisionedThroughputOverride']['ReadCapacityUnits'] : null,
210210
]),
211211
'GlobalSecondaryIndexes' => empty($item['GlobalSecondaryIndexes']) ? [] : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($item['GlobalSecondaryIndexes']),
212+
'ReplicaInaccessibleDateTime' => (isset($item['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $item['ReplicaInaccessibleDateTime'])))) ? $d : null,
212213
]);
213214
}
214215

src/ValueObject/ProvisionedThroughputDescription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class ProvisionedThroughputDescription
1616

1717
/**
1818
* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on
19-
* provisioned throughput decreases, see Limits in the *Amazon DynamoDB Developer Guide*.
19+
* provisioned throughput decreases, see Service, Account, and Table Quotas in the *Amazon DynamoDB Developer Guide*.
2020
*
2121
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html
2222
*/

src/ValueObject/ReplicaDescription.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ final class ReplicaDescription
4141
*/
4242
private $GlobalSecondaryIndexes;
4343

44+
/**
45+
* The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the
46+
* `ReplicaStatus` property.
47+
*/
48+
private $ReplicaInaccessibleDateTime;
49+
4450
/**
4551
* @param array{
4652
* RegionName?: null|string,
@@ -50,6 +56,7 @@ final class ReplicaDescription
5056
* KMSMasterKeyId?: null|string,
5157
* ProvisionedThroughputOverride?: null|ProvisionedThroughputOverride|array,
5258
* GlobalSecondaryIndexes?: null|ReplicaGlobalSecondaryIndexDescription[],
59+
* ReplicaInaccessibleDateTime?: null|\DateTimeImmutable,
5360
* } $input
5461
*/
5562
public function __construct(array $input)
@@ -61,6 +68,7 @@ public function __construct(array $input)
6168
$this->KMSMasterKeyId = $input['KMSMasterKeyId'] ?? null;
6269
$this->ProvisionedThroughputOverride = isset($input['ProvisionedThroughputOverride']) ? ProvisionedThroughputOverride::create($input['ProvisionedThroughputOverride']) : null;
6370
$this->GlobalSecondaryIndexes = isset($input['GlobalSecondaryIndexes']) ? array_map([ReplicaGlobalSecondaryIndexDescription::class, 'create'], $input['GlobalSecondaryIndexes']) : null;
71+
$this->ReplicaInaccessibleDateTime = $input['ReplicaInaccessibleDateTime'] ?? null;
6472
}
6573

6674
public static function create($input): self
@@ -91,6 +99,11 @@ public function getRegionName(): ?string
9199
return $this->RegionName;
92100
}
93101

102+
public function getReplicaInaccessibleDateTime(): ?\DateTimeImmutable
103+
{
104+
return $this->ReplicaInaccessibleDateTime;
105+
}
106+
94107
/**
95108
* @return ReplicaStatus::*|null
96109
*/

0 commit comments

Comments
 (0)