Configures the owner of an instance, a database, or a table.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | SetOwners |
The operation that you want to perform. Set the value to SetOwners. |
| Tid | Long | Yes | 3*** |
The ID of the tenant. Note To view the ID of the tenant, move the pointer over the profile picture in the upper-right
corner of the Data Management (DMS) console. For more information, see the "View information
about the current tenant" section of the Manage DMS tenants topic.
|
| ResourceId | String | Yes | 174**** |
The ID of the resource. The ID of the resource varies with the owner type. The owner types and resource IDs have the following mappings:
|
| OwnerType | String | Yes | INSTANCE |
The type of the owner. Valid values:
|
| OwnerIds | String | Yes | 51**** |
The ID of the user whom you want to specify as an owner. Separate multiple IDs with commas (,). You can call the GetUser or ListUsers operation to query the ID of the user. Note The value of the OwnerIds parameter is that of the UserId parameter.
|
| RegionId | String | No | cn-hangzhou |
The ID of the region in which DMS is activated. For more information about the valid values of this parameter, see RegionID parameter. Note Set this parameter to the ID of the region that is in proximity to your applications.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | A99CD576-1E18-4E86-931E-C3CCE56DC030 |
The ID of the request. |
| ErrorCode | String | UnknownError |
The error code. |
| ErrorMessage | String | UnknownError |
The error message. |
| Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=SetOwners
&Tid=-1
&ResourceId=123
&OwnerType=DATABASE
&OwnerIds=123, 456
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<SetOwnersResponse>
<RequestId>A99CD576-1E18-4E86-931E-C3CCE56DC030</RequestId>
<Success>true</Success>
</SetOwnersResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "A99CD576-1E18-4E86-931E-C3CCE56DC030",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.