首页 CreateWorkspaceRole

CreateWorkspaceRole

更新时间: 2026-05-08 16:55:20

Creates a workspace role.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/workspaces/{WorkspaceId}/roles HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

The workspace ID. You can call the ListWorkspaces operation to obtain the workspace ID.

123

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

RoleName

string

No

The unique name for the custom role within the workspace. It can contain letters, digits, underscores (_), and hyphens (-), and be up to 64 characters long.

dev-test

RoleType

string

No

The role type. This operation only creates custom roles. Valid value: custom.

custom

ModulePermissions ModulePermissions

No

The permission settings for the role.

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

The request ID.

A519F77D-28A0-52F5-AB82-5********8

InstanceJobId

string

The job ID for the request.

CreateWorkspaceCustomRole-role-***abc*******

Examples

Success response

JSON format

{
  "RequestId": "A519F77D-28A0-52F5-AB82-5********8",
  "InstanceJobId": "CreateWorkspaceCustomRole-role-***abc*******"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.

阿里云首页 人工智能平台 PAI 相关技术圈