全部产品
Search
文档中心

资源编排:ALIYUN::REDIS::AuditLogConfig

更新时间:Dec 14, 2023

ALIYUN::REDIS::AuditLogConfig类型用于修改Redis实例的审计日志设置。

语法

{
  "Type": "ALIYUN::REDIS::AuditLogConfig",
  "Properties": {
    "InstanceId": String,
    "Retention": Integer
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceId

String

实例ID。

您可以调用DescribeInstances - 查询实例的列表信息获取实例ID。

Retention

Integer

审计日志保留天数。

取值:1~365

本参数的设置对当前地域下的所有Redis实例生效。

返回值

Fn::GetAtt

InstanceId:实例ID

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      InstanceId:
        Description:
          en: The ID of the instance. You can call the DescribeInstances operation to
            query the ID of the instance.
        Required: true
        Type: String
      Retention:
        Description:
          en: 'The retention period of audit logs. Valid values: 1 to 365. Unit: days.
    
            Note: The value of this parameter takes effect for all ApsaraDB for Redis
            instances in the current region.'
        MaxValue: 365
        MinValue: 1
        Required: true
        Type: Number
    Resources:
      AuditLogConfig:
        Properties:
          InstanceId:
            Ref: InstanceId
          Retention:
            Ref: Retention
        Type: ALIYUN::REDIS::AuditLogConfig
    Outputs:
      InstanceId:
        Description: IP address whitelist to be modified
        Value:
          Fn::GetAtt:
          - AuditLogConfig
          - InstanceId
                            
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "InstanceId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the instance. You can call the DescribeInstances operation to query the ID of the instance."
          },
          "Required": true
        },
        "Retention": {
          "Type": "Number",
          "Description": {
            "en": "The retention period of audit logs. Valid values: 1 to 365. Unit: days.\nNote: The value of this parameter takes effect for all ApsaraDB for Redis instances in the current region."
          },
          "Required": true,
          "MinValue": 1,
          "MaxValue": 365
        }
      },
      "Resources": {
        "AuditLogConfig": {
          "Type": "ALIYUN::REDIS::AuditLogConfig",
          "Properties": {
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "Retention": {
              "Ref": "Retention"
            }
          }
        }
      },
      "Outputs": {
        "InstanceId": {
          "Description": "IP address whitelist to be modified",
          "Value": {
            "Fn::GetAtt": [
              "AuditLogConfig",
              "InstanceId"
            ]
          }
        }
      }
    }