This topic describes the scenarios of the AliyunServiceRoleForApiGatewayMonitoring service-linked role and how to delete the role.
Background information
The AliyunServiceRoleForApiGatewayMonitoring service-linked role is a RAM role that is provided to facilitate you to apply the same alert settings to all API operations in an API group.
Scenarios
API Gateway assumes the AliyunServiceRoleForApiGatewayMonitoring service-linked role to gain access to your CloudMonitor resources. After the mapping between an API group and an application group in CloudMonitor is established, the API operations in the API group automatically become instances in the mapping application group in CloudMonitor. This way, you can manage the alert settings for multiple API operations in the same API group at a time.
Description of the AliyunServiceRoleForApiGatewayMonitoring service-linked role
Role name: AliyunServiceRoleForApiGatewayMonitoring Policy attached to the role: AliyunServiceRolePolicyForApiGatewayMonitoring Permission description:
{
"Version": "1",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cms:CreateMonitorGroup",
"cms:CreateMonitorGroupInstances",
"cms:DescribeMonitorGroups",
"cms:DeleteMonitorGroup",
"cms:DeleteMonitorGroupInstances"
],
"Resource": "acs:cms:*:*:*"
}
]
}
Delete the AliyunServiceRoleForApiGatewayMonitoring service-linked role
Before you delete the AliyunServiceRoleForApiGatewayMonitoring service-linked role, you must delete the application group that depends on the service-linked role in CloudMonitor. To delete the AliyunServiceRoleForApiGatewayMonitoring service-linked role, perform the following steps:
Log on to the CloudMonitor console.
In the left-side navigation pane, click
Application Groups
.Find and delete the APIGATEWAY_${region}_$(groupId) application group in CloudMonitor. In the name, ${region} indicates the region where the API group that maps the application group resides, and $(groupId) indicates the ID of the API group. For example, the name of the application group is
APIGATEWAY_ap-southeast-1_d17e78c9d436436c89a7e8c42a329a4d
.Log on to the RAM console. In the left-side navigation pane, click
RAM Roles
. Find theAliyunServiceRoleForApiGatewayMonitoring
role and click Delete in the Actions column.