AWS-EnableDocDbClusterBackupRetentionPeriod - AWS Systems Manager 自動化 Runbook 參考

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

AWS-EnableDocDbClusterBackupRetentionPeriod

Description

AWS-EnableDocDbClusterBackupRetentionPeriod Runbook 會為您指定的 Amazon DocumentDB 叢集啟用備份保留期間。此功能會設定自動備份保留的總天數。若要修改叢集,叢集必須處於可用狀態,引擎類型為 docdb

執行此自動化 (主控台)

文件類型

 自動化

擁有者

Amazon

平台

Linux、macOS、 Windows

參數

  • AutomationAssumeRole

    類型:字串

    描述:(選用) 允許 Systems Manager Automation 代表您執行動作的 (IAM) 角色的 AWS Identity and Access Management Amazon Resource Name (ARN)。如果未指定角色,Systems Manager Automation 會使用啟動此 Runbook 的使用者許可。

  • DBClusterResourceId

    類型:字串

    描述:(必要) 您要為其啟用備份保留期的 Amazon DocumentDB 叢集的資源 ID。

  • BackupRetentionPeriod

    類型:整數

    描述:(必要) 保留自動備份的天數。必須是 7-35 天的值。

  • PreferredBackupWindow

    類型:字串

    描述:(選用) 國際標準時間協同 (UTC) 的每日時間範圍,格式為 hh24:mm-hh24:mm,例如 07:14-07:44。值必須至少為 30 分鐘,且不能與偏好的維護時段衝突。

  • ssm:GetAutomationExecution

  • ssm:StartAutomationExecution

  • docdb:DescribeDBClusters

  • docdb:ModifyDBCluster

  • rds:DescribeDBClusters

  • rds:ModifyDBCluster

文件步驟

  • GetDocDbClusterIdentifier (aws:executeAwsApi) - 使用提供的資源 ID 傳回 Amazon DocumentDB 叢集識別符。

  • VerifyDocDbEngine (aws:assertAwsResourceProperty) - 驗證 Amazon DocumentDB 引擎類型docdb是為了防止意外變更其他 Amazon RDS 引擎類型。

  • VerifyDocDbStatus (aws:waitAwsResourceProperty) - 驗證 Amazon DocumentDB 叢集狀態為 available

  • ModifyDocDbRetentionPeriod (aws:executeAwsApi) - 使用指定 Amazon DocumentDB 叢集提供的值來設定保留期間。

  • VerifyDocDbBackupsEnabled (aws:executeScript) - 驗證 Amazon DocumentDB 叢集的保留期間,如果指定,則表示已成功設定偏好的備份時段。

輸出

ModifyDocDbRetentionPeriod.ModifyDbClusterResponse - ModifyDBCluster API 操作的回應。

VerifyDocDbBackupsEnabled.VerifyDbClusterBackupsEnabledResponse - 步驟的輸出,VerifyDocDbBackupsEnabled確認成功修改 Amazon DocumentDB 叢集。