

• Amazon Systems Manager CloudWatch 控制面板在 2026 年 4 月 30 日之后将不再可用。客户可以像现在一样继续使用 Amazon CloudWatch 控制台来查看、创建和管理其 Amazon CloudWatch 控制面板。有关更多信息，请参阅 [Amazon CloudWatch 控制面板文档](https://docs.amazonaws.cn/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

# 自动化调度角色
<a name="cloud-connector-automation-dispatch-role"></a>

自动化调度角色是 State Manager 针对云连接器启动 Automation 执行时使用的角色。State Manager 通过此角色将自动化代入角色传递给 Automation。该调度角色还直接代入 Azure 联合身份验证角色，这样在某个关联运行时，State Manager 就可以解析哪些 Azure 虚拟机与云连接器的目标相匹配。

**角色名称模式：**`SSM-AzureDispatchRole-{{connector-name}}-{{id8}}`

该信任策略允许 Systems Manager 服务主体代入该角色，其范围仅限于您的 Amazon Web Services 账户。将 `123456789012` 替换为您的 Amazon Web Services 账户 ID。

```
{
    "Version": "2012-10-17", 		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "sts:AssumeRole",
            "Principal": {
                "Service": "ssm.amazonaws.com"
            },
            "Condition": {
                "StringEquals": {
                    "aws:SourceAccount": "123456789012"
                }
            }
        }
    ]
}
```

该权限策略授予 State Manager 将 Automation 执行分派给云连接器目标所需的操作。将 `123456789012` 替换为您的 Amazon Web Services 账户 ID、`us-east-1` 替换为创建云连接器的 Amazon Web Services 区域、`SSM-AzureAssumeRole-MyConnector-a1b2c3d4` 替换为自动化代入角色的名称、`SSM-AzureRole-MyConnector-a1b2c3d4` 替换为 Azure 联合身份验证角色的名称，`connector-id` 替换为云连接器的 ID。

**权限详细信息**

该策略包含以下权限。
+ `iam:PassRole`：可以使 State Manager 在开始执行运行手册时将自动化代入角色传递给 Automation。`iam:PassedToService` 条件将传递对象限制为 `ssm.amazonaws.com`，`iam:AssociatedResourceARN` 条件限制为连接器的 Amazon Web Services 区域中的 `AWS-InstallSSMAgentOnAzure` 运行手册和自动化执行。
+ `iam:ListRoleTags`：可以使 State Manager 在传递或代入前读取角色上的标签，以确认标签属于同一云连接器。
+ `ssm:GetCloudConnector`：可以使 State Manager 在目标解析期间读取云连接器配置。
+ `ssm:ListCloudConnectors`：可以使 State Manager 在解析关联目标时枚举云连接器。
+ `ssm:DescribeInstanceInformation`：可以使 State Manager 读取通过连接器注册的托管节点的状态，以确定哪些目标符合条件。
+ `ssm:StartAutomationExecution`：可以使 State Manager 针对连接器的目标，对 `AWS-InstallSSMAgentOnAzure` 运行手册启动 Automation 执行。
+ `sts:AssumeRole`：可以使 State Manager 代入 Azure 联合身份验证角色，以便在解析连接器的目标时可以向 Azure 验证身份。

```
{
    "Version": "2012-10-17", 		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "iam:PassRole",
            "Resource": "arn:aws:iam::123456789012:role/service-role/SSM-AzureAssumeRole-MyConnector-a1b2c3d4",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "ssm.amazonaws.com"
                },
                "ArnLike": {
                    "iam:AssociatedResourceARN": [
                        "arn:aws:ssm:us-east-1:*:document/AWS-InstallSSMAgentOnAzure",
                        "arn:aws:ssm:us-east-1:*:automation-definition/AWS-InstallSSMAgentOnAzure:1",
                        "arn:aws:ssm:us-east-1:123456789012:automation-execution/*"
                    ]
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": "ssm:GetCloudConnector",
            "Resource": "arn:aws:ssm:us-east-1:123456789012:cloud-connector/connector-id"
        },
        {
            "Effect": "Allow",
            "Action": "ssm:StartAutomationExecution",
            "Resource": [
                "arn:aws:ssm:us-east-1:*:document/AWS-InstallSSMAgentOnAzure",
                "arn:aws:ssm:us-east-1:*:automation-definition/AWS-InstallSSMAgentOnAzure:1",
                "arn:aws:ssm:us-east-1:123456789012:automation-execution/*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": "sts:AssumeRole",
            "Resource": "arn:aws:iam::123456789012:role/service-role/SSM-AzureRole-MyConnector-a1b2c3d4"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ssm:DescribeInstanceInformation",
                "ssm:ListCloudConnectors",
                "iam:ListRoleTags"
            ],
            "Resource": "*"
        }
    ]
}
```