Creates an Object Storage Service (OSS) external store.
Usage notes
Host consists of a project name and a Simple Log Service endpoint. You must specify a project in Host.
Debugging
Request headers
This operation uses only common request headers and does not have operation-specific request headers. For more information, see Common request parameters.
Request syntax
POST /externalstores HTTP/1.1
Request parameters
Parameter |
Type |
Position |
Required |
Example |
Description |
project | String | Host | Yes | my-project | The name of the project. |
Object | Body | Yes | The request struct. |
||
externalStoreName | String | Body | Yes | test_oss_store | The name of the external store. |
storeType | String | Body | Yes | oss | The type of the external store. Set the value to oss. |
parameter | Object | Body | Yes | The parameters that are configured for the external store. |
|
accessid | String | Body | Yes | LTAI5tFsHGGeYry*****1Sz | The AccessKey ID that is used to access the OSS bucket. |
accesskey | String | Body | Yes | GyviCLDVHkHrOztdkxuE6******Rp6 | The AccessKey secret that is used to access the OSS bucket. |
endpoint | String | Body | Yes | oss-cn-hangzhou.aliyuncs.com | The OSS endpoint. |
bucket | String | Body | Yes | my-bucket | The name of the OSS bucket. |
objects | Array of String | Body | Yes | file-name | The name of the associated OSS bucket. Valid values of N: 1 to 100. |
columns | Array | Body | Yes | The associated fields. |
|
name | String | Body | Yes | auto-test | The name of the field. |
type | String | Body | Yes | sls | The type of the field. |
Response parameters
Parameter |
Type |
Example |
Description |
Server | String | nginx | The name of the server. |
Content-Type | String | application/json | The format of the response body. |
Content-Length | String | 0 | The length of the response body. |
Connection | String | close | Indicates whether the connection is persistent. Valid values:
|
Date | String | Sun, 27 May 2018 08:25:04 GMT | The time when the response was returned. |
x-log-requestid | String | 5B0A6B60BB6EE39764D458B5 | The request ID. |
Examples
Sample requests
POST /externalstores HTTP/1.1
Host:ali-test-project.cn-hangzhou.log.aliyuncs.com
Content-Type:application/json
{
"externalStoreName" : "test_oss_store",
"storeType" : "oss",
"parameter" : {
"accessid" : "LTAI5tFsHGGeYry*****1Sz",
"accesskey" : "GyviCLDVHkHrOztdkxuE6******Rp6",
"endpoint" : "oss-cn-hangzhou.aliyuncs.com",
"bucket" : "my-bucket",
"objects" : [ ],
"columns" : [ {
"name" : "auto-test",
"type" : "sls"
} ]
}
}
Sample success responses
JSON
format
HTTP/1.1 200 OK
Error codes
For a list of error codes, see Service error codes.