ALIYUN::SLS::Project类型用于创建一个日志项目。

语法

{
  "Type": "ALIYUN::SLS::Project",
  "Properties": {
    "Name": String,
    "Description": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
Name String 日志项目的名称。
  • 长度为3~36个字符。
  • 支持小写字母、数字、连字符(-)、下划线(_)。
  • 必须以小写字母或数字开头和结尾。
Description String 日志项目的描述。
  • 长度为0~64个字符。
  • 不支持的符号包括:<>'"\。

返回值

Fn::GetAtt

Name: 日志项目名称。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Project": {
      "Type": "ALIYUN::SLS::Project",
      "Properties": {
        "Name": {
          "Ref": "Name"
        },
        "Description": {
          "Ref": "Description"
        }
      }
    }
  },
  "Parameters": {
    "Name": {
      "MinLength": 3,
      "Type": "String",
      "Description": "Project name: 1. Only supports lowercase letters, numbers, hyphens (-) and underscores (_). 2. Must start and end with lowercase letters and numbers. 3. The name length is 3-63 characters.",
      "MaxLength": 63
    },
    "Description": {
      "Type": "String",
      "Description": "Project description: <>'\"\\ is not supported, up to 64 characters.",
      "MaxLength": 64
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  Project:
    Type: ALIYUN::SLS::Project
    Properties:
      Name:
        Ref: Name
      Description:
        Ref: Description
Parameters:
  Name:
    MinLength: 3
    Type: String
    Description: Project name: 1. Only supports lowercase letters, numbers, hyphens
      (-) and underscores (_). 2. Must start and end with lowercase letters and numbers. 3.
      The name length is 3-63 characters.
    MaxLength: 63
  Description:
    Type: String
    Description: 'Project description: <>''"\ is not supported, up to 64 characters.'
    MaxLength: 64