管理服务关联角色AliyunServiceRoleForSLSAILens

您可以授予日志服务AI日志洞察应用使用服务关联角色AliyunServiceRoleForSLSAILens来访问您在其他云产品中的资源。本文介绍AliyunServiceRoleForSLSAILens角色的应用场景和权限策略。

应用场景

当您通过AI日志洞察应用采集AI类云产品日志时,日志服务会调用相关云产品的OpenAPI接口获取采集账号下的云产品信息。此过程中,日志服务需要通过AliyunServiceRoleForSLSAILens角色获取AI类云产品的部分读取权限及日志采集相关的部分修改权限。更多信息,请参见服务关联角色

权限策略

  • 角色名称:AliyunServiceRoleForSLSAILens

  • 角色权限策略名称:AliyunServiceRolePolicyForSLSAILens

  • 权限策略:

    {
        "Version": "1",
        "Statement": [
            {
                "Action": [
                    "pai:GetWorkspace",
                    "pai:ListWorkspaces"
                ],
                "Resource": "*",
                "Effect": "Allow"
            },
            {
                "Action": [
                    "log:CreateProject",
                    "log:GetProject",
                    "log:ListProject",
                    "log:ListLogStores",
                    "log:GetLogStore",
                    "log:CreateIndex",
                    "log:UpdateIndex",
                    "log:GetIndex",
                    "log:CreateDashboard",
                    "log:UpdateDashboard",
                    "log:ListDashboard",
                    "log:CreateLogStore",
                    "log:CreateSavedSearch",
                    "log:UpdateSavedSearch"
                ],
                "Resource": "acs:log:*:*:project/*",
                "Effect": "Allow"
            },
            {
                "Action": "ram:DeleteServiceLinkedRole",
                "Resource": "*",
                "Effect": "Allow",
                "Condition": {
                    "StringEquals": {
                        "ram:ServiceName": "ai-lens.log.aliyuncs.com"
                    }
                }
            }
        ]
    }