Configures the owner of an instance, a database, or a table.

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 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:

  • INSTANCE: the ID of an instance. You can call the ListInstances operation to query the ID of the instance.
  • DATABASE: the ID of a physical database. You can call the ListDatabases operation to query the ID of the physical database.
  • LOGIC_DATABASE: the ID of a logical database. You can call the ListLogicDatabases operation to query the ID of the logical database.
  • TABLE: the ID of a physical table. You can call the ListTables operation to query the ID of the physical table.
  • LOGIC_DATABASE: the ID of a logical table. You can call the ListLogicTables operation to query the ID of the logical table.
OwnerType String Yes INSTANCE

The type of the owner. Valid values:

  • INSTANCE: an owner of an instance.
  • DATABASE: an owner of a physical database.
  • LOGIC_DATABASE: an owner of a logical database.
  • TABLE: an owner of a physical table.
  • LOGIC_TABLE: an owner of a logical table.
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:

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

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.