Skip to content

Commit 9cb927f

Browse files
Update generated code (#1887)
update generated code
1 parent a29a1cb commit 9cb927f

File tree

8 files changed

+76
-8
lines changed

8 files changed

+76
-8
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.342.36"
3+
"${LATEST}": "3.343.0"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/Kinesis/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- AWS api-change: added `eu-isoe-west-1` region
8+
- AWS api-change: Amazon KDS now supports tagging and attribute-based access control (ABAC) for enhanced fan-out consumers.
89

910
### Changed
1011

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Kinesis\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The processing of the request failed because of an unknown error, exception, or failure.
9+
*/
10+
final class InternalFailureException extends ClientException
11+
{
12+
}

src/Service/Kinesis/src/Input/AddTagsToStreamInput.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ final class AddTagsToStreamInput extends Input
2020
private $streamName;
2121

2222
/**
23-
* A set of up to 10 key-value pairs to use to create the tags.
23+
* A set of up to 50 key-value pairs to use to create the tags. A tag consists of a required key and an optional value.
24+
* You can add up to 50 tags per resource.
2425
*
2526
* @required
2627
*

src/Service/Kinesis/src/Input/CreateStreamInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class CreateStreamInput extends Input
4242
private $streamModeDetails;
4343

4444
/**
45-
* A set of up to 10 key-value pairs to use to create the tags.
45+
* A set of up to 50 key-value pairs to use to create the tags. A tag consists of a required key and an optional value.
4646
*
4747
* @var array<string, string>|null
4848
*/

src/Service/Kinesis/src/Input/RegisterStreamConsumerInput.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,34 @@ final class RegisterStreamConsumerInput extends Input
3131
*/
3232
private $consumerName;
3333

34+
/**
35+
* A set of up to 50 key-value pairs. A tag consists of a required key and an optional value.
36+
*
37+
* @var array<string, string>|null
38+
*/
39+
private $tags;
40+
3441
/**
3542
* @param array{
3643
* StreamARN?: string,
3744
* ConsumerName?: string,
45+
* Tags?: null|array<string, string>,
3846
* '@region'?: string|null,
3947
* } $input
4048
*/
4149
public function __construct(array $input = [])
4250
{
4351
$this->streamArn = $input['StreamARN'] ?? null;
4452
$this->consumerName = $input['ConsumerName'] ?? null;
53+
$this->tags = $input['Tags'] ?? null;
4554
parent::__construct($input);
4655
}
4756

4857
/**
4958
* @param array{
5059
* StreamARN?: string,
5160
* ConsumerName?: string,
61+
* Tags?: null|array<string, string>,
5262
* '@region'?: string|null,
5363
* }|RegisterStreamConsumerInput $input
5464
*/
@@ -67,6 +77,14 @@ public function getStreamArn(): ?string
6777
return $this->streamArn;
6878
}
6979

80+
/**
81+
* @return array<string, string>
82+
*/
83+
public function getTags(): array
84+
{
85+
return $this->tags ?? [];
86+
}
87+
7088
/**
7189
* @internal
7290
*/
@@ -107,6 +125,16 @@ public function setStreamArn(?string $value): self
107125
return $this;
108126
}
109127

128+
/**
129+
* @param array<string, string> $value
130+
*/
131+
public function setTags(array $value): self
132+
{
133+
$this->tags = $value;
134+
135+
return $this;
136+
}
137+
110138
private function requestBody(): array
111139
{
112140
$payload = [];
@@ -118,6 +146,16 @@ private function requestBody(): array
118146
throw new InvalidArgument(\sprintf('Missing parameter "ConsumerName" for "%s". The value cannot be null.', __CLASS__));
119147
}
120148
$payload['ConsumerName'] = $v;
149+
if (null !== $v = $this->tags) {
150+
if (empty($v)) {
151+
$payload['Tags'] = new \stdClass();
152+
} else {
153+
$payload['Tags'] = [];
154+
foreach ($v as $name => $mv) {
155+
$payload['Tags'][$name] = $mv;
156+
}
157+
}
158+
}
121159

122160
return $payload;
123161
}

src/Service/Kinesis/src/KinesisClient.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use AsyncAws\Kinesis\Exception\AccessDeniedException;
1616
use AsyncAws\Kinesis\Exception\ExpiredIteratorException;
1717
use AsyncAws\Kinesis\Exception\ExpiredNextTokenException;
18+
use AsyncAws\Kinesis\Exception\InternalFailureException;
1819
use AsyncAws\Kinesis\Exception\InvalidArgumentException;
1920
use AsyncAws\Kinesis\Exception\KMSAccessDeniedException;
2021
use AsyncAws\Kinesis\Exception\KMSDisabledException;
@@ -151,10 +152,11 @@ public function addTagsToStream($input): Result
151152
*
152153
* CreateStream has a limit of five transactions per second per account.
153154
*
154-
* You can add tags to the stream when making a `CreateStream` request by setting the `Tags` parameter. If you pass
155-
* `Tags` parameter, in addition to having `kinesis:createStream` permission, you must also have
156-
* `kinesis:addTagsToStream` permission for the stream that will be created. Tags will take effect from the `CREATING`
157-
* status of the stream.
155+
* You can add tags to the stream when making a `CreateStream` request by setting the `Tags` parameter. If you pass the
156+
* `Tags` parameter, in addition to having the `kinesis:CreateStream` permission, you must also have the
157+
* `kinesis:AddTagsToStream` permission for the stream that will be created. The `kinesis:TagResource` permission
158+
* won’t work to tag streams on creation. Tags will take effect from the `CREATING` status of the stream, but you
159+
* can't make any updates to the tags until the stream is in `ACTIVE` state.
158160
*
159161
* [^1]: https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html
160162
* [^2]: https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html
@@ -603,6 +605,7 @@ public function enableEnhancedMonitoring($input): EnhancedMonitoringOutput
603605
*
604606
* @throws AccessDeniedException
605607
* @throws ExpiredIteratorException
608+
* @throws InternalFailureException
606609
* @throws InvalidArgumentException
607610
* @throws KMSAccessDeniedException
608611
* @throws KMSDisabledException
@@ -619,6 +622,7 @@ public function getRecords($input): GetRecordsOutput
619622
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetRecords', 'region' => $input->getRegion(), 'exceptionMapping' => [
620623
'AccessDeniedException' => AccessDeniedException::class,
621624
'ExpiredIteratorException' => ExpiredIteratorException::class,
625+
'InternalFailureException' => InternalFailureException::class,
622626
'InvalidArgumentException' => InvalidArgumentException::class,
623627
'KMSAccessDeniedException' => KMSAccessDeniedException::class,
624628
'KMSDisabledException' => KMSDisabledException::class,
@@ -683,6 +687,7 @@ public function getRecords($input): GetRecordsOutput
683687
* }|GetShardIteratorInput $input
684688
*
685689
* @throws AccessDeniedException
690+
* @throws InternalFailureException
686691
* @throws InvalidArgumentException
687692
* @throws ProvisionedThroughputExceededException
688693
* @throws ResourceNotFoundException
@@ -692,6 +697,7 @@ public function getShardIterator($input): GetShardIteratorOutput
692697
$input = GetShardIteratorInput::create($input);
693698
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetShardIterator', 'region' => $input->getRegion(), 'exceptionMapping' => [
694699
'AccessDeniedException' => AccessDeniedException::class,
700+
'InternalFailureException' => InternalFailureException::class,
695701
'InvalidArgumentException' => InvalidArgumentException::class,
696702
'ProvisionedThroughputExceededException' => ProvisionedThroughputExceededException::class,
697703
'ResourceNotFoundException' => ResourceNotFoundException::class,
@@ -1037,6 +1043,7 @@ public function mergeShards($input): Result
10371043
* }|PutRecordInput $input
10381044
*
10391045
* @throws AccessDeniedException
1046+
* @throws InternalFailureException
10401047
* @throws InvalidArgumentException
10411048
* @throws KMSAccessDeniedException
10421049
* @throws KMSDisabledException
@@ -1052,6 +1059,7 @@ public function putRecord($input): PutRecordOutput
10521059
$input = PutRecordInput::create($input);
10531060
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'PutRecord', 'region' => $input->getRegion(), 'exceptionMapping' => [
10541061
'AccessDeniedException' => AccessDeniedException::class,
1062+
'InternalFailureException' => InternalFailureException::class,
10551063
'InvalidArgumentException' => InvalidArgumentException::class,
10561064
'KMSAccessDeniedException' => KMSAccessDeniedException::class,
10571065
'KMSDisabledException' => KMSDisabledException::class,
@@ -1135,6 +1143,7 @@ public function putRecord($input): PutRecordOutput
11351143
* }|PutRecordsInput $input
11361144
*
11371145
* @throws AccessDeniedException
1146+
* @throws InternalFailureException
11381147
* @throws InvalidArgumentException
11391148
* @throws KMSAccessDeniedException
11401149
* @throws KMSDisabledException
@@ -1150,6 +1159,7 @@ public function putRecords($input): PutRecordsOutput
11501159
$input = PutRecordsInput::create($input);
11511160
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'PutRecords', 'region' => $input->getRegion(), 'exceptionMapping' => [
11521161
'AccessDeniedException' => AccessDeniedException::class,
1162+
'InternalFailureException' => InternalFailureException::class,
11531163
'InvalidArgumentException' => InvalidArgumentException::class,
11541164
'KMSAccessDeniedException' => KMSAccessDeniedException::class,
11551165
'KMSDisabledException' => KMSDisabledException::class,
@@ -1170,6 +1180,11 @@ public function putRecords($input): PutRecordsOutput
11701180
* every shard you subscribe to. This rate is unaffected by the total number of consumers that read from the same
11711181
* stream.
11721182
*
1183+
* You can add tags to the registered consumer when making a `RegisterStreamConsumer` request by setting the `Tags`
1184+
* parameter. If you pass the `Tags` parameter, in addition to having the `kinesis:RegisterStreamConsumer` permission,
1185+
* you must also have the `kinesis:TagResource` permission for the consumer that will be registered. Tags will take
1186+
* effect from the `CREATING` status of the consumer.
1187+
*
11731188
* You can register up to 20 consumers per stream. A given consumer can only be registered with one stream at a time.
11741189
*
11751190
* For an example of how to use this operation, see Enhanced Fan-Out Using the Kinesis Data Streams API [^1].
@@ -1186,6 +1201,7 @@ public function putRecords($input): PutRecordsOutput
11861201
* @param array{
11871202
* StreamARN: string,
11881203
* ConsumerName: string,
1204+
* Tags?: null|array<string, string>,
11891205
* '@region'?: string|null,
11901206
* }|RegisterStreamConsumerInput $input
11911207
*

src/Service/Kinesis/src/ValueObject/Tag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use AsyncAws\Core\Exception\InvalidArgument;
66

77
/**
8-
* Metadata assigned to the stream, consisting of a key-value pair.
8+
* Metadata assigned to the stream or consumer, consisting of a key-value pair.
99
*/
1010
final class Tag
1111
{

0 commit comments

Comments
 (0)