ALIYUN::SLB::AccessLogsAddition

ALIYUN::SLB::AccessLogsAddition类型用于为传统型负载均衡实例添加访问日志转发规则。

语法

{
  "Type": "ALIYUN::SLB::AccessLogsAddition",
  "Properties": {
    "LogStore": String,
    "LoadBalancerId": String,
    "LogProject": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

LogStore

String

日志服务 LogStore 的名称。

LoadBalancerId

String

传统型负载均衡实例的 ID。

LogProject

String

日志服务 LogProject 的名称。

返回值

Fn::GetAtt

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  LogStore:
    Type: String
    Description:
      en: The log store name.
    Required: true
  LoadBalancerId:
    Type: String
    Description:
      en: The load balancer id.Only SLB Layer 7 load balancing (HTTP/HTTPS listening) supports the access log function.Prerequisites1. A SLB instance has been created. For details, see Creating and Managing CLB Instances.2. A virtual server group has been created. Backend servers have been added to the server group.3. HTTP or HTTPS listening has been configured for CLB. 4. You have enabled the log service. For details, see Activating the Log Service.
    Required: true
  LogProject:
    Type: String
    Description:
      en: The log project name.
    Required: true
Resources:
  AccessLogsAddition:
    Type: ALIYUN::SLB::AccessLogsAddition
    Properties:
      LogStore:
        Ref: LogStore
      LoadBalancerId:
        Ref: LoadBalancerId
      LogProject:
        Ref: LogProject
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "LogStore": {
      "Type": "String",
      "Description": {
        "en": "The log store name."
      },
      "Required": true
    },
    "LoadBalancerId": {
      "Type": "String",
      "Description": {
        "en": "The load balancer id.Only SLB Layer 7 load balancing (HTTP/HTTPS listening) supports the access log function.Prerequisites1. A SLB instance has been created. For details, see Creating and Managing CLB Instances.2. A virtual server group has been created. Backend servers have been added to the server group.3. HTTP or HTTPS listening has been configured for CLB. 4. You have enabled the log service. For details, see Activating the Log Service."
      },
      "Required": true
    },
    "LogProject": {
      "Type": "String",
      "Description": {
        "en": "The log project name."
      },
      "Required": true
    }
  },
  "Resources": {
    "AccessLogsAddition": {
      "Type": "ALIYUN::SLB::AccessLogsAddition",
      "Properties": {
        "LogStore": {
          "Ref": "LogStore"
        },
        "LoadBalancerId": {
          "Ref": "LoadBalancerId"
        },
        "LogProject": {
          "Ref": "LogProject"
        }
      }
    }
  }
}