The mgwutil delete-address command deletes a data address by specifying its name. It supports interactive confirmation and a force-delete option.
Deletion is irreversible. Confirm carefully before deleting.
Command format
mgwutil delete-address <address-name> [--force]Parameter description
Parameter | Required | Description |
address-name | Yes | Name of the data address to delete. |
--force | No | Force deletion without interactive confirmation. Disabled by default. |
Examples
Interactive mode
Run the delete command and confirm when prompted. This is the default safe mode to prevent accidental deletion.
mgwutil delete-address mgwutil_address-12After you enter the command, a prompt appears on the screen to confirm the deletion.
please confirm if you want to delete address: (y/n) Enter
nand press Enter to cancel the operation. The system returnscancel the delete address operation.Enter
yand press Enter to confirm deletion.
Force delete (non-interactive)
Force delete the specified data address without prompts.
Use the following command to force delete a data address. This action is irreversible. Proceed with caution.
mgwutil delete-address mgwutil_address-12 --forceResponse
Success response
{
"Code": "success" ,
"StatusCode": 204,
"LogTime": "2025-12-25 17:51:37",
"Data": {}
}Failure response
{
"Code": "fail",
"StatusCode": 400,
"LogTime": "2026-01-18 22:46:21",
"ErrorMsg": "please input y or n",
"ErrorCode": "InvalidInput",
"RequestId": ""
}Error codes
Error codes indicate error categories. For details, see the error message (ErrorMsg).
These error codes include common error codes.
ErrorCode | Description |
CancelOperation | Delete operation canceled. |
InvalidInput | Invalid confirmation input. Enter 'y' to confirm or 'n' to cancel. |