Manage the AliyunServiceRoleForSLSStorageLens service-linked role

Updated at:

CloudLens applications require the AliyunServiceRoleForSLSStorageLens service-linked role to access resources in other cloud services. This topic covers the scenarios and permissions policy for this role.

Scenarios

When you use a CloudLens application to collect logs from storage services, Simple Log Service calls the API operations of those services to obtain resource information and manage log collection settings. This requires the AliyunServiceRoleForSLSStorageLens service-linked role. For more information, see Service-linked roles.

Description

  • Role name: AliyunServiceRoleForSLSStorageLens

  • Policy attached to the role: AliyunServiceRolePolicyForSLSStorageLens

  • Policy document:

    {
        "Version": "1",
        "Statement": [
            {
                "Action": [
                    "nas:DescribeFileSystems"
                ],
                "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",
                    "log:CreateLogtailPipelineConfig",
                    "log:GetLogtailPipelineConfig",
                    "log:ListLogtailPipelineConfig",
                    "log:DeleteLogtailPipelineConfig",
                    "log:UpdateLogtailPipelineConfig",
                    "log:CreateMachineGroup",
                    "log:RemoveConfigFromGroup",
                    "log:ApplyConfigToGroup",
                    "log:GetMachineGroup",
                    "log:ListTagResources",
                    "log:TagResources"
                ],
                "Resource": [
                    "acs:log:*:*:project/*"
                ],
                "Effect": "Allow"
            },
            {
                "Action": "ram:DeleteServiceLinkedRole",
                "Resource": "*",
                "Effect": "Allow",
                "Condition": {
                    "StringEquals": {
                        "ram:ServiceName": "storagelens.log.aliyuncs.com"
                    }
                }
            }
        ]
    }