Skip to content

Commit 0873aa4

Browse files
authored
Add BedrockAgent client (#1990)
1 parent ed67bd8 commit 0873aa4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

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

77
- AWS api-change: Added `us-isob-west-1` region
88
- Added `DescribeLogGroups` method
9+
- Support for BedrockAgent
910

1011
### Dependency bumped
1112

src/AwsClientFactory.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use AsyncAws\AppSync\AppSyncClient;
88
use AsyncAws\Athena\AthenaClient;
9+
use AsyncAws\BedrockAgent\BedrockAgentClient;
910
use AsyncAws\BedrockRuntime\BedrockRuntimeClient;
1011
use AsyncAws\CloudFormation\CloudFormationClient;
1112
use AsyncAws\CloudFront\CloudFrontClient;
@@ -119,6 +120,19 @@ public function appSync(): AppSyncClient
119120
return $this->serviceCache[__METHOD__];
120121
}
121122

123+
public function bedrockAgent(): BedrockAgentClient
124+
{
125+
if (!class_exists(BedrockAgentClient::class)) {
126+
throw MissingDependency::create('async-aws/bedrock-agent', 'BedrockAgent');
127+
}
128+
129+
if (!isset($this->serviceCache[__METHOD__])) {
130+
$this->serviceCache[__METHOD__] = new BedrockAgentClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger);
131+
}
132+
133+
return $this->serviceCache[__METHOD__];
134+
}
135+
122136
public function bedrockRuntime(): BedrockRuntimeClient
123137
{
124138
if (!class_exists(BedrockRuntimeClient::class)) {

0 commit comments

Comments
 (0)