From 589fc33bbd7a4a9fa137c42e0488dd57d2f4a98b Mon Sep 17 00:00:00 2001 From: AsyncAws Bot Date: Mon, 30 Aug 2021 21:13:21 +0000 Subject: [PATCH 01/54] Update branch alias --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8ae8f2c..2201ff2 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ }, "extra": { "branch-alias": { - "dev-master": "0.1-dev" + "dev-master": "0.2-dev" } }, "autoload": { From b8632ed38af4e68f77cbdc0e79ade8bc09af19f0 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 11 Sep 2021 17:16:36 +0100 Subject: [PATCH 02/54] Upgrade `shivammathur/setup-php` (#1095) --- .github/workflows/branch_alias.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/branch_alias.yml b/.github/workflows/branch_alias.yml index f43964b..fe3ba6a 100644 --- a/.github/workflows/branch_alias.yml +++ b/.github/workflows/branch_alias.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Set up PHP - uses: shivammathur/setup-php@2.7.0 + uses: shivammathur/setup-php@v2 with: php-version: 8.0 coverage: none diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c790a2..1f7c850 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Set up PHP - uses: shivammathur/setup-php@2.7.0 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} coverage: none From 42e4ac01455f4ad4361d98b3bb17ca3c7a572842 Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Wed, 3 Nov 2021 02:48:39 -0700 Subject: [PATCH 03/54] Update generated code (#1129) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update generated code * Apply suggestions from code review Co-authored-by: Jérémy Derussé --- CHANGELOG.md | 4 ++++ src/FirehoseClient.php | 50 +++++++++++++++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 457d417..e341d7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Use specific configuration for `us` regions + ## 0.1.0 First version diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index 938f425..94bb2ae 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -102,14 +102,6 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; - case 'us-gov-east-1': - case 'us-gov-west-1': - return [ - 'endpoint' => "https://firehose.$region.amazonaws.com", - 'signRegion' => $region, - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; case 'us-iso-east-1': return [ 'endpoint' => "https://firehose.$region.c2s.ic.gov", @@ -159,6 +151,48 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; + case 'us-east-1': + return [ + 'endpoint' => 'https://firehose.us-east-1.amazonaws.com', + 'signRegion' => 'us-east-1', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; + case 'us-east-2': + return [ + 'endpoint' => 'https://firehose.us-east-2.amazonaws.com', + 'signRegion' => 'us-east-2', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; + case 'us-gov-east-1': + return [ + 'endpoint' => 'https://firehose.us-gov-east-1.amazonaws.com', + 'signRegion' => 'us-gov-east-1', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; + case 'us-gov-west-1': + return [ + 'endpoint' => 'https://firehose.us-gov-west-1.amazonaws.com', + 'signRegion' => 'us-gov-west-1', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; + case 'us-west-1': + return [ + 'endpoint' => 'https://firehose.us-west-1.amazonaws.com', + 'signRegion' => 'us-west-1', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; + case 'us-west-2': + return [ + 'endpoint' => 'https://firehose.us-west-2.amazonaws.com', + 'signRegion' => 'us-west-2', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; } return [ From 6c4ac08d586006c52547cfda0371b7255f6f2a42 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 16 Dec 2021 08:49:26 +0000 Subject: [PATCH 04/54] Fixed Composer Normalize workflow (#1144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed Composer Normalize workflow * Fix subprojects Co-authored-by: Jérémy Derussé --- composer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 2201ff2..5376fe4 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,8 @@ { "name": "async-aws/firehose", - "type": "library", "description": "Firehose client, part of the AWS SDK provided by AsyncAws.", + "license": "MIT", + "type": "library", "keywords": [ "aws", "amazon", @@ -9,18 +10,12 @@ "async-aws", "firehose" ], - "license": "MIT", "require": { "php": "^7.2.5 || ^8.0", "ext-filter": "*", "ext-json": "*", "async-aws/core": "^1.9" }, - "extra": { - "branch-alias": { - "dev-master": "0.2-dev" - } - }, "autoload": { "psr-4": { "AsyncAws\\Firehose\\": "src" @@ -30,5 +25,10 @@ "psr-4": { "AsyncAws\\Firehose\\Tests\\": "tests/" } + }, + "extra": { + "branch-alias": { + "dev-master": "0.2-dev" + } } } From cb9e45faf49f52d7194ba923598ac5205054308c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Fri, 17 Dec 2021 18:43:18 +0100 Subject: [PATCH 05/54] Bump CI to php 8.1 (and tests root against php 8.2) (#1148) --- .github/workflows/branch_alias.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/branch_alias.yml b/.github/workflows/branch_alias.yml index fe3ba6a..78f7734 100644 --- a/.github/workflows/branch_alias.yml +++ b/.github/workflows/branch_alias.yml @@ -13,7 +13,7 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 coverage: none - name: Find branch alias diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f7c850..4e80845 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 10 matrix: - php: ['7.2', '7.3', '7.4', '8.0'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1'] steps: - name: Set up PHP From 1c39b48af5c4c3b36551dc3d91e0e93c39bd14ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 1 Feb 2022 13:21:05 +0100 Subject: [PATCH 06/54] Simplify generated endpointMetadata (#1176) --- src/FirehoseClient.php | 46 ++---------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index 94bb2ae..0890229 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -104,8 +104,8 @@ protected function getEndpointMetadata(?string $region): array ]; case 'us-iso-east-1': return [ - 'endpoint' => "https://firehose.$region.c2s.ic.gov", - 'signRegion' => $region, + 'endpoint' => 'https://firehose.us-iso-east-1.c2s.ic.gov', + 'signRegion' => 'us-iso-east-1', 'signService' => 'firehose', 'signVersions' => ['v4'], ]; @@ -151,48 +151,6 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; - case 'us-east-1': - return [ - 'endpoint' => 'https://firehose.us-east-1.amazonaws.com', - 'signRegion' => 'us-east-1', - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; - case 'us-east-2': - return [ - 'endpoint' => 'https://firehose.us-east-2.amazonaws.com', - 'signRegion' => 'us-east-2', - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; - case 'us-gov-east-1': - return [ - 'endpoint' => 'https://firehose.us-gov-east-1.amazonaws.com', - 'signRegion' => 'us-gov-east-1', - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; - case 'us-gov-west-1': - return [ - 'endpoint' => 'https://firehose.us-gov-west-1.amazonaws.com', - 'signRegion' => 'us-gov-west-1', - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; - case 'us-west-1': - return [ - 'endpoint' => 'https://firehose.us-west-1.amazonaws.com', - 'signRegion' => 'us-west-1', - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; - case 'us-west-2': - return [ - 'endpoint' => 'https://firehose.us-west-2.amazonaws.com', - 'signRegion' => 'us-west-2', - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; } return [ From e84913faaf403c00f3bed47cbf05d4f66a047cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 4 Apr 2022 14:56:16 +0200 Subject: [PATCH 07/54] Fix recusion in json object generation (#1210) --- src/Result/PutRecordBatchOutput.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Result/PutRecordBatchOutput.php b/src/Result/PutRecordBatchOutput.php index 9f9c7ce..d962bb7 100644 --- a/src/Result/PutRecordBatchOutput.php +++ b/src/Result/PutRecordBatchOutput.php @@ -58,6 +58,15 @@ protected function populateResult(Response $response): void $this->requestResponses = $this->populateResultPutRecordBatchResponseEntryList($data['RequestResponses']); } + private function populateResultPutRecordBatchResponseEntry(array $json): PutRecordBatchResponseEntry + { + return new PutRecordBatchResponseEntry([ + 'RecordId' => isset($json['RecordId']) ? (string) $json['RecordId'] : null, + 'ErrorCode' => isset($json['ErrorCode']) ? (string) $json['ErrorCode'] : null, + 'ErrorMessage' => isset($json['ErrorMessage']) ? (string) $json['ErrorMessage'] : null, + ]); + } + /** * @return PutRecordBatchResponseEntry[] */ @@ -65,11 +74,7 @@ private function populateResultPutRecordBatchResponseEntryList(array $json): arr { $items = []; foreach ($json as $item) { - $items[] = new PutRecordBatchResponseEntry([ - 'RecordId' => isset($item['RecordId']) ? (string) $item['RecordId'] : null, - 'ErrorCode' => isset($item['ErrorCode']) ? (string) $item['ErrorCode'] : null, - 'ErrorMessage' => isset($item['ErrorMessage']) ? (string) $item['ErrorMessage'] : null, - ]); + $items[] = $this->populateResultPutRecordBatchResponseEntry($item); } return $items; From 721b47cab8fb2f848aedce60e84e15c42c8e96cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Sat, 28 May 2022 01:40:14 +0200 Subject: [PATCH 08/54] prepare next release (#1248) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e341d7f..5202363 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 0.1.1 + ### Added - AWS api-change: Use specific configuration for `us` regions From 02e766f910f31c4d4c63494bf429da5b36543ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Fri, 29 Jul 2022 00:51:07 +0200 Subject: [PATCH 09/54] Improve region deduplication (#1277) --- src/FirehoseClient.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index 0890229..22a9749 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -102,13 +102,6 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; - case 'us-iso-east-1': - return [ - 'endpoint' => 'https://firehose.us-iso-east-1.c2s.ic.gov', - 'signRegion' => 'us-iso-east-1', - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; case 'fips-us-east-1': return [ 'endpoint' => 'https://firehose-fips.us-east-1.amazonaws.com', @@ -123,6 +116,20 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; + case 'fips-us-west-1': + return [ + 'endpoint' => 'https://firehose-fips.us-west-1.amazonaws.com', + 'signRegion' => 'us-west-1', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; + case 'fips-us-west-2': + return [ + 'endpoint' => 'https://firehose-fips.us-west-2.amazonaws.com', + 'signRegion' => 'us-west-2', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; case 'fips-us-gov-east-1': return [ 'endpoint' => 'https://firehose-fips.us-gov-east-1.amazonaws.com', @@ -137,17 +144,10 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; - case 'fips-us-west-1': - return [ - 'endpoint' => 'https://firehose-fips.us-west-1.amazonaws.com', - 'signRegion' => 'us-west-1', - 'signService' => 'firehose', - 'signVersions' => ['v4'], - ]; - case 'fips-us-west-2': + case 'us-iso-east-1': return [ - 'endpoint' => 'https://firehose-fips.us-west-2.amazonaws.com', - 'signRegion' => 'us-west-2', + 'endpoint' => 'https://firehose.us-iso-east-1.c2s.ic.gov', + 'signRegion' => 'us-iso-east-1', 'signService' => 'firehose', 'signVersions' => ['v4'], ]; From 4b0ec4a36339d0c166dfdc1a83b18bbe5f335f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 6 Sep 2022 14:34:22 +0200 Subject: [PATCH 10/54] Run tests with PHP 8.2 (#1299) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e80845..45dfe7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 10 matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] steps: - name: Set up PHP From 633378b1552a90112edd796a7e476a12d77fc558 Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Tue, 29 Nov 2022 00:05:23 -0800 Subject: [PATCH 11/54] Update generated code (#1338) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update generated code * Update src/Service/CloudWatch/CHANGELOG.md Co-authored-by: Jérémy Derussé --- CHANGELOG.md | 4 ++++ src/FirehoseClient.php | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5202363..b7335e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Added `us-iso-west-1` region + ## 0.1.1 ### Added diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index 22a9749..f033767 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -145,9 +145,10 @@ protected function getEndpointMetadata(?string $region): array 'signVersions' => ['v4'], ]; case 'us-iso-east-1': + case 'us-iso-west-1': return [ - 'endpoint' => 'https://firehose.us-iso-east-1.c2s.ic.gov', - 'signRegion' => 'us-iso-east-1', + 'endpoint' => "https://firehose.$region.c2s.ic.gov", + 'signRegion' => $region, 'signService' => 'firehose', 'signVersions' => ['v4'], ]; From 7031c7be0304a01f2682deea4e0a05d222d6e893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Wed, 30 Nov 2022 09:14:25 +0100 Subject: [PATCH 12/54] Prepare next release (#1341) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7335e3..f909753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.0.0 + ### Added - AWS api-change: Added `us-iso-west-1` region From d1240b15f31be5a0a8fb0b78916766955de516f0 Mon Sep 17 00:00:00 2001 From: AsyncAws Bot Date: Wed, 30 Nov 2022 08:20:48 +0000 Subject: [PATCH 13/54] Update branch alias --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5376fe4..a401230 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "0.2-dev" + "dev-master": "1.1-dev" } } } From e0f4568269482db0030ce671af5daecb047c3d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 2 Jan 2023 11:08:13 +0100 Subject: [PATCH 14/54] Update php-cs-fixer (#1353) --- src/FirehoseClient.php | 2 ++ src/Input/PutRecordBatchInput.php | 1 + src/Input/PutRecordInput.php | 1 + 3 files changed, 4 insertions(+) diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index f033767..c591563 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -29,6 +29,7 @@ class FirehoseClient extends AbstractApi * @param array{ * DeliveryStreamName: string, * Record: Record|array, + * * @region?: string, * }|PutRecordInput $input * @@ -61,6 +62,7 @@ public function putRecord($input): PutRecordOutput * @param array{ * DeliveryStreamName: string, * Records: Record[], + * * @region?: string, * }|PutRecordBatchInput $input * diff --git a/src/Input/PutRecordBatchInput.php b/src/Input/PutRecordBatchInput.php index 7668eec..496883a 100644 --- a/src/Input/PutRecordBatchInput.php +++ b/src/Input/PutRecordBatchInput.php @@ -32,6 +32,7 @@ final class PutRecordBatchInput extends Input * @param array{ * DeliveryStreamName?: string, * Records?: Record[], + * * @region?: string, * } $input */ diff --git a/src/Input/PutRecordInput.php b/src/Input/PutRecordInput.php index f6bef97..4283558 100644 --- a/src/Input/PutRecordInput.php +++ b/src/Input/PutRecordInput.php @@ -32,6 +32,7 @@ final class PutRecordInput extends Input * @param array{ * DeliveryStreamName?: string, * Record?: Record|array, + * * @region?: string, * } $input */ From 81e830a041bcd667f3bb94ff7966def13261c4b0 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Tue, 30 May 2023 10:30:32 +0200 Subject: [PATCH 15/54] Update the GitHub Actions configuration (#1416) --- .github/workflows/checks.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 1a72276..30bc8de 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Modify composer.json run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45dfe7b..78d4ac8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Initialize tests run: make initialize From 106b19b02882d603053a0a2677f3b3093a526943 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Wed, 31 May 2023 12:10:07 +0200 Subject: [PATCH 16/54] Remove usage of ::set-output in GitHub Actions (#1422) --- .github/workflows/branch_alias.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branch_alias.yml b/.github/workflows/branch_alias.yml index 78f7734..104809a 100644 --- a/.github/workflows/branch_alias.yml +++ b/.github/workflows/branch_alias.yml @@ -23,7 +23,7 @@ jobs: echo "Last tag was $TAG" ARR=(${TAG//./ }) ARR[1]=$((${ARR[1]}+1)) - echo ::set-output name=alias::${ARR[0]}.${ARR[1]} + echo "alias=${ARR[0]}.${ARR[1]}" >> $GITHUB_OUTPUT - name: Checkout main repo run: | From db4745e98de905e2424dcd1dde35638f7e617f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 12 Jun 2023 09:34:01 +0200 Subject: [PATCH 17/54] Generates proper documentation for classes and properties (#1418) --- src/Exception/ServiceUnavailableException.php | 4 +- src/FirehoseClient.php | 74 +++++++++++++++++++ src/ValueObject/Record.php | 2 +- 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/src/Exception/ServiceUnavailableException.php b/src/Exception/ServiceUnavailableException.php index 2de2343..1aa0366 100644 --- a/src/Exception/ServiceUnavailableException.php +++ b/src/Exception/ServiceUnavailableException.php @@ -8,9 +8,9 @@ /** * The service is unavailable. Back off and retry the operation. If you continue to see the exception, throughput limits * for the delivery stream may have been exceeded. For more information about limits and how to request an increase, see - * Amazon Kinesis Data Firehose Limits. + * Amazon Kinesis Data Firehose Limits [^1]. * - * @see https://docs.aws.amazon.com/firehose/latest/dev/limits.html + * [^1]: https://docs.aws.amazon.com/firehose/latest/dev/limits.html */ final class ServiceUnavailableException extends ClientException { diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index c591563..b0df8a3 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -23,6 +23,35 @@ class FirehoseClient extends AbstractApi * Writes a single data record into an Amazon Kinesis Data Firehose delivery stream. To write multiple data records into * a delivery stream, use PutRecordBatch. Applications using these operations are referred to as producers. * + * By default, each delivery stream can take in up to 2,000 transactions per second, 5,000 records per second, or 5 MB + * per second. If you use PutRecord and PutRecordBatch, the limits are an aggregate across these two operations for each + * delivery stream. For more information about limits and how to request an increase, see Amazon Kinesis Data Firehose + * Limits [^1]. + * + * You must specify the name of the delivery stream and the data record when using PutRecord. The data record consists + * of a data blob that can be up to 1,000 KiB in size, and any kind of data. For example, it can be a segment from a log + * file, geographic location data, website clickstream data, and so on. + * + * Kinesis Data Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at + * the destination, a common solution is to use delimiters in the data, such as a newline (`\n`) or some other character + * unique within the data. This allows the consumer application to parse individual data items when reading the data + * from the destination. + * + * The `PutRecord` operation returns a `RecordId`, which is a unique string assigned to each record. Producer + * applications can use this ID for purposes such as auditability and investigation. + * + * If the `PutRecord` operation throws a `ServiceUnavailableException`, back off and retry. If the exception persists, + * it is possible that the throughput limits have been exceeded for the delivery stream. + * + * Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream + * as it tries to send the records to the destination. If the destination is unreachable for more than 24 hours, the + * data is no longer available. + * + * ! Don't concatenate two or more base64 strings to form the data fields of your records. Instead, concatenate the raw + * ! data, then perform base64 encoding. + * + * [^1]: https://docs.aws.amazon.com/firehose/latest/dev/limits.html + * * @see https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecord.html * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-firehose-2015-08-04.html#putrecord * @@ -56,6 +85,51 @@ public function putRecord($input): PutRecordOutput * producer than when writing single records. To write single data records into a delivery stream, use PutRecord. * Applications using these operations are referred to as producers. * + * For information about service quota, see Amazon Kinesis Data Firehose Quota [^1]. + * + * Each PutRecordBatch request supports up to 500 records. Each record in the request can be as large as 1,000 KB + * (before base64 encoding), up to a limit of 4 MB for the entire request. These limits cannot be changed. + * + * You must specify the name of the delivery stream and the data record when using PutRecord. The data record consists + * of a data blob that can be up to 1,000 KB in size, and any kind of data. For example, it could be a segment from a + * log file, geographic location data, website clickstream data, and so on. + * + * Kinesis Data Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at + * the destination, a common solution is to use delimiters in the data, such as a newline (`\n`) or some other character + * unique within the data. This allows the consumer application to parse individual data items when reading the data + * from the destination. + * + * The PutRecordBatch response includes a count of failed records, `FailedPutCount`, and an array of responses, + * `RequestResponses`. Even if the PutRecordBatch call succeeds, the value of `FailedPutCount` may be greater than 0, + * indicating that there are records for which the operation didn't succeed. Each entry in the `RequestResponses` array + * provides additional information about the processed record. It directly correlates with a record in the request array + * using the same ordering, from the top to the bottom. The response array always includes the same number of records as + * the request array. `RequestResponses` includes both successfully and unsuccessfully processed records. Kinesis Data + * Firehose tries to process all records in each PutRecordBatch request. A single record failure does not stop the + * processing of subsequent records. + * + * A successfully processed record includes a `RecordId` value, which is unique for the record. An unsuccessfully + * processed record includes `ErrorCode` and `ErrorMessage` values. `ErrorCode` reflects the type of error, and is one + * of the following values: `ServiceUnavailableException` or `InternalFailure`. `ErrorMessage` provides more detailed + * information about the error. + * + * If there is an internal server error or a timeout, the write might have completed or it might have failed. If + * `FailedPutCount` is greater than 0, retry the request, resending only those records that might have failed + * processing. This minimizes the possible duplicate records and also reduces the total bytes sent (and corresponding + * charges). We recommend that you handle any duplicates at the destination. + * + * If PutRecordBatch throws `ServiceUnavailableException`, back off and retry. If the exception persists, it is possible + * that the throughput limits have been exceeded for the delivery stream. + * + * Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream + * as it attempts to send the records to the destination. If the destination is unreachable for more than 24 hours, the + * data is no longer available. + * + * ! Don't concatenate two or more base64 strings to form the data fields of your records. Instead, concatenate the raw + * ! data, then perform base64 encoding. + * + * [^1]: https://docs.aws.amazon.com/firehose/latest/dev/limits.html + * * @see https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-firehose-2015-08-04.html#putrecordbatch * diff --git a/src/ValueObject/Record.php b/src/ValueObject/Record.php index dbb0ed0..ad10bdf 100644 --- a/src/ValueObject/Record.php +++ b/src/ValueObject/Record.php @@ -5,7 +5,7 @@ use AsyncAws\Core\Exception\InvalidArgument; /** - * The record. + * The unit of data in a delivery stream. */ final class Record { From 7f27621929bf41e4d56ad648fd684e7542925e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 13 Jun 2023 11:27:45 +0200 Subject: [PATCH 18/54] Use GHA without docker to run BC-Checks (#1438) --- .github/workflows/checks.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 30bc8de..a2ea916 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -23,5 +23,14 @@ jobs: git config --local user.name "AsyncAws Bot" git commit -am "Allow unstable dependencies" + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + tools: composer:v2 + + - name: Install roave/backward-compatibility-check + run: composer require --dev roave/backward-compatibility-check + - name: Roave BC Check - uses: docker://nyholm/roave-bc-check-ga + run: vendor/bin/roave-backward-compatibility-check From 13eb340222c3f790fbab243180efb37304864f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 13 Jun 2023 12:27:04 +0200 Subject: [PATCH 19/54] Fix Roave BC script (#1441) --- .github/workflows/checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index a2ea916..c73d351 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Modify composer.json run: | From 0e546d3debc6825bc3f85b8bf2672994f1f056b9 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Fri, 23 Jun 2023 11:12:59 +0200 Subject: [PATCH 20/54] Generate valid phpdoc param tags (#1457) * Fix the phpdoc of the RequestContext * Generate valid phpdoc param tags When an array shape key starts with a `@` like `@region`, it must be quoted in the phpdoc as the unquoted one would be interpreted as the next phpdoc tag. * Use an unsealed shape for the type in Input This avoids reports about passing extra keys from child classes in Psalm. * Allow passing null as the region in the input The base input class already accept null values in addition to omitted values for the region. * Update the psalm baseline * Disallow invalid docblocks in Psalm as well --- src/FirehoseClient.php | 6 ++---- src/Input/PutRecordBatchInput.php | 3 +-- src/Input/PutRecordInput.php | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index b0df8a3..ce68368 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -58,8 +58,7 @@ class FirehoseClient extends AbstractApi * @param array{ * DeliveryStreamName: string, * Record: Record|array, - * - * @region?: string, + * '@region'?: string|null, * }|PutRecordInput $input * * @throws ResourceNotFoundException @@ -136,8 +135,7 @@ public function putRecord($input): PutRecordOutput * @param array{ * DeliveryStreamName: string, * Records: Record[], - * - * @region?: string, + * '@region'?: string|null, * }|PutRecordBatchInput $input * * @throws ResourceNotFoundException diff --git a/src/Input/PutRecordBatchInput.php b/src/Input/PutRecordBatchInput.php index 496883a..7292e1b 100644 --- a/src/Input/PutRecordBatchInput.php +++ b/src/Input/PutRecordBatchInput.php @@ -32,8 +32,7 @@ final class PutRecordBatchInput extends Input * @param array{ * DeliveryStreamName?: string, * Records?: Record[], - * - * @region?: string, + * '@region'?: string|null, * } $input */ public function __construct(array $input = []) diff --git a/src/Input/PutRecordInput.php b/src/Input/PutRecordInput.php index 4283558..64a7aee 100644 --- a/src/Input/PutRecordInput.php +++ b/src/Input/PutRecordInput.php @@ -32,8 +32,7 @@ final class PutRecordInput extends Input * @param array{ * DeliveryStreamName?: string, * Record?: Record|array, - * - * @region?: string, + * '@region'?: string|null, * } $input */ public function __construct(array $input = []) From 4a3e5021b430f252eaf596ecce7f167d19fc37cf Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 24 Jun 2023 18:58:20 +0200 Subject: [PATCH 21/54] Generate the phpdoc for the static create method of objects (#1464) --- src/Input/PutRecordBatchInput.php | 7 +++++++ src/Input/PutRecordInput.php | 7 +++++++ src/ValueObject/PutRecordBatchResponseEntry.php | 7 +++++++ src/ValueObject/Record.php | 5 +++++ 4 files changed, 26 insertions(+) diff --git a/src/Input/PutRecordBatchInput.php b/src/Input/PutRecordBatchInput.php index 7292e1b..467ee2d 100644 --- a/src/Input/PutRecordBatchInput.php +++ b/src/Input/PutRecordBatchInput.php @@ -42,6 +42,13 @@ public function __construct(array $input = []) parent::__construct($input); } + /** + * @param array{ + * DeliveryStreamName?: string, + * Records?: Record[], + * '@region'?: string|null, + * }|PutRecordBatchInput $input + */ public static function create($input): self { return $input instanceof self ? $input : new self($input); diff --git a/src/Input/PutRecordInput.php b/src/Input/PutRecordInput.php index 64a7aee..1ed9909 100644 --- a/src/Input/PutRecordInput.php +++ b/src/Input/PutRecordInput.php @@ -42,6 +42,13 @@ public function __construct(array $input = []) parent::__construct($input); } + /** + * @param array{ + * DeliveryStreamName?: string, + * Record?: Record|array, + * '@region'?: string|null, + * }|PutRecordInput $input + */ public static function create($input): self { return $input instanceof self ? $input : new self($input); diff --git a/src/ValueObject/PutRecordBatchResponseEntry.php b/src/ValueObject/PutRecordBatchResponseEntry.php index a688c6f..b19cd25 100644 --- a/src/ValueObject/PutRecordBatchResponseEntry.php +++ b/src/ValueObject/PutRecordBatchResponseEntry.php @@ -38,6 +38,13 @@ public function __construct(array $input) $this->errorMessage = $input['ErrorMessage'] ?? null; } + /** + * @param array{ + * RecordId?: null|string, + * ErrorCode?: null|string, + * ErrorMessage?: null|string, + * }|PutRecordBatchResponseEntry $input + */ public static function create($input): self { return $input instanceof self ? $input : new self($input); diff --git a/src/ValueObject/Record.php b/src/ValueObject/Record.php index ad10bdf..0455948 100644 --- a/src/ValueObject/Record.php +++ b/src/ValueObject/Record.php @@ -25,6 +25,11 @@ public function __construct(array $input) $this->data = $input['Data'] ?? null; } + /** + * @param array{ + * Data: string, + * }|Record $input + */ public static function create($input): self { return $input instanceof self ? $input : new self($input); From 2c214c50973d0d453e2214a0df2d8345bf3b9209 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Mon, 26 Jun 2023 09:52:50 +0200 Subject: [PATCH 22/54] Fix the generated param types for maps and lists (#1466) The constructor are not enforcing the usage of value objects. They also support passing an array accepted by the create method. --- src/FirehoseClient.php | 2 +- src/Input/PutRecordBatchInput.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index ce68368..fffaa36 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -134,7 +134,7 @@ public function putRecord($input): PutRecordOutput * * @param array{ * DeliveryStreamName: string, - * Records: Record[], + * Records: array, * '@region'?: string|null, * }|PutRecordBatchInput $input * diff --git a/src/Input/PutRecordBatchInput.php b/src/Input/PutRecordBatchInput.php index 467ee2d..814ae59 100644 --- a/src/Input/PutRecordBatchInput.php +++ b/src/Input/PutRecordBatchInput.php @@ -31,7 +31,7 @@ final class PutRecordBatchInput extends Input /** * @param array{ * DeliveryStreamName?: string, - * Records?: Record[], + * Records?: array, * '@region'?: string|null, * } $input */ @@ -45,7 +45,7 @@ public function __construct(array $input = []) /** * @param array{ * DeliveryStreamName?: string, - * Records?: Record[], + * Records?: array, * '@region'?: string|null, * }|PutRecordBatchInput $input */ From 5e49711614bd5db83653e96a20f97440c2a99047 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 1 Jul 2023 22:49:08 +0200 Subject: [PATCH 23/54] Validate value object required fields in the constructor (#1488) * Refactor the code generating object properties * Refactor the generation of array getters Optional array fields still need to consider the property as nullable even though the getter will return an empty array as AWS does not treat absent lists the same than empty lists in input. * Add validation of required parameters in value object constructors * Remove checks for missing properties for value object request bodies This is already validated in the constructor now. --- src/ValueObject/Record.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ValueObject/Record.php b/src/ValueObject/Record.php index 0455948..ea9216e 100644 --- a/src/ValueObject/Record.php +++ b/src/ValueObject/Record.php @@ -22,7 +22,7 @@ final class Record */ public function __construct(array $input) { - $this->data = $input['Data'] ?? null; + $this->data = $input['Data'] ?? $this->throwException(new InvalidArgument('Missing required field "Data".')); } /** @@ -46,11 +46,17 @@ public function getData(): string public function requestBody(): array { $payload = []; - if (null === $v = $this->data) { - throw new InvalidArgument(sprintf('Missing parameter "Data" for "%s". The value cannot be null.', __CLASS__)); - } + $v = $this->data; $payload['Data'] = base64_encode($v); return $payload; } + + /** + * @return never + */ + private function throwException(\Throwable $exception) + { + throw $exception; + } } From e47ab222e5bb1b2df8dae395f7fc7b02de9eda3b Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Mon, 3 Jul 2023 08:09:15 +0200 Subject: [PATCH 24/54] Generate the property type for generated objects (#1467) --- src/Result/PutRecordBatchOutput.php | 6 ++++++ src/Result/PutRecordOutput.php | 4 ++++ src/ValueObject/PutRecordBatchResponseEntry.php | 6 ++++++ src/ValueObject/Record.php | 2 ++ 4 files changed, 18 insertions(+) diff --git a/src/Result/PutRecordBatchOutput.php b/src/Result/PutRecordBatchOutput.php index d962bb7..6db230f 100644 --- a/src/Result/PutRecordBatchOutput.php +++ b/src/Result/PutRecordBatchOutput.php @@ -11,17 +11,23 @@ class PutRecordBatchOutput extends Result /** * The number of records that might have failed processing. This number might be greater than 0 even if the * PutRecordBatch call succeeds. Check `FailedPutCount` to determine whether there are records that you need to resend. + * + * @var int */ private $failedPutCount; /** * Indicates whether server-side encryption (SSE) was enabled during this operation. + * + * @var bool|null */ private $encrypted; /** * The results array. For each record, the index of the response element is the same as the index used in the request * array. + * + * @var PutRecordBatchResponseEntry[] */ private $requestResponses; diff --git a/src/Result/PutRecordOutput.php b/src/Result/PutRecordOutput.php index ed95ce5..4a872c9 100644 --- a/src/Result/PutRecordOutput.php +++ b/src/Result/PutRecordOutput.php @@ -9,11 +9,15 @@ class PutRecordOutput extends Result { /** * The ID of the record. + * + * @var string */ private $recordId; /** * Indicates whether server-side encryption (SSE) was enabled during this operation. + * + * @var bool|null */ private $encrypted; diff --git a/src/ValueObject/PutRecordBatchResponseEntry.php b/src/ValueObject/PutRecordBatchResponseEntry.php index b19cd25..86e4e97 100644 --- a/src/ValueObject/PutRecordBatchResponseEntry.php +++ b/src/ValueObject/PutRecordBatchResponseEntry.php @@ -11,16 +11,22 @@ final class PutRecordBatchResponseEntry { /** * The ID of the record. + * + * @var string|null */ private $recordId; /** * The error code for an individual record result. + * + * @var string|null */ private $errorCode; /** * The error message for an individual record result. + * + * @var string|null */ private $errorMessage; diff --git a/src/ValueObject/Record.php b/src/ValueObject/Record.php index ea9216e..5d61dfd 100644 --- a/src/ValueObject/Record.php +++ b/src/ValueObject/Record.php @@ -12,6 +12,8 @@ final class Record /** * The data blob, which is base64-encoded when the blob is serialized. The maximum size of the data blob, before * base64-encoding, is 1,000 KiB. + * + * @var string */ private $data; From 23021ac81446e0874bfbd6af210c14a5d37a02a8 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 8 Jul 2023 18:13:55 +0200 Subject: [PATCH 25/54] Avoid overriding the exception message with the raw message (#1516) --- src/Exception/InvalidArgumentException.php | 9 --------- src/Exception/InvalidKMSResourceException.php | 12 ------------ src/Exception/ResourceNotFoundException.php | 9 --------- src/Exception/ServiceUnavailableException.php | 9 --------- 4 files changed, 39 deletions(-) diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 94e6415..6b39b70 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -3,19 +3,10 @@ namespace AsyncAws\Firehose\Exception; use AsyncAws\Core\Exception\Http\ClientException; -use Symfony\Contracts\HttpClient\ResponseInterface; /** * The specified input parameter has a value that is not valid. */ final class InvalidArgumentException extends ClientException { - protected function populateResult(ResponseInterface $response): void - { - $data = $response->toArray(false); - - if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) { - $this->message = $v; - } - } } diff --git a/src/Exception/InvalidKMSResourceException.php b/src/Exception/InvalidKMSResourceException.php index d018a0c..4f53ce8 100644 --- a/src/Exception/InvalidKMSResourceException.php +++ b/src/Exception/InvalidKMSResourceException.php @@ -3,7 +3,6 @@ namespace AsyncAws\Firehose\Exception; use AsyncAws\Core\Exception\Http\ClientException; -use Symfony\Contracts\HttpClient\ResponseInterface; /** * Kinesis Data Firehose throws this exception when an attempt to put records or to start or stop delivery stream @@ -12,15 +11,4 @@ */ final class InvalidKMSResourceException extends ClientException { - protected function populateResult(ResponseInterface $response): void - { - $data = $response->toArray(false); - - if (null !== $v = (isset($data['code']) ? (string) $data['code'] : null)) { - $this->code = $v; - } - if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) { - $this->message = $v; - } - } } diff --git a/src/Exception/ResourceNotFoundException.php b/src/Exception/ResourceNotFoundException.php index a0a17fb..99a1c7f 100644 --- a/src/Exception/ResourceNotFoundException.php +++ b/src/Exception/ResourceNotFoundException.php @@ -3,19 +3,10 @@ namespace AsyncAws\Firehose\Exception; use AsyncAws\Core\Exception\Http\ClientException; -use Symfony\Contracts\HttpClient\ResponseInterface; /** * The specified resource could not be found. */ final class ResourceNotFoundException extends ClientException { - protected function populateResult(ResponseInterface $response): void - { - $data = $response->toArray(false); - - if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) { - $this->message = $v; - } - } } diff --git a/src/Exception/ServiceUnavailableException.php b/src/Exception/ServiceUnavailableException.php index 1aa0366..4f99b15 100644 --- a/src/Exception/ServiceUnavailableException.php +++ b/src/Exception/ServiceUnavailableException.php @@ -3,7 +3,6 @@ namespace AsyncAws\Firehose\Exception; use AsyncAws\Core\Exception\Http\ClientException; -use Symfony\Contracts\HttpClient\ResponseInterface; /** * The service is unavailable. Back off and retry the operation. If you continue to see the exception, throughput limits @@ -14,12 +13,4 @@ */ final class ServiceUnavailableException extends ClientException { - protected function populateResult(ResponseInterface $response): void - { - $data = $response->toArray(false); - - if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) { - $this->message = $v; - } - } } From 9eb13a83ab3476e7487c94f760ef70d96d6334d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 7 Aug 2023 22:00:50 +0200 Subject: [PATCH 26/54] prepare next release (#1536) --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f909753..de95c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Change Log -## NOT RELEASED +## 1.1.0 + +### Added + +- Avoid overriding the exception message with the raw message + +### Changed + +- Improve parameter type and return type in phpdoc ## 1.0.0 From 1bfc3d77ac9d8f57c76096add099205fac71e25b Mon Sep 17 00:00:00 2001 From: AsyncAws Bot Date: Mon, 7 Aug 2023 21:14:18 +0000 Subject: [PATCH 27/54] Update branch alias --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a401230..639499c 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.2-dev" } } } From d65fffd6886ae7e6d2a34f604d04bd7b1027cf42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 8 Aug 2023 13:25:17 +0200 Subject: [PATCH 28/54] restore `not release` entry in changelogs (#1539) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de95c79..8d28eb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## NOT RELEASED + ## 1.1.0 ### Added From e4deb74af601b6bfc8f503d33d3e312f78a03771 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 30 Aug 2023 09:47:15 +0100 Subject: [PATCH 29/54] Test on PHP 8.3 (#1560) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78d4ac8..ecfd8ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 10 matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] steps: - name: Set up PHP From 12dd4ebc1f540affe7cc1af7558bf63f60f2f720 Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Thu, 28 Sep 2023 00:11:16 -0700 Subject: [PATCH 30/54] Update generated code (#1577) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update generated code * Update src/Service/Ses/CHANGELOG.md --------- Co-authored-by: Jérémy Derussé --- CHANGELOG.md | 4 ++++ src/FirehoseClient.php | 25 +++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d28eb3..2e91eb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Changed + +- AWS enhancement: Documentation updates. + ## 1.1.0 ### Added diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index fffaa36..71b576c 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -28,6 +28,11 @@ class FirehoseClient extends AbstractApi * delivery stream. For more information about limits and how to request an increase, see Amazon Kinesis Data Firehose * Limits [^1]. * + * Kinesis Data Firehose accumulates and publishes a particular metric for a customer account in one minute intervals. + * It is possible that the bursts of incoming bytes/records ingested to a delivery stream last only for a few seconds. + * Due to this, the actual spikes in the traffic might not be fully visible in the customer's 1 minute CloudWatch + * metrics. + * * You must specify the name of the delivery stream and the data record when using PutRecord. The data record consists * of a data blob that can be up to 1,000 KiB in size, and any kind of data. For example, it can be a segment from a log * file, geographic location data, website clickstream data, and so on. @@ -40,8 +45,12 @@ class FirehoseClient extends AbstractApi * The `PutRecord` operation returns a `RecordId`, which is a unique string assigned to each record. Producer * applications can use this ID for purposes such as auditability and investigation. * - * If the `PutRecord` operation throws a `ServiceUnavailableException`, back off and retry. If the exception persists, - * it is possible that the throughput limits have been exceeded for the delivery stream. + * If the `PutRecord` operation throws a `ServiceUnavailableException`, the API is automatically reinvoked (retried) 3 + * times. If the exception persists, it is possible that the throughput limits have been exceeded for the delivery + * stream. + * + * Re-invoking the Put API operations (for example, PutRecord and PutRecordBatch) can result in data duplicates. For + * larger data assets, allow for a longer time out before retrying Put API operations. * * Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream * as it tries to send the records to the destination. If the destination is unreachable for more than 24 hours, the @@ -84,6 +93,11 @@ public function putRecord($input): PutRecordOutput * producer than when writing single records. To write single data records into a delivery stream, use PutRecord. * Applications using these operations are referred to as producers. * + * Kinesis Data Firehose accumulates and publishes a particular metric for a customer account in one minute intervals. + * It is possible that the bursts of incoming bytes/records ingested to a delivery stream last only for a few seconds. + * Due to this, the actual spikes in the traffic might not be fully visible in the customer's 1 minute CloudWatch + * metrics. + * * For information about service quota, see Amazon Kinesis Data Firehose Quota [^1]. * * Each PutRecordBatch request supports up to 500 records. Each record in the request can be as large as 1,000 KB @@ -117,8 +131,11 @@ public function putRecord($input): PutRecordOutput * processing. This minimizes the possible duplicate records and also reduces the total bytes sent (and corresponding * charges). We recommend that you handle any duplicates at the destination. * - * If PutRecordBatch throws `ServiceUnavailableException`, back off and retry. If the exception persists, it is possible - * that the throughput limits have been exceeded for the delivery stream. + * If PutRecordBatch throws `ServiceUnavailableException`, the API is automatically reinvoked (retried) 3 times. If the + * exception persists, it is possible that the throughput limits have been exceeded for the delivery stream. + * + * Re-invoking the Put API operations (for example, PutRecord and PutRecordBatch) can result in data duplicates. For + * larger data assets, allow for a longer time out before retrying Put API operations. * * Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream * as it attempts to send the records to the destination. If the destination is unreachable for more than 24 hours, the From d59563e4b6ea8676bfdc7b61c7c2bc398294ebd3 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Fri, 8 Dec 2023 16:07:29 +0000 Subject: [PATCH 31/54] Work around where empty lists are missing from responses (#1621) --- src/Result/PutRecordBatchOutput.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Result/PutRecordBatchOutput.php b/src/Result/PutRecordBatchOutput.php index 6db230f..66016c7 100644 --- a/src/Result/PutRecordBatchOutput.php +++ b/src/Result/PutRecordBatchOutput.php @@ -61,7 +61,7 @@ protected function populateResult(Response $response): void $this->failedPutCount = (int) $data['FailedPutCount']; $this->encrypted = isset($data['Encrypted']) ? filter_var($data['Encrypted'], \FILTER_VALIDATE_BOOLEAN) : null; - $this->requestResponses = $this->populateResultPutRecordBatchResponseEntryList($data['RequestResponses']); + $this->requestResponses = $this->populateResultPutRecordBatchResponseEntryList($data['RequestResponses'] ?? []); } private function populateResultPutRecordBatchResponseEntry(array $json): PutRecordBatchResponseEntry From e22e02531e772735cf7b370acae49c4185a9121b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Fri, 8 Dec 2023 17:07:40 +0100 Subject: [PATCH 32/54] Add a test to assert branch-alias is well defined (#1610) --- .github/workflows/branch_alias.yml | 76 ------------------------------ composer.json | 2 +- 2 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 .github/workflows/branch_alias.yml diff --git a/.github/workflows/branch_alias.yml b/.github/workflows/branch_alias.yml deleted file mode 100644 index 104809a..0000000 --- a/.github/workflows/branch_alias.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Update branch alias - -on: - push: - tags: ['*'] - -jobs: - branch-alias: - name: Update branch alias - runs-on: ubuntu-latest - - steps: - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.1 - coverage: none - - - name: Find branch alias - id: find_alias - run: | - TAG=$(echo $GITHUB_REF | cut -d'/' -f 3) - echo "Last tag was $TAG" - ARR=(${TAG//./ }) - ARR[1]=$((${ARR[1]}+1)) - echo "alias=${ARR[0]}.${ARR[1]}" >> $GITHUB_OUTPUT - - - name: Checkout main repo - run: | - git clone --branch master https://${{ secrets.BOT_GITHUB_TOKEN }}:x-oauth-basic@github.com/async-aws/aws aws - - - name: Update branch alias - run: | - cd aws/src/Service/Firehose - CURRENT_ALIAS=$(composer config extra.branch-alias.dev-master | cut -d'-' -f 1) - - # If there is a current value on the branch alias - if [ ! -z $CURRENT_ALIAS ]; then - NEW_ALIAS=${{ steps.find_alias.outputs.alias }} - CURRENT_ARR=(${CURRENT_ALIAS//./ }) - NEW_ARR=(${NEW_ALIAS//./ }) - - if [ ${CURRENT_ARR[0]} -gt ${NEW_ARR[0]} ]; then - echo "The current value for major version is larger" - exit 1; - fi - - if [ ${CURRENT_ARR[0]} -eq ${NEW_ARR[0]} ] && [ ${CURRENT_ARR[1]} -gt ${NEW_ARR[1]} ]; then - echo "The current value for minor version is larger" - exit 1; - fi - fi - - composer config extra.branch-alias.dev-master ${{ steps.find_alias.outputs.alias }}-dev - - - name: Commit & push the new files - run: | - echo "::group::git status" - cd aws - git status - echo "::endgroup::" - - git add -N . - if [[ $(git diff --numstat | wc -l) -eq 0 ]]; then - echo "No changes found. Exiting." - exit 0; - fi - - git config --local user.email "github@async-aws.com" - git config --local user.name "AsyncAws Bot" - - echo "::group::git push" - git add . - git commit -m "Update branch alias" - git push - echo "::endgroup::" diff --git a/composer.json b/composer.json index 639499c..a401230 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.1-dev" } } } From aeb2d621c2fb607ab1f698c56ca89fb8930a4a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Wed, 13 Dec 2023 21:52:19 +0100 Subject: [PATCH 33/54] prepare next release (#1624) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e91eb3..1db5700 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.1.1 + ### Changed - AWS enhancement: Documentation updates. From 4fdaf7c1a5226c697bd83e730ae7547b276e8847 Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Fri, 15 Dec 2023 03:20:44 -0800 Subject: [PATCH 34/54] Update generated code (#1627) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update generated code * Update src/Service/Firehose/CHANGELOG.md --------- Co-authored-by: Jérémy Derussé --- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/Exception/InvalidSourceException.php | 12 ++++++++++++ src/FirehoseClient.php | 5 +++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/Exception/InvalidSourceException.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 1db5700..4acb6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Added InvalidSourceException in put operations + ## 1.1.1 ### Changed diff --git a/composer.json b/composer.json index a401230..639499c 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.2-dev" } } } diff --git a/src/Exception/InvalidSourceException.php b/src/Exception/InvalidSourceException.php new file mode 100644 index 0000000..5f583e1 --- /dev/null +++ b/src/Exception/InvalidSourceException.php @@ -0,0 +1,12 @@ + ResourceNotFoundException::class, 'InvalidArgumentException' => InvalidArgumentException::class, 'InvalidKMSResourceException' => InvalidKMSResourceException::class, + 'InvalidSourceException' => InvalidSourceException::class, 'ServiceUnavailableException' => ServiceUnavailableException::class, ]])); @@ -158,6 +161,7 @@ public function putRecord($input): PutRecordOutput * @throws ResourceNotFoundException * @throws InvalidArgumentException * @throws InvalidKMSResourceException + * @throws InvalidSourceException * @throws ServiceUnavailableException */ public function putRecordBatch($input): PutRecordBatchOutput @@ -167,6 +171,7 @@ public function putRecordBatch($input): PutRecordBatchOutput 'ResourceNotFoundException' => ResourceNotFoundException::class, 'InvalidArgumentException' => InvalidArgumentException::class, 'InvalidKMSResourceException' => InvalidKMSResourceException::class, + 'InvalidSourceException' => InvalidSourceException::class, 'ServiceUnavailableException' => ServiceUnavailableException::class, ]])); From 769620c0d19cab05ecd2d14a90445cc03887b869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 9 Jan 2024 09:38:58 +0100 Subject: [PATCH 35/54] Prepare new release (#1640) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4acb6d6..86dc26a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.2.0 + ### Added - AWS api-change: Added InvalidSourceException in put operations From dbaced89a84f56e557725619542299be767d5d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Wed, 10 Jan 2024 21:23:23 +0100 Subject: [PATCH 36/54] Test against PHP 8.4 (#1642) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecfd8ab..346792d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 10 matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] steps: - name: Set up PHP From 5024f870d039abde53971fd322b3e85ad908365b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Thu, 11 Jan 2024 00:55:46 +0100 Subject: [PATCH 37/54] Make PHP 8.3 the default version in tests (#1643) --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c73d351..c767322 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -28,7 +28,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.3 tools: composer:v2 - name: Install roave/backward-compatibility-check From 83906a4c45be78fa46aa24fa1460ad401a6aae8f Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:52:44 -0800 Subject: [PATCH 38/54] Update generated code (#1668) update generated code --- CHANGELOG.md | 4 ++ src/Exception/InvalidKMSResourceException.php | 6 +-- src/Exception/ServiceUnavailableException.php | 2 +- src/FirehoseClient.php | 49 +++++++++---------- 4 files changed, 31 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86dc26a..c573e00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Changed + +- AWS enhancement: Documentation updates. + ## 1.2.0 ### Added diff --git a/src/Exception/InvalidKMSResourceException.php b/src/Exception/InvalidKMSResourceException.php index 4f53ce8..9275a27 100644 --- a/src/Exception/InvalidKMSResourceException.php +++ b/src/Exception/InvalidKMSResourceException.php @@ -5,9 +5,9 @@ use AsyncAws\Core\Exception\Http\ClientException; /** - * Kinesis Data Firehose throws this exception when an attempt to put records or to start or stop delivery stream - * encryption fails. This happens when the KMS service throws one of the following exception types: - * `AccessDeniedException`, `InvalidStateException`, `DisabledException`, or `NotFoundException`. + * Firehose throws this exception when an attempt to put records or to start or stop delivery stream encryption fails. + * This happens when the KMS service throws one of the following exception types: `AccessDeniedException`, + * `InvalidStateException`, `DisabledException`, or `NotFoundException`. */ final class InvalidKMSResourceException extends ClientException { diff --git a/src/Exception/ServiceUnavailableException.php b/src/Exception/ServiceUnavailableException.php index 4f99b15..83101ca 100644 --- a/src/Exception/ServiceUnavailableException.php +++ b/src/Exception/ServiceUnavailableException.php @@ -7,7 +7,7 @@ /** * The service is unavailable. Back off and retry the operation. If you continue to see the exception, throughput limits * for the delivery stream may have been exceeded. For more information about limits and how to request an increase, see - * Amazon Kinesis Data Firehose Limits [^1]. + * Amazon Firehose Limits [^1]. * * [^1]: https://docs.aws.amazon.com/firehose/latest/dev/limits.html */ diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index 784364f..afba798 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -21,25 +21,23 @@ class FirehoseClient extends AbstractApi { /** - * Writes a single data record into an Amazon Kinesis Data Firehose delivery stream. To write multiple data records into - * a delivery stream, use PutRecordBatch. Applications using these operations are referred to as producers. + * Writes a single data record into an Amazon Firehose delivery stream. To write multiple data records into a delivery + * stream, use PutRecordBatch. Applications using these operations are referred to as producers. * * By default, each delivery stream can take in up to 2,000 transactions per second, 5,000 records per second, or 5 MB * per second. If you use PutRecord and PutRecordBatch, the limits are an aggregate across these two operations for each - * delivery stream. For more information about limits and how to request an increase, see Amazon Kinesis Data Firehose - * Limits [^1]. + * delivery stream. For more information about limits and how to request an increase, see Amazon Firehose Limits [^1]. * - * Kinesis Data Firehose accumulates and publishes a particular metric for a customer account in one minute intervals. - * It is possible that the bursts of incoming bytes/records ingested to a delivery stream last only for a few seconds. - * Due to this, the actual spikes in the traffic might not be fully visible in the customer's 1 minute CloudWatch - * metrics. + * Firehose accumulates and publishes a particular metric for a customer account in one minute intervals. It is possible + * that the bursts of incoming bytes/records ingested to a delivery stream last only for a few seconds. Due to this, the + * actual spikes in the traffic might not be fully visible in the customer's 1 minute CloudWatch metrics. * * You must specify the name of the delivery stream and the data record when using PutRecord. The data record consists * of a data blob that can be up to 1,000 KiB in size, and any kind of data. For example, it can be a segment from a log * file, geographic location data, website clickstream data, and so on. * - * Kinesis Data Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at - * the destination, a common solution is to use delimiters in the data, such as a newline (`\n`) or some other character + * Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the + * destination, a common solution is to use delimiters in the data, such as a newline (`\n`) or some other character * unique within the data. This allows the consumer application to parse individual data items when reading the data * from the destination. * @@ -53,9 +51,9 @@ class FirehoseClient extends AbstractApi * Re-invoking the Put API operations (for example, PutRecord and PutRecordBatch) can result in data duplicates. For * larger data assets, allow for a longer time out before retrying Put API operations. * - * Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream - * as it tries to send the records to the destination. If the destination is unreachable for more than 24 hours, the - * data is no longer available. + * Data records sent to Firehose are stored for 24 hours from the time they are added to a delivery stream as it tries + * to send the records to the destination. If the destination is unreachable for more than 24 hours, the data is no + * longer available. * * ! Don't concatenate two or more base64 strings to form the data fields of your records. Instead, concatenate the raw * ! data, then perform base64 encoding. @@ -96,12 +94,11 @@ public function putRecord($input): PutRecordOutput * producer than when writing single records. To write single data records into a delivery stream, use PutRecord. * Applications using these operations are referred to as producers. * - * Kinesis Data Firehose accumulates and publishes a particular metric for a customer account in one minute intervals. - * It is possible that the bursts of incoming bytes/records ingested to a delivery stream last only for a few seconds. - * Due to this, the actual spikes in the traffic might not be fully visible in the customer's 1 minute CloudWatch - * metrics. + * Firehose accumulates and publishes a particular metric for a customer account in one minute intervals. It is possible + * that the bursts of incoming bytes/records ingested to a delivery stream last only for a few seconds. Due to this, the + * actual spikes in the traffic might not be fully visible in the customer's 1 minute CloudWatch metrics. * - * For information about service quota, see Amazon Kinesis Data Firehose Quota [^1]. + * For information about service quota, see Amazon Firehose Quota [^1]. * * Each PutRecordBatch request supports up to 500 records. Each record in the request can be as large as 1,000 KB * (before base64 encoding), up to a limit of 4 MB for the entire request. These limits cannot be changed. @@ -110,8 +107,8 @@ public function putRecord($input): PutRecordOutput * of a data blob that can be up to 1,000 KB in size, and any kind of data. For example, it could be a segment from a * log file, geographic location data, website clickstream data, and so on. * - * Kinesis Data Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at - * the destination, a common solution is to use delimiters in the data, such as a newline (`\n`) or some other character + * Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the + * destination, a common solution is to use delimiters in the data, such as a newline (`\n`) or some other character * unique within the data. This allows the consumer application to parse individual data items when reading the data * from the destination. * @@ -120,9 +117,9 @@ public function putRecord($input): PutRecordOutput * indicating that there are records for which the operation didn't succeed. Each entry in the `RequestResponses` array * provides additional information about the processed record. It directly correlates with a record in the request array * using the same ordering, from the top to the bottom. The response array always includes the same number of records as - * the request array. `RequestResponses` includes both successfully and unsuccessfully processed records. Kinesis Data - * Firehose tries to process all records in each PutRecordBatch request. A single record failure does not stop the - * processing of subsequent records. + * the request array. `RequestResponses` includes both successfully and unsuccessfully processed records. Firehose tries + * to process all records in each PutRecordBatch request. A single record failure does not stop the processing of + * subsequent records. * * A successfully processed record includes a `RecordId` value, which is unique for the record. An unsuccessfully * processed record includes `ErrorCode` and `ErrorMessage` values. `ErrorCode` reflects the type of error, and is one @@ -140,9 +137,9 @@ public function putRecord($input): PutRecordOutput * Re-invoking the Put API operations (for example, PutRecord and PutRecordBatch) can result in data duplicates. For * larger data assets, allow for a longer time out before retrying Put API operations. * - * Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream - * as it attempts to send the records to the destination. If the destination is unreachable for more than 24 hours, the - * data is no longer available. + * Data records sent to Firehose are stored for 24 hours from the time they are added to a delivery stream as it + * attempts to send the records to the destination. If the destination is unreachable for more than 24 hours, the data + * is no longer available. * * ! Don't concatenate two or more base64 strings to form the data fields of your records. Instead, concatenate the raw * ! data, then perform base64 encoding. From 556c722390f562cd670a1f5775282dedd478add3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 27 Feb 2024 15:44:12 +0100 Subject: [PATCH 39/54] prepare next release (#1674) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c573e00..b28df30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.2.1 + ### Changed - AWS enhancement: Documentation updates. From be93af020bacada1545583e9fdf32c2da9e52e09 Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Wed, 17 Apr 2024 01:44:57 -0700 Subject: [PATCH 40/54] Update generated code (#1699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update generated code * Update src/Service/Firehose/CHANGELOG.md --------- Co-authored-by: Jérémy Derussé --- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/FirehoseClient.php | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b28df30..9a7c931 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Added `us-isob-east-1` region. + ## 1.2.1 ### Changed diff --git a/composer.json b/composer.json index 639499c..163b09e 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } } } diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index afba798..93bbaba 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -245,6 +245,13 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; + case 'us-isob-east-1': + return [ + 'endpoint' => 'https://firehose.us-isob-east-1.sc2s.sgov.gov', + 'signRegion' => 'us-isob-east-1', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; } return [ From 683db380c43bb13e2909efa018e5c010850aac13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 14 May 2024 09:34:42 +0200 Subject: [PATCH 41/54] Prepare next release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a7c931..80dc628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.3.0 + ### Added - AWS api-change: Added `us-isob-east-1` region. From 8a8f309ce02535b1de48ef9ac60c76de600479ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Wed, 5 Jun 2024 21:12:02 +0200 Subject: [PATCH 42/54] Add an accept header in JSON request to help 3rd party services like localstack (#1721) --- CHANGELOG.md | 4 ++++ src/Input/PutRecordBatchInput.php | 1 + src/Input/PutRecordInput.php | 1 + tests/Unit/Input/PutRecordBatchInputTest.php | 1 + tests/Unit/Input/PutRecordInputTest.php | 1 + 5 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80dc628..b44e500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Changed + +- Add `Accept: application/json` header in request to fix incompatibility with 3rd party providers + ## 1.3.0 ### Added diff --git a/src/Input/PutRecordBatchInput.php b/src/Input/PutRecordBatchInput.php index 814ae59..a02c10b 100644 --- a/src/Input/PutRecordBatchInput.php +++ b/src/Input/PutRecordBatchInput.php @@ -76,6 +76,7 @@ public function request(): Request $headers = [ 'Content-Type' => 'application/x-amz-json-1.1', 'X-Amz-Target' => 'Firehose_20150804.PutRecordBatch', + 'Accept' => 'application/json', ]; // Prepare query diff --git a/src/Input/PutRecordInput.php b/src/Input/PutRecordInput.php index 1ed9909..7951cdc 100644 --- a/src/Input/PutRecordInput.php +++ b/src/Input/PutRecordInput.php @@ -73,6 +73,7 @@ public function request(): Request $headers = [ 'Content-Type' => 'application/x-amz-json-1.1', 'X-Amz-Target' => 'Firehose_20150804.PutRecord', + 'Accept' => 'application/json', ]; // Prepare query diff --git a/tests/Unit/Input/PutRecordBatchInputTest.php b/tests/Unit/Input/PutRecordBatchInputTest.php index 91cde75..ec04c79 100644 --- a/tests/Unit/Input/PutRecordBatchInputTest.php +++ b/tests/Unit/Input/PutRecordBatchInputTest.php @@ -27,6 +27,7 @@ public function testRequest(): void POST / HTTP/1.0 Content-Type: application/x-amz-json-1.1 x-amz-target: Firehose_20150804.PutRecordBatch + Accept: application/json { "DeliveryStreamName": "streamfoo", diff --git a/tests/Unit/Input/PutRecordInputTest.php b/tests/Unit/Input/PutRecordInputTest.php index 1f5742c..3846333 100644 --- a/tests/Unit/Input/PutRecordInputTest.php +++ b/tests/Unit/Input/PutRecordInputTest.php @@ -22,6 +22,7 @@ public function testRequest(): void POST / HTTP/1.0 Content-Type: application/x-amz-json-1.1 x-amz-target: Firehose_20150804.PutRecord + Accept: application/json { "DeliveryStreamName": "streamfoo", From e01aa7f3649f07c7818fd7e281ae164c063a5d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Wed, 3 Jul 2024 19:28:59 +0200 Subject: [PATCH 43/54] Prepare next release (#1733) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b44e500..ffab902 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.3.1 + ### Changed - Add `Accept: application/json` header in request to fix incompatibility with 3rd party providers From e2b7673bc7ca8d7d9930b355501b08b375f1e170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 30 Jul 2024 13:36:17 +0200 Subject: [PATCH 44/54] Bump php-cs-fixer to version 3.60 (#1743) --- CHANGELOG.md | 4 ++++ src/Input/PutRecordBatchInput.php | 4 ++-- src/Input/PutRecordInput.php | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffab902..0cb5b45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Changed + +- Enable compiler optimization for the `sprintf` function. + ## 1.3.1 ### Changed diff --git a/src/Input/PutRecordBatchInput.php b/src/Input/PutRecordBatchInput.php index a02c10b..ab96ae5 100644 --- a/src/Input/PutRecordBatchInput.php +++ b/src/Input/PutRecordBatchInput.php @@ -114,11 +114,11 @@ private function requestBody(): array { $payload = []; if (null === $v = $this->deliveryStreamName) { - throw new InvalidArgument(sprintf('Missing parameter "DeliveryStreamName" for "%s". The value cannot be null.', __CLASS__)); + throw new InvalidArgument(\sprintf('Missing parameter "DeliveryStreamName" for "%s". The value cannot be null.', __CLASS__)); } $payload['DeliveryStreamName'] = $v; if (null === $v = $this->records) { - throw new InvalidArgument(sprintf('Missing parameter "Records" for "%s". The value cannot be null.', __CLASS__)); + throw new InvalidArgument(\sprintf('Missing parameter "Records" for "%s". The value cannot be null.', __CLASS__)); } $index = -1; diff --git a/src/Input/PutRecordInput.php b/src/Input/PutRecordInput.php index 7951cdc..f12ba66 100644 --- a/src/Input/PutRecordInput.php +++ b/src/Input/PutRecordInput.php @@ -108,11 +108,11 @@ private function requestBody(): array { $payload = []; if (null === $v = $this->deliveryStreamName) { - throw new InvalidArgument(sprintf('Missing parameter "DeliveryStreamName" for "%s". The value cannot be null.', __CLASS__)); + throw new InvalidArgument(\sprintf('Missing parameter "DeliveryStreamName" for "%s". The value cannot be null.', __CLASS__)); } $payload['DeliveryStreamName'] = $v; if (null === $v = $this->record) { - throw new InvalidArgument(sprintf('Missing parameter "Record" for "%s". The value cannot be null.', __CLASS__)); + throw new InvalidArgument(\sprintf('Missing parameter "Record" for "%s". The value cannot be null.', __CLASS__)); } $payload['Record'] = $v->requestBody(); From 1348024c05078c55585a53261e560c22c021401a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Wed, 9 Oct 2024 10:09:09 +0200 Subject: [PATCH 45/54] prepare next release (#1778) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cb5b45..3cc4553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.3.2 + ### Changed - Enable compiler optimization for the `sprintf` function. From 0d31e745610d52528455e8bf3988e2b478e05666 Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Sat, 9 Nov 2024 02:01:10 -0800 Subject: [PATCH 46/54] Update generated code (#1790) update generated code --- CHANGELOG.md | 4 ++ src/Exception/InvalidKMSResourceException.php | 2 +- src/Exception/ServiceUnavailableException.php | 2 +- src/FirehoseClient.php | 38 ++++++++++++------- src/Input/PutRecordBatchInput.php | 2 +- src/Input/PutRecordInput.php | 2 +- .../PutRecordBatchResponseEntry.php | 2 +- src/ValueObject/Record.php | 2 +- 8 files changed, 34 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc4553..ccf6cd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Changed + +- AWS enhancement: Documentation updates. + ## 1.3.2 ### Changed diff --git a/src/Exception/InvalidKMSResourceException.php b/src/Exception/InvalidKMSResourceException.php index 9275a27..90bff4b 100644 --- a/src/Exception/InvalidKMSResourceException.php +++ b/src/Exception/InvalidKMSResourceException.php @@ -5,7 +5,7 @@ use AsyncAws\Core\Exception\Http\ClientException; /** - * Firehose throws this exception when an attempt to put records or to start or stop delivery stream encryption fails. + * Firehose throws this exception when an attempt to put records or to start or stop Firehose stream encryption fails. * This happens when the KMS service throws one of the following exception types: `AccessDeniedException`, * `InvalidStateException`, `DisabledException`, or `NotFoundException`. */ diff --git a/src/Exception/ServiceUnavailableException.php b/src/Exception/ServiceUnavailableException.php index 83101ca..4c9e5d3 100644 --- a/src/Exception/ServiceUnavailableException.php +++ b/src/Exception/ServiceUnavailableException.php @@ -6,7 +6,7 @@ /** * The service is unavailable. Back off and retry the operation. If you continue to see the exception, throughput limits - * for the delivery stream may have been exceeded. For more information about limits and how to request an increase, see + * for the Firehose stream may have been exceeded. For more information about limits and how to request an increase, see * Amazon Firehose Limits [^1]. * * [^1]: https://docs.aws.amazon.com/firehose/latest/dev/limits.html diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index 93bbaba..a19fc52 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -21,21 +21,26 @@ class FirehoseClient extends AbstractApi { /** - * Writes a single data record into an Amazon Firehose delivery stream. To write multiple data records into a delivery - * stream, use PutRecordBatch. Applications using these operations are referred to as producers. + * Writes a single data record into an Firehose stream. To write multiple data records into a Firehose stream, use + * PutRecordBatch. Applications using these operations are referred to as producers. * - * By default, each delivery stream can take in up to 2,000 transactions per second, 5,000 records per second, or 5 MB + * By default, each Firehose stream can take in up to 2,000 transactions per second, 5,000 records per second, or 5 MB * per second. If you use PutRecord and PutRecordBatch, the limits are an aggregate across these two operations for each - * delivery stream. For more information about limits and how to request an increase, see Amazon Firehose Limits [^1]. + * Firehose stream. For more information about limits and how to request an increase, see Amazon Firehose Limits [^1]. * * Firehose accumulates and publishes a particular metric for a customer account in one minute intervals. It is possible - * that the bursts of incoming bytes/records ingested to a delivery stream last only for a few seconds. Due to this, the + * that the bursts of incoming bytes/records ingested to a Firehose stream last only for a few seconds. Due to this, the * actual spikes in the traffic might not be fully visible in the customer's 1 minute CloudWatch metrics. * - * You must specify the name of the delivery stream and the data record when using PutRecord. The data record consists + * You must specify the name of the Firehose stream and the data record when using PutRecord. The data record consists * of a data blob that can be up to 1,000 KiB in size, and any kind of data. For example, it can be a segment from a log * file, geographic location data, website clickstream data, and so on. * + * For multi record de-aggregation, you can not put more than 500 records even if the data blob length is less than 1000 + * KiB. If you include more than 500 records, the request succeeds but the record de-aggregation doesn't work as + * expected and transformation lambda is invoked with the complete base64 encoded data blob instead of de-aggregated + * base64 decoded records. + * * Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the * destination, a common solution is to use delimiters in the data, such as a newline (`\n`) or some other character * unique within the data. This allows the consumer application to parse individual data items when reading the data @@ -45,13 +50,13 @@ class FirehoseClient extends AbstractApi * applications can use this ID for purposes such as auditability and investigation. * * If the `PutRecord` operation throws a `ServiceUnavailableException`, the API is automatically reinvoked (retried) 3 - * times. If the exception persists, it is possible that the throughput limits have been exceeded for the delivery + * times. If the exception persists, it is possible that the throughput limits have been exceeded for the Firehose * stream. * * Re-invoking the Put API operations (for example, PutRecord and PutRecordBatch) can result in data duplicates. For * larger data assets, allow for a longer time out before retrying Put API operations. * - * Data records sent to Firehose are stored for 24 hours from the time they are added to a delivery stream as it tries + * Data records sent to Firehose are stored for 24 hours from the time they are added to a Firehose stream as it tries * to send the records to the destination. If the destination is unreachable for more than 24 hours, the data is no * longer available. * @@ -90,12 +95,12 @@ public function putRecord($input): PutRecordOutput } /** - * Writes multiple data records into a delivery stream in a single call, which can achieve higher throughput per - * producer than when writing single records. To write single data records into a delivery stream, use PutRecord. + * Writes multiple data records into a Firehose stream in a single call, which can achieve higher throughput per + * producer than when writing single records. To write single data records into a Firehose stream, use PutRecord. * Applications using these operations are referred to as producers. * * Firehose accumulates and publishes a particular metric for a customer account in one minute intervals. It is possible - * that the bursts of incoming bytes/records ingested to a delivery stream last only for a few seconds. Due to this, the + * that the bursts of incoming bytes/records ingested to a Firehose stream last only for a few seconds. Due to this, the * actual spikes in the traffic might not be fully visible in the customer's 1 minute CloudWatch metrics. * * For information about service quota, see Amazon Firehose Quota [^1]. @@ -103,10 +108,15 @@ public function putRecord($input): PutRecordOutput * Each PutRecordBatch request supports up to 500 records. Each record in the request can be as large as 1,000 KB * (before base64 encoding), up to a limit of 4 MB for the entire request. These limits cannot be changed. * - * You must specify the name of the delivery stream and the data record when using PutRecord. The data record consists + * You must specify the name of the Firehose stream and the data record when using PutRecord. The data record consists * of a data blob that can be up to 1,000 KB in size, and any kind of data. For example, it could be a segment from a * log file, geographic location data, website clickstream data, and so on. * + * For multi record de-aggregation, you can not put more than 500 records even if the data blob length is less than 1000 + * KiB. If you include more than 500 records, the request succeeds but the record de-aggregation doesn't work as + * expected and transformation lambda is invoked with the complete base64 encoded data blob instead of de-aggregated + * base64 decoded records. + * * Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the * destination, a common solution is to use delimiters in the data, such as a newline (`\n`) or some other character * unique within the data. This allows the consumer application to parse individual data items when reading the data @@ -132,12 +142,12 @@ public function putRecord($input): PutRecordOutput * charges). We recommend that you handle any duplicates at the destination. * * If PutRecordBatch throws `ServiceUnavailableException`, the API is automatically reinvoked (retried) 3 times. If the - * exception persists, it is possible that the throughput limits have been exceeded for the delivery stream. + * exception persists, it is possible that the throughput limits have been exceeded for the Firehose stream. * * Re-invoking the Put API operations (for example, PutRecord and PutRecordBatch) can result in data duplicates. For * larger data assets, allow for a longer time out before retrying Put API operations. * - * Data records sent to Firehose are stored for 24 hours from the time they are added to a delivery stream as it + * Data records sent to Firehose are stored for 24 hours from the time they are added to a Firehose stream as it * attempts to send the records to the destination. If the destination is unreachable for more than 24 hours, the data * is no longer available. * diff --git a/src/Input/PutRecordBatchInput.php b/src/Input/PutRecordBatchInput.php index ab96ae5..1c7faca 100644 --- a/src/Input/PutRecordBatchInput.php +++ b/src/Input/PutRecordBatchInput.php @@ -11,7 +11,7 @@ final class PutRecordBatchInput extends Input { /** - * The name of the delivery stream. + * The name of the Firehose stream. * * @required * diff --git a/src/Input/PutRecordInput.php b/src/Input/PutRecordInput.php index f12ba66..7f61c65 100644 --- a/src/Input/PutRecordInput.php +++ b/src/Input/PutRecordInput.php @@ -11,7 +11,7 @@ final class PutRecordInput extends Input { /** - * The name of the delivery stream. + * The name of the Firehose stream. * * @required * diff --git a/src/ValueObject/PutRecordBatchResponseEntry.php b/src/ValueObject/PutRecordBatchResponseEntry.php index 86e4e97..54b8993 100644 --- a/src/ValueObject/PutRecordBatchResponseEntry.php +++ b/src/ValueObject/PutRecordBatchResponseEntry.php @@ -4,7 +4,7 @@ /** * Contains the result for an individual record from a PutRecordBatch request. If the record is successfully added to - * your delivery stream, it receives a record ID. If the record fails to be added to your delivery stream, the result + * your Firehose stream, it receives a record ID. If the record fails to be added to your Firehose stream, the result * includes an error code and an error message. */ final class PutRecordBatchResponseEntry diff --git a/src/ValueObject/Record.php b/src/ValueObject/Record.php index 5d61dfd..5241ea1 100644 --- a/src/ValueObject/Record.php +++ b/src/ValueObject/Record.php @@ -5,7 +5,7 @@ use AsyncAws\Core\Exception\InvalidArgument; /** - * The unit of data in a delivery stream. + * The unit of data in a Firehose stream. */ final class Record { From 5a5d8017c5b6d44c36c3e4cb87d417015e80159f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 11 Nov 2024 11:35:53 +0100 Subject: [PATCH 47/54] Upgrade github actions (#1792) --- .github/workflows/checks.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c767322..b9c47e8 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 346792d..9ed2af1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize tests run: make initialize From 78e3b17c8d274dee1ff9a2c4a477ec5d1de2c31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Sun, 24 Nov 2024 12:42:17 +0100 Subject: [PATCH 48/54] prepare next release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf6cd4..9d8fc18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.3.3 + ### Changed - AWS enhancement: Documentation updates. From ae24239d3fd9fff5ac67852e695060c6ffb90efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Sun, 24 Nov 2024 18:57:34 +0100 Subject: [PATCH 49/54] Add support for php 8.5 (#1808) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ed2af1..0778da5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 10 matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] steps: - name: Set up PHP From 1b72ba8ac66a25b6a8c9cdee2fbd36dee9d1303b Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Wed, 5 Feb 2025 02:54:55 -0800 Subject: [PATCH 50/54] Update generated code (#1841) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update generated code * Apply suggestions from code review --------- Co-authored-by: Jérémy Derussé --- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/FirehoseClient.php | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d8fc18..ae94d85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Added `us-isof-east-1` and `us-isof-south-1` regions + ## 1.3.3 ### Changed diff --git a/composer.json b/composer.json index 163b09e..42d9f2a 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } } } diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index a19fc52..aa7c33a 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -255,6 +255,14 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; + case 'us-isof-east-1': + case 'us-isof-south-1': + return [ + 'endpoint' => "https://firehose.$region.csp.hci.ic.gov", + 'signRegion' => $region, + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; case 'us-isob-east-1': return [ 'endpoint' => 'https://firehose.us-isob-east-1.sc2s.sgov.gov', From 94168d6fc48daf388baa7387b06c4d28ef6e8cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Wed, 5 Mar 2025 21:41:02 +0100 Subject: [PATCH 51/54] Prepare release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae94d85..83982c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.4.0 + ### Added - AWS api-change: Added `us-isof-east-1` and `us-isof-south-1` regions From f5a582e89e7cb2ae81cdbb4edea2de40d9c8fdc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Fri, 11 Apr 2025 11:10:18 +0200 Subject: [PATCH 52/54] Sort exceptions alphabetically (#1875) --- CHANGELOG.md | 4 ++++ src/FirehoseClient.php | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83982c3..71c3819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Changed + +- Sort exception alphabetically. + ## 1.4.0 ### Added diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index aa7c33a..ec1e78c 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -74,20 +74,20 @@ class FirehoseClient extends AbstractApi * '@region'?: string|null, * }|PutRecordInput $input * - * @throws ResourceNotFoundException * @throws InvalidArgumentException * @throws InvalidKMSResourceException * @throws InvalidSourceException + * @throws ResourceNotFoundException * @throws ServiceUnavailableException */ public function putRecord($input): PutRecordOutput { $input = PutRecordInput::create($input); $response = $this->getResponse($input->request(), new RequestContext(['operation' => 'PutRecord', 'region' => $input->getRegion(), 'exceptionMapping' => [ - 'ResourceNotFoundException' => ResourceNotFoundException::class, 'InvalidArgumentException' => InvalidArgumentException::class, 'InvalidKMSResourceException' => InvalidKMSResourceException::class, 'InvalidSourceException' => InvalidSourceException::class, + 'ResourceNotFoundException' => ResourceNotFoundException::class, 'ServiceUnavailableException' => ServiceUnavailableException::class, ]])); @@ -165,20 +165,20 @@ public function putRecord($input): PutRecordOutput * '@region'?: string|null, * }|PutRecordBatchInput $input * - * @throws ResourceNotFoundException * @throws InvalidArgumentException * @throws InvalidKMSResourceException * @throws InvalidSourceException + * @throws ResourceNotFoundException * @throws ServiceUnavailableException */ public function putRecordBatch($input): PutRecordBatchOutput { $input = PutRecordBatchInput::create($input); $response = $this->getResponse($input->request(), new RequestContext(['operation' => 'PutRecordBatch', 'region' => $input->getRegion(), 'exceptionMapping' => [ - 'ResourceNotFoundException' => ResourceNotFoundException::class, 'InvalidArgumentException' => InvalidArgumentException::class, 'InvalidKMSResourceException' => InvalidKMSResourceException::class, 'InvalidSourceException' => InvalidSourceException::class, + 'ResourceNotFoundException' => ResourceNotFoundException::class, 'ServiceUnavailableException' => ServiceUnavailableException::class, ]])); From f4282fef770faf18d25c27564d8945497dca8e59 Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Fri, 11 Apr 2025 07:29:43 -0700 Subject: [PATCH 53/54] Update generated code (#1874) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update generated code * Apply suggestions from code review --------- Co-authored-by: Jérémy Derussé --- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/FirehoseClient.php | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c3819..8535902 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Added `eu-isoe-west-1` region + ### Changed - Sort exception alphabetically. diff --git a/composer.json b/composer.json index 42d9f2a..bd6472d 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } } } diff --git a/src/FirehoseClient.php b/src/FirehoseClient.php index ec1e78c..7e21193 100644 --- a/src/FirehoseClient.php +++ b/src/FirehoseClient.php @@ -263,6 +263,13 @@ protected function getEndpointMetadata(?string $region): array 'signService' => 'firehose', 'signVersions' => ['v4'], ]; + case 'eu-isoe-west-1': + return [ + 'endpoint' => 'https://firehose.eu-isoe-west-1.cloud.adc-e.uk', + 'signRegion' => 'eu-isoe-west-1', + 'signService' => 'firehose', + 'signVersions' => ['v4'], + ]; case 'us-isob-east-1': return [ 'endpoint' => 'https://firehose.us-isob-east-1.sc2s.sgov.gov', From e10458f015281c4a91a77236c6af9adf9d7c0b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 12 May 2025 11:35:01 +0200 Subject: [PATCH 54/54] Prepeare release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8535902..acc0ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## NOT RELEASED +## 1.5.0 + ### Added - AWS api-change: Added `eu-isoe-west-1` region