From fcef04ca44d2d80ebaf20554d80ae82ff9bb5792 Mon Sep 17 00:00:00 2001 From: Zheng Dayu Date: Sun, 8 Sep 2024 01:11:43 +0000 Subject: [PATCH] Github actions auto update oos templates --- list-templates.json | 54 +++++- templates/ACS-ECS-BulkyEncryptDisks.yaml | 154 ++++++++++++++++++ templates/ACS-ECS-CreateImage.yaml | 37 ++++- ...CS-ECS-LocalBuildAndDeployOnSingleECS.yaml | 135 +++++++++++++++ ...SS-LifeCycleDownloadFileAndRunCommand.yaml | 140 ++++++++++++++++ ...ESS-LifeCycleModifyInstanceChargeType.yaml | 37 ++++- ...S-Redis-BulkyModifyInstanceBackupTime.yaml | 114 +++++++++++++ 7 files changed, 663 insertions(+), 8 deletions(-) create mode 100644 templates/ACS-ECS-BulkyEncryptDisks.yaml create mode 100644 templates/ACS-ECS-LocalBuildAndDeployOnSingleECS.yaml diff --git a/list-templates.json b/list-templates.json index 202d2e3..a9b605d 100644 --- a/list-templates.json +++ b/list-templates.json @@ -300,7 +300,7 @@ "CreatedDate": "2019-10-22T08:17:08Z", "Description": "{\"en\": \"Creates an ECS image\", \"zh-cn\": \"创建一个ECS镜像\", \"name-en\": \"Create Image\", \"name-zh-cn\": \"创建镜像\", \"categories\": [\"image_manage\", \"application_manage\"]}", "HasTrigger": false, - "Hash": "eea281d8751174c935b5cb7877bff5657546f12db870127d263ddb7e6a840f04", + "Hash": "81135cac5cb27bd658eaf49dba16030e55c6fc226532ece97a383c03e30408f6", "IsFavorite": false, "Popularity": 8.23, "ResourceGroupId": "rg-acfmz4wrjukykdy", @@ -310,10 +310,10 @@ "TemplateId": "t-4bdb1745c171401883a2", "TemplateName": "ACS-ECS-CreateImage", "TemplateType": "Automation", - "TemplateVersion": "v16", + "TemplateVersion": "v17", "TotalExecutionCount": -1, "UpdatedBy": "ACS", - "UpdatedDate": "2023-12-27T08:40:56Z" + "UpdatedDate": "2024-09-06T06:00:42Z" }, { "Category": "Other", @@ -5130,7 +5130,7 @@ "CreatedDate": "2024-06-20T08:03:57Z", "Description": "{\"en\": \"Use lifecycleHook to modify instance charge type in the specified scaling activity\", \"zh-cn\": \"使用生命周期挂钩修改实例付费方式(仅支持弹性扩张活动)\", \"name-en\": \"ACS-ESS-LifeCycleModifyInstanceChargeType\", \"name-zh-cn\": \"使用生命周期挂钩修改实例付费方式(仅支持弹性扩张活动)\", \"categories\": [\"elastic_manage\"]}", "HasTrigger": false, - "Hash": "d3941991ea196d6adef9be45866caf2ef22c5adbd00fd481ca75f25d3449756a", + "Hash": "56613e8cb140004ad2e667fafb23be176eb6293a91a4f02e27a01aaf6f73bcbd", "IsFavorite": false, "Popularity": 5, "ResourceGroupId": "", @@ -5140,10 +5140,10 @@ "TemplateId": "t-a4b9386581c541718b51", "TemplateName": "ACS-ESS-LifeCycleModifyInstanceChargeType", "TemplateType": "Automation", - "TemplateVersion": "v2", + "TemplateVersion": "v3", "TotalExecutionCount": -1, "UpdatedBy": "ACS", - "UpdatedDate": "2024-08-21T06:32:54Z" + "UpdatedDate": "2024-09-06T01:43:13Z" }, { "Category": "Other", @@ -5376,6 +5376,48 @@ "UpdatedBy": "ACS", "UpdatedDate": "2024-08-06T08:57:02Z" }, + { + "Category": "Other", + "CreatedBy": "ACS", + "CreatedDate": "2024-09-02T03:38:03Z", + "Description": "{\"en\": \"Build and deploy applications on a single ECS\", \"zh-cn\": \"在单个ECS上构建并部署应用\", \"name-en\": \"ACS-ECS-LocalBuildAndDeployOnSingleECS\", \"name-zh-cn\": \"单ECS本地构建部署\"}", + "HasTrigger": false, + "Hash": "a21e88e0534022bff616ea30e87f93862addcc05be91ec46e7204cceb24fb38d", + "IsFavorite": false, + "Popularity": 5, + "ResourceGroupId": "", + "ShareType": "Public", + "Tags": {}, + "TemplateFormat": "YAML", + "TemplateId": "t-19a26faf087d4d8a8a1a", + "TemplateName": "ACS-ECS-LocalBuildAndDeployOnSingleECS", + "TemplateType": "Automation", + "TemplateVersion": "v2", + "TotalExecutionCount": -1, + "UpdatedBy": "ACS", + "UpdatedDate": "2024-09-02T05:51:04Z" + }, + { + "Category": "Other", + "CreatedBy": "ACS", + "CreatedDate": "2024-09-03T09:27:39Z", + "Description": "{\"en\": \"Bulky encrypt the disks\", \"zh-cn\": \"批量加密云盘\", \"name-en\": \"ACS-ECS-BulkyEncryptDisks\", \"name-zh-cn\": \"批量加密云盘\", \"categories\": [\"security\"]}", + "HasTrigger": false, + "Hash": "e578228b6ef14ea3dfe35a1992eca70e93b2bf51ff6abfdc8f23248cae75208d", + "IsFavorite": false, + "Popularity": 5, + "ResourceGroupId": "", + "ShareType": "Public", + "Tags": {}, + "TemplateFormat": "YAML", + "TemplateId": "t-5028412d133e4853976c", + "TemplateName": "ACS-ECS-BulkyEncryptDisks", + "TemplateType": "Automation", + "TemplateVersion": "v1", + "TotalExecutionCount": -1, + "UpdatedBy": "ACS", + "UpdatedDate": "2024-09-03T09:27:39Z" + }, { "Category": "Other", "CreatedBy": "ACS", diff --git a/templates/ACS-ECS-BulkyEncryptDisks.yaml b/templates/ACS-ECS-BulkyEncryptDisks.yaml new file mode 100644 index 0000000..16b2f4c --- /dev/null +++ b/templates/ACS-ECS-BulkyEncryptDisks.yaml @@ -0,0 +1,154 @@ +FormatVersion: OOS-2019-06-01 +Description: + en: Bulky encrypt the disks + zh-cn: 批量加密云盘 + name-en: ACS-ECS-BulkyEncryptDisks + name-zh-cn: 批量加密云盘 + categories: + - security +Parameters: + regionId: + Type: String + Label: + en: RegionId + zh-cn: 地域ID + AssociationProperty: RegionId + Default: '{{ ACS::RegionId }}' + targets: + Type: Json + Label: + en: TargetInstance + zh-cn: 目标实例 + AssociationProperty: Targets + AssociationPropertyMetadata: + ResourceType: 'ALIYUN::ECS::Instance' + RegionId: regionId + KMSKeyId: + Label: + en: KMSKeyId + zh-cn: 加密镜像使用的KMS密钥ID + AssociationProperty: ALIYUN::KMS::Key::KeyId + AssociationPropertyMetadata: + RegionId: regionId + Type: String + diskType: + Label: + en: DiskType + zh-cn: 磁盘类型 + Type: List + AllowedValues: + - system + - data + Default: + - system + 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: Views the ECS instances + zh-cn: 获取ECS实例 + Action: ACS::SelectTargets + Properties: + ResourceType: ALIYUN::ECS::Instance + RegionId: '{{ regionId }}' + Filters: + - '{{ targets }}' + Outputs: + instanceIds: + Type: List + ValueSelector: Instances.Instance[].InstanceId +- Name: encryptSystemDisk + Action: ACS::ECS::EncryptSystemDisk + Description: + en: Bulky encrypt the system disks + zh-cn: 批量加密系统盘 + When: + Fn::Equals: + - true + - Fn::Jq: + - First + - 'contains(["system"])' + - '{{diskType}}' + Properties: + regionId: '{{ regionId }}' + instanceId: '{{ ACS::TaskLoopItem }}' + KMSKeyId: '{{ KMSKeyId }}' + Outputs: + systemDiskEncryptedInstance: + Type: String + ValueSelector: .systemDiskEncryptedInstance + Loop: + RateControl: '{{ rateControl }}' + Items: '{{ getInstance.instanceIds }}' + Outputs: + systemDiskEncryptedInstances: + AggregateType: Fn::ListJoin + AggregateField: systemDiskEncryptedInstance +- Name: encryptDataDisk + Action: ACS::ECS::BulkyEncryptDataDisk + Description: + en: Bulky encrypt the data disks + zh-cn: 批量加密数据盘 + When: + Fn::Equals: + - true + - Fn::Jq: + - First + - 'contains(["data"])' + - '{{diskType}}' + Properties: + regionId: '{{ regionId }}' + instanceId: '{{ ACS::TaskLoopItem }}' + KMSKeyId: '{{ KMSKeyId }}' + Loop: + RateControl: '{{ rateControl }}' + Items: '{{ getInstance.instanceIds }}' +Outputs: + systemDiskEncryptedInstances: + Type: Json + Value: + Fn::Jq: + - First + - '[.[][]]|.|= map(select(.))' + - '{{ encryptSystemDisk.systemDiskEncryptedInstances }}' +Metadata: + ALIYUN::OOS::Interface: + ParameterGroups: + - Parameters: + - regionId + - targets + - instancePassword + - diskType + Label: + default: + zh-cn: 选择实例 + en: Select Ecs Instances + - Parameters: + - KMSKeyId + Label: + default: + zh-cn: 配置KMSKey + en: Configure KMSKey + - Parameters: + - rateControl + - OOSAssumeRole + Label: + default: + zh-cn: 高级选项 + en: Control Options diff --git a/templates/ACS-ECS-CreateImage.yaml b/templates/ACS-ECS-CreateImage.yaml index 4ecda01..54e5e65 100644 --- a/templates/ACS-ECS-CreateImage.yaml +++ b/templates/ACS-ECS-CreateImage.yaml @@ -40,6 +40,12 @@ Parameters: AssociationPropertyMetadata: ShowSystem: false Default: [] + whetherOnlySystemDisk: + Label: + en: WhetherOnlySystemDisk + zh-cn: 是否仅选择系统盘 + Type: Boolean + Default: false OOSAssumeRole: Label: en: OOSAssumeRole @@ -53,6 +59,28 @@ Tasks: Description: en: Create new image with the specified image name and instance ID zh-cn: 通过指定实例ID和镜像名称创建新的镜像 + When: + Fn::Equals: + - '{{ whetherOnlySystemDisk }}' + - false + Properties: + regionId: '{{ regionId }}' + imageName: '{{ imageName }}__on_{{ ACS::ExecutionId }}_at_{{ Acs::CurrentDate }}' + instanceId: '{{ instanceId }}' + tags: '{{tags}}' + Outputs: + imageId: + ValueSelector: imageId + Type: String +- Name: createImageOnlySystemDisk + Action: ACS::ECS::CreateImageForSystemDisk + Description: + en: Create new system disk image with the specified image name and instance ID + zh-cn: 通过指定实例ID和镜像名称创建新的系统盘镜像 + When: + Fn::Equals: + - '{{ whetherOnlySystemDisk }}' + - true Properties: regionId: '{{ regionId }}' imageName: '{{ imageName }}__on_{{ ACS::ExecutionId }}_at_{{ Acs::CurrentDate }}' @@ -65,7 +93,13 @@ Tasks: Outputs: imageId: Type: String - Value: '{{ createImage.imageId }}' + Value: + Fn::If: + - Fn::Equals: + - '{{ whetherOnlySystemDisk }}' + - false + - '{{ createImage.imageId }}' + - '{{ createImageOnlySystemDisk.imageId }}' Metadata: ALIYUN::OOS::Interface: ParameterGroups: @@ -79,6 +113,7 @@ Metadata: - Parameters: - imageName - tags + - whetherOnlySystemDisk Label: default: zh-cn: 镜像设置 diff --git a/templates/ACS-ECS-LocalBuildAndDeployOnSingleECS.yaml b/templates/ACS-ECS-LocalBuildAndDeployOnSingleECS.yaml new file mode 100644 index 0000000..69794be --- /dev/null +++ b/templates/ACS-ECS-LocalBuildAndDeployOnSingleECS.yaml @@ -0,0 +1,135 @@ +FormatVersion: OOS-2019-06-01 +Description: + en: Build and deploy applications on a single ECS + zh-cn: 在单个ECS上构建并部署应用 + name-en: ACS-ECS-LocalBuildAndDeployOnSingleECS + name-zh-cn: 单ECS本地构建部署 +Parameters: + platform: + Type: String + Label: + en: Platform + zh-cn: 平台 + AssociationProperty: ALIYUN::OOS::GitPlatform::Name + Default: github + AllowedValues: + - github + - gitee + owner: + Type: String + Label: + en: Owner + zh-cn: 所有者 + AssociationProperty: ALIYUN::OOS::GitAccount::Name + AssociationPropertyMetadata: + Platform: ${platform} + organization: + Type: String + Label: + en: Organization + zh-cn: 组织 + Default: '' + AssociationProperty: ALIYUN::OOS::GitOrganization::Name + AssociationPropertyMetadata: + Platform: ${platform} + Owner: ${owner} + repository: + Type: String + Label: + en: Repository + zh-cn: 仓库 + AssociationProperty: ALIYUN::OOS::GitRepository::Name + AssociationPropertyMetadata: + Platform: ${platform} + Organization: ${organization} + Owner: ${owner} + instanceId: + Description: + en: The ID of ECS instance + zh-cn: ECS实例ID + Type: String + Default: '' + AssociationPropertyMetadata: + Visible: + Condition: + Fn::Equals: + - ${platform} + - Null + branch: + Label: + en: Branch + zh-cn: 分支 + Description: + en: Branch, pull default branch if not set + zh-cn: 代码仓库分支,不填拉取默认分支 + Type: String + Default: '' + isDockerBuild: + Label: + en: IsDockerBuild + zh-cn: 是否Docker构建 + Description: + en: If true, docker will automatically be install on your ecs. + zh-cn: 如果为true,会为您在ECS上自动安装Docker。 + Type: Boolean + Default: true + buildAndDeployScript: + Label: + en: buildAndDeployScript + zh-cn: 构建部署脚本 + Type: String + MaxLength: 16384 + AssociationProperty: ALIYUN::OOS::Command::CommandContent + AssociationPropertyMetadata: + CommandType: RunShellScript + Default: |- + # sample java deploy script + set -e + yum install -y maven-3.5.4 + mvn package + java -jar target/sample-spring-1.0-SNAPSHOT.jar & +RamRole: '' +Tasks: + - Name: GitCodeRepo + Action: ACS::CICD::GitCodeRepo + Description: 指定代码源,生成临时授权链接 + Properties: + organization: '{{ organization }}' + platform: '{{ platform }}' + owner: '{{ owner }}' + repository: '{{ repository }}' + Outputs: + authorizedUrl: + Type: String + ValueSelector: authorizedUrl + - Name: LocalBuildAndDeploy + Action: ACS::CICD::LocalBuildAndDeploy + Description: 拉取代码,构建并部署应用 + Properties: + instanceId: '{{ instanceId }}' + codeSource: git + isDockerBuild: '{{ isDockerBuild }}' + codeSourceUrl: '{{ GitCodeRepo.authorizedUrl }}' + branch: '{{ branch }}' + buildAndDeployScript: '{{ buildAndDeployScript }}' + regionId: '{{ ACS::RegionId }}' +Metadata: + ALIYUN::OOS::Interface: + ParameterGroups: + - Parameters: + - platform + - owner + - organization + - repository + - branch + Label: + default: + zh-cn: 代码源配置 + en: Code Source Configuration + - Parameters: + - isDockerBuild + - buildAndDeployScript + Label: + default: + zh-cn: 构建部署配置 + en: Build and Deploy Configuration diff --git a/templates/ACS-ESS-LifeCycleDownloadFileAndRunCommand.yaml b/templates/ACS-ESS-LifeCycleDownloadFileAndRunCommand.yaml index e69de29..734f7c3 100644 --- a/templates/ACS-ESS-LifeCycleDownloadFileAndRunCommand.yaml +++ b/templates/ACS-ESS-LifeCycleDownloadFileAndRunCommand.yaml @@ -0,0 +1,140 @@ +FormatVersion: OOS-2019-06-01 +Description: + en: Use lifecycleHook to download file and run command in the specified scaling activity instance + zh-cn: 使用生命周期挂钩下载文件到实例并执行命令 + name-en: ACS-ESS-LifeCycleDownloadFileAndRunCommand + name-zh-cn: 使用生命周期挂钩下载文件到实例并执行命令 + categories: + - elastic_manage +Parameters: + sourcePath: + Type: String + Label: + en: SourcePath + zh-cn: 存储文件的URL + destinationDir: + Label: + en: DestinationDir + zh-cn: 实例中文件复制的目标目录 + Type: String + whetherSaveToFile: + Label: + en: whetherSaveToFile + zh-cn: 是否将内容下载到特定文件 + Type: Boolean + Default: true + commandContent: + Label: + en: CommandContent + zh-cn: 在ECS实例中执行的云助手命令 + Type: String + AssociationProperty: Code + Default: echo hello + timeout: + Label: + en: Timeout + zh-cn: ECS实例中执行命令的超时时间 + Type: Number + Default: 600 + regionId: + Label: + en: RegionId + zh-cn: 地域ID + Description: + en: The ID of region + zh-cn: '地域ID,请使用弹性伸缩系统默认值 ${regionId}' + Type: String + Default: '${regionId}' + instanceIds: + Label: + en: InstanceIds + zh-cn: ECS实例ID列表 + Description: + en: The ID list of the ECS instance + zh-cn: 'ECS实例ID列表,请使用弹性伸缩系统默认值 ["${instanceId}"]' + Type: List + Default: + - '${instanceIds}' + lifecycleHookId: + Label: + en: LifecycleHookId + zh-cn: 生命周期挂钩ID + Description: + en: The ID of the lifecycle hook + zh-cn: '生命周期挂钩ID,请使用弹性伸缩系统默认值 ${lifecycleHookId}' + Type: String + Default: '${lifecycleHookId}' + lifecycleActionToken: + Label: + en: LifecycleActionToken + zh-cn: 实例关联的特定伸缩活动的令牌 + Description: + en: The token that indicates a specific scaling activity associated with an instance + zh-cn: '实例关联的特定伸缩活动的令牌,请使用弹性伸缩系统默认值 ${lifecycleActionToken}' + Type: String + Default: '${lifecycleActionToken}' + 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: OOSServiceRole +RamRole: '{{ OOSAssumeRole }}' +Tasks: + - Name: downloadFileAndRunCommand + OnError: CompleteLifecycleActionForAbandon + OnSuccess: CompleteLifecycleActionForContinue + Action: ACS::ESS::DownloadFileAndRunCommand + Description: + en: Downloads file to the ECS instances adn run command + zh-cn: 下载文件到实例并执行命令 + Properties: + regionId: '{{ regionId }}' + instanceId: '{{ ACS::TaskLoopItem }}' + sourceType: https + sourcePath: '{{ sourcePath }}' + destinationDir: '{{ destinationDir }}' + whetherSaveToFile: '{{ whetherSaveToFile }}' + commandContent: '{{ commandContent }}' + timeout: '{{ timeout }}' + Loop: + RateControl: '{{ rateControl }}' + Items: '{{ instanceIds }}' + - Name: CompleteLifecycleActionForContinue + Action: 'ACS::ExecuteAPI' + Description: + en: Modify lifecycle action for continue + zh-cn: 修改伸缩活动的等待状态为继续完成 + OnSuccess: 'ACS::END' + Properties: + Service: ESS + API: CompleteLifecycleAction + Parameters: + RegionId: '{{ regionId }}' + LifecycleHookId: '{{ lifecycleHookId }}' + LifecycleActionToken: '{{ lifecycleActionToken }}' + LifecycleActionResult: CONTINUE + - Name: CompleteLifecycleActionForAbandon + Action: 'ACS::ExecuteAPI' + Description: + en: Complete lifecycle action for Abandon + zh-cn: 修改伸缩活动的等待状态为弃用 + Properties: + Service: ESS + API: CompleteLifecycleAction + Parameters: + RegionId: '{{ regionId }}' + LifecycleHookId: '{{ lifecycleHookId }}' + LifecycleActionToken: '{{ lifecycleActionToken }}' + LifecycleActionResult: ABANDON + diff --git a/templates/ACS-ESS-LifeCycleModifyInstanceChargeType.yaml b/templates/ACS-ESS-LifeCycleModifyInstanceChargeType.yaml index e7ada30..ed289e0 100644 --- a/templates/ACS-ESS-LifeCycleModifyInstanceChargeType.yaml +++ b/templates/ACS-ESS-LifeCycleModifyInstanceChargeType.yaml @@ -64,6 +64,22 @@ Parameters: Fn::Equals: - ${instanceChargeType} - PostPaid + autoRenew: + Description: + en: Specifies whether instances are automatically renewed before expire. + zh-cn: 实例到期前是否自动续费。 + Label: + en: AutoRenew + zh-cn: 实例到期前是否自动续费。 + Type: Boolean + Default: false + AssociationPropertyMetadata: + Visible: + Condition: + Fn::Not: + Fn::Equals: + - ${instanceChargeType} + - PostPaid networkChargeType: Label: en: NetworkChargeType @@ -147,7 +163,6 @@ Tasks: Duration: 10s - Name: modifyInstanceChargeType OnError: CompleteLifecycleActionForAbandon - OnSuccess: CompleteLifecycleActionForContinue Description: en: Modify instance charge type zh-cn: 修改实例计费方式 @@ -163,6 +178,26 @@ Tasks: Loop: Items: '{{ instanceIds }}' RateControl: '{{ rateControl }}' + - Name: modifyInstanceAutoRenewAttribute + OnError: CompleteLifecycleActionForAbandon + OnSuccess: CompleteLifecycleActionForContinue + Description: + en: Modify Instance AutoRenew Attribute + zh-cn: 设置包年包月实例的自动续费状态 + Action: ACS::ECS::ModifyInstanceAutoRenewAttribute + Properties: + regionId: '{{ regionId }}' + instanceId: '{{ ACS::TaskLoopItem }}' + autoRenew: '{{ autoRenew }}' + duration: '{{ period }}' + periodUnit: '{{ periodUnit }}' + Loop: + Items: '{{ instanceIds }}' + RateControl: '{{ rateControl }}' + When: + Fn::Equals: + - '{{ autoRenew }}' + - true - Name: CompleteLifecycleActionForContinue Action: ACS::ExecuteAPI Description: diff --git a/templates/ACS-Redis-BulkyModifyInstanceBackupTime.yaml b/templates/ACS-Redis-BulkyModifyInstanceBackupTime.yaml index e69de29..5c08f16 100644 --- a/templates/ACS-Redis-BulkyModifyInstanceBackupTime.yaml +++ b/templates/ACS-Redis-BulkyModifyInstanceBackupTime.yaml @@ -0,0 +1,114 @@ +FormatVersion: OOS-2019-06-01 +Description: + name-en: ACS-Redis-BulkyModifyInstanceBackupTime + name-zh-cn: Redis实例开启增量备份 + categories: + - security +Parameters: + regionId: + Label: + en: RegionId + zh-cn: 地域ID + Type: String + AssociationProperty: RegionId + Default: '{{ ACS::RegionId }}' + preferredBackupTime: + Label: + en: backup time + zh-cn: 备份时间 + Description: + zh-cn: 必须为整点,且间隔时间为1小时,格式为HH:mmZ-HH:mmZ(UTC时间) + en: TThe 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 + zh-cn: 备份周期 + Type: List + AllowedValues: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Sunday + enableBackupLog: + Label: + en: enable or disable incremental data backup + zh-cn: 开启或关闭数据闪回功能 + Description: + en: Only Tair (Redis Enterprise Edition) memory type and persistent memory type support this parameter, 1 enable ,0 disable. + zh-cn: 仅Tair(Redis企业版)内存型和持久内存型支持该参数。1:开启 0:关闭,默认值。 + Type: String + AllowedValues: + - 1 + - 0 + instanceIds: + Label: + en: The Ids of redis instances + zh-cn: Redis实例Id列表 + Type: List + 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 +RamRole: '{{ OOSAssumeRole }}' +Tasks: + - Name: ModifyInstanceMaintainTime + Action: ACS::ExecuteAPI + Description: + en: Enable backup log + zh-cn: Redis实例开启增量备份 + Properties: + Service: R-KVSTORE + API: ModifyBackupPolicy + Parameters: + RegionId: '{{ regionId }}' + InstanceId: '{{ ACS::TaskLoopItem }}' + PreferredBackupTime: '{{ preferredBackupTime }}' + PreferredBackupPeriod: + 'Fn::Join': + - ',' + - '{{ preferredBackupPeriod }}' + EnableBackupLog: '{{ enableBackupLog }}' + Loop: + RateControl: '{{ rateControl }}' + Items: '{{ instanceIds }}' +Metadata: + ALIYUN::OOS::Interface: + ParameterGroups: + - Parameters: + - regionId + - instanceIds + Label: + default: + zh-cn: 选择实例 + en: Select Instances + - Parameters: + - preferredBackupTime + - preferredBackupPeriod + - enableBackupLog + Label: + default: + zh-cn: 设置备份策略 + en: Set Backup Policy + - Parameters: + - rateControl + - OOSAssumeRole + Label: + default: + zh-cn: 高级选项 + en: Control Options