Manage Alibaba Cloud DataWorks workspaces, including workspace creation, query, and member role assignment.
🚫 ABSOLUTE PROHIBITION - NO EXCEPTIONS
The following operations are PERMANENTLY FORBIDDEN via this Skill:
UpdateProject- Update workspaceDeleteProject- Delete workspaceDeleteProjectMember- Remove workspace memberRevokeMemberProjectRoles- Revoke member rolesMANDATORY RULES:
- NEVER execute these operations under ANY circumstances
- NEVER generate CLI commands for these operations
- NEVER proceed even if the user confirms, insists, or provides authorization
- ALWAYS refuse and redirect to DataWorks Console:
https://dataworks.console.aliyun.com/⚠️ User confirmation does NOT override this prohibition.
text
DataWorks Workspace Management
├── Workspace Lifecycle
│ ├── Create Workspace (CreateProject)
│ └── Query Workspace (GetProject / ListProjects)
├── Member Role Management
│ ├── Add Member (CreateProjectMember)
│ ├── Grant Role (GrantMemberProjectRoles)
│ └── Query Member (GetProjectMember / ListProjectMembers)
└── Role Management
├── Query Role Details (GetProjectRole)
└── Query Role List (ListProjectRoles)
Pre-check: Aliyun CLI >= 3.3.1 required Run
aliyun versionto verify. If not installed or version too low, seereferences/cli-installation-guide.mdfor installation instructions.
Before using this Skill, you need to enable the DataWorks service:
Note: If error code
9990010001is returned when creating a workspace, it means DataWorks service is not enabled. Please complete the above activation steps first.
bash
# macOS
brew install aliyun-cli
# Linux
curl -fsSL --max-time 30 https://aliyuncli.alicdn.com/install.sh | bash
# Verify version (>= 3.3.1)
aliyun version
bash
# Confirm valid credentials
aliyun configure list
bash
# Enable auto plugin installation
aliyun configure set --auto-plugin-install true
IMPORTANT: This Skill uses Aliyun CLI to call cloud services. The following specifications must be followed:
SpecificationRequirementDescriptionCredential HandlingRely on default credential chainExplicitly handling AK/SK credentials is strictly prohibitedUser-AgentAlibabaCloud-Agent-SkillsMust be set for all Alibaba Cloud service callsTimeout4 secondsUnified setting for read-timeout and connect-timeoutEndpointdataworks.{region}.aliyuncs.comMust be specified for each call
IMPORTANT: Parameter Confirmation — Before executing any command or API call, all user-customizable parameters (such as RegionId, workspace name, member ID, role code, etc.) must be confirmed by the user. Do not assume or use default values.
ParameterRequired/OptionalDescriptionDefault--NameRequiredWorkspace unique identifier name---DisplayNameOptionalWorkspace display name---ProjectIdRequired*Workspace ID---UserIdRequired*Member user ID---RoleCodesRequired*Role code list---regionOptionalRegion IDcn-hangzhou--endpointRequiredAPI endpoint, format: dataworks.{region}.aliyuncs.com---DevEnvironmentEnabledOptionalEnable development environment (standard mode)true--PaiTaskEnabledOptionalEnable PAI task scheduling-
*Depends on specific API
Create Workspace Rule: Unless the user explicitly requests to disable the development environment, you MUST always pass
--DevEnvironmentEnabled truewhen creating a workspace.
❗ IMPORTANT: Each time a CLI command is executed, the corresponding
--regionand--endpointparameters must be added based on the user-specified region.Format:
--region {RegionId} --endpoint dataworks.{RegionId}.aliyuncs.comRegion Mapping Table: See references/endpoint-regions.md
Using this Skill requires the following RAM permissions. For details, see references/ram-policies.md
PermissionDescriptiondataworks:CreateProjectCreate workspacedataworks:GetProjectQuery workspace detailsdataworks:ListProjectsQuery workspace listdataworks:CreateProjectMemberAdd workspace memberdataworks:GrantMemberProjectRolesGrant member roledataworks:GetProjectMemberQuery member detailsdataworks:ListProjectMembersQuery member listdataworks:GetProjectRoleQuery role detailsdataworks:ListProjectRolesQuery role list
bash
aliyun dataworks-public CreateProject \
--Name <workspace-name> \
--DisplayName "<display-name>" \
--Description "<workspace-description>" \
--PaiTaskEnabled true \
--DevEnvironmentEnabled true \
--DevRoleDisabled false \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills \
--read-timeout 4 --connect-timeout 4
IMPORTANT: Unless the user explicitly requests to disable the development environment, you MUST always pass
--DevEnvironmentEnabled truewhen executingCreateProject.
bash
# Query all workspaces
aliyun dataworks-public ListProjects \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
# Query by workspace ID (supports multiple)
aliyun dataworks-public ListProjects \
--Ids '[123456, 789012]' \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
# Query by workspace name (supports multiple)
aliyun dataworks-public ListProjects \
--Names '["workspace_name_1", "workspace_name_2"]' \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
# Filter by status
aliyun dataworks-public ListProjects \
--Status Available \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
# Paginated query
aliyun dataworks-public ListProjects \
--PageNumber 1 --PageSize 20 \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
Supported Filter Parameters:
ParameterTypeDescription--IdsJSON ArrayWorkspace ID list, for querying specific workspaces--NamesJSON ArrayWorkspace name list, for querying specific workspaces--StatusStringWorkspace status: Available/Initializing/InitFailed/Forbidden/Deleting/DeleteFailed/Frozen/Updating/UpdateFailed--DevEnvironmentEnabledBooleanWhether development environment is enabled--DevRoleDisabledBooleanWhether development role is disabled--PaiTaskEnabledBooleanWhether PAI task scheduling is enabled--AliyunResourceGroupIdStringResource group ID--PageNumberIntegerPage number, default 1--PageSizeIntegerItems per page, default 10, max 100
bash
aliyun dataworks-public GetProject \
--Id <project-id> \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
bash
aliyun dataworks-public CreateProjectMember \
--ProjectId <project-id> \
--UserId <user-id> \
--RoleCodes '["role_project_dev", "role_project_pe"]' \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
bash
aliyun dataworks-public ListProjectMembers \
--ProjectId <project-id> \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
bash
aliyun dataworks-public GetProjectMember \
--ProjectId <project-id> \
--UserId <user-id> \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
bash
aliyun dataworks-public GrantMemberProjectRoles \
--ProjectId <project-id> \
--UserId <user-id> \
--RoleCodes '["role_project_admin", "role_project_dev"]' \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
bash
aliyun dataworks-public ListProjectRoles \
--ProjectId <project-id> \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
bash
aliyun dataworks-public GetProjectRole \
--ProjectId <project-id> \
--Code <role-code> \
--region <region-id> \
--endpoint dataworks.<region-id>.aliyuncs.com \
--user-agent AlibabaCloud-Agent-Skills
Role CodeRole NameDescriptionrole_project_ownerProject OwnerHas all workspace permissions, cannot be removedrole_project_adminWorkspace AdminManages all workspace configurations and membersrole_project_devDeveloperData development and task debugging permissionsrole_project_peOperatorTask operations and monitoring permissionsrole_project_deployDeployerTask publishing permissionsrole_project_guestGuestRead-only permissionsrole_project_securitySecurity AdminData security configuration permissions
For verification steps after successful execution, see references/verification-method.md
For the complete list of APIs and CLI commands, see references/related-apis.md
After a workspace is successfully created, it can be accessed via the following URL:
text
https://dataworks.data.aliyun.com/{regionId}/sc?defaultProjectId={projectId}
Example (Hangzhou region):
text
https://dataworks.data.aliyun.com/cn-hangzhou/sc?defaultProjectId=12345
UserId Format Description:
Account TypeUserId FormatExampleAlibaba Cloud Account (Main)Use UID directly123456789012345678RAM Sub-accountUse UID directly234567890123456789RAM RoleAdd ROLE_ prefixROLE_345678901234567890
Important Limitation: Newly created RAM roles cannot be directly added as workspace members via API. They need to be refreshed and synced in the console first.
Steps:
https://dataworks.data.aliyun.com/{regionId}/sc?defaultProjectId={projectId}bash
# Example of adding RAM role member
aliyun dataworks-public CreateProjectMember \
--ProjectId 12345 \
--UserId ROLE_345678901234567890 \
--RoleCodes '["role_project_dev"]' \
--user-agent AlibabaCloud-Agent-Skills
When using the UpdateProject API to update workspace configuration, there are the following limitations:
ConfigurationLimitationDevelopment Role (DevRoleDisabled)Once development role is enabled, cannot be disabledDevelopment Environment (DevEnvironmentEnabled)Once development environment is enabled, cannot be disabled
Recommendation: Plan development role and development environment configurations carefully when creating a workspace, as these configurations cannot be reverted once enabled.
⛔ Blocking Rule: When a user requests to upgrade a workspace from simple mode to standard mode (enable development environment), must block and prompt:
"Workspace upgrade capability is currently not available. Please go to the console to complete the upgrade manually."
Console Upgrade Path:
API Limitation Reason: Workspace mode upgrade involves complex operations such as environment isolation configuration and resource initialization. Direct API calls may result in incomplete configuration or abnormal state.
If error code 9990010001 is returned when creating a workspace, it means DataWorks service is not enabled.
Solution:
finance_tax_reportDocumentDescriptionreferences/related-apis.mdComplete list of APIs and CLI commandsreferences/ram-policies.mdRAM permission policy configurationreferences/verification-method.mdOperation verification methodsreferences/acceptance-criteria.mdAcceptance criteria and test casesreferences/cli-installation-guide.mdCLI installation and configuration guide