Adds a workspace administrator, a workspace member, or a task flow developer in Data Management (DMS).

You must call this operation as a DMS administrator, a database administrator (DBA), or a workspace administrator.

Usage notes:

  • Before you call this operation to add a user as a task flow developer, make sure that you have added the user as a workspace member.
  • You cannot call this operation to transfer the ownership of a task flow. To transfer the ownership of a task flow, call the ChangLhDagOwner operation.
  • For more information about workspace roles and permissions, see Manage permissions on a workspace.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddLhMembers

The operation that you want to perform. Set the value to AddLhMembers.

ObjectType Integer Yes 0

The type of the object. Valid values:

  • 0: workspace
  • 1: task flow
ObjectId Long Yes 1

The ID of the object.

  • If the object is a workspace, you can call the GetLhSpaceByName operation to obtain the workspace ID.
  • If the object is a task flow, you can call the ListLhTaskFlowAndScenario operation to obtain the task flow ID.
Members Array Yes

The information about the users to be added.

UserId Long Yes 15****

The ID of the user to be added. You can call the ListUsers or GetUser operation to obtain the user ID.

Roles Array of String Yes ADMIN

The role. Valid values:

  • ADMIN: workspace administrator. You can add a workspace administrator only as a DMS administrator or a DBA.
  • MEMBER: workspace member.
  • DEVELOPER: task flow developer. Only a workspace member can be added as a task flow developer.
Tid Long No 3000

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID.

RegionId String No cn-hangzhou

The ID of the region in which DMS is activated. For more information, see RegionID parameter.

Response parameters

Parameter Type Example Description
RequestId String 31853A2B-DC9D-5B39-8492-D2AC8BCF550E

The ID of the request.

ErrorCode String 403

The error code returned if the request fails.

ErrorMessage String UnknownError

The error message returned if the request fails.

Success Boolean true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=AddLhMembers
&ObjectType=0
&ObjectId=1
&Members=[{"Roles":["ADMIN"]}]
&Tid=3***
&Common request parameters

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<AddLhMembersResponse>
    <RequestId>31853A2B-DC9D-5B39-8492-D2AC8BCF550E</RequestId>
    <Success>true</Success>
</AddLhMembersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "31853A2B-DC9D-5B39-8492-D2AC8BCF550E",
  "Success" : true
}

Error code

For a list of error codes, visit the Error Center.