All Products
Search
Document Center

CloudOps Orchestration Service:ACS-RDS-BulkyModifySQLCollectorRetention

Last Updated:Nov 26, 2024

Template name

ACS-RDS-BulkyModifySQLCollectorRetention

Execute Now

Template description

Sets the retention period of SQL audit logs on ApsaraDB RDS instances to 180 days.

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Data type

Required

Default value

Limit

instanceIds

The IDs of the ApsaraDB RDS instances.

List

Yes

regionId

The region ID.

String

No

{{ ACS::RegionId }}

rateControl

The rate control settings.

Json

No

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

OOSAssumeRole

The RAM role that is assumed by CloudOps Orchestration Service (OOS).

String

No

""

Output parameters

N/A.

Permission policy that is required to execute the template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "rds:ModifySQLCollectorRetention"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

References

ACS-RDS-BulkyModifySQLCollectorRetention

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Modify SQL collector retention   
  name-en: ACS-RDS-BulkyModifySQLCollectorRetention
  categories:
    - security
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId       
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  instanceIds:
    Label:
      en: InstanceIds       
    AssociationProperty: ALIYUN::RDS::Instance::InstanceId
    AssociationPropertyMetadata:
      RegionId: regionId
    Type: List
  rateControl:
    Label:
      en: RateControl      
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole       
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: modifySQLCollectorRetention
    Action: ACS::ExecuteAPI
    Description:
      en: Modify SQL collector retention      
    Properties:
      Service: RDS
      API: ModifySQLCollectorRetention
      Parameters:
        RegionId: '{{ regionId }}'
        DBInstanceId: '{{ ACS::TaskLoopItem }}'
        ConfigValue: 180
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ instanceIds }}'