

• 2026 年 4 月 30 日之後， AWS Systems Manager CloudWatch Dashboard 將不再可用。客戶可以繼續使用 Amazon CloudWatch 主控台來檢視、建立和管理其 Amazon CloudWatch 儀表板，就像現在一樣。如需詳細資訊，請參閱 [Amazon CloudWatch Dashboard 文件](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 正在新增 Change Calendar 依賴性到自動化 Runbook
<a name="systems-manager-change-calendar-automations"></a>

若要讓自動化動作遵循 Change Calendar中的工具 AWS Systems Manager，請在使用 [`aws:assertAwsResourceProperty`](automation-action-assertAwsResourceProperty.md)動作的 Automation Runbook 中新增步驟。設定要執行 `GetCalendarState` 的動作，來驗證指定的行事曆項目是否處於您希望的狀態 (`OPEN` 或 `CLOSED`)。只有在行事曆狀態為 `OPEN` 時，自動化 Runbook 才可以繼續進行下一個步驟。下列內容是 YAML 的範例摘錄，其中的自動化 Runbook 無法繼續進行下一個步驟 (`LaunchInstance`)，除非行事曆狀態符合 `DesiredValues` 中指定的 `OPEN` 行事曆狀態才可以。

下列是 範例。

```
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 
...
```