|
30 | 30 | use AsyncAws\Sns\SnsClient; |
31 | 31 | use AsyncAws\Sqs\SqsClient; |
32 | 32 | use AsyncAws\Ssm\SsmClient; |
| 33 | +use AsyncAws\StepFunctions\StepFunctionsClient; |
33 | 34 | use Psr\Log\LoggerInterface; |
34 | 35 | use Psr\Log\NullLogger; |
35 | 36 | use Symfony\Component\HttpClient\HttpClient; |
@@ -333,12 +334,21 @@ public function ssm(): SsmClient |
333 | 334 |
|
334 | 335 | public function sts(): StsClient |
335 | 336 | { |
336 | | - if (!class_exists(StsClient::class)) { |
337 | | - throw MissingDependency::create('async-aws/core', 'STS'); |
| 337 | + if (!isset($this->serviceCache[__METHOD__])) { |
| 338 | + $this->serviceCache[__METHOD__] = new StsClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger); |
| 339 | + } |
| 340 | + |
| 341 | + return $this->serviceCache[__METHOD__]; |
| 342 | + } |
| 343 | + |
| 344 | + public function stepFunctions(): StepFunctionsClient |
| 345 | + { |
| 346 | + if (!class_exists(StepFunctionsClient::class)) { |
| 347 | + throw MissingDependency::create('async-aws/step-functions', 'StepFunctions'); |
338 | 348 | } |
339 | 349 |
|
340 | 350 | if (!isset($this->serviceCache[__METHOD__])) { |
341 | | - $this->serviceCache[__METHOD__] = new StsClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger); |
| 351 | + $this->serviceCache[__METHOD__] = new StepFunctionsClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger); |
342 | 352 | } |
343 | 353 |
|
344 | 354 | return $this->serviceCache[__METHOD__]; |
|
0 commit comments