The mgwutil list-address command lists the data address configurations for the data migration service. The results are sorted in reverse chronological order by creation time. This command also supports paged queries that use the marker and count parameters.
Command format
mgwutil list-address [--marker <value>] [--count <value>] [--text] [--json]Parameters
Parameter | Required | Description |
--marker | No | The start marker for a paged query. This value comes from the |
--count | No | The maximum number of records to return in a single request. |
--text | No | Returns the response in plain text format. If you omit this parameter, the response defaults to plain text format. |
--json | No | Returns the response in JSON format. |
Examples
List data addresses
By default, the command lists all data addresses in plain text format and in reverse chronological order from newest to oldest.
You can include the --text parameter.
mgwutil list-address --textYou can omit any parameters.
mgwutil list-address
Successful response
CreateTime Name Version Status AddressType DataType AgentList
2025-05-20 18:24:09 test_***_src_all__***__ossinv_oss_sa 66134809-_***_-42e5-_***_-573f4393cfe3 available ossinv ossinv
2025-05-20 18:23:09 test__***__src_all__***__ossinv_oss_da f71d0e8e-_***_-4eae-_***_-9fa3b78de25e available oss oss
2025-05-20 18:22:09 test__***__src_big__***__ossinv_oss_da 0ee700b5-_***_-4ada-_***_-fd3364c6937b available oss oss
2025-05-20 18:21:09 test__***__src_big__***__ossinv_oss_sa e1f4cbac-_***_-4102-_***_-a318433f559d available ossinv ossinv You can use the --json parameter to list all data addresses in JSON format and in reverse chronological order from newest to oldest.
mgwutil list-address --jsonSuccessful response
{
"Code": "success",
"StatusCode": 200,
"Data": [
{
"CreateTime": "2026-01-21 12:01:41",
"Name": "****-test-dest-retry-20260121-114234-retry-20260121-120141",
"Version": "80b4266a-****-4a03-****-b7fb23a387bb",
"Status": "available",
"AddressType": "ossinv",
"DataType": "",
"AgentList": ""
},
{
"CreateTime": "2026-01-21 11:42:34",
"Name": "****-test-dest-retry-20260121-114234",
"Version": "571377a9-****-44c4-****-e7fd550bc064",
"Status": "available",
"AddressType": "ossinv",
"DataType": "",
"AgentList": ""
}
],
"LogTime": "2026-01-21 18:28:55"
}Query data addresses by page
If the total number of data addresses exceeds the page size, you can use the --marker and --count parameters to perform a paged query.
You can include the --text parameter.
mgwutil list-address --marker "" --count 2 --textBy default, there are no parameters.
mgwutil list-address --marker "" --count 2Successful response
CreateTime Name Version Status AddressType DataType AgentList
2025-09-26 10:19:29 common-inv-***-oss-src 6b12b7b7-***-43c8-***-617984521e1a available inv oss
2025-08-15 14:21:26 agent2-test-***-low f15ec331-***-47b4-***-5dd7e754ee5b available oss You can include the --json parameter.
mgwutil list-tunnel --marker "" --count 2 --jsonSuccessful response
{
"Code": "success",
"StatusCode": 200,
"Data": {
"ImportTunnel": [
{
"CreateTime": "2025-09-26 10:19:29",
"Name": "common-inv-****-oss-src",
"Version": "6b12b7b7-****-43c8-****-617984521e1a",
"Status": "available",
"AddressType": "inv",
"DataType": "oss",
"AgentList": ""
},
{
"CreateTime": "2025-08-15 14:21:26",
"Name": "agent2-test-****-low",
"Version": "f15ec331-****-47b4-****-5dd7e754ee5b",
"Status": "available",
"AddressType": "oss",
"DataType": "",
"AgentList": ""
}
],
"NextMarker": "common-inv-***-oss-src",
"Truncated": true
},
"LogTime": "2026-01-21 19:04:22"
}
Failed response
{
"Code": "fail",
"StatusCode": 400,
"LogTime": "2026-01-18 22:43:08",
"ErrorMsg": "SDKError: StatusCode: 400 Code: InvalidArgument Message: count is less than 0 or exceed maximum Data: {'AccessDeniedDetail':null,'Recommend':null,'ecCode':null,'hostId':'1147096387694355.cn-hangzhou.mgw.aliyuncs.com','requestId':'696CF17C936706343068128C','statusCode':400} ",
"ErrorCode": "InvalidArgument",
"RequestId": "696CF17C936706343068128C"
}Error codes
An error code indicates the category of an error. For more information, see the error message (ErrorMsg).
This error code is one of the generic error codes.
ErrorCode | Description |
InvalidArgument | The parameter name is invalid or the parameter value is not valid. |