Nama template
ACS-Redis-BulkyCreateBackupAndUploadToOSS: Membuat backup Redis secara batch dan mengunggahnya ke OSS.
Deskripsi template
Template ini membuat backup untuk beberapa instans Redis secara batch dan mengunggah file backup tersebut ke Object Storage Service (OSS). Anda mungkin dikenai biaya untuk pembuatan backup Redis dan penggunaan Function Compute (FC) guna mengunggah file backup ke OSS. Untuk detail penagihan, lihat biaya backup Redis dan penagihan Function Compute.
Tipe template
Otomatis
Pemilik
Alibaba Cloud
Parameter input
Parameter | Deskripsi | Tipe data | Diperlukan | Nilai default | Batasan |
targets | Instans tujuan. | Json | Ya | ||
OSSRegionId | Wilayah tempat bucket OSS berada. | String | Ya | ||
OSSBucketName | Nama bucket OSS. | String | Ya | ||
regionId | ID wilayah. | String | Tidak | {{ACS::RegionId}} | |
invokeConfig | Konfigurasi eksekusi. | String | Tidak | sync | |
rateControl | Peran RAM OOS | Json | Tidak | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | Peran RAM yang diasumsikan oleh CloudOps Orchestration Service (OOS). | String | Tidak | "" |
Parameter output
Parameter | Deskripsi | Tipe data |
OSSObjectURLs | List |
Kebijakan izin yang diperlukan untuk mengeksekusi 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"
}
]
}
Detail
ACS-Redis-BulkyCreateBackupAndUploadToOSS
Isi Template
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 }}'