模板名稱
ACS-Redis-BulkyCreateBackupAndUploadToOSS 大量建立Redis備份並上傳到OSS
模板描述
大量建立Redis備份並上傳到OSS。備份redis和使用fc將備份上傳到oss都可能會產生費用,計費詳情參考費用和計費概述
模板類型
自動化
所有者
Alibaba Cloud
輸入參數
參數名稱 | 描述 | 類型 | 是否必填 | 預設值 | 約束 |
targets | 目標執行個體 | Json | 是 | ||
OSSRegionId | OSS Bucket所在地區ID | String | 是 | ||
OSSBucketName | OSS Bucket名稱 | String | 是 | ||
regionId | 地區ID | String | 否 | {{ACS::RegionId}} | |
rateControl | 任務執行的並發比率 | Json | 否 | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | OOS扮演的RAM角色 | String | 否 | "" |
輸出參數
參數名稱 | 描述 | 類型 |
OSSObjectURLs | List |
執行此模板需要的權限原則
{
"Version": "1",
"Statement": [
{
"Action": [
"kvstore:CreateBackup",
"kvstore:DescribeBackupTasks",
"kvstore:DescribeBackups",
"kvstore:DescribeInstances"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"ros:CreateStack",
"ros:DeleteStack",
"ros:GetStack"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
ACS-Redis-BulkyCreateBackupAndUploadToOSS詳情
模板內容
FormatVersion: OOS-2019-06-01
Description:
en: Create Redis backups in batches and upload them to OSS. Backing up redis and using fc to upload the backup to OSS may incur charges. For billing details, please refer to <a href='https://help .aliyun.com/zh/redis/user-guide/automatic-or-manual-backup#e606eb29c7mew'>Redis Backup Fee Instructions</a> and <a href='https://help.aliyun.com/zh/ fc/product-overview/billing-overview'>Function calculation billing instructions</a>
zh-cn: 大量建立Redis備份並上傳到OSS。備份redis和使用fc將備份上傳到oss都可能會產生費用,計費詳情參考<a href='https://help.aliyun.com/zh/redis/user-guide/automatic-or-manual-backup#e606eb29c7mew'>Redis備份費用說明</a>和<a href='https://help.aliyun.com/zh/fc/product-overview/billing-overview'>Function Compute計費說明</a>
name-en: ACS-Redis-BulkyCreateBackupAndUploadToOSS
name-zh-cn: 大量建立Redis備份並上傳到OSS
Parameters:
regionId:
Label:
en: RegionId
zh-cn: 地區ID
Type: String
AssociationProperty: RegionId
Default: '{{ACS::RegionId}}'
targets:
Type: Json
Label:
en: TargetInstance
zh-cn: 目標執行個體
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: ALIYUN::Redis::Instance
RegionId: regionId
OSSRegionId:
Label:
en: OSSRegionId
zh-cn: OSS Bucket所在地區ID
Type: String
AssociationProperty: RegionId
OSSBucketName:
Label:
en: OSSBucketName
zh-cn: OSS Bucket名稱
Type: String
AssociationProperty: ALIYUN::OSS::Bucket::BucketName
AssociationPropertyMetadata:
RegionId: ${OSSRegionId}
rateControl:
Label:
en: RateControl
zh-cn: 任務執行的並發比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: GetInstance
Description:
en: Get the redis instances
zh-cn: 擷取Redis執行個體
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: Create backup and upload to OSS
zh-cn: 建立Redis備份並上傳到OSS
Properties:
regionId: '{{ regionId }}'
instanceId: '{{ ACS::TaskLoopItem }}'
OSSRegionId: '{{ OSSRegionId }}'
OSSBucketName: '{{ OSSBucketName }}'
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 }}'