Creates a sharing rule for a data source to share it with other workspaces or RAM users.
Operation description
-
This operation is available for all DataWorks editions.
-
To share a data source from Workspace A to Workspace B, you must have the data source sharing permissions in both workspaces. You must have one of the following roles in DataWorks:
-
Tenant Owner, Tenant Administrator, Workspace Administrator, and Workspace Owner
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:CreateDataSourceSharedRule |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DataSourceId |
integer |
Yes |
The data source ID. |
144544 |
| TargetProjectId |
integer |
Yes |
The ID of the workspace to which you want to share the data source. You cannot share the data source to the workspace with which the data source is associated. |
106560 |
| SharedUser |
string |
No |
The user with which you want to share the data source. If you do not configure this parameter, the data source is shared to an entire workspace. |
1107550004253538 |
| EnvType |
string |
Yes |
The environment of the target workspace to which the data source is shared. Valid values:
|
Dev |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. You can use this ID to locate logs and troubleshoot issues. |
46F594E6-84AB-5FA5-8144-6F3D149961E1 |
| Id |
integer |
The sharing rule ID. |
105412 |
Examples
Success response
JSON format
{
"RequestId": "46F594E6-84AB-5FA5-8144-6F3D149961E1",
"Id": 105412
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.