本文为您介绍Clickhouse服务关联角色(AliyunServiceRoleForClickHouse)的应用场景以及如何删除服务关联角色。

背景信息

Clickhouse服务关联角色(AliyunServiceRoleForClickHouse)是在某些情况下,为了完成Clickhouse自身的某个功能,需要获取其他云服务的访问权限,而提供的RAM角色。更多关于服务关联角色的信息请参见服务关联角色

应用场景

Clickhouse的日志投递功能需要访问SLS云服务资源,通过服务关联角色功能获取访问权限。

AliyunServiceRoleForClickHouse介绍

角色名称:AliyunServiceRoleForClickHouse

角色权限策略:AliyunServiceRolePolicyForClickHouse

权限说明:

{
  "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"
}

删除服务关联角色

如果您需要删除AliyunServiceRoleForClickHouse(服务关联角色),需要先释放依赖这个服务角色的所有集群。