External Store を作成する

リクエスト構文
POST /externalstores HTTP/1.1
'x-log-bodyrawsize': '0',
'Content-Type': 'application/json', 
'Content-Length': <ContentLength>,  
'Content-MD5': <Md5>, 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 'hmac-sha1', 
'Host': <Project Endpoint> 
'Date': <GMT Date>, 
'Authorization': <AuthorizationString> 
'{"externalStoreName": "<ExternalStoreName>", 
  "storeType": "rds-vpc", 
  "parameter": {
               "vpc-id": "<vpc-id>", 
               "instance-id": "<instance-id>", 
               "host": "<host>", 
               "port": "<port>", 
               "username": "<username>", 
               "password": "<password>", 
               "db": "<db>", 
               "table": "<table>", 
               "region": "region>"
               }
}'
リクエストパラメーター
属性名 データ型 必須 説明
ExternalStoreName String はい <td class="en-UStry align-left colsep-1 rowsep-1">External Store 名。プロジェクト内で一意であり、Logstor 名と競合しません。
vpc-id String いいえ RDS インスタンスの Virtual Private Cloud (VPC) ID。
instance-id String いいえ <td class="en-UStry align-left colsep-1 rowsep-1"> RDS インスタンス ID。 vpc-id と instance-id は同時に空にできます。これは、External Store が VPC 環境になく、直接アクセス可能であることを示します。
host String いいえ <td class="en-UStry align-left colsep-1 rowsep-1"> vpc-id と instance-id の両方が空の場合に必要な、RDS インスタンスが存在するホスト。
port String はい <td class="en-UStry align-left colsep-1 rowsep-1"> RDS ポート。 </td>
username String はい ユーザーの名前。
password String はい パスワード
db String はい データベースの名前。
String はい <td class="en-UStry align-left colsep-1 rowsep-1">テーブル名。 </td>
region String はい <td class="en-UStry align-left colsep-1 rowsep-1"> RDS インスタンスが存在するリージョン。現在は cn-qingdao、cn-beijing、および cn-hangzhou のみをサポートしています。
リクエストヘッダ

CreateExternalStore API には、特別なリクエストヘッダーはありません。 Log Service API のパブリックリクエストヘッダーについての詳細は、パブリックリクエストヘッダーをご参照ください。

POST /externalstores HTTP/1.1
'x-log-bodyrawsize': '0',
'Content-Type': 'application/json', 
'Content-Length': '307', 
'Content-MD5': '7C1D14659C0BBBA7C7BFF9E5A1A46705', 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 'hmac-sha1', 
'Host': 'ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com', 
'Date': 'Thu, 19 Apr 2018 02:15:41 GMT', 
'Authorization': 'LOG <yourAccessKeyId>:<yourSignature>'}
'{"externalStoreName": "rds_store", 
  "storeType": "rds-vpc", 
  "parameter": {
               "vpc-id": "vpc-bp1aevy8sofi8mh1q****", 
               "instance-id": "i-bp1b6c719dfa08exf****", 
               "host": "192.168.XX.XX", 
               "port": "3306", 
               "username":"root", 
               "password": "sfdsfldsfksfls****", 
               "db": "meta", 
               "table":"join_meta" 
               "region": "cn-qingdao"
               }}'

External Store を更新する

リクエスト構文
PUT /externalstores/<ExternalStoreName> HTTP/1.1
'x-log-bodyrawsize': '0',
'Content-Type': 'application/json', 
'Content-Length': <ContentLength>, 
'Content-MD5': <Md5>, 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 'hmac-sha1', 
'Host': <Project Endpoint> 
'Date': <GMT Date>, 
'Authorization': <AuthorizationString> 
'{"externalStoreName": "<ExternalStoreName>",  
  "storeType": "rds-vpc", 
  "parameter": {
               "vpc-id": "<vpc-id>", 
               "instance-id": "<instance-id>", 
               "host": "<host>", 
               "port": "<port>", 
               "username": "<username>", 
               "password": "<password>", 
               "db": "<db>", 
               "table": "<table>", 
               "region": "region>"
               }
}'
リクエストパラメーター
属性名 データ型 必須 説明
ExternalStoreName String はい <td class="en-UStry align-left colsep-1 rowsep-1">External Store 名。プロジェクト内で一意であり、Logstor 名と競合しません。
vpc-id String いいえ RDS インスタンスの Virtual Private Cloud (VPC) ID。
intance-id String いいえ <td class="en-UStry align-left colsep-1 rowsep-1"> RDS インスタンス ID。 vpc-id と instance-id は同時に空にできます。これは、External Store が VPC 環境になく、直接アクセス可能であることを示します。
host String いいえ <td class="en-UStry align-left colsep-1 rowsep-1"> vpc-id と instance-id の両方が空の場合に必要な、RDS インスタンスが存在するホスト。
port String はい <td class="en-UStry align-left colsep-1 rowsep-1"> RDS ポート。 </td>
username String はい ユーザーの名前。
password String はい パスワード
db String はい データベースの名前。
String はい <td class="en-UStry align-left colsep-1 rowsep-1">テーブル名。 </td>
region String はい <td class="en-UStry align-left colsep-1 rowsep-1"> RDS インスタンスが存在するリージョン。現在は cn-qingdao、cn-beijing、および cn-hangzhou のみをサポートしています。
PUT http://ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com:80/externalstores/rds_store  HTTP/1.1
'x-log-bodyrawsize': '0',
'Content-Type': 'application/json', 
'Content-Length': '307', 
'Content-MD5': '7C1D14659C0BBBA7C7BFF9E5A1A46705', 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 'hmac-sha1', 
'Host': 'ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com', 
'Date': 'Thu, 19 Apr 2018 02:15:41 GMT', 
'Authorization': 'LOG <yourAccessKeyId>:<yourSignature>'}
'{"externalStoreName": "rds_store", 
  "storeType": "rds-vpc", 
  "parameter": {
               "vpc-id": "vpc-bp1aevy8sofi8mh1q****", 
               "instance-id": "i-bp1b6c719dfa08exf****", 
               "host": "192.168.XX.XX", 
               "port": "3306", 
               "username": "root", 
               "password": "sfdsfldsfksfl****", 
               "db": "meta", 
               "table": "join_meta", 
               "region": "cn-qingdao"
               }}'

すべての External Store を一覧表示する

リクエスト構文
GET /externalstores?externalStoreName=<external_store_name_prefix>&offset=<offset>&lines=<lines>
'Content-Length': '0', 
'x-log-bodyrawsize': '0', 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 
'hmac-sha1', 
'Host': '<endpoint>',
'Date': 'Thu, 19 Apr 2018 03:03:16 GMT', 
'Authorization': 'LOG <yourAccessKeyId>:<yourSignature>'}
リクエストパラメーター
属性名 データ型 必須 説明
externalStoreName String いいえ この文字列を含む External Store をフィルタリングします。
値の範囲は 0–100 で、デフォルト値は 100 です。 Integer いいえ External Store の取得を開始する位置のオフセット。
lines Integer いいえ 取得する External Store の数
GET http://ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com:80/externalstores?externalStoreName=&offset=0&lines=10
'Content-Length': '0', 
'x-log-bodyrawsize': '0', 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 
'hmac-sha1', 
'Host': 'ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com',
'Date': 'Thu, 19 Apr 2018 03:03:16 GMT', 
'Authorization': 'LOG <yourAccessKeyId>:<yourSignature>'}
レスポンス
{'count': 3, 'externalstores': ['ecs_store', 'rds_store', 'ecs_store1'], 'total': 3}

External  Store の詳細を取得する

http://ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com:80/externalstores/<external_store_name>  
'Content-Length': '0', 
'x-log-bodyrawsize': '0', 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 'hmac-sha1', 
'Host': 'ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com', 
'Date': 'Thu, 19 Apr 2018 03:26:49 GMT', 
'Authorization': 'LOG <yourAccessKeyId>:<yourSignature>'
リクエストパラメーター
属性名 データ型 必須 説明
external_store_name String はい 取得する External Store の名前。
http://ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com:80/externalstores/rds_store
'Content-Length': '0', 
'x-log-bodyrawsize': '0', 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 'hmac-sha1', 
'Host': 'ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com', 
'Date': 'Thu, 19 Apr 2018 03:26:49 GMT', 
'Authorization': 'LOG <yourAccessKeyId>:<yourSignature>'
レスポンス
{
  'storeType': 'rds-vpc', 
  'parameter': {
               'region': 'cn-qingdao', 
               'vpc-id': 'vpc-bp1aevy8sofi8mh1q****', 
               'instance-id': 'i-bp1b6c719dfa08exf****', 
               'host': '192.168.XX.XX', 
               'port': '3306', 
               'username': 'root', 
               'db': 'meta', 
               'table': 'join_meta'
               }
}

External Store を削除する

DELETE /externalstores/<external_store_name>
'Content-Length': '0',
'x-log-bodyrawsize': '0', 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 'hmac-sha1', 
'Host': 'ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com', 
'Date': 'Thu, 19 Apr 2018 03:32:49 GMT', 
'Authorization': 'LOG <yourAccessKeyId>:<yourSignature>'
リクエストパラメーター
属性名 データ型 必須 説明
external_store_name String はい 削除する外部ストアの External Store の名前。
 DELETE http://ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com:80/externalstores/rds_store
'Content-Length': '0',
'x-log-bodyrawsize': '0', 
'x-log-apiversion': '0.6.0', 
'x-log-signaturemethod': 'hmac-sha1', 
'Host': 'ali-yunlei-chengdu.cn-chengdu.log.aliyuncs.com', 
'Date': 'Thu, 19 Apr 2018 03:32:49 GMT', 
'Authorization': 'LOG <yourAccessKeyId>:<yourSignature>'