Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::SLB::AccessLogsAddition

Última atualização: Jun 27, 2026

Configura uma regra de encaminhamento de log de acesso para uma instância do Classic Load Balancer (CLB).

Sintaxe

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

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

LogStore

String

Sim

Não

Nome do Logstore no Simple Log Service (SLS).

Nenhuma.

LoadBalancerId

String

Sim

Não

ID da instância CLB.

Nenhuma.

LogProject

String

Sim

Não

Nome do projeto no SLS.

Nenhuma.

Valores de retorno

Fn::GetAtt

Nenhum.

Exemplos

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. Prerequisites 1. 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. Prerequisites 1. 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"
        }
      }
    }
  }
}