ALIYUN::MaxCompute::Project

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

语法

{
  "Type": "ALIYUN::MaxCompute::Project",
  "Properties": {
    "Comment": String,
    "DefaultQuota": String,
    "ChargeType": String,
    "IpWhiteList": Map,
    "Properties": Map,
    "Name": String,
    "SupportSchemaLevels": Boolean
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Comment

String

备注。

DefaultQuota

String

默认计算quota。

ChargeType

String

付费类型。

取值:

  • Prepaid:预付费。

  • Postpaid:后付费。

IpWhiteList

Map

IP白名单。

更多信息,请参见IpWhiteList属性

Properties

Map

项目属性。

更多信息,请参见Properties属性

Name

String

项目名称。

必须以小写字母开头,包含小写字母、数字和下划线。 长度范围为3 ~ 28个字符。

SupportSchemaLevels

Boolean

是否支持模式级别。

取值:

  • true:支持

  • fasle:不支持(默认值)

IpWhiteList语法

"IpWhiteList": {
  "VpcIpList": String,
  "IpList": String
}

IpWhiteList属性

属性名称

类型

必须

允许更新

描述

约束

VpcIpList

String

VPC IP白名单列表。

IpList

String

IP白名单。

Properties语法

"Properties": {
  "SqlMeteringMax": Integer,
  "TypeSystem": String,
  "RetentionDays": Integer,
  "Encryption": Map,
  "AllowFullScan": Boolean,
  "EnableDecimal2": Boolean
}

Properties属性

属性名称

类型

必须

允许更新

描述

约束

SqlMeteringMax

Integer

SQL消费限制。

TypeSystem

String

数据类型版本。

取值:

  • 1:1.0版本 。

  • 2:2.0版。本 。

  • hive:hive兼容类型。

RetentionDays

Integer

备份数据保留天数。

Encryption

Map

存储加密信息。

更多信息,请参见Encryption属性

AllowFullScan

Boolean

是否允许全表扫描。

取值:

  • true:允许全表扫描。

  • false:不允许全表扫描。

EnableDecimal2

Boolean

是否开启Decimal 2.0。

取值:

  • true:开启Decimal 2.0。

  • false:不开启Decimal 2.0。

Encryption语法

"Encryption": {
  "Enable": Boolean,
  "Algorithm": String,
  "Key": String
}

Encryption属性

属性名称

类型

必须

允许更新

描述

约束

Enable

Boolean

是否启用加密。

Algorithm

String

加密算法名称。

例如:SHA1。

Key

String

算法密钥名称。

返回值

Fn::GetAtt

Name:项目名称

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ChargeType:
    AllowedValues:
    - PayAsYouGo
    - Subscription
    Description:
      en: Quota payment type, support PayAsYouGo, Subscription.
    Required: false
    Type: String
  Comment:
    Description:
      en: The comments of project.
    Required: false
    Type: String
  DefaultQuota:
    Description:
      en: Default Computing Resource Group.
    Required: false
    Type: String
  IpWhiteList:
    AssociationPropertyMetadata:
      Parameters:
        IpList:
          Description:
            en: Classic network IP white list. Separate multiple items with commas.
          Required: false
          Type: String
        VpcIpList:
          Description:
            en: VPC network whitelist. Separate multiple items with commas.
          Required: false
          Type: String
    Description:
      en: IP whitelist.
    Required: false
    Type: Json
  Name:
    AllowedPattern: ^[a-z][a-z0-9_]{2,27}$
    Description:
      en: 'The name of the project.

        It must start with a lower-case letter and contain lower-case letters, digits,
        and underscores (_). The value must contain 3 to 28 characters'
    Required: true
    Type: String
  Properties:
    AssociationPropertyMetadata:
      Parameters:
        AllowFullScan:
          Description:
            en: Whether to allow full table scan.
          Required: false
          Type: Boolean
        EnableDecimal2:
          Description:
            en: Whether to turn on Decimal2.0.
          Required: false
          Type: Boolean
        Encryption:
          AssociationPropertyMetadata:
            Parameters:
              Algorithm:
                Description:
                  en: Encryption Algorithm.
                Required: false
                Type: String
              Enable:
                Description:
                  en: Whether to open encryption.
                Required: false
                Type: Boolean
              Key:
                Description:
                  en: Encryption algorithm key.
                Required: false
                Type: String
          Description:
            en: Whether encryption is turned on.
          Required: false
          Type: Json
        RetentionDays:
          Description:
            en: Job default retention time.
          Required: false
          Type: Number
        SqlMeteringMax:
          Description:
            en: SQL charge limit.
          Required: false
          Type: Number
        TypeSystem:
          AllowedValues:
          - '1'
          - '2'
          - hive
          Description:
            en: Type system.
          Required: false
          Type: String
    Description:
      en: Project base attributes.
    Required: false
    Type: Json
Resources:
  Project:
    Properties:
      ChargeType:
        Ref: ChargeType
      Comment:
        Ref: Comment
      DefaultQuota:
        Ref: DefaultQuota
      IpWhiteList:
        Ref: IpWhiteList
      Name:
        Ref: Name
      Properties:
        Ref: Properties
    Type: ALIYUN::MaxCompute::Project
Outputs:
  Name:
    Description: The name of the project.
    Value:
      Fn::GetAtt:
      - Project
      - Name
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Comment": {
      "Type": "String",
      "Description": {
        "en": "The comments of project."
      },
      "Required": false
    },
    "DefaultQuota": {
      "Type": "String",
      "Description": {
        "en": "Default Computing Resource Group."
      },
      "Required": false
    },
    "ChargeType": {
      "Type": "String",
      "Description": {
        "en": "Quota payment type, support PayAsYouGo, Subscription."
      },
      "AllowedValues": [
        "PayAsYouGo",
        "Subscription"
      ],
      "Required": false
    },
    "IpWhiteList": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "VpcIpList": {
            "Type": "String",
            "Description": {
              "en": "VPC network whitelist. Separate multiple items with commas."
            },
            "Required": false
          },
          "IpList": {
            "Type": "String",
            "Description": {
              "en": "Classic network IP white list. Separate multiple items with commas."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "IP whitelist."
      },
      "Required": false
    },
    "Properties": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "SqlMeteringMax": {
            "Type": "Number",
            "Description": {
              "en": "SQL charge limit."
            },
            "Required": false
          },
          "TypeSystem": {
            "Type": "String",
            "Description": {
              "en": "Type system."
            },
            "AllowedValues": [
              "1",
              "2",
              "hive"
            ],
            "Required": false
          },
          "RetentionDays": {
            "Type": "Number",
            "Description": {
              "en": "Job default retention time."
            },
            "Required": false
          },
          "Encryption": {
            "AssociationPropertyMetadata": {
              "Parameters": {
                "Enable": {
                  "Type": "Boolean",
                  "Description": {
                    "en": "Whether to open encryption."
                  },
                  "Required": false
                },
                "Algorithm": {
                  "Type": "String",
                  "Description": {
                    "en": "Encryption Algorithm."
                  },
                  "Required": false
                },
                "Key": {
                  "Type": "String",
                  "Description": {
                    "en": "Encryption algorithm key."
                  },
                  "Required": false
                }
              }
            },
            "Type": "Json",
            "Description": {
              "en": "Whether encryption is turned on."
            },
            "Required": false
          },
          "AllowFullScan": {
            "Type": "Boolean",
            "Description": {
              "en": "Whether to allow full table scan."
            },
            "Required": false
          },
          "EnableDecimal2": {
            "Type": "Boolean",
            "Description": {
              "en": "Whether to turn on Decimal2.0."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "Project base attributes."
      },
      "Required": false
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the project.\nIt must start with a lower-case letter and contain lower-case letters, digits, and underscores (_). The value must contain 3 to 28 characters"
      },
      "AllowedPattern": "^[a-z][a-z0-9_]{2,27}$",
      "Required": true
    }
  },
  "Resources": {
    "Project": {
      "Type": "ALIYUN::MaxCompute::Project",
      "Properties": {
        "Comment": {
          "Ref": "Comment"
        },
        "DefaultQuota": {
          "Ref": "DefaultQuota"
        },
        "ChargeType": {
          "Ref": "ChargeType"
        },
        "IpWhiteList": {
          "Ref": "IpWhiteList"
        },
        "Properties": {
          "Ref": "Properties"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "Name": {
      "Description": "The name of the project.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "Name"
        ]
      }
    }
  }
}