All Products
Search
Document Center

CloudOps Orchestration Service:ACS-Redis-BulkyCreateBackupAndUploadToOSS

Last Updated:Jun 03, 2026

Batch-creates Redis backups and uploads them to an OSS bucket using OOS and Function Compute.

Template name

ACS-Redis-BulkyCreateBackupAndUploadToOSS

Execute Now

Template description

Batch-creates Redis backups and uploads the backup files to OSS. You may be charged for Redis backups and for using FC to upload files to OSS. Billing details: Redis backup costs and Function Compute billing

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Data type

Required

Default value

Limit

targets

Target Redis instances.

Json

Yes

OSSRegionId

Region of the OSS bucket.

String

Yes

OSSBucketName

OSS bucket name.

String

Yes

regionId

Region ID.

String

No

{{ACS::RegionId}}

invokeConfig

Execution mode (sync or async).

String

No

sync

rateControl

OOS RAM role

Json

No

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

OOSAssumeRole

RAM role assumed by OOS.

String

No

""

Output parameters

Parameter

Description

Data type

OSSObjectURLs

List

Permission policy that is required to execute the template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "kvstore:CreateBackup",
                "kvstore:DescribeBackupTasks",
                "kvstore:DescribeBackups",
                "kvstore:DescribeInstances"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "oos:GetApplicationGroup"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "ros:CreateStack",
                "ros:DeleteStack",
                "ros:GetStack"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "ecs:DescribeNetworkInterfaces"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "fc:CreateFunction",
                "fc:CreateService",
                "fc:CreateVpcBinding",
                "fc:DeleteFunction",
                "fc:DeleteFunctionAsyncInvokeConfig",
                "fc:DeleteService",
                "fc:DeleteVpcBinding",
                "fc:GetFunction",
                "fc:GetResourceTags",
                "fc:GetService",
                "fc:GetStatefulAsyncInvocation",
                "fc:InvokeFunction",
                "fc:PutFunctionAsyncInvokeConfig",
                "fc:TagResource",
                "fc:UnTagResource",
                "fc:UpdateFunction",
                "fc:UpdateService"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "ram:PassRole"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

ACS-Redis-BulkyCreateBackupAndUploadToOSS

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Creates backups for multiple Redis instances in a batch and uploads the backup files to an Object Storage Service (OSS) bucket. You may be charged for creating Redis backups and for using Function Compute (FC) to upload the backups to OSS. For more information about billing, see <a href='https://www.alibabacloud.com/help/en/redis/user-guide/automatic-or-manual-backup#section-9p1-2sd-zfb'>Backup storage costs</a> and <a href='https://www.alibabacloud.com/help/en/fc/product-overview/billing-overview'>Billing overview</a>.
  name-en: ACS-Redis-BulkyCreateBackupAndUploadToOSS
  categories:
    - tair
Parameters:
  regionId:
    Label:
      en: Region ID
    Type: String
    AssociationProperty: RegionId
    Default: '{{ACS::RegionId}}'
  targets:
    Type: Json
    Label:
      en: Target Instances
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: ALIYUN::Redis::Instance
      RegionId: regionId
  OSSRegionId:
    Label:
      en: OSS Bucket Region ID
    Type: String
    AssociationProperty: RegionId
  OSSBucketName:
    Label:
      en: OSS Bucket Name
    Type: String
    AssociationProperty: ALIYUN::OSS::Bucket::BucketName
    AssociationPropertyMetadata:
      RegionId: ${OSSRegionId}
  invokeConfig:
    Type: String
    Label:
      en: Execution Mode
    Description:
      en: 'The execution mode of the Function Compute (FC) function: synchronous or asynchronous. If you use FC to upload a backup file larger than 500 MB, the synchronous execution may fail because of the 60-second runtime limit. In this case, select asynchronous execution. Asynchronous execution requires the following additional permissions: [fc:DeleteFunctionAsyncInvokeConfig, fc:GetStatefulAsyncInvocation, fc:PutFunctionAsyncInvokeConfig]'
    AllowedValues:
      - sync
      - async
    Default: sync
  rateControl:
    Label:
      en: Rate Control
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOS Assume Role
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: GetInstance
    Description:
      en: Gets the Redis instances.
    Action: ACS::SelectTargets
    Properties:
      ResourceType: ALIYUN::Redis::Instance
      RegionId: '{{ regionId }}'
      Filters:
        - '{{ targets }}'
    Outputs:
      InstanceIds:
        Type: List
        ValueSelector: Instances.Instance[].InstanceId
  - Name: CreateBackupAndUploadToOSS
    Action: ACS::Redis::CreateBackupAndUploadToOSS
    Description:
      en: Creates a Redis backup and uploads the backup to OSS.
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      OSSRegionId: '{{ OSSRegionId }}'
      OSSBucketName: '{{ OSSBucketName }}'
      invokeConfig: '{{ invokeConfig }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ GetInstance.InstanceIds }}'
      Outputs:
        OSSObjectURLs:
          AggregateType: Fn::ListJoin
          AggregateField: OSSObjectURL
    Outputs:
      OSSObjectURL:
        Type: String
        ValueSelector: '.OSSObjectURL + "{{ACS::ExecutionId}}/"  | split(".t0") | .[0]'
Outputs:
  OSSObjectURLs:
    Type: List
    Value: '{{ CreateBackupAndUploadToOSS.OSSObjectURLs }}'