获得 MachineGroup 上已经被应用的配置名称。
示例:
GET /machinegroups/{groupName}/configs
GET /machinegroups/{groupName}/configs HTTP/1.1
Authorization: <AuthorizationString>
Date: <GMT Date>
Host: <Project Endpoint>
x-log-apiversion: 0.6.0
x-log-signaturemethod: hmac-sha1
URL 参数:
参数名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
groupName | string | 是 | 机器分组名称 |
无特有请求头。关于 Log Service API 的公共请求头,请参考 公共请求头。
无特有响应头。关于 Log Service API 的公共响应头,请参考 公共响应头。
请求成功,其响应 Body 会包括指定 machinegroup 下的所有 machine 列表,具体格式如下:
名称 | 类型 | 描述 |
---|---|---|
count | 整型 | 返回的 config 数目。 |
configs | 字符串数组 | 返回的 config 名称列表。 |
{
"count":2,
"configs":
["config1","config2"]
}
除了返回 Log Service API 的 通用错误码,还可能返回如下特有错误码:
HTTP 状态码 | ErrorCode | ErrorMessage |
---|---|---|
404 | GroupNotExist | group {GroupName} does not exist |
500 | InternalServerError | internal server error |
无
GET /machinegroups/test-machine-group/configs HTTP/1.1
Header :
{
"x-log-apiversion": "0.6.0",
"Authorization": "LOG 94to3z418yupi6ikawqqd370:/Ntg290OaJ8JfInmhzYTG/GJwbE=",
"Host": "ali-test-project.cn-hangzhou-devcommon-intranet.sls.aliyuncs.com",
"Date": "Tue, 10 Nov 2015 19:45:48 GMT",
"Content-Length": "0",
"x-log-signaturemethod": "hmac-sha1",
"User-Agent": "sls-java-sdk-v-0.6.0",
"Content-Type": "application/x-protobuf",
"x-log-bodyrawsize": "0"
}
HTTP/1.1 200 OK
Header :
{
"Date": "Tue, 10 Nov 2015 19:45:48 GMT",
"Content-Length": "53",
"x-log-requestid": "5642496C99248C8C7B00173F",
"Connection": "close",
"Content-Type": "application/json",
"Server": "nginx/1.6.1"
}
Body :
{
"configs": [
"two",
"three",
"test_logstore"
],
"count": 3
}
在文档使用中是否遇到以下问题
更多建议
匿名提交