Todos os produtos
Search
Central de documentação

CloudOps Orchestration Service:ACS-Redis-BulkyCreateBackupAndUploadToOSS

Última atualização: Jun 28, 2026

Cria backups do Redis em lote e os envia para um bucket do OSS usando OOS e Function Compute.

Nome do modelo

ACS-Redis-BulkyCreateBackupAndUploadToOSS

Executar agora

Descrição do modelo

Este modelo cria backups do Redis em lote e envia os arquivos de backup para o OSS. A criação de backups do Redis e o uso do FC para enviar arquivos ao OSS podem gerar custos. Para obter mais informações sobre faturamento, consulte: Custos de backup do Redis e Faturamento do Function Compute.

Tipo de modelo

Automatizado

Proprietário

Alibaba Cloud

Parâmetros de entrada

Parâmetro

Descrição

Tipo de dados

Obrigatório

Valor padrão

Limite

targets

Instâncias Redis de destino.

Json

Sim

OSSRegionId

Região do bucket OSS.

String

Sim

OSSBucketName

Nome do bucket OSS.

String

Sim

regionId

ID da região.

String

Não

{{ACS::RegionId}}

invokeConfig

Modo de execução (síncrono ou assíncrono).

String

Não

sync

rateControl

Função RAM do OOS.

Json

Não

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

OOSAssumeRole

Função RAM assumida pelo OOS.

String

Não

""

Parâmetros de saída

Parâmetro

Descrição

Tipo de dados

OSSObjectURLs

List

Política de permissões necessária para executar o modelo

{
    "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"
        }
    ]
}

Detalhes

ACS-Redis-BulkyCreateBackupAndUploadToOSS

Conteúdo do modelo

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 }}'