ALIYUN::ALB::AccessLogEnable

更新时间:
复制为 MD 格式

ALIYUN::ALB::AccessLogEnable类型用于启用访问日志功能。

语法

{
  "Type": "ALIYUN::ALB::AccessLogEnable",
  "Properties": {
    "LogStore": String,
    "LoadBalancerId": String,
    "LogProject": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

LoadBalancerId

String

ALB实例的ID。

LogProject

String

日志项目Project。

LogStore

String

日志库Logstore。

返回值

Fn::GetAtt

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  LogStore:
    Type: String
    Description:
      en: The name of the LogHub logstore.
      zh: LogHub日志库的名称。
    Required: true
  LoadBalancerId:
    Type: String
    Description:
      en: The ID of the ALB instance.
      zh: ALB实例的ID。
    Required: true
  LogProject:
    Type: String
    Description:
      en: The name of the LogHub project.
      zh: LogHub项目的名称。
    Required: true
Resources:
  LoadBalancerAccessLogConfigAttachment:
    Type: ALIYUN::ALB::AccessLogEnable
    Properties:
      LogStore:
        Ref: LogStore
      LoadBalancerId:
        Ref: LoadBalancerId
      LogProject:
        Ref: LogProject
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "LogStore": {
      "Type": "String",
      "Description": {
        "en": "The name of the LogHub logstore.",
        "zh": "LogHub日志库的名称。"
      },
      "Required": true
    },
    "LoadBalancerId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the ALB instance.",
        "zh": "ALB实例的ID。"
      },
      "Required": true
    },
    "LogProject": {
      "Type": "String",
      "Description": {
        "en": "The name of the LogHub project.",
        "zh": "LogHub项目的名称。"
      },
      "Required": true
    }
  },
  "Resources": {
    "LoadBalancerAccessLogConfigAttachment": {
      "Type": "ALIYUN::ALB::AccessLogEnable",
      "Properties": {
        "LogStore": {
          "Ref": "LogStore"
        },
        "LoadBalancerId": {
          "Ref": "LoadBalancerId"
        },
        "LogProject": {
          "Ref": "LogProject"
        }
      }
    }
  }
}