ALIYUN::ApiGateway::LogConfig is used to create a log configuration.

Syntax

{
  "Type": "ALIYUN::ApiGateway::LogConfig",
  "Properties": {
    "SlsLogStore": String,
    "SlsProject": String
  }
}

Properties

Property Type Required Editable Description Constraint
SlsProject String Yes Yes The Log Service project. None
SlsLogStore String Yes Yes The Logstore in the Log Service project. None

Response parameters

Fn::GetAtt

  • SlsProject: the name of the Log Service project.
  • SlsLogStore: the name of the Logstore.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SlsLogStore": {
      "Type": "String",
      "Description": "Logstore name of SLS",
      "MinLength": 3,
      "MaxLength": 63
    },
    "SlsProject": {
      "Type": "String",
      "Description": "Project name of SLS",
      "MinLength": 3,
      "MaxLength": 63
    }
  },
  "Resources": {
    "LogConfig": {
      "Type": "ALIYUN::ApiGateway::LogConfig",
      "Properties": {
        "SlsLogStore": {
          "Ref": "SlsLogStore"
        },
        "SlsProject": {
          "Ref": "SlsProject"
        }
      }
    }
  },
  "Outputs": {
    "SlsLogStore": {
      "Description": "Logstore name of SLS",
      "Value": {
        "Fn::GetAtt": [
          "LogConfig",
          "SlsLogStore"
        ]
      }
    },
    "SlsProject": {
      "Description": "Project name of SLS",
      "Value": {
        "Fn::GetAtt": [
          "LogConfig",
          "SlsProject"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SlsLogStore:
    Type: String
    Description: Logstore name of SLS
    MinLength: 3
    MaxLength: 63
  SlsProject:
    Type: String
    Description: Project name of SLS
    MinLength: 3
    MaxLength: 63
Resources:
  LogConfig:
    Type: 'ALIYUN::ApiGateway::LogConfig'
    Properties:
      SlsLogStore:
        Ref: SlsLogStore
      SlsProject:
        Ref: SlsProject
Outputs:
  SlsLogStore:
    Description: Logstore name of SLS
    Value:
      'Fn::GetAtt':
        - LogConfig
        - SlsLogStore
  SlsProject:
    Description: Project name of SLS
    Value:
      'Fn::GetAtt':
        - LogConfig
        - SlsProject