How to setup amazon timestream in php?

折月煮酒 提交于 2021-01-07 01:20:41

问题


I have found the documentation for it here. I have PHP SDK installed. Now when I go through the documents there is not so much in detail about the PHP one. I have the following questions:

  1. Here how can I specify the $client
$result = $client->createDatabase([
    'DatabaseName' => '<string>', // REQUIRED
    'KmsKeyId' => '<string>',
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);
  1. Is there any good documents or videos regarding the timestream in PHP from where I can get some help.

回答1:


There are two client classes. One for writing and one for reading.

TimestreamWriteClient

https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.TimestreamWrite.TimestreamWriteClient.html

and

TimestreamQueryClient

https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.TimestreamQuery.TimestreamQueryClient.html

You can use the function createTimestreamQuery and createTimestreamWrite on the $sdk object to instantiate those classes.



来源:https://stackoverflow.com/questions/65027337/how-to-setup-amazon-timestream-in-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!