Skip to content

Commit f8b9e6c

Browse files
authored
Generate CodeDeploy client (#516)
* Generate CodeDeploy client * Added docs and some tests * Added tests * cs
1 parent d52ebfb commit f8b9e6c

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
@@ -5,6 +5,7 @@
55
namespace AsyncAws\Core;
66

77
use AsyncAws\CloudFormation\CloudFormationClient;
8+
use AsyncAws\CodeDeploy\CodeDeployClient;
89
use AsyncAws\Core\Credentials\CacheProvider;
910
use AsyncAws\Core\Credentials\ChainProvider;
1011
use AsyncAws\Core\Credentials\ConfigurationProvider;
@@ -94,6 +95,19 @@ public function cloudFormation(): CloudFormationClient
9495
return $this->serviceCache[__METHOD__];
9596
}
9697

98+
public function codeDeploy(): CodeDeployClient
99+
{
100+
if (!class_exists(CodeDeployClient::class)) {
101+
throw MissingDependency::create('async-aws/code-deploy', 'CodeDeploy');
102+
}
103+
104+
if (!isset($this->serviceCache[__METHOD__])) {
105+
$this->serviceCache[__METHOD__] = new CodeDeployClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger);
106+
}
107+
108+
return $this->serviceCache[__METHOD__];
109+
}
110+
97111
public function dynamoDb(): DynamoDbClient
98112
{
99113
if (!class_exists(DynamoDbClient::class)) {

0 commit comments

Comments
 (0)