Manage the AliyunServiceRoleForSLSAILens service-linked role

Updated at:

The AliyunServiceRoleForSLSAILens service-linked role grants the AI Log Insight application the permissions to access resources of other cloud services on behalf of Simple Log Service.

Scenarios

When you use AI Log Insight to collect logs from AI cloud services, Simple Log Service calls the API operations of those services to retrieve cloud service information within your account. Simple Log Service assumes the AliyunServiceRoleForSLSAILens role to read resources of the AI cloud services and modify log collection configurations. For more information, see Service-linked roles.

Policy

  • Role name: AliyunServiceRoleForSLSAILens

  • Policy name: AliyunServiceRolePolicyForSLSAILens

  • Policy document:

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