All Products
Search
Document Center

CloudOps Orchestration Service:ACS-Redis-BulkyModifyInstanceBackupTime

Last Updated:Dec 23, 2025

Template name

ACS-Redis-BulkyModifyInstanceBackupTime - Enables incremental backup for Redis instances

Execute Now

Template description

None

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Data type

Required

Default value

Limit

preferredBackupPeriod

The backup cycle.

List

Yes

enableBackupLog

Specifies whether to enable the data flashback feature for the instances.

String

Yes

OOSAssumeRole

The RAM role that is assumed by CloudOps Orchestration Service (OOS).

String

Yes

regionId

Task execution concurrency

String

No

{{ ACS::RegionId }}

targets

The target instances.

Json

No

{"Type": "ResourceIds", "ResourceIds": [], "RegionId": "{{ regionId }}"}

instanceIds

The list of Redis instance IDs.

List

No

[]

preferredBackupTime

The backup time.

String

No

07:00Z-08:00Z

rateControl

The rate control settings.

Json

No

{"Mode": "Concurrency", "MaxErrors": 0, "Concurrency": 10}

Output parameters

N/A.

Permission policy that is required to execute the template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "kvstore:DescribeInstances",
                "kvstore:ModifyBackupPolicy"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "oos:GetApplicationGroup"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

ACS-Redis-BulkyModifyInstanceBackupTime

Template content

FormatVersion: OOS-2019-06-01
Description:
  name-en: ACS-Redis-BulkyModifyInstanceBackupTime
  categories:
    - security
    - tair
Parameters:
  regionId:
    Label:
      en: RegionId
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  targets:
    Type: Json
    Label:
      en: TargetInstance
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: ALIYUN::Redis::Instance
      RegionId: regionId
    Default:
      Type: ResourceIds
      ResourceIds: []
      RegionId: '{{ regionId }}'
  instanceIds:
    Type: List
    Label:
      en: RedisInstanceIds
    Default: []
    AssociationPropertyMetadata:
      Visible:
        Condition:
          Fn::Equals:
            - ${targets}
            - {}
  preferredBackupTime:
    Label:
      en: backup time
    Description:
      en: The beginning and end of the time range must be on the hour. The duration must be an hour. Specify the time in the ISO 8601 standard in the HH:mmZ-HH:mmZ format. The time must be in UTC.
    Type: String
    Default: '07:00Z-08:00Z'
  preferredBackupPeriod:
    Label:
      en: backup period
    Type: List
    AllowedValues:
      - Monday
      - Tuesday
      - Wednesday
      - Thursday
      - Friday
      - Saturday
      - Sunday
  enableBackupLog:
    Label:
      en: enable or disable incremental data backup
    Description:
      en:  Only Tair (Redis Enterprise Edition) memory-optimized and persistent memory instances support this parameter. Set the value to 1 to enable the feature or 0 to disable it.
    Type: String
    AllowedValues:
      - 1
      - 0
  rateControl:
    Label:
      en: RateControl
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
    Type: String
RamRole: '{{ OOSAssumeRole }}'
Conditions:
  instanceId:
    Fn::Equals:
      - '{{ instanceIds }}'
      - []
Tasks:
  - Name: getInstance
    When: instanceId
    Description:
      en: Get the Redis instances
    Action: ACS::SelectTargets
    Properties:
      ResourceType: ALIYUN::Redis::Instance
      RegionId: '{{regionId}}'
      Filters:
        - '{{ targets }}'
    Outputs:
      instanceIds:
        Type: List
        ValueSelector: Instances.Instance[].InstanceId
  - Name: ModifyInstanceMaintainTime
    Action: ACS::ExecuteAPI
    Description:
      en: Enable backup log
    Properties:
      Service: R-KVSTORE
      API: ModifyBackupPolicy
      Parameters:
        RegionId: '{{ regionId }}'
        InstanceId: '{{ ACS::TaskLoopItem }}'
        PreferredBackupTime: '{{ preferredBackupTime }}'
        PreferredBackupPeriod:
          'Fn::Join':
            - ','
            - '{{ preferredBackupPeriod }}'
        EnableBackupLog: '{{ enableBackupLog }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items:
        Fn::If:
          - Fn::Equals:
              - '{{instanceIds}}'
              - []
          - '{{ getInstance.instanceIds }}'
          - '{{ instanceIds}}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - instanceIds
          - targets
        Label:
          default:
            en: Select Instances
      - Parameters:
          - preferredBackupTime
          - preferredBackupPeriod
          - enableBackupLog
        Label:
          default:
            en: Set Backup Policy
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            en: Control Options