ALIYUN::ACTIONTRAIL::TrailLogging 类型用于启用或关闭跟踪的日志记录。

语法

{
  "Type": "ALIYUN::ACTIONTRAIL::TrailLogging",
  "Properties": {
    "Name": String,
    "Enable": Boolean
  }
}   

属性

属性名称类型必须允许更新描述约束
NameString跟踪的名称。无。
EnableBoolean启用或关闭跟踪的日志记录。无。

返回值

Fn::GetAtt

  • IsLogging:服务是否打开。
  • LatestDeliveryError:最后一次行为追踪异常的日志信息。
  • LatestDeliveryTime:最后一次成功记录行为的时间。
  • StartLoggingTime:用户上一次开启该跟踪的时间。
  • StopLoggingTime:用户上一次停止该跟踪的时间。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Resources:
      TrailLogging:
        Type: ALIYUN::ACTIONTRAIL::TrailLogging
        Properties:
          Name: test-trail
          Enable: true
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Resources": {
        "TrailLogging": {
          "Type": "ALIYUN::ACTIONTRAIL::TrailLogging",
          "Properties": {
            "Name": "test-trail",
            "Enable": true
          }
        }
      }
    }