UpdateCollectorName

Updated at:

Updates the name of a collector.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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.

NameTypeRequiredExampleDescription
nameStringYescollectorName1The 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:

  • true: Performs only a check and does not update the collector.

  • false: Performs a check and updates the collector.

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:

  • ECS: 6.8.5_with_community

  • ACK: 6.8.13_with_community

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: ECS instance

  • ACKCluster: ACK cluster

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: Enables Monitoring.

  • false: Disables Monitoring.

true

configType

string

The configuration type. Valid values:

  • collectorTargetInstance: the output of the collector

  • collectorDeployMachine: the machine where the collector is deployed

  • collectorElasticsearchForKibana: the information about the Elasticsearch instance that supports Kibana Dashboard

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.