ALIYUN::DataWorks::Project

ALIYUN::DataWorks::Project类型用于创建一个DataWorks工作空间。

语法

{
  "Type": "ALIYUN::DataWorks::Project",
  "Properties": {
    "ProjectIdentifier": String,
    "DisableDevelopment": Boolean,
    "IsAllowDownload": Boolean,
    "ProjectName": String,
    "ProjectDescription": String,
    "ProjectMode": Integer,
    "ResourceGroupId": String,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ProjectIdentifier

String

工作空间的名称。

只能包含大小写字母、数字和下划线,且首字母必须是字母或数字。

DisableDevelopment

Boolean

是否禁用开发角色。

取值:

  • false(默认值):开启开发角色。

  • true:禁用开发角色。

IsAllowDownload

Boolean

是否允许下载ide上查询的结果。

取值:

  • 1:默认值,允许下载。

  • 0:不允许下载。

ProjectName

String

工作空间的显示名称。

ProjectDescription

String

工作空间的详细描述信息。

ProjectMode

Integer

工作空间的模式。

取值:

  • 2:默认值,表示简单工作空间模式。

  • 3:表示标准工作空间模式。

ResourceGroupId

String

资源组ID。

Tags

List

工作空间绑定的标签列表。

更多信息,请参见Tags属性

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

返回值

Fn::GetAtt

  • ProjectIdentifier:工作空间的名称

  • IsDefault:是否为默认工作空间

  • SchedulerMaxRetryTimes:默认出错自动重跑的次数。

  • ProtectedMode:工作空间是否开启了保护模式

  • ProjectId:工作空间的ID。

  • TablePrivacyMode:MaxCompute表的可见性权限

  • EnvTypes:工作空间包含的环境信息。

  • ResidentArea:工作空间的类型。

  • SchedulerRetryInterval:默认出错自动重跑的时间间隔

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ProjectIdentifier:
    Type: String
    Description:
      en: The name of the workspace. The name can contain letters, digits, and underscores (_) and must start with a letter or digit.
    AllowedPattern: ^[a-zA-Z][a-zA-Z0-9_]{2,27}$
    Required: true
    Default: test_project
Resources:
  Project:
    Type: ALIYUN::DataWorks::Project
    Properties:
      ProjectIdentifier:
        Ref: ProjectIdentifier
Outputs:
  ProjectIdentifier:
    Description: The name of the workspace. The name can contain letters, digits, and underscores (_) and must start with a letter or digit.
    Value:
      Fn::GetAtt:
        - Project
        - ProjectIdentifier
  IsDefault:
    Description: |-
      Indicates whether the workspace is the default workspace. Valid values:
      1: The workspace is the default workspace.
      0: The workspace is not the default workspace.
    Value:
      Fn::GetAtt:
        - Project
        - IsDefault
  SchedulerMaxRetryTimes:
    Description: The default maximum number of automatic reruns that are allowed after an error occurs.
    Value:
      Fn::GetAtt:
        - Project
        - SchedulerMaxRetryTimes
  ProtectedMode:
    Description: |-
      Indicates whether the workspace protection feature is enabled. Valid values:
      1: The workspace protection feature is enabled.
      0: The workspace protection feature is disabled.
    Value:
      Fn::GetAtt:
        - Project
        - ProtectedMode
  ProjectId:
    Description: The ID of the workspace.
    Value:
      Fn::GetAtt:
        - Project
        - ProjectId
  TablePrivacyMode:
    Description: |-
      Indicates whether the MaxCompute tables in the workspace are visible to the users within the tenant. Valid values:
      0: The MaxCompute tables are invisible to the users within a tenant.
      1: The MaxCompute tables are visible to the users within a tenant.
    Value:
      Fn::GetAtt:
        - Project
        - TablePrivacyMode
  EnvTypes:
    Description: |-
      The environment of the workspace. Valid values: PROD and DEV.
      The value PROD indicates the production environment. Workspaces in basic mode provide only the production environment.
      The value DEV indicates the development environment. Workspaces in standard mode provide both the development environment and the production environment.
    Value:
      Fn::GetAtt:
        - Project
        - EnvTypes
  ResidentArea:
    Description: 'The type of the workspace. Valid values: private and swap.'
    Value:
      Fn::GetAtt:
        - Project
        - ResidentArea
  SchedulerRetryInterval:
    Description: 'The interval between automatic reruns after an error occurs. Unit: milliseconds. The maximum interval is 30 minutes. You must pay attention to the conversion between units.'
    Value:
      Fn::GetAtt:
        - Project
        - SchedulerRetryInterval

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ProjectIdentifier": {
      "Type": "String",
      "Description": {
        "en": "The name of the workspace. The name can contain letters, digits, and underscores (_) and must start with a letter or digit."
      },
      "AllowedPattern": "^[a-zA-Z][a-zA-Z0-9_]{2,27}$",
      "Required": true,
      "Default": "test_project"
    }
  },
  "Resources": {
    "Project": {
      "Type": "ALIYUN::DataWorks::Project",
      "Properties": {
        "ProjectIdentifier": {
          "Ref": "ProjectIdentifier"
        }
      }
    }
  },
  "Outputs": {
    "ProjectIdentifier": {
      "Description": "The name of the workspace. The name can contain letters, digits, and underscores (_) and must start with a letter or digit.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "ProjectIdentifier"
        ]
      }
    },
    "IsDefault": {
      "Description": "Indicates whether the workspace is the default workspace. Valid values:\n1: The workspace is the default workspace.\n0: The workspace is not the default workspace.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "IsDefault"
        ]
      }
    },
    "SchedulerMaxRetryTimes": {
      "Description": "The default maximum number of automatic reruns that are allowed after an error occurs.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "SchedulerMaxRetryTimes"
        ]
      }
    },
    "ProtectedMode": {
      "Description": "Indicates whether the workspace protection feature is enabled. Valid values:\n1: The workspace protection feature is enabled.\n0: The workspace protection feature is disabled.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "ProtectedMode"
        ]
      }
    },
    "ProjectId": {
      "Description": "The ID of the workspace.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "ProjectId"
        ]
      }
    },
    "TablePrivacyMode": {
      "Description": "Indicates whether the MaxCompute tables in the workspace are visible to the users within the tenant. Valid values:\n0: The MaxCompute tables are invisible to the users within a tenant.\n1: The MaxCompute tables are visible to the users within a tenant.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "TablePrivacyMode"
        ]
      }
    },
    "EnvTypes": {
      "Description": "The environment of the workspace. Valid values: PROD and DEV.\nThe value PROD indicates the production environment. Workspaces in basic mode provide only the production environment.\nThe value DEV indicates the development environment. Workspaces in standard mode provide both the development environment and the production environment.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "EnvTypes"
        ]
      }
    },
    "ResidentArea": {
      "Description": "The type of the workspace. Valid values: private and swap.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "ResidentArea"
        ]
      }
    },
    "SchedulerRetryInterval": {
      "Description": "The interval between automatic reruns after an error occurs. Unit: milliseconds. The maximum interval is 30 minutes. You must pay attention to the conversion between units.",
      "Value": {
        "Fn::GetAtt": [
          "Project",
          "SchedulerRetryInterval"
        ]
      }
    }
  }
}