diff --git a/manifest.json b/manifest.json index f8a7a84d5..80e86d9f3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.325.7" + "${LATEST}": "3.326.0" }, "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 f5497bb00..49afa9554 100644 --- a/src/Service/DynamoDb/CHANGELOG.md +++ b/src/Service/DynamoDb/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: This release includes supports the new WarmThroughput feature for DynamoDB. You can now provide an optional WarmThroughput attribute for CreateTable or UpdateTable APIs to pre-warm your table or global secondary index. You can also use DescribeTable to see the latest WarmThroughput value. + ### Changed - use strict comparison `null !==` instead of `!` diff --git a/src/Service/DynamoDb/composer.json b/src/Service/DynamoDb/composer.json index ea90eaf1a..096d3f0b9 100644 --- a/src/Service/DynamoDb/composer.json +++ b/src/Service/DynamoDb/composer.json @@ -32,7 +32,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } } } diff --git a/src/Service/DynamoDb/src/DynamoDbClient.php b/src/Service/DynamoDb/src/DynamoDbClient.php index 951b1b2e1..4b11e1551 100644 --- a/src/Service/DynamoDb/src/DynamoDbClient.php +++ b/src/Service/DynamoDb/src/DynamoDbClient.php @@ -82,6 +82,7 @@ use AsyncAws\DynamoDb\ValueObject\Tag; use AsyncAws\DynamoDb\ValueObject\TimeToLiveSpecification; use AsyncAws\DynamoDb\ValueObject\TransactWriteItem; +use AsyncAws\DynamoDb\ValueObject\WarmThroughput; class DynamoDbClient extends AbstractApi { @@ -284,6 +285,7 @@ public function batchWriteItem($input): BatchWriteItemOutput * Tags?: null|array, * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, + * WarmThroughput?: null|WarmThroughput|array, * ResourcePolicy?: null|string, * OnDemandThroughput?: null|OnDemandThroughput|array, * '@region'?: string|null, @@ -1000,6 +1002,7 @@ public function updateItem($input): UpdateItemOutput * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * '@region'?: string|null, * }|UpdateTableInput $input * diff --git a/src/Service/DynamoDb/src/Input/CreateTableInput.php b/src/Service/DynamoDb/src/Input/CreateTableInput.php index 34c742f55..247cdd63a 100644 --- a/src/Service/DynamoDb/src/Input/CreateTableInput.php +++ b/src/Service/DynamoDb/src/Input/CreateTableInput.php @@ -21,6 +21,7 @@ use AsyncAws\DynamoDb\ValueObject\SSESpecification; use AsyncAws\DynamoDb\ValueObject\StreamSpecification; use AsyncAws\DynamoDb\ValueObject\Tag; +use AsyncAws\DynamoDb\ValueObject\WarmThroughput; /** * Represents the input of a `CreateTable` operation. @@ -219,6 +220,13 @@ final class CreateTableInput extends Input */ private $deletionProtectionEnabled; + /** + * Represents the warm throughput (in read units per second and write units per second) for creating a table. + * + * @var WarmThroughput|null + */ + private $warmThroughput; + /** * An Amazon Web Services resource-based policy document in JSON format that will be attached to the table. * @@ -259,6 +267,7 @@ final class CreateTableInput extends Input * Tags?: null|array, * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, + * WarmThroughput?: null|WarmThroughput|array, * ResourcePolicy?: null|string, * OnDemandThroughput?: null|OnDemandThroughput|array, * '@region'?: string|null, @@ -278,6 +287,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->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null; $this->resourcePolicy = $input['ResourcePolicy'] ?? null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; parent::__construct($input); @@ -297,6 +307,7 @@ public function __construct(array $input = []) * Tags?: null|array, * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, + * WarmThroughput?: null|WarmThroughput|array, * ResourcePolicy?: null|string, * OnDemandThroughput?: null|OnDemandThroughput|array, * '@region'?: string|null, @@ -398,6 +409,11 @@ public function getTags(): array return $this->tags ?? []; } + public function getWarmThroughput(): ?WarmThroughput + { + return $this->warmThroughput; + } + /** * @internal */ @@ -543,6 +559,13 @@ public function setTags(array $value): self return $this; } + public function setWarmThroughput(?WarmThroughput $value): self + { + $this->warmThroughput = $value; + + return $this; + } + private function requestBody(): array { $payload = []; @@ -620,6 +643,9 @@ private function requestBody(): array if (null !== $v = $this->deletionProtectionEnabled) { $payload['DeletionProtectionEnabled'] = (bool) $v; } + if (null !== $v = $this->warmThroughput) { + $payload['WarmThroughput'] = $v->requestBody(); + } if (null !== $v = $this->resourcePolicy) { $payload['ResourcePolicy'] = $v; } diff --git a/src/Service/DynamoDb/src/Input/UpdateTableInput.php b/src/Service/DynamoDb/src/Input/UpdateTableInput.php index 8317e5d31..8655beb3f 100644 --- a/src/Service/DynamoDb/src/Input/UpdateTableInput.php +++ b/src/Service/DynamoDb/src/Input/UpdateTableInput.php @@ -15,6 +15,7 @@ use AsyncAws\DynamoDb\ValueObject\ReplicationGroupUpdate; use AsyncAws\DynamoDb\ValueObject\SSESpecification; use AsyncAws\DynamoDb\ValueObject\StreamSpecification; +use AsyncAws\DynamoDb\ValueObject\WarmThroughput; /** * Represents the input of an `UpdateTable` operation. @@ -130,6 +131,13 @@ final class UpdateTableInput extends Input */ private $onDemandThroughput; + /** + * Represents the warm throughput (in read units per second and write units per second) for updating a table. + * + * @var WarmThroughput|null + */ + private $warmThroughput; + /** * @param array{ * AttributeDefinitions?: null|array, @@ -143,6 +151,7 @@ final class UpdateTableInput extends Input * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * '@region'?: string|null, * } $input */ @@ -159,6 +168,7 @@ public function __construct(array $input = []) $this->tableClass = $input['TableClass'] ?? null; $this->deletionProtectionEnabled = $input['DeletionProtectionEnabled'] ?? null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; + $this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null; parent::__construct($input); } @@ -175,6 +185,7 @@ public function __construct(array $input = []) * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * '@region'?: string|null, * }|UpdateTableInput $input */ @@ -253,6 +264,11 @@ public function getTableName(): ?string return $this->tableName; } + public function getWarmThroughput(): ?WarmThroughput + { + return $this->warmThroughput; + } + /** * @internal */ @@ -371,6 +387,13 @@ public function setTableName(?string $value): self return $this; } + public function setWarmThroughput(?WarmThroughput $value): self + { + $this->warmThroughput = $value; + + return $this; + } + private function requestBody(): array { $payload = []; @@ -429,6 +452,9 @@ private function requestBody(): array if (null !== $v = $this->onDemandThroughput) { $payload['OnDemandThroughput'] = $v->requestBody(); } + if (null !== $v = $this->warmThroughput) { + $payload['WarmThroughput'] = $v->requestBody(); + } return $payload; } diff --git a/src/Service/DynamoDb/src/Result/CreateTableOutput.php b/src/Service/DynamoDb/src/Result/CreateTableOutput.php index 5565ab0e7..4e34b4348 100644 --- a/src/Service/DynamoDb/src/Result/CreateTableOutput.php +++ b/src/Service/DynamoDb/src/Result/CreateTableOutput.php @@ -8,6 +8,7 @@ use AsyncAws\DynamoDb\ValueObject\AttributeDefinition; use AsyncAws\DynamoDb\ValueObject\BillingModeSummary; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription; +use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; @@ -22,6 +23,7 @@ use AsyncAws\DynamoDb\ValueObject\StreamSpecification; use AsyncAws\DynamoDb\ValueObject\TableClassSummary; use AsyncAws\DynamoDb\ValueObject\TableDescription; +use AsyncAws\DynamoDb\ValueObject\TableWarmThroughputDescription; /** * Represents the output of a `CreateTable` operation. @@ -100,6 +102,7 @@ private function populateResultGlobalSecondaryIndexDescription(array $json): Glo 'ItemCount' => isset($json['ItemCount']) ? (int) $json['ItemCount'] : null, 'IndexArn' => isset($json['IndexArn']) ? (string) $json['IndexArn'] : null, 'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']), ]); } @@ -116,6 +119,15 @@ private function populateResultGlobalSecondaryIndexDescriptionList(array $json): return $items; } + private function populateResultGlobalSecondaryIndexWarmThroughputDescription(array $json): GlobalSecondaryIndexWarmThroughputDescription + { + return new GlobalSecondaryIndexWarmThroughputDescription([ + 'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null, + 'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null, + 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, + ]); + } + /** * @return KeySchemaElement[] */ @@ -229,6 +241,7 @@ private function populateResultReplicaDescription(array $json): ReplicaDescripti 'KMSMasterKeyId' => isset($json['KMSMasterKeyId']) ? (string) $json['KMSMasterKeyId'] : null, 'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']), 'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']), 'GlobalSecondaryIndexes' => !isset($json['GlobalSecondaryIndexes']) ? null : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($json['GlobalSecondaryIndexes']), 'ReplicaInaccessibleDateTime' => (isset($json['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['ReplicaInaccessibleDateTime'])))) ? $d : null, 'ReplicaTableClassSummary' => empty($json['ReplicaTableClassSummary']) ? null : $this->populateResultTableClassSummary($json['ReplicaTableClassSummary']), @@ -254,6 +267,7 @@ private function populateResultReplicaGlobalSecondaryIndexDescription(array $jso 'IndexName' => isset($json['IndexName']) ? (string) $json['IndexName'] : null, 'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']), 'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']), ]); } @@ -333,6 +347,16 @@ private function populateResultTableDescription(array $json): TableDescription 'TableClassSummary' => empty($json['TableClassSummary']) ? null : $this->populateResultTableClassSummary($json['TableClassSummary']), 'DeletionProtectionEnabled' => isset($json['DeletionProtectionEnabled']) ? filter_var($json['DeletionProtectionEnabled'], \FILTER_VALIDATE_BOOLEAN) : null, 'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']), + ]); + } + + private function populateResultTableWarmThroughputDescription(array $json): TableWarmThroughputDescription + { + return new TableWarmThroughputDescription([ + 'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null, + 'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null, + 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, ]); } } diff --git a/src/Service/DynamoDb/src/Result/DeleteTableOutput.php b/src/Service/DynamoDb/src/Result/DeleteTableOutput.php index 65e03cfaf..b9a8c9603 100644 --- a/src/Service/DynamoDb/src/Result/DeleteTableOutput.php +++ b/src/Service/DynamoDb/src/Result/DeleteTableOutput.php @@ -8,6 +8,7 @@ use AsyncAws\DynamoDb\ValueObject\AttributeDefinition; use AsyncAws\DynamoDb\ValueObject\BillingModeSummary; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription; +use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; @@ -22,6 +23,7 @@ use AsyncAws\DynamoDb\ValueObject\StreamSpecification; use AsyncAws\DynamoDb\ValueObject\TableClassSummary; use AsyncAws\DynamoDb\ValueObject\TableDescription; +use AsyncAws\DynamoDb\ValueObject\TableWarmThroughputDescription; /** * Represents the output of a `DeleteTable` operation. @@ -100,6 +102,7 @@ private function populateResultGlobalSecondaryIndexDescription(array $json): Glo 'ItemCount' => isset($json['ItemCount']) ? (int) $json['ItemCount'] : null, 'IndexArn' => isset($json['IndexArn']) ? (string) $json['IndexArn'] : null, 'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']), ]); } @@ -116,6 +119,15 @@ private function populateResultGlobalSecondaryIndexDescriptionList(array $json): return $items; } + private function populateResultGlobalSecondaryIndexWarmThroughputDescription(array $json): GlobalSecondaryIndexWarmThroughputDescription + { + return new GlobalSecondaryIndexWarmThroughputDescription([ + 'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null, + 'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null, + 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, + ]); + } + /** * @return KeySchemaElement[] */ @@ -229,6 +241,7 @@ private function populateResultReplicaDescription(array $json): ReplicaDescripti 'KMSMasterKeyId' => isset($json['KMSMasterKeyId']) ? (string) $json['KMSMasterKeyId'] : null, 'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']), 'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']), 'GlobalSecondaryIndexes' => !isset($json['GlobalSecondaryIndexes']) ? null : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($json['GlobalSecondaryIndexes']), 'ReplicaInaccessibleDateTime' => (isset($json['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['ReplicaInaccessibleDateTime'])))) ? $d : null, 'ReplicaTableClassSummary' => empty($json['ReplicaTableClassSummary']) ? null : $this->populateResultTableClassSummary($json['ReplicaTableClassSummary']), @@ -254,6 +267,7 @@ private function populateResultReplicaGlobalSecondaryIndexDescription(array $jso 'IndexName' => isset($json['IndexName']) ? (string) $json['IndexName'] : null, 'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']), 'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']), ]); } @@ -333,6 +347,16 @@ private function populateResultTableDescription(array $json): TableDescription 'TableClassSummary' => empty($json['TableClassSummary']) ? null : $this->populateResultTableClassSummary($json['TableClassSummary']), 'DeletionProtectionEnabled' => isset($json['DeletionProtectionEnabled']) ? filter_var($json['DeletionProtectionEnabled'], \FILTER_VALIDATE_BOOLEAN) : null, 'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']), + ]); + } + + private function populateResultTableWarmThroughputDescription(array $json): TableWarmThroughputDescription + { + return new TableWarmThroughputDescription([ + 'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null, + 'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null, + 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, ]); } } diff --git a/src/Service/DynamoDb/src/Result/DescribeTableOutput.php b/src/Service/DynamoDb/src/Result/DescribeTableOutput.php index 3fcd784f1..a624c29d5 100644 --- a/src/Service/DynamoDb/src/Result/DescribeTableOutput.php +++ b/src/Service/DynamoDb/src/Result/DescribeTableOutput.php @@ -8,6 +8,7 @@ use AsyncAws\DynamoDb\ValueObject\AttributeDefinition; use AsyncAws\DynamoDb\ValueObject\BillingModeSummary; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription; +use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; @@ -22,6 +23,7 @@ use AsyncAws\DynamoDb\ValueObject\StreamSpecification; use AsyncAws\DynamoDb\ValueObject\TableClassSummary; use AsyncAws\DynamoDb\ValueObject\TableDescription; +use AsyncAws\DynamoDb\ValueObject\TableWarmThroughputDescription; /** * Represents the output of a `DescribeTable` operation. @@ -100,6 +102,7 @@ private function populateResultGlobalSecondaryIndexDescription(array $json): Glo 'ItemCount' => isset($json['ItemCount']) ? (int) $json['ItemCount'] : null, 'IndexArn' => isset($json['IndexArn']) ? (string) $json['IndexArn'] : null, 'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']), ]); } @@ -116,6 +119,15 @@ private function populateResultGlobalSecondaryIndexDescriptionList(array $json): return $items; } + private function populateResultGlobalSecondaryIndexWarmThroughputDescription(array $json): GlobalSecondaryIndexWarmThroughputDescription + { + return new GlobalSecondaryIndexWarmThroughputDescription([ + 'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null, + 'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null, + 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, + ]); + } + /** * @return KeySchemaElement[] */ @@ -229,6 +241,7 @@ private function populateResultReplicaDescription(array $json): ReplicaDescripti 'KMSMasterKeyId' => isset($json['KMSMasterKeyId']) ? (string) $json['KMSMasterKeyId'] : null, 'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']), 'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']), 'GlobalSecondaryIndexes' => !isset($json['GlobalSecondaryIndexes']) ? null : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($json['GlobalSecondaryIndexes']), 'ReplicaInaccessibleDateTime' => (isset($json['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['ReplicaInaccessibleDateTime'])))) ? $d : null, 'ReplicaTableClassSummary' => empty($json['ReplicaTableClassSummary']) ? null : $this->populateResultTableClassSummary($json['ReplicaTableClassSummary']), @@ -254,6 +267,7 @@ private function populateResultReplicaGlobalSecondaryIndexDescription(array $jso 'IndexName' => isset($json['IndexName']) ? (string) $json['IndexName'] : null, 'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']), 'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']), ]); } @@ -333,6 +347,16 @@ private function populateResultTableDescription(array $json): TableDescription 'TableClassSummary' => empty($json['TableClassSummary']) ? null : $this->populateResultTableClassSummary($json['TableClassSummary']), 'DeletionProtectionEnabled' => isset($json['DeletionProtectionEnabled']) ? filter_var($json['DeletionProtectionEnabled'], \FILTER_VALIDATE_BOOLEAN) : null, 'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']), + ]); + } + + private function populateResultTableWarmThroughputDescription(array $json): TableWarmThroughputDescription + { + return new TableWarmThroughputDescription([ + 'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null, + 'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null, + 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, ]); } } diff --git a/src/Service/DynamoDb/src/Result/UpdateTableOutput.php b/src/Service/DynamoDb/src/Result/UpdateTableOutput.php index 248274747..3e6e2478f 100644 --- a/src/Service/DynamoDb/src/Result/UpdateTableOutput.php +++ b/src/Service/DynamoDb/src/Result/UpdateTableOutput.php @@ -8,6 +8,7 @@ use AsyncAws\DynamoDb\ValueObject\AttributeDefinition; use AsyncAws\DynamoDb\ValueObject\BillingModeSummary; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription; +use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; @@ -22,6 +23,7 @@ use AsyncAws\DynamoDb\ValueObject\StreamSpecification; use AsyncAws\DynamoDb\ValueObject\TableClassSummary; use AsyncAws\DynamoDb\ValueObject\TableDescription; +use AsyncAws\DynamoDb\ValueObject\TableWarmThroughputDescription; /** * Represents the output of an `UpdateTable` operation. @@ -100,6 +102,7 @@ private function populateResultGlobalSecondaryIndexDescription(array $json): Glo 'ItemCount' => isset($json['ItemCount']) ? (int) $json['ItemCount'] : null, 'IndexArn' => isset($json['IndexArn']) ? (string) $json['IndexArn'] : null, 'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']), ]); } @@ -116,6 +119,15 @@ private function populateResultGlobalSecondaryIndexDescriptionList(array $json): return $items; } + private function populateResultGlobalSecondaryIndexWarmThroughputDescription(array $json): GlobalSecondaryIndexWarmThroughputDescription + { + return new GlobalSecondaryIndexWarmThroughputDescription([ + 'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null, + 'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null, + 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, + ]); + } + /** * @return KeySchemaElement[] */ @@ -229,6 +241,7 @@ private function populateResultReplicaDescription(array $json): ReplicaDescripti 'KMSMasterKeyId' => isset($json['KMSMasterKeyId']) ? (string) $json['KMSMasterKeyId'] : null, 'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']), 'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']), 'GlobalSecondaryIndexes' => !isset($json['GlobalSecondaryIndexes']) ? null : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($json['GlobalSecondaryIndexes']), 'ReplicaInaccessibleDateTime' => (isset($json['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['ReplicaInaccessibleDateTime'])))) ? $d : null, 'ReplicaTableClassSummary' => empty($json['ReplicaTableClassSummary']) ? null : $this->populateResultTableClassSummary($json['ReplicaTableClassSummary']), @@ -254,6 +267,7 @@ private function populateResultReplicaGlobalSecondaryIndexDescription(array $jso 'IndexName' => isset($json['IndexName']) ? (string) $json['IndexName'] : null, 'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']), 'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']), ]); } @@ -333,6 +347,16 @@ private function populateResultTableDescription(array $json): TableDescription 'TableClassSummary' => empty($json['TableClassSummary']) ? null : $this->populateResultTableClassSummary($json['TableClassSummary']), 'DeletionProtectionEnabled' => isset($json['DeletionProtectionEnabled']) ? filter_var($json['DeletionProtectionEnabled'], \FILTER_VALIDATE_BOOLEAN) : null, 'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']), + 'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']), + ]); + } + + private function populateResultTableWarmThroughputDescription(array $json): TableWarmThroughputDescription + { + return new TableWarmThroughputDescription([ + 'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null, + 'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null, + 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, ]); } } diff --git a/src/Service/DynamoDb/src/ValueObject/CreateGlobalSecondaryIndexAction.php b/src/Service/DynamoDb/src/ValueObject/CreateGlobalSecondaryIndexAction.php index f1ab878d9..1381c5ba4 100644 --- a/src/Service/DynamoDb/src/ValueObject/CreateGlobalSecondaryIndexAction.php +++ b/src/Service/DynamoDb/src/ValueObject/CreateGlobalSecondaryIndexAction.php @@ -51,6 +51,14 @@ final class CreateGlobalSecondaryIndexAction */ private $onDemandThroughput; + /** + * Represents the warm throughput value (in read units per second and write units per second) when creating a secondary + * index. + * + * @var WarmThroughput|null + */ + private $warmThroughput; + /** * @param array{ * IndexName: string, @@ -58,6 +66,7 @@ final class CreateGlobalSecondaryIndexAction * Projection: Projection|array, * ProvisionedThroughput?: null|ProvisionedThroughput|array, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * } $input */ public function __construct(array $input) @@ -67,6 +76,7 @@ public function __construct(array $input) $this->projection = isset($input['Projection']) ? Projection::create($input['Projection']) : $this->throwException(new InvalidArgument('Missing required field "Projection".')); $this->provisionedThroughput = isset($input['ProvisionedThroughput']) ? ProvisionedThroughput::create($input['ProvisionedThroughput']) : null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; + $this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null; } /** @@ -76,6 +86,7 @@ public function __construct(array $input) * Projection: Projection|array, * ProvisionedThroughput?: null|ProvisionedThroughput|array, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * }|CreateGlobalSecondaryIndexAction $input */ public static function create($input): self @@ -111,6 +122,11 @@ public function getProvisionedThroughput(): ?ProvisionedThroughput return $this->provisionedThroughput; } + public function getWarmThroughput(): ?WarmThroughput + { + return $this->warmThroughput; + } + /** * @internal */ @@ -136,6 +152,9 @@ public function requestBody(): array if (null !== $v = $this->onDemandThroughput) { $payload['OnDemandThroughput'] = $v->requestBody(); } + if (null !== $v = $this->warmThroughput) { + $payload['WarmThroughput'] = $v->requestBody(); + } return $payload; } diff --git a/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndex.php b/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndex.php index c61d6b468..a22d9776e 100644 --- a/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndex.php +++ b/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndex.php @@ -62,6 +62,14 @@ final class GlobalSecondaryIndex */ private $onDemandThroughput; + /** + * Represents the warm throughput value (in read units per second and write units per second) for the specified + * secondary index. If you use this parameter, you must specify `ReadUnitsPerSecond`, `WriteUnitsPerSecond`, or both. + * + * @var WarmThroughput|null + */ + private $warmThroughput; + /** * @param array{ * IndexName: string, @@ -69,6 +77,7 @@ final class GlobalSecondaryIndex * Projection: Projection|array, * ProvisionedThroughput?: null|ProvisionedThroughput|array, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * } $input */ public function __construct(array $input) @@ -78,6 +87,7 @@ public function __construct(array $input) $this->projection = isset($input['Projection']) ? Projection::create($input['Projection']) : $this->throwException(new InvalidArgument('Missing required field "Projection".')); $this->provisionedThroughput = isset($input['ProvisionedThroughput']) ? ProvisionedThroughput::create($input['ProvisionedThroughput']) : null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; + $this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null; } /** @@ -87,6 +97,7 @@ public function __construct(array $input) * Projection: Projection|array, * ProvisionedThroughput?: null|ProvisionedThroughput|array, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * }|GlobalSecondaryIndex $input */ public static function create($input): self @@ -122,6 +133,11 @@ public function getProvisionedThroughput(): ?ProvisionedThroughput return $this->provisionedThroughput; } + public function getWarmThroughput(): ?WarmThroughput + { + return $this->warmThroughput; + } + /** * @internal */ @@ -147,6 +163,9 @@ public function requestBody(): array if (null !== $v = $this->onDemandThroughput) { $payload['OnDemandThroughput'] = $v->requestBody(); } + if (null !== $v = $this->warmThroughput) { + $payload['WarmThroughput'] = $v->requestBody(); + } return $payload; } diff --git a/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndexDescription.php b/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndexDescription.php index adb33ad04..508540267 100644 --- a/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndexDescription.php +++ b/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndexDescription.php @@ -114,6 +114,14 @@ final class GlobalSecondaryIndexDescription */ private $onDemandThroughput; + /** + * Represents the warm throughput value (in read units per second and write units per second) for the specified + * secondary index. + * + * @var GlobalSecondaryIndexWarmThroughputDescription|null + */ + private $warmThroughput; + /** * @param array{ * IndexName?: null|string, @@ -126,6 +134,7 @@ final class GlobalSecondaryIndexDescription * ItemCount?: null|int, * IndexArn?: null|string, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|GlobalSecondaryIndexWarmThroughputDescription|array, * } $input */ public function __construct(array $input) @@ -140,6 +149,7 @@ public function __construct(array $input) $this->itemCount = $input['ItemCount'] ?? null; $this->indexArn = $input['IndexArn'] ?? null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; + $this->warmThroughput = isset($input['WarmThroughput']) ? GlobalSecondaryIndexWarmThroughputDescription::create($input['WarmThroughput']) : null; } /** @@ -154,6 +164,7 @@ public function __construct(array $input) * ItemCount?: null|int, * IndexArn?: null|string, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|GlobalSecondaryIndexWarmThroughputDescription|array, * }|GlobalSecondaryIndexDescription $input */ public static function create($input): self @@ -216,4 +227,9 @@ public function getProvisionedThroughput(): ?ProvisionedThroughputDescription { return $this->provisionedThroughput; } + + public function getWarmThroughput(): ?GlobalSecondaryIndexWarmThroughputDescription + { + return $this->warmThroughput; + } } diff --git a/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndexWarmThroughputDescription.php b/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndexWarmThroughputDescription.php new file mode 100644 index 000000000..a9b962d8d --- /dev/null +++ b/src/Service/DynamoDb/src/ValueObject/GlobalSecondaryIndexWarmThroughputDescription.php @@ -0,0 +1,77 @@ +readUnitsPerSecond = $input['ReadUnitsPerSecond'] ?? null; + $this->writeUnitsPerSecond = $input['WriteUnitsPerSecond'] ?? null; + $this->status = $input['Status'] ?? null; + } + + /** + * @param array{ + * ReadUnitsPerSecond?: null|int, + * WriteUnitsPerSecond?: null|int, + * Status?: null|IndexStatus::*, + * }|GlobalSecondaryIndexWarmThroughputDescription $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getReadUnitsPerSecond(): ?int + { + return $this->readUnitsPerSecond; + } + + /** + * @return IndexStatus::*|null + */ + public function getStatus(): ?string + { + return $this->status; + } + + public function getWriteUnitsPerSecond(): ?int + { + return $this->writeUnitsPerSecond; + } +} diff --git a/src/Service/DynamoDb/src/ValueObject/ReplicaDescription.php b/src/Service/DynamoDb/src/ValueObject/ReplicaDescription.php index 82fa31ab3..de5ba7ef5 100644 --- a/src/Service/DynamoDb/src/ValueObject/ReplicaDescription.php +++ b/src/Service/DynamoDb/src/ValueObject/ReplicaDescription.php @@ -72,6 +72,13 @@ final class ReplicaDescription */ private $onDemandThroughputOverride; + /** + * Represents the warm throughput value for this replica. + * + * @var TableWarmThroughputDescription|null + */ + private $warmThroughput; + /** * Replica-specific global secondary index settings. * @@ -101,6 +108,7 @@ final class ReplicaDescription * KMSMasterKeyId?: null|string, * ProvisionedThroughputOverride?: null|ProvisionedThroughputOverride|array, * OnDemandThroughputOverride?: null|OnDemandThroughputOverride|array, + * WarmThroughput?: null|TableWarmThroughputDescription|array, * GlobalSecondaryIndexes?: null|array, * ReplicaInaccessibleDateTime?: null|\DateTimeImmutable, * ReplicaTableClassSummary?: null|TableClassSummary|array, @@ -115,6 +123,7 @@ public function __construct(array $input) $this->kmsMasterKeyId = $input['KMSMasterKeyId'] ?? null; $this->provisionedThroughputOverride = isset($input['ProvisionedThroughputOverride']) ? ProvisionedThroughputOverride::create($input['ProvisionedThroughputOverride']) : null; $this->onDemandThroughputOverride = isset($input['OnDemandThroughputOverride']) ? OnDemandThroughputOverride::create($input['OnDemandThroughputOverride']) : null; + $this->warmThroughput = isset($input['WarmThroughput']) ? TableWarmThroughputDescription::create($input['WarmThroughput']) : null; $this->globalSecondaryIndexes = isset($input['GlobalSecondaryIndexes']) ? array_map([ReplicaGlobalSecondaryIndexDescription::class, 'create'], $input['GlobalSecondaryIndexes']) : null; $this->replicaInaccessibleDateTime = $input['ReplicaInaccessibleDateTime'] ?? null; $this->replicaTableClassSummary = isset($input['ReplicaTableClassSummary']) ? TableClassSummary::create($input['ReplicaTableClassSummary']) : null; @@ -129,6 +138,7 @@ public function __construct(array $input) * KMSMasterKeyId?: null|string, * ProvisionedThroughputOverride?: null|ProvisionedThroughputOverride|array, * OnDemandThroughputOverride?: null|OnDemandThroughputOverride|array, + * WarmThroughput?: null|TableWarmThroughputDescription|array, * GlobalSecondaryIndexes?: null|array, * ReplicaInaccessibleDateTime?: null|\DateTimeImmutable, * ReplicaTableClassSummary?: null|TableClassSummary|array, @@ -194,4 +204,9 @@ public function getReplicaTableClassSummary(): ?TableClassSummary { return $this->replicaTableClassSummary; } + + public function getWarmThroughput(): ?TableWarmThroughputDescription + { + return $this->warmThroughput; + } } diff --git a/src/Service/DynamoDb/src/ValueObject/ReplicaGlobalSecondaryIndexDescription.php b/src/Service/DynamoDb/src/ValueObject/ReplicaGlobalSecondaryIndexDescription.php index f269f3305..dc0ae45f8 100644 --- a/src/Service/DynamoDb/src/ValueObject/ReplicaGlobalSecondaryIndexDescription.php +++ b/src/Service/DynamoDb/src/ValueObject/ReplicaGlobalSecondaryIndexDescription.php @@ -28,11 +28,19 @@ final class ReplicaGlobalSecondaryIndexDescription */ private $onDemandThroughputOverride; + /** + * Represents the warm throughput of the global secondary index for this replica. + * + * @var GlobalSecondaryIndexWarmThroughputDescription|null + */ + private $warmThroughput; + /** * @param array{ * IndexName?: null|string, * ProvisionedThroughputOverride?: null|ProvisionedThroughputOverride|array, * OnDemandThroughputOverride?: null|OnDemandThroughputOverride|array, + * WarmThroughput?: null|GlobalSecondaryIndexWarmThroughputDescription|array, * } $input */ public function __construct(array $input) @@ -40,6 +48,7 @@ public function __construct(array $input) $this->indexName = $input['IndexName'] ?? null; $this->provisionedThroughputOverride = isset($input['ProvisionedThroughputOverride']) ? ProvisionedThroughputOverride::create($input['ProvisionedThroughputOverride']) : null; $this->onDemandThroughputOverride = isset($input['OnDemandThroughputOverride']) ? OnDemandThroughputOverride::create($input['OnDemandThroughputOverride']) : null; + $this->warmThroughput = isset($input['WarmThroughput']) ? GlobalSecondaryIndexWarmThroughputDescription::create($input['WarmThroughput']) : null; } /** @@ -47,6 +56,7 @@ public function __construct(array $input) * IndexName?: null|string, * ProvisionedThroughputOverride?: null|ProvisionedThroughputOverride|array, * OnDemandThroughputOverride?: null|OnDemandThroughputOverride|array, + * WarmThroughput?: null|GlobalSecondaryIndexWarmThroughputDescription|array, * }|ReplicaGlobalSecondaryIndexDescription $input */ public static function create($input): self @@ -68,4 +78,9 @@ public function getProvisionedThroughputOverride(): ?ProvisionedThroughputOverri { return $this->provisionedThroughputOverride; } + + public function getWarmThroughput(): ?GlobalSecondaryIndexWarmThroughputDescription + { + return $this->warmThroughput; + } } diff --git a/src/Service/DynamoDb/src/ValueObject/TableDescription.php b/src/Service/DynamoDb/src/ValueObject/TableDescription.php index 45e123bbf..32f7c59fd 100644 --- a/src/Service/DynamoDb/src/ValueObject/TableDescription.php +++ b/src/Service/DynamoDb/src/ValueObject/TableDescription.php @@ -301,6 +301,13 @@ final class TableDescription */ private $onDemandThroughput; + /** + * Describes the warm throughput value of the base table. + * + * @var TableWarmThroughputDescription|null + */ + private $warmThroughput; + /** * @param array{ * AttributeDefinitions?: null|array, @@ -327,6 +334,7 @@ final class TableDescription * TableClassSummary?: null|TableClassSummary|array, * DeletionProtectionEnabled?: null|bool, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|TableWarmThroughputDescription|array, * } $input */ public function __construct(array $input) @@ -355,6 +363,7 @@ public function __construct(array $input) $this->tableClassSummary = isset($input['TableClassSummary']) ? TableClassSummary::create($input['TableClassSummary']) : null; $this->deletionProtectionEnabled = $input['DeletionProtectionEnabled'] ?? null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; + $this->warmThroughput = isset($input['WarmThroughput']) ? TableWarmThroughputDescription::create($input['WarmThroughput']) : null; } /** @@ -383,6 +392,7 @@ public function __construct(array $input) * TableClassSummary?: null|TableClassSummary|array, * DeletionProtectionEnabled?: null|bool, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|TableWarmThroughputDescription|array, * }|TableDescription $input */ public static function create($input): self @@ -527,4 +537,9 @@ public function getTableStatus(): ?string { return $this->tableStatus; } + + public function getWarmThroughput(): ?TableWarmThroughputDescription + { + return $this->warmThroughput; + } } diff --git a/src/Service/DynamoDb/src/ValueObject/TableWarmThroughputDescription.php b/src/Service/DynamoDb/src/ValueObject/TableWarmThroughputDescription.php new file mode 100644 index 000000000..96c73ec25 --- /dev/null +++ b/src/Service/DynamoDb/src/ValueObject/TableWarmThroughputDescription.php @@ -0,0 +1,76 @@ +readUnitsPerSecond = $input['ReadUnitsPerSecond'] ?? null; + $this->writeUnitsPerSecond = $input['WriteUnitsPerSecond'] ?? null; + $this->status = $input['Status'] ?? null; + } + + /** + * @param array{ + * ReadUnitsPerSecond?: null|int, + * WriteUnitsPerSecond?: null|int, + * Status?: null|TableStatus::*, + * }|TableWarmThroughputDescription $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getReadUnitsPerSecond(): ?int + { + return $this->readUnitsPerSecond; + } + + /** + * @return TableStatus::*|null + */ + public function getStatus(): ?string + { + return $this->status; + } + + public function getWriteUnitsPerSecond(): ?int + { + return $this->writeUnitsPerSecond; + } +} diff --git a/src/Service/DynamoDb/src/ValueObject/UpdateGlobalSecondaryIndexAction.php b/src/Service/DynamoDb/src/ValueObject/UpdateGlobalSecondaryIndexAction.php index 76a0db084..baf58cfb9 100644 --- a/src/Service/DynamoDb/src/ValueObject/UpdateGlobalSecondaryIndexAction.php +++ b/src/Service/DynamoDb/src/ValueObject/UpdateGlobalSecondaryIndexAction.php @@ -36,11 +36,20 @@ final class UpdateGlobalSecondaryIndexAction */ private $onDemandThroughput; + /** + * Represents the warm throughput value of the new provisioned throughput settings to be applied to a global secondary + * index. + * + * @var WarmThroughput|null + */ + private $warmThroughput; + /** * @param array{ * IndexName: string, * ProvisionedThroughput?: null|ProvisionedThroughput|array, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * } $input */ public function __construct(array $input) @@ -48,6 +57,7 @@ public function __construct(array $input) $this->indexName = $input['IndexName'] ?? $this->throwException(new InvalidArgument('Missing required field "IndexName".')); $this->provisionedThroughput = isset($input['ProvisionedThroughput']) ? ProvisionedThroughput::create($input['ProvisionedThroughput']) : null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; + $this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null; } /** @@ -55,6 +65,7 @@ public function __construct(array $input) * IndexName: string, * ProvisionedThroughput?: null|ProvisionedThroughput|array, * OnDemandThroughput?: null|OnDemandThroughput|array, + * WarmThroughput?: null|WarmThroughput|array, * }|UpdateGlobalSecondaryIndexAction $input */ public static function create($input): self @@ -77,6 +88,11 @@ public function getProvisionedThroughput(): ?ProvisionedThroughput return $this->provisionedThroughput; } + public function getWarmThroughput(): ?WarmThroughput + { + return $this->warmThroughput; + } + /** * @internal */ @@ -91,6 +107,9 @@ public function requestBody(): array if (null !== $v = $this->onDemandThroughput) { $payload['OnDemandThroughput'] = $v->requestBody(); } + if (null !== $v = $this->warmThroughput) { + $payload['WarmThroughput'] = $v->requestBody(); + } return $payload; } diff --git a/src/Service/DynamoDb/src/ValueObject/WarmThroughput.php b/src/Service/DynamoDb/src/ValueObject/WarmThroughput.php new file mode 100644 index 000000000..c3eba841a --- /dev/null +++ b/src/Service/DynamoDb/src/ValueObject/WarmThroughput.php @@ -0,0 +1,74 @@ +readUnitsPerSecond = $input['ReadUnitsPerSecond'] ?? null; + $this->writeUnitsPerSecond = $input['WriteUnitsPerSecond'] ?? null; + } + + /** + * @param array{ + * ReadUnitsPerSecond?: null|int, + * WriteUnitsPerSecond?: null|int, + * }|WarmThroughput $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getReadUnitsPerSecond(): ?int + { + return $this->readUnitsPerSecond; + } + + public function getWriteUnitsPerSecond(): ?int + { + return $this->writeUnitsPerSecond; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->readUnitsPerSecond) { + $payload['ReadUnitsPerSecond'] = $v; + } + if (null !== $v = $this->writeUnitsPerSecond) { + $payload['WriteUnitsPerSecond'] = $v; + } + + return $payload; + } +} diff --git a/src/Service/MediaConvert/CHANGELOG.md b/src/Service/MediaConvert/CHANGELOG.md index fa038c6e6..8e89b023a 100644 --- a/src/Service/MediaConvert/CHANGELOG.md +++ b/src/Service/MediaConvert/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changed - use strict comparison `null !==` instead of `!` +- AWS enhancement: Documentation updates. ## 1.4.0 diff --git a/src/Service/MediaConvert/src/ValueObject/JobSettings.php b/src/Service/MediaConvert/src/ValueObject/JobSettings.php index f192fd398..f9ad2ed1f 100644 --- a/src/Service/MediaConvert/src/ValueObject/JobSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/JobSettings.php @@ -97,8 +97,8 @@ final class JobSettings * Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses * to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need * to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is - * currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine - * Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]. + * currently with the following Nielsen versions: Nielsen Watermark SDK Version 6.0.13 Nielsen NLM Watermark Engine + * Version 1.3.3 Nielsen Watermark Authenticator [SID_TIC] Version [7.0.0]. * * @var NielsenNonLinearWatermarkSettings|null */ diff --git a/src/Service/MediaConvert/src/ValueObject/NielsenNonLinearWatermarkSettings.php b/src/Service/MediaConvert/src/ValueObject/NielsenNonLinearWatermarkSettings.php index 1f06560d5..91a8a3545 100644 --- a/src/Service/MediaConvert/src/ValueObject/NielsenNonLinearWatermarkSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/NielsenNonLinearWatermarkSettings.php @@ -11,8 +11,8 @@ * Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses * to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need * to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is - * currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine - * Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]. + * currently with the following Nielsen versions: Nielsen Watermark SDK Version 6.0.13 Nielsen NLM Watermark Engine + * Version 1.3.3 Nielsen Watermark Authenticator [SID_TIC] Version [7.0.0]. */ final class NielsenNonLinearWatermarkSettings {