Skip to content

Commit

Permalink
Create new IotData client (#1278)
Browse files Browse the repository at this point in the history
* Create new IotData client

* fix ci
  • Loading branch information
tyx committed Aug 1, 2022
1 parent a4e36bd commit 1594762
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

### Added

- Added support for Iot Data

## 1.16.0

### Added

- Added support for endpoint discovery
- Added support for Iot Core

Expand Down
14 changes: 14 additions & 0 deletions src/AwsClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use AsyncAws\Firehose\FirehoseClient;
use AsyncAws\Iam\IamClient;
use AsyncAws\Iot\IotClient;
use AsyncAws\IotData\IotDataClient;
use AsyncAws\Kinesis\KinesisClient;
use AsyncAws\Kms\KmsClient;
use AsyncAws\Lambda\LambdaClient;
Expand Down Expand Up @@ -306,6 +307,19 @@ public function iot(): IotClient
return $this->serviceCache[__METHOD__];
}

public function iotData(): IotDataClient
{
if (!class_exists(IotDataClient::class)) {
throw MissingDependency::create('async-aws/iot-data', 'IotData');
}

if (!isset($this->serviceCache[__METHOD__])) {
$this->serviceCache[__METHOD__] = new IotDataClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger);
}

return $this->serviceCache[__METHOD__];
}

public function kinesis(): KinesisClient
{
if (!class_exists(KinesisClient::class)) {
Expand Down

0 comments on commit 1594762

Please sign in to comment.