本文为您介绍小程序Serverless服务关联角色(AliyunServiceRoleForMPServerless)的应用场景以及如何删除服务关联角色。

背景信息

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

应用场景

小程序Serverless的云函数功能需要访问函数计算的资源,通过服务关联角色功能获取访问权限。

AliyunServiceRoleForMPServerless介绍

角色名称:AliyunServiceRoleForMPServerless

角色权限策略:AliyunServiceRolePolicyForMPServerless

权限说明:

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "fc:CreateService",
                "fc:ListServices",
                "fc:GetService",
                "fc:UpdateService",
                "fc:DeleteService",
                "fc:CreateFunction",
                "fc:ListFunctions",
                "fc:GetFunction",
                "fc:UpdateFunction",
                "fc:DeleteFunction",
                "fc:GetFunctionCode",
                "fc:InvokeFunction",
                "fc:CreateTrigger",
                "fc:ListTriggers",
                "fc:GetTrigger",
                "fc:UpdateTrigger",
                "fc:DeleteTrigger",
                "fc:PublishVersion",
                "fc:ListVersions",
                "fc:DeleteVersion",
                "fc:CreateAlias",
                "fc:ListAliases",
                "fc:GetAlias",
                "fc:UpdateAlias",
                "fc:DeleteAlias",
                "fc:PutProvisionConfig",
                "fc:GetProvisionConfig",
                "fc:ListProvisionConfigs"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {   
            "Action": "ram:PassRole",     
            "Resource": "acs:ram:*:*:role/aliyunfcaccessingmpserverlessrole-*",      
            "Effect": "Allow"   
        },
        {
            "Action": "ram:DeleteServiceLinkedRole",
            "Resource": "*",
            "Effect": "Allow",
            "Condition": {
                "StringEquals": {
                    "ram:ServiceName": "mpserverless.aliyuncs.com"
                }
            }
        }
    ]
}

删除服务关联角色

如果您需要删除AliyunServiceRoleForMPServerless(服务关联角色),需要先删除所有的服务空间。