ALIYUN::NLPAUTOML::Project

ALIYUN::NLPAUTOML::Project类型用于创建项目。

语法

{
  "Type": "ALIYUN::NLPAUTOML::Project",
  "Properties": {
    "ProjectName": String,
    "ProjectType": String,
    "ProjectDescription": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ProjectName

String

项目名称。

不能以数字和符号开头,长度不能大于32个字符。

ProjectType

String

项目类型。

取值:

  • ner

  • textCategory

  • baseRelation

  • textMatching

  • sentimentAnalysis

  • resumeExtract

  • reviewAnalysis

ProjectDescription

String

项目描述。

不能以数字和符号开头,长度不能大于256个字符。

返回值

Fn::GetAtt

ProjectId:项目ID

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ProjectDescription:
    AllowedPattern: ^[a-zA-Z][-_a-zA-Z0-9]{1,256}$
    Description: The description of project.Cannot start with numbers and symbols,
      and the length cannot be greater than 256 characters.
    Type: String
  ProjectName:
    AllowedPattern: ^[a-zA-Z][-_a-zA-Z0-9]{1,32}$
    Description: The name of project. Cannot start with numbers and symbols, and the
      length cannot be greater than 32 characters.
    Type: String
  ProjectType:
    AllowedValues:
    - ner
    - textCategory
    - baseRelation
    - textMatching
    - sentimentAnalysis
    - resumeExtract
    - reviewAnalysis
    Description: 'The type of nlp project. The following value is allowed: ner, textCategorybaseRelation,
      textMatching, sentimentAnalysis, resumeExtract, reviewAnalysis'
    Type: String
Resources:
  Project:
    Properties:
      ProjectDescription:
        Ref: ProjectDescription
      ProjectName:
        Ref: ProjectName
      ProjectType:
        Ref: ProjectType
    Type: ALIYUN::NLPAUTOML::Project
Outputs:
  ProjectId:
    Description: The project ID
    Value:
      Fn::GetAtt:
      - Project
      - ProjectId

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ProjectName": {
      "Type": "String",
      "Description": "The name of project. Cannot start with numbers and symbols, and the length cannot be greater than 32 characters.",
      "AllowedPattern": "^[a-zA-Z][-_a-zA-Z0-9]{1,32}$"
    },
    "ProjectType": {
      "Type": "String",
      "Description": "The type of nlp project. The following value is allowed: ner, textCategorybaseRelation, textMatching, sentimentAnalysis, resumeExtract, reviewAnalysis",
      "AllowedValues": [
        "ner",
        "textCategory",
        "baseRelation",
        "textMatching",
        "sentimentAnalysis",
        "resumeExtract",
        "reviewAnalysis"
      ]
    },
    "ProjectDescription": {
      "Type": "String",
      "Description": "The description of project.Cannot start with numbers and symbols, and the length cannot be greater than 256 characters.",
      "AllowedPattern": "^[a-zA-Z][-_a-zA-Z0-9]{1,256}$"
    }
  },
  "Resources": {
    "Project": {
      "Type": "ALIYUN::NLPAUTOML::Project",
      "Properties": {
        "ProjectName": {
          "Ref": "ProjectName"
        },
        "ProjectType": {
          "Ref": "ProjectType"
        },
        "ProjectDescription": {
          "Ref": "ProjectDescription"
        }
      }
    }
  },
  "Outputs": {
    "ProjectId": {
      "Description": "The project ID",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "ProjectId"
        ]
      }
    }
  }
}