UpdateCollectorName
Updates the name of a collector.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:UpdateCollectorName |
update |
*All Resource
|
None | None |
Request syntax
POST /openapi/collectors/{ResId}/actions/rename HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResId |
string |
Yes |
The ID of the collector. |
ct-cn-77uqof2s7rg5c**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. The client generates the token and must ensure that it is unique among different requests. The token can be up to 64 ASCII characters in length. |
5A2CFF0E-5718-45B5-9D4D-70B3FF**** |
| body |
string |
No |
The updated name of the collector. |
{"name":"collectorName1"} |
Request body
The request body must also include the following parameter to specify the updated name of the collector.
| Name | Type | Required | Example | Description |
| name | String | Yes | collectorName1 | The updated name of the collector. |
Example:
{
"name": "collectorName1"
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1**** |
| Result |
object |
The returned result. |
|
| resId |
string |
The instance ID of the collector. |
ct-cn-77uqof2s7rg5c**** |
| gmtUpdateTime |
string |
The time when the collector was updated. The time follows the YYYY-MM-DDTHH:mm:ss.SSS+HHMM format, where the suffix indicates the time zone offset. |
2020-06-20T07:26:47.000+0000 |
| dryRun |
boolean |
Specifies whether to perform a dry run. Valid values:
|
false |
| ownerId |
string |
The ID of the account. |
16852099488***** |
| vpcId |
string |
The ID of the virtual private cloud (VPC) where the collector resides. |
vpc-bp16k1dvzxtma***** |
| resType |
string |
The type of the collector. Valid values: fileBeat, metricBeat, heartBeat, and audiBeat. |
fileBeat |
| resVersion |
string |
The version of the collector. The supported versions vary based on the type of the machine where the collector is deployed:
|
6.8.5_with_community |
| gmtCreatedTime |
string |
The time when the collector was created. The time follows the YYYY-MM-DDTHH:mm:ss.SSS+HHMM format, where the suffix indicates the time zone offset. |
2020-06-20T07:26:47.000+0000 |
| status |
string |
The status of the collector. Valid values: activing (taking effect) and active (effective). |
active |
| name |
string |
The name of the collector. |
ct-test |
| configs |
array<object> |
The configuration file information of the collector. |
|
|
object |
|||
| content |
string |
The content of the file. |
- key: log\n title: Log file content\n description: >\n Contains log file lines.\n .... |
| fileName |
string |
The name of the file. |
fields.yml |
| extendConfigs |
array<object> |
The extended configurations of the collector. |
|
|
array<object> |
|||
| successPodsCount |
string |
The number of pods from which data is successfully collected in the ACK cluster. This parameter is displayed when configType is set to collectorDeployMachines and type is set to ACKCluster. |
8 |
| protocol |
string |
The transmission protocol. Valid values: HTTP and HTTPS. |
HTTP |
| userName |
string |
The username used to access the instance specified by the collector output. Default value: elastic. This parameter is displayed when configType is set to collectorTargetInstance or collectorElasticsearchForKibana. |
elastic |
| totalPodsCount |
string |
The total number of pods from which data is collected in the ACK cluster. This parameter is displayed when configType is set to collectorDeployMachines and type is set to ACKCluster. |
10 |
| type |
string |
The type of the machine where the collector is deployed. This parameter is displayed when configType is set to collectorDeployMachine. Valid values:
|
ECSInstanceId |
| kibanaHost |
string |
The address for public network access to Kibana after Kibana Dashboard is enabled. This parameter is displayed when configType is set to collectorElasticsearchForKibana. |
https://es-cn-4591jumei000u****.kibana.elasticsearch.aliyuncs.com:5601 |
| enableMonitoring |
boolean |
Specifies whether to enable Monitoring. This parameter is displayed when configType is set to collectorTargetInstance and instanceType is set to elasticsearch. Valid values:
|
true |
| configType |
string |
The configuration type. Valid values:
|
collectorDeployMachine |
| instanceType |
string |
The type of the instance specified by the collector output. Valid values: elasticsearch and logstash. This parameter is displayed when configType is set to collectorTargetInstance. |
elasticsearch |
| groupId |
string |
The ID of the machine group. This parameter is displayed when configType is set to collectorDeployMachine. |
default_ct-cn-5i2l75bz4776**** |
| host |
string |
The address for internal-facing access to Kibana over the private network after Kibana Dashboard is enabled. This parameter is displayed when configType is set to collectorElasticsearchForKibana. |
es-cn-4591jumei000u****-kibana.internal.elasticsearch.aliyuncs.com:5601 |
| instanceId |
string |
Instance ID of the instance associated with the collector. If configType is set to collectorTargetInstance, this parameter indicates instance ID of the instance specified by the collector output. If configType is set to collectorDeployMachines and type is set to ACKCluster, this parameter indicates instance ID of the ACK cluster. |
es-cn-n6w1o1**** |
| machines |
array<object> |
The information about the ECS instances where the collector is deployed. This parameter is displayed when configType is set to collectorDeployMachines and type is set to ECSInstanceId. |
|
|
object |
|||
| agentStatus |
string |
The status of each collector on the ECS instance. Valid values: heartOk (normal heartbeat), heartLost (abnormal heartbeat), uninstalled (not installed), and failed (installation failed). |
heartOk |
| instanceId |
string |
The IDs of the ECS instances. |
c1b9fde5172b84f82b9928e825a7b8988 |
| hosts |
array |
The access endpoints of the instance specified by the collector output. This parameter is displayed when configType is set to collectorTargetInstance. |
|
|
string |
The access endpoints of the instance specified by the collector output. This parameter is displayed when configType is set to collectorTargetInstance. |
["es-cn-n6w1o1x*****.elasticsearch.aliyuncs.com:9200"] |
|
| collectorPaths |
array |
The collection path of Filebeat. This parameter is displayed when the collector is deployed on an ECS instance. |
|
|
string |
The collection path of Filebeat. This parameter is displayed when the collector is deployed on an ECS instance. |
["/var/log"] |
Examples
Success response
JSON format
{
"RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****",
"Result": {
"resId": "ct-cn-77uqof2s7rg5c****",
"gmtUpdateTime": "2020-06-20T07:26:47.000+0000",
"dryRun": false,
"ownerId": "16852099488*****",
"vpcId": "vpc-bp16k1dvzxtma*****",
"resType": "fileBeat",
"resVersion": "6.8.5_with_community",
"gmtCreatedTime": "2020-06-20T07:26:47.000+0000",
"status": "active",
"name": "ct-test",
"configs": [
{
"content": "- key: log\\n title: Log file content\\n description: >\\n Contains log file lines.\\n ....",
"fileName": "fields.yml"
}
],
"extendConfigs": [
{
"successPodsCount": "8",
"protocol": "HTTP",
"userName": "elastic",
"totalPodsCount": "10",
"type": "ECSInstanceId",
"kibanaHost": "https://es-cn-4591jumei000u****.kibana.elasticsearch.aliyuncs.com:5601",
"enableMonitoring": true,
"configType": "collectorDeployMachine",
"instanceType": "elasticsearch",
"groupId": "default_ct-cn-5i2l75bz4776****",
"host": "es-cn-4591jumei000u****-kibana.internal.elasticsearch.aliyuncs.com:5601",
"instanceId": "es-cn-n6w1o1****",
"machines": [
{
"agentStatus": "heartOk",
"instanceId": "c1b9fde5172b84f82b9928e825a7b8988"
}
],
"hosts": [
"[\"es-cn-n6w1o1x*****.elasticsearch.aliyuncs.com:9200\"]"
]
}
],
"collectorPaths": [
"[\"/var/log\"]"
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.