本文介紹AHAS服務關聯角色AliyunServiceRoleForAHAS以及如何刪除該角色。

背景信息

AHAS服務關聯角色AliyunServiceRoleForAHAS是AHAS在某些情況下,為了完成自身的某個功能,需要獲取其他云服務的訪問權限而提供的RAM角色。更多關于服務關聯角色的信息請參見服務關聯角色

應用場景

AHAS架構感知的資源拓撲、流量防護等功能需要訪問負載均衡SLB(Server Load Balancer)、專有網絡VPC(Virtual Private Cloud)、云服務器ECS(Elastic Compute Service)等云服務的資源時,可通過自動創建的AHAS服務關聯角色AliyunServiceRoleForAHAS獲取訪問權限。

權限說明

AHAS服務關聯角色AliyunServiceRoleForAHAS具備的云服務的訪問權限如下所示,更多權限說明請參見權限策略管理

        {
            "Action": [
                "ecs:DescribeInstanceAutoRenewAttribute",
                "ecs:DescribeInstances",
                "ecs:DescribeInstanceStatus",
                "ecs:DescribeInstanceVncUrl",
                "ecs:DescribeSpotPriceHistory",
                "ecs:DescribeUserdata",
                "ecs:DescribeInstanceRamRole",
                "ecs:DescribeDisks",
                "ecs:DescribeSnapshots",
                "ecs:DescribeAutoSnapshotPolicy",
                "ecs:DescribeSnapshotLinks",
                "ecs:DescribeImages",
                "ecs:DescribeImageSharePermission",
                "ecs:DescribeClassicLinkInstances",
                "ecs:AuthorizeSecurityGroup",
                "ecs:DescribeSecurityGroupAttribute",
                "ecs:DescribeSecurityGroups",
                "ecs:ModifySecurityGroupAttribute",
                "ecs:AuthorizeSecurityGroupEgress",
                "ecs:ModifySecurityGroupRule",
                "ecs:DescribeSecurityGroupReferences",
                "ecs:ModifySecurityGroupPolicy",
                "ecs:RevokeSecurityGroup",
                "ecs:DescribeNetworkInterfaces",
                "ecs:DescribeTags",
                "ecs:DescribeRegions",
                "ecs:DescribeZones",
                "ecs:DescribeInstanceMonitorData",
                "ecs:DescribeEipMonitorData",
                "ecs:DescribeDiskMonitorData",
                "ecs:DescribeInstanceTypes",
                "ecs:DescribeInstanceTypeFamilies",
                "ecs:DescribeTasks",
                "ecs:DescribeTaskAttribute",
                "ecs:DescribeInstanceAttribute",
                "ecs:InvokeCommand",
                "ecs:CreateCommand",
                "ecs:StopInvocation",
                "ecs:DeleteCommand",
                "ecs:DescribeCommands",
                "ecs:DescribeInvocations",
                "ecs:DescribeInvocationResults",
                "ecs:ModifyCommand",
                "ecs:InstallCloudAssistant",
                "ecs:CreateNetworkInterfacePermission",
                "ecs:DeleteNetworkInterfacePermission",
                "ecs:CreateNetworkInterface",
                "ecs:CreateSecurityGroup",
                "ecs:DeleteSecurityGroup",
                "ecs:ModifyNetworkInterfaceAttribute",
                "ecs:ModifyInstanceAttribute",
                "ecs:DescribeNetworkInterfaces",
                "ecs:RebootInstances",
                "ecs:StopInstances",
                "ecs:StartInstances"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
      
        {
            "Action": [
                "slb:DescribeLoadBalancers",
                "slb:DescribeLoadBalancerAttribute",
                "slb:DescribeLoadBalancerHTTPListenerAttribute",
                "slb:DescribeLoadBalancerHTTPSListenerAttribute",
                "slb:DescribeLoadBalancerTCPListenerAttribute",
                "slb:DescribeLoadBalancerUDPListenerAttribute",
                "slb:DescribeHealthStatus",
                "slb:DescribeVServerGroups",
                "slb:DescribeVServerGroupAttribute",
                "slb:DescribeTags",
                "slb:DescribeRules"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
      
        {
            "Action": [
                "vpc:DescribeVSwitches",
                "vpc:DescribeVpcs",
                "vpc:DescribeNatGateways",
                "vpc:DescribeForwardTableEntries",
                "vpc:DescribeSnatTableEntries",
                "vpc:DescribeBandwidthPackages",
                "vpc:DescribeEipAddresses",
                "vpc:DescribeEipGatewayInfo",
                "vpc:DescribeEipMonitorData"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
      

刪除AHAS服務關聯角色

如果您需要刪除AHAS服務關聯角色AliyunServiceRoleForAHAS,請注意刪除AliyunServiceRoleForAHAS后,會影響您AHAS數據的獲取。刪除AliyunServiceRoleForAHAS的操作步驟如下。

說明 如果當前賬號下還存在ACK集群,則需先刪除這些集群,才能刪除AliyunServiceRoleForAHAS,否則提示刪除失敗。
  1. 登錄RAM控制臺,在左側導航欄中單擊身份管理 > 角色
  2. 角色頁面的搜索框中,輸入AliyunServiceRoleForAHAS,自動搜索到名稱為AliyunServiceRoleForAHAS的RAM角色。
  3. 在右側操作列,單擊刪除
  4. 刪除角色對話框,單擊確定
    重要 刪除服務關聯角色后會影響您AHAS數據的獲取,請謹慎刪除!

常見問題

問:為什么我的RAM用戶無法自動創建AHAS服務關聯角色AliyunServiceRoleForAHAS?

答:您需要擁有指定的權限才能自動創建或刪除AliyunServiceRoleForAHAS。因此,在RAM用戶無法自動創建AliyunServiceRoleForAHAS時,您需為其添加以下權限策略。
{
    "Statement": [
        {
            "Action": [
                "ram:CreateServiceLinkedRole"
            ],
            "Resource": "acs:ram:*:主賬號ID:role/*",
            "Effect": "Allow",
            "Condition": {
                "StringEquals": {
                    "ram:ServiceName": [
                        "ahas.aliyuncs.com"
                    ]
                }
            }
        }
    ],
    "Version": "1"
}
說明 請將主賬號ID替換為您實際的阿里云賬號(主賬號)ID。