

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

# 向自动化运行手册添加 Change Calendar 依赖关系
<a name="systems-manager-change-calendar-automations"></a>

要让 Automation 操作遵循 Change Calendar（AWS Systems Manager 中的一项工具），请在使用 [`aws:assertAwsResourceProperty`](automation-action-assertAwsResourceProperty.md) 操作的 Automation 运行手册中添加一个步骤。将该操作配置为运行 `GetCalendarState` 以验证指定的日历条目是否处于所需状态（`OPEN` 或 `CLOSED`）。只有在日历状态为 `OPEN` 时才允许自动化运行手册继续执行下一步。以下是基于 YAML 的示例，摘录了只有当日历状态与在 `DesiredValues` 中指定的状态 `OPEN` 匹配时，才能继续到下一步 `LaunchInstance` 的自动化运行手册。

示例如下：

```
mainSteps:
  - name: MyCheckCalendarStateStep
    action: 'aws:assertAwsResourceProperty'
    inputs:
      Service: ssm
      Api: GetCalendarState
      CalendarNames: ["arn:aws:ssm:us-east-2:123456789012:document/SaleDays"]
      PropertySelector: '$.State'
      DesiredValues:
      - OPEN
    description: "Use GetCalendarState to determine whether a calendar is open or closed."
    nextStep: LaunchInstance
  - name: LaunchInstance
    action: 'aws:executeScript'
    inputs:
      Runtime: python3.11 
...
```