diff --git a/list-templates.json b/list-templates.json index 3d1ddb0..45330c6 100644 --- a/list-templates.json +++ b/list-templates.json @@ -5418,6 +5418,69 @@ "UpdatedBy": "ACS", "UpdatedDate": "2024-09-03T09:27:39Z" }, + { + "Category": "TimerTrigger", + "CreatedBy": "ACS", + "CreatedDate": "2024-09-23T08:04:28Z", + "Description": "{\"en\": \"Schedule to cleanup of buckets in a specified resource group\", \"zh-cn\": \"定时删除指定资源组中的bucket\", \"name-en\": \"ACS-OSS-ScheduleToBulkyDeleteBuckets\", \"name-zh-cn\": \"定时删除指定资源组中的bucket\", \"categories\": [\"time_trigger\"]}", + "HasTrigger": true, + "Hash": "0eddd8d65a71241ee249d0b2931a2fbd5be2d7441008cfa842ca0a685fd6fdc9", + "IsFavorite": false, + "Popularity": 5, + "ResourceGroupId": "", + "ShareType": "Public", + "Tags": {}, + "TemplateFormat": "YAML", + "TemplateId": "t-adfc696997a4465193c2", + "TemplateName": "ACS-OSS-ScheduleToBulkyDeleteBuckets", + "TemplateType": "Automation", + "TemplateVersion": "v1", + "TotalExecutionCount": -1, + "UpdatedBy": "ACS", + "UpdatedDate": "2024-09-23T08:04:28Z" + }, + { + "Category": "Other", + "CreatedBy": "ACS", + "CreatedDate": "2024-09-24T03:14:00Z", + "Description": "{\"name-en\": \"ACS-ENS-BulkyQueryInstanceInfo\", \"name-zh-cn\": \"批量查询ENS实例信息\", \"en\": \"Bulky query ENS instance info\", \"zh-cn\": \"批量查询ENS实例信息\"}", + "HasTrigger": false, + "Hash": "c880369b8a9bb064c02f8aeef4e3f6c8e95655202e19e6f343a30a16d99ccb44", + "IsFavorite": false, + "Popularity": 5, + "ResourceGroupId": "", + "ShareType": "Public", + "Tags": {}, + "TemplateFormat": "YAML", + "TemplateId": "t-27c740db29784bf38f74", + "TemplateName": "ACS-ENS-BulkyQueryInstanceInfo", + "TemplateType": "Automation", + "TemplateVersion": "v1", + "TotalExecutionCount": -1, + "UpdatedBy": "ACS", + "UpdatedDate": "2024-09-24T03:14:00Z" + }, + { + "Category": "Other", + "CreatedBy": "ACS", + "CreatedDate": "2024-09-26T03:04:37Z", + "Description": "{\"en\": \"ACS-ECS-SetDiskEncryption\", \"zh-cn\": \"设置云盘默认加密操作\", \"name-en\": \"ACS-ECS-SetDiskEncryption\", \"name-zh-cn\": \"设置云盘默认加密操作\"}", + "HasTrigger": false, + "Hash": "dd193b885ff7c7237b93870ad4246f09299f56405afefe31c3b20b4b95edc037", + "IsFavorite": false, + "Popularity": 5, + "ResourceGroupId": "", + "ShareType": "Public", + "Tags": {}, + "TemplateFormat": "YAML", + "TemplateId": "t-6f47c01e82c046258acb", + "TemplateName": "ACS-ECS-SetDiskEncryption", + "TemplateType": "Automation", + "TemplateVersion": "v4", + "TotalExecutionCount": -1, + "UpdatedBy": "ACS", + "UpdatedDate": "2024-09-26T06:37:16Z" + }, { "Category": "Other", "CreatedBy": "ACS", diff --git a/templates/ACS-ECS-SetDiskEncryption.yaml b/templates/ACS-ECS-SetDiskEncryption.yaml new file mode 100644 index 0000000..036462e --- /dev/null +++ b/templates/ACS-ECS-SetDiskEncryption.yaml @@ -0,0 +1,109 @@ +FormatVersion: OOS-2019-06-01 +Description: + en: ACS-ECS-SetDiskEncryption + zh-cn: 设置云盘默认加密操作 + name-en: ACS-ECS-SetDiskEncryption + name-zh-cn: 设置云盘默认加密操作 +Parameters: + createDiskEncryptions: + Type: List + Default: [] + Label: + en: Create disk encryption options + zh-cn: 开启云盘加密的选项 + AssociationProperty: List[Parameters] + AssociationPropertyMetadata: + Parameters: + RegionId: + Type: String + AssociationProperty: RegionId + KMSKeyId: + Type: String + AssociationProperty: ALIYUN::KMS::Key::KeyId + AssociationPropertyMetadata: + RegionId: ${.RegionId} + Default: Null + modifyDiskEncryptions: + Type: List + Default: [] + Label: + en: Modify disk encryption options + zh-cn: 修改云盘加密的选项 + AssociationProperty: List[Parameters] + AssociationPropertyMetadata: + Parameters: + RegionId: + Type: String + AssociationProperty: RegionId + KMSKeyId: + Type: String + AssociationProperty: ALIYUN::KMS::Key::KeyId + AssociationPropertyMetadata: + RegionId: ${.RegionId} + Default: Null + disableDiskEncryptions: + Type: List + Default: [] + Label: + en: Disable disk encryption options + zh-cn: 关闭云盘加密的选项 + AssociationProperty: List[Parameters] + AssociationPropertyMetadata: + Parameters: + RegionId: + Type: String + AssociationProperty: RegionId + rateControl: + Label: + en: RateControl + zh-cn: 任务执行的并发比率 + Type: Json + AssociationProperty: RateControl + Default: + Mode: Concurrency + MaxErrors: 0 + Concurrency: 10 +RamRole: '' +Tasks: + - Name: DisableDiskEncryptionByDefault + Action: ACS::ECS::DisableDiskEncryptionByDefault + Description: 'DisableDiskEncryptionByDefault' + Properties: + regionId: + Fn::Select: + - RegionId + - '{{ ACS::TaskLoopItem }}' + Loop: + Items: '{{ disableDiskEncryptions }}' + RateControl: '{{ rateControl }}' + - Name: ModifyDiskDefaultKMSKeyId + Action: ACS::ECS::ModifyDiskDefaultKMSKeyId + Description: 'ModifyDiskDefaultKMSKeyId' + Properties: + regionId: + Fn::Select: + - RegionId + - '{{ ACS::TaskLoopItem }}' + KMSKeyId: + Fn::Select: + - KMSKeyId + - '{{ ACS::TaskLoopItem }}' + Loop: + Items: '{{ modifyDiskEncryptions }}' + RateControl: '{{ rateControl }}' + - Name: EnableDiskEncryptionByDefault + Action: ACS::ECS::EnableDiskEncryptionByDefault + Description: 'EnableDiskEncryptionByDefault' + Properties: + regionId: + Fn::Select: + - RegionId + - '{{ ACS::TaskLoopItem }}' + KMSKeyId: + Fn::Select: + - KMSKeyId + - '{{ ACS::TaskLoopItem }}' + Loop: + Items: '{{ createDiskEncryptions }}' + RateControl: '{{ rateControl }}' + diff --git a/templates/ACS-ENS-BulkyQueryInstanceInfo.yaml b/templates/ACS-ENS-BulkyQueryInstanceInfo.yaml new file mode 100644 index 0000000..2db7288 --- /dev/null +++ b/templates/ACS-ENS-BulkyQueryInstanceInfo.yaml @@ -0,0 +1,31 @@ +FormatVersion: OOS-2019-06-01 +Description: + name-en: ACS-ENS-BulkyQueryInstanceInfo + name-zh-cn: 批量查询ENS实例信息 + en: Bulky query ENS instance info + zh-cn: 批量查询ENS实例信息 +Parameters: + 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 ENS instances + zh-cn: 获取ENS实例 + Action: ACS::ENS::QueryInstanceInfo + diff --git a/templates/ACS-OSS-ScheduleToBulkyDeleteBuckets.yaml b/templates/ACS-OSS-ScheduleToBulkyDeleteBuckets.yaml new file mode 100644 index 0000000..8394c9d --- /dev/null +++ b/templates/ACS-OSS-ScheduleToBulkyDeleteBuckets.yaml @@ -0,0 +1,126 @@ +FormatVersion: OOS-2019-06-01 +Description: + en: Schedule to cleanup of buckets in a specified resource group + zh-cn: 定时删除指定资源组中的bucket + name-en: ACS-OSS-ScheduleToBulkyDeleteBuckets + name-zh-cn: 定时删除指定资源组中的bucket + categories: + - time_trigger +Parameters: + regionId: + Type: String + Label: + en: The id of region + zh-cn: 地域ID + AssociationProperty: RegionId + Default: '{{ ACS::RegionId }}' + timerTrigger: + Type: Json + Label: + en: TimerTrigger + zh-cn: 定时类型 + AssociationProperty: ALIYUN::OOS::Component::TimerTrigger + AssociationPropertyMetadata: + MinuteInterval: 30 + resourceGroupId: + Type: String + Label: + en: ResourceGroupId + zh-cn: 资源组ID + 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: timerTrigger + Action: ACS::TimerTrigger + Description: + en: Triggers a task as scheduled by specifying type and expression + zh-cn: 通过指定触发类型和表达式按计划触发任务 + Properties: + Type: + 'Fn::Select': + - type + - '{{timerTrigger}}' + Expression: + 'Fn::Select': + - expression + - '{{timerTrigger}}' + EndDate: + 'Fn::Select': + - endDate + - '{{ timerTrigger }}' + TimeZone: + 'Fn::Select': + - timeZone + - '{{ timerTrigger }}' + - Name: getBuckets + Description: + en: Gets OSS buckets + zh-cn: 获取OSS bucket + Action: ACS::ExecuteAPI + Properties: + Service: OSS + API: ListBuckets + Method: GET + URI: '/' + Headers: + x-oss-resource-group-id: '{{resourceGroupId}}' + Body: '' + Outputs: + bucketNames: + Type: List + ValueSelector: '.ListAllMyBucketsResult.Buckets.Bucket[] | {"Name": .Name, RegionId: .Region} ' + - Name: deleteBucket + Action: ACS::OSS::DeleteBucket + Description: + en: Delete bucket + zh-cn: 删除 bucket + Properties: + regionId: + Fn::Select: + - RegionId + - '{{ ACS::TaskLoopItem }}' + bucketName: + Fn::Select: + - Name + - '{{ ACS::TaskLoopItem }}' + Loop: + Items: '{{ getBuckets.bucketNames }}' + RateControl: '{{ rateControl }}' +Metadata: + ALIYUN::OOS::Interface: + ParameterGroups: + - Parameters: + - timerTrigger + Label: + default: + zh-cn: 定时设置 + en: Timer Trigger Configure + - Parameters: + - regionId + - resourceGroupId + Label: + default: + zh-cn: 选择资源组 + en: Select Resource Group + - Parameters: + - rateControl + - OOSAssumeRole + Label: + default: + zh-cn: 高级选项 + en: Control Options diff --git a/templates/ACS-Redis-BulkyDeleteSecurityIpFromInstanceIPArray.yaml b/templates/ACS-Redis-BulkyDeleteSecurityIpFromInstanceIPArray.yaml index 9d1ac68..e69de29 100644 --- a/templates/ACS-Redis-BulkyDeleteSecurityIpFromInstanceIPArray.yaml +++ b/templates/ACS-Redis-BulkyDeleteSecurityIpFromInstanceIPArray.yaml @@ -1,96 +0,0 @@ -FormatVersion: OOS-2019-06-01 -Description: - en: Bulky del specified ip from the ip white list array of redis instances - zh-cn: 批量从Redis实例IP白名单分组里删除指定IP - name-en: ACS-Redis-BulkyDeleteSecurityIpFromInstanceIPArray - name-zh-cn: 批量从Redis实例IP白名单分组里删除指定IP - categories: - - security -Parameters: - regionId: - Label: - en: The region id of instances - zh-cn: 实例所在地域ID - Type: String - AssociationProperty: RegionId - Default: '{{ ACS::RegionId }}' - instanceId: - Label: - en: The id of Redis instances - zh-cn: Redis实例ID - Type: String - securityIp: - Label: - en: The security ip to delete - zh-cn: 要删除的IP - Type: String - Default: 0.0.0.0/0 - OOSAssumeRole: - Label: - en: The RAM role to be assumed by OOS - zh-cn: OOS扮演的RAM角色 - Type: String - Default: OOSServiceRole -RamRole: '{{ OOSAssumeRole }}' -Tasks: - - Name: describeSecurityIps - Action: ACS::ExecuteAPI - Description: - en: Query SecurityIPList of a redis instance - zh-cn: 查询一个redis实例包含的SecurityIPList - Properties: - Service: R-KVSTORE - API: DescribeSecurityIps - Parameters: - RegionId: '{{ regionId }}' - InstanceId: '{{ instanceId }}' - Outputs: - SecurityIpGroupName: - Type: List - ValueSelector: '.SecurityIpGroups.SecurityIpGroup[] | {"SecurityIpList": .SecurityIpList, "SecurityIpGroupName": .SecurityIpGroupName}' - - Name: modifySecurityIps - Action: ACS::Redis::DeleteSecurityIpByInstanceIPArray - Description: - en: Query SecurityIPList of a redis instance - zh-cn: 查询一个redis实例包含的SecurityIPList - Properties: - regionId: '{{ regionId }}' - instanceId: '{{ instanceId }}' - securityIpList: - Fn::Select: - - SecurityIpList - - '{{ ACS::TaskLoopItem }}' - securityIpGroupName: - Fn::Select: - - SecurityIpGroupName - - '{{ ACS::TaskLoopItem }}' - securityIp: '{{ securityIp }}' - Loop: - Items: '{{ describeSecurityIps.SecurityIpGroupName }}' - RateControl: - Mode: Concurrency - MaxErrors: 0 - Concurrency: 1 -Metadata: - ALIYUN::OOS::Interface: - ParameterGroups: - - Parameters: - - securityIp - Label: - default: - zh-cn: 参数配置 - en: Parameters Configure - - Parameters: - - regionId - - instanceId - Label: - default: - zh-cn: 选择实例 - en: Select Instances - - Parameters: - - OOSAssumeRole - Label: - default: - zh-cn: 高级选项 - en: Control Options -