This topic describes the scenarios of the ApsaraDB for ClickHouse service-linked role (AliyunServiceRoleForClickHouse) and how to delete the role.

Background information

To implement a feature, ApsaraDB for ClickHouse may require permissions to access other Alibaba Cloud services. The service-linked role AliyunServiceRoleForClickHouse is a Resource Access Management (RAM) role that authorizes ApsaraDB for ClickHouse to access such services. For more information about service-linked roles, see Service-linked roles.

Scenarios

To implement the log delivery feature, ApsaraDB for ClickHouse must obtain permissions to access Log Service by using its service-linked role.

AliyunServiceRoleForClickHouse description

Role name: AliyunServiceRoleForClickHouse

Policy attached to the role: AliyunServiceRolePolicyForClickHouse

The policy specifies the following permissions:

{
  "Statement": [
    {
      "Action": [
        "log:GetProject",
        "log:ListProject",
        "log:GetCursor",
        "log:GetCursorTime",
        "log:GetLogs",
        "log:GetHistograms",
        "log:GetContextLogs",
        "log:PullLogs",
        "log:GetLogStoreLogs",
        "log:GetLogStoreHistogram",
        "log:GetLogStore",
        "log:ListLogStores",
        "log:GetCursorOrData",
        "log:ListShards",
        "log:GetConfig",
        "log:ListConfig",
        "log:GetShipperStatus",
        "log:GetCheckPoint",
        "log:HeartBeat",
        "log:UpdateCheckPoint",
        "log:PostLogStoreLogs",
        "log:CreateConsumerGroup",
        "log:UpdateConsumerGroup",
        "log:DeleteConsumerGroup",
        "log:ListConsumerGroup",
        "log:ConsumerGroupUpdateCheckPoint",
        "log:ConsumerGroupHeartBeat",
        "log:GetConsumerGroupCheckPoint",
        "log:CreateExport",
        "log:GetExport",
        "log:ListExport",
        "log:UpdateExport",
        "log:DeleteExport",
        "log:CreateJob",
        "log:GetJob",
        "log:ListJobs",
        "log:UpdateJob",
        "log:DeleteJob"
      ],
      "Resource": "*",
      "Effect": "Allow"
    },
    {
      "Action": "ram:DeleteServiceLinkedRole",
      "Resource": "*",
      "Effect": "Allow",
      "Condition": {
        "StringEquals": {
          "ram:ServiceName": "clickhouse.aliyuncs.com"
        }
      }
    }
  ],
  "Version": "1"
}

Instructions on how to delete the service-linked role

Before you delete the AliyunServiceRoleForClickHouse role, you must release all clusters that depend on the role.