Skip to content

Commit bbac540

Browse files
Update generated code (#1991)
* update generated code * Apply suggestion from @jderusse --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent 320fb08 commit bbac540

File tree

13 files changed

+224
-1
lines changed

13 files changed

+224
-1
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.359.12"
3+
"${LATEST}": "3.360.1"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/BedrockRuntime/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: Amazon Bedrock Runtime Service Tier Support Launch
8+
59
### Dependency bumped
610

711
- Drop support for PHP versions lower than 8.2

src/Service/BedrockRuntime/src/BedrockRuntimeClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace AsyncAws\BedrockRuntime;
44

55
use AsyncAws\BedrockRuntime\Enum\PerformanceConfigLatency;
6+
use AsyncAws\BedrockRuntime\Enum\ServiceTierType;
67
use AsyncAws\BedrockRuntime\Enum\Trace;
78
use AsyncAws\BedrockRuntime\Exception\AccessDeniedException;
89
use AsyncAws\BedrockRuntime\Exception\InternalServerException;
@@ -57,6 +58,7 @@ class BedrockRuntimeClient extends AbstractApi
5758
* guardrailIdentifier?: string|null,
5859
* guardrailVersion?: string|null,
5960
* performanceConfigLatency?: PerformanceConfigLatency::*|null,
61+
* serviceTier?: ServiceTierType::*|null,
6062
* '@region'?: string|null,
6163
* }|InvokeModelRequest $input
6264
*
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace AsyncAws\BedrockRuntime\Enum;
4+
5+
final class ServiceTierType
6+
{
7+
public const DEFAULT = 'default';
8+
public const FLEX = 'flex';
9+
public const PRIORITY = 'priority';
10+
11+
public static function exists(string $value): bool
12+
{
13+
return isset([
14+
self::DEFAULT => true,
15+
self::FLEX => true,
16+
self::PRIORITY => true,
17+
][$value]);
18+
}
19+
}

src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace AsyncAws\BedrockRuntime\Input;
44

55
use AsyncAws\BedrockRuntime\Enum\PerformanceConfigLatency;
6+
use AsyncAws\BedrockRuntime\Enum\ServiceTierType;
67
use AsyncAws\BedrockRuntime\Enum\Trace;
78
use AsyncAws\Core\Exception\InvalidArgument;
89
use AsyncAws\Core\Input;
@@ -103,6 +104,13 @@ final class InvokeModelRequest extends Input
103104
*/
104105
private $performanceConfigLatency;
105106

107+
/**
108+
* Specifies the processing tier type used for serving the request.
109+
*
110+
* @var ServiceTierType::*|null
111+
*/
112+
private $serviceTier;
113+
106114
/**
107115
* @param array{
108116
* body?: string|null,
@@ -113,6 +121,7 @@ final class InvokeModelRequest extends Input
113121
* guardrailIdentifier?: string|null,
114122
* guardrailVersion?: string|null,
115123
* performanceConfigLatency?: PerformanceConfigLatency::*|null,
124+
* serviceTier?: ServiceTierType::*|null,
116125
* '@region'?: string|null,
117126
* } $input
118127
*/
@@ -126,6 +135,7 @@ public function __construct(array $input = [])
126135
$this->guardrailIdentifier = $input['guardrailIdentifier'] ?? null;
127136
$this->guardrailVersion = $input['guardrailVersion'] ?? null;
128137
$this->performanceConfigLatency = $input['performanceConfigLatency'] ?? null;
138+
$this->serviceTier = $input['serviceTier'] ?? null;
129139
parent::__construct($input);
130140
}
131141

@@ -139,6 +149,7 @@ public function __construct(array $input = [])
139149
* guardrailIdentifier?: string|null,
140150
* guardrailVersion?: string|null,
141151
* performanceConfigLatency?: PerformanceConfigLatency::*|null,
152+
* serviceTier?: ServiceTierType::*|null,
142153
* '@region'?: string|null,
143154
* }|InvokeModelRequest $input
144155
*/
@@ -185,6 +196,14 @@ public function getPerformanceConfigLatency(): ?string
185196
return $this->performanceConfigLatency;
186197
}
187198

199+
/**
200+
* @return ServiceTierType::*|null
201+
*/
202+
public function getServiceTier(): ?string
203+
{
204+
return $this->serviceTier;
205+
}
206+
188207
/**
189208
* @return Trace::*|null
190209
*/
@@ -227,6 +246,12 @@ public function request(): Request
227246
}
228247
$headers['X-Amzn-Bedrock-PerformanceConfig-Latency'] = $this->performanceConfigLatency;
229248
}
249+
if (null !== $this->serviceTier) {
250+
if (!ServiceTierType::exists($this->serviceTier)) {
251+
throw new InvalidArgument(\sprintf('Invalid parameter "serviceTier" for "%s". The value "%s" is not a valid "ServiceTierType".', __CLASS__, $this->serviceTier));
252+
}
253+
$headers['X-Amzn-Bedrock-Service-Tier'] = $this->serviceTier;
254+
}
230255

231256
// Prepare query
232257
$query = [];
@@ -298,6 +323,16 @@ public function setPerformanceConfigLatency(?string $value): self
298323
return $this;
299324
}
300325

326+
/**
327+
* @param ServiceTierType::*|null $value
328+
*/
329+
public function setServiceTier(?string $value): self
330+
{
331+
$this->serviceTier = $value;
332+
333+
return $this;
334+
}
335+
301336
/**
302337
* @param Trace::*|null $value
303338
*/

src/Service/BedrockRuntime/src/Result/InvokeModelResponse.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace AsyncAws\BedrockRuntime\Result;
44

55
use AsyncAws\BedrockRuntime\Enum\PerformanceConfigLatency;
6+
use AsyncAws\BedrockRuntime\Enum\ServiceTierType;
67
use AsyncAws\Core\Response;
78
use AsyncAws\Core\Result;
89

@@ -32,6 +33,13 @@ class InvokeModelResponse extends Result
3233
*/
3334
private $performanceConfigLatency;
3435

36+
/**
37+
* Specifies the processing tier type used for serving the request.
38+
*
39+
* @var ServiceTierType::*|null
40+
*/
41+
private $serviceTier;
42+
3543
public function getBody(): string
3644
{
3745
$this->initialize();
@@ -56,12 +64,23 @@ public function getPerformanceConfigLatency(): ?string
5664
return $this->performanceConfigLatency;
5765
}
5866

67+
/**
68+
* @return ServiceTierType::*|null
69+
*/
70+
public function getServiceTier(): ?string
71+
{
72+
$this->initialize();
73+
74+
return $this->serviceTier;
75+
}
76+
5977
protected function populateResult(Response $response): void
6078
{
6179
$headers = $response->getHeaders();
6280

6381
$this->contentType = $headers['content-type'][0];
6482
$this->performanceConfigLatency = $headers['x-amzn-bedrock-performanceconfig-latency'][0] ?? null;
83+
$this->serviceTier = $headers['x-amzn-bedrock-service-tier'][0] ?? null;
6584

6685
$this->body = $response->getContent();
6786
}

src/Service/CloudFormation/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
- AWS api-change: Update endpoint ruleset parameters casing
1212
- AWS apu-change: Added `us-isob-west-1` region
13+
- AWS api-change: New CloudFormation DescribeEvents API with operation ID tracking and failure filtering capabilities to quickly identify root causes of deployment failures.
1314

1415
### Dependency bumped
1516

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace AsyncAws\CloudFormation\Enum;
4+
5+
final class OperationType
6+
{
7+
public const CONTINUE_ROLLBACK = 'CONTINUE_ROLLBACK';
8+
public const CREATE_CHANGESET = 'CREATE_CHANGESET';
9+
public const CREATE_STACK = 'CREATE_STACK';
10+
public const DELETE_STACK = 'DELETE_STACK';
11+
public const ROLLBACK = 'ROLLBACK';
12+
public const UPDATE_STACK = 'UPDATE_STACK';
13+
14+
public static function exists(string $value): bool
15+
{
16+
return isset([
17+
self::CONTINUE_ROLLBACK => true,
18+
self::CREATE_CHANGESET => true,
19+
self::CREATE_STACK => true,
20+
self::DELETE_STACK => true,
21+
self::ROLLBACK => true,
22+
self::UPDATE_STACK => true,
23+
][$value]);
24+
}
25+
}

src/Service/CloudFormation/src/Result/DescribeStackEventsOutput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ private function populateResultStackEvent(\SimpleXMLElement $xml): StackEvent
107107
'StackId' => (string) $xml->StackId,
108108
'EventId' => (string) $xml->EventId,
109109
'StackName' => (string) $xml->StackName,
110+
'OperationId' => (null !== $v = $xml->OperationId[0]) ? (string) $v : null,
110111
'LogicalResourceId' => (null !== $v = $xml->LogicalResourceId[0]) ? (string) $v : null,
111112
'PhysicalResourceId' => (null !== $v = $xml->PhysicalResourceId[0]) ? (string) $v : null,
112113
'ResourceType' => (null !== $v = $xml->ResourceType[0]) ? (string) $v : null,

src/Service/CloudFormation/src/Result/DescribeStacksOutput.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use AsyncAws\CloudFormation\CloudFormationClient;
66
use AsyncAws\CloudFormation\Enum\Capability;
77
use AsyncAws\CloudFormation\Input\DescribeStacksInput;
8+
use AsyncAws\CloudFormation\ValueObject\OperationEntry;
89
use AsyncAws\CloudFormation\ValueObject\Output;
910
use AsyncAws\CloudFormation\ValueObject\Parameter;
1011
use AsyncAws\CloudFormation\ValueObject\RollbackConfiguration;
@@ -121,6 +122,19 @@ private function populateResultCapabilities(\SimpleXMLElement $xml): array
121122
return $items;
122123
}
123124

125+
/**
126+
* @return OperationEntry[]
127+
*/
128+
private function populateResultLastOperations(\SimpleXMLElement $xml): array
129+
{
130+
$items = [];
131+
foreach ($xml->member as $item) {
132+
$items[] = $this->populateResultOperationEntry($item);
133+
}
134+
135+
return $items;
136+
}
137+
124138
/**
125139
* @return string[]
126140
*/
@@ -134,6 +148,14 @@ private function populateResultNotificationARNs(\SimpleXMLElement $xml): array
134148
return $items;
135149
}
136150

151+
private function populateResultOperationEntry(\SimpleXMLElement $xml): OperationEntry
152+
{
153+
return new OperationEntry([
154+
'OperationType' => (null !== $v = $xml->OperationType[0]) ? (string) $v : null,
155+
'OperationId' => (null !== $v = $xml->OperationId[0]) ? (string) $v : null,
156+
]);
157+
}
158+
137159
private function populateResultOutput(\SimpleXMLElement $xml): Output
138160
{
139161
return new Output([
@@ -237,6 +259,7 @@ private function populateResultStack(\SimpleXMLElement $xml): Stack
237259
'RetainExceptOnCreate' => (null !== $v = $xml->RetainExceptOnCreate[0]) ? filter_var((string) $v, \FILTER_VALIDATE_BOOLEAN) : null,
238260
'DeletionMode' => (null !== $v = $xml->DeletionMode[0]) ? (string) $v : null,
239261
'DetailedStatus' => (null !== $v = $xml->DetailedStatus[0]) ? (string) $v : null,
262+
'LastOperations' => (0 === ($v = $xml->LastOperations)->count()) ? null : $this->populateResultLastOperations($v),
240263
]);
241264
}
242265

0 commit comments

Comments
 (0)