Skip to content

Commit f2fba03

Browse files
authored
feat: Add Iot client (#1267)
* feat: Add Iot client * fix ci * add changelog mention
1 parent 279d9d7 commit f2fba03

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
@@ -5,6 +5,7 @@
55
### Added
66

77
- Added support for endpoint discovery
8+
- Added support for Iot Core
89

910
## 1.15.0
1011

src/AwsClientFactory.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use AsyncAws\EventBridge\EventBridgeClient;
2727
use AsyncAws\Firehose\FirehoseClient;
2828
use AsyncAws\Iam\IamClient;
29+
use AsyncAws\Iot\IotClient;
2930
use AsyncAws\Kinesis\KinesisClient;
3031
use AsyncAws\Kms\KmsClient;
3132
use AsyncAws\Lambda\LambdaClient;
@@ -292,6 +293,19 @@ public function iam(): IamClient
292293
return $this->serviceCache[__METHOD__];
293294
}
294295

296+
public function iot(): IotClient
297+
{
298+
if (!class_exists(IotClient::class)) {
299+
throw MissingDependency::create('async-aws/iot', 'Iot');
300+
}
301+
302+
if (!isset($this->serviceCache[__METHOD__])) {
303+
$this->serviceCache[__METHOD__] = new IotClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger);
304+
}
305+
306+
return $this->serviceCache[__METHOD__];
307+
}
308+
295309
public function kinesis(): KinesisClient
296310
{
297311
if (!class_exists(KinesisClient::class)) {

0 commit comments

Comments
 (0)