Skip to content

Commit f118bb9

Browse files
Nemo64jderusse
andauthored
implement rds-data service (#645)
* implement RDSDataService * Handle recurcion is JsonRest * Update Services * Update RdsDataService * Fallback endpoint when not available * set FUNCTION_KEY in more places * update readme for value object * php cs fix * implement $fn usage detection * make phpstan ignore array keys that are defined out of order phpstan/phpstan#3358 * revert added complexity by just ignoring phpstan messages * change capitalisation of the rds data service * ignore argument missmatch in generated code * avoid edge case where a function is accessed but not created Co-authored-by: Jérémy Derussé <[email protected]>
1 parent eff4efe commit f118bb9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/AwsClientFactory.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use AsyncAws\EventBridge\EventBridgeClient;
2020
use AsyncAws\Iam\IamClient;
2121
use AsyncAws\Lambda\LambdaClient;
22+
use AsyncAws\RdsDataService\RdsDataServiceClient;
2223
use AsyncAws\S3\S3Client;
2324
use AsyncAws\Ses\SesClient;
2425
use AsyncAws\Sns\SnsClient;
@@ -182,6 +183,19 @@ public function lambda(): LambdaClient
182183
return $this->serviceCache[__METHOD__];
183184
}
184185

186+
public function rdsDataService(): RdsDataServiceClient
187+
{
188+
if (!class_exists(RdsDataServiceClient::class)) {
189+
throw MissingDependency::create('async-aws/rds-data-service', 'RdsDataService');
190+
}
191+
192+
if (!isset($this->serviceCache[__METHOD__])) {
193+
$this->serviceCache[__METHOD__] = new RdsDataServiceClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger);
194+
}
195+
196+
return $this->serviceCache[__METHOD__];
197+
}
198+
185199
public function s3(): S3Client
186200
{
187201
if (!class_exists(S3Client::class)) {

0 commit comments

Comments
 (0)