All Products
Search
Document Center

Cloud Storage Gateway:DeleteGateway

Last Updated:Jun 24, 2025

Deletes a pay-as-you-go gateway from its cluster.

Operation description

Usage notes

Take note of the following items:

  • You can delete only a pay-as-you-go gateway.
  • You can delete a gateway that is only in the Initialized, Activated, Running, Unknown, Failed, or Stopped state.
  • If you have deleted a gateway using the CSG console, but it still appears in the Resource Management console, this may be due to cached information or synchronization delays. Wait a moment for the system to automatically update the status. If it does not update after an extended period, try refreshing the page or allow the system to synchronize automatically.

Warning Deleting a gateway will interrupt business activities and data synchronization tasks. Exercise caution when performing this action.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
hcs-sgw:DeleteGatewaydelete
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
GatewayIdstringYes

The gateway ID.

gw-0001xv7je3580031y***
ReasonTypestringNo

The type of the reason why you want to delete the gateway. Valid values:

  • REASON1: The gateway fee is too high.
  • REASON2: The gateway is used for testing only and is no longer needed now.
  • REASON3: The gateway feature or performance does not meet the business requirements.
  • REASON4: The new features are highly anticipated.
REASON2
ReasonDetailstringNo

The detailed reason why you want to delete the gateway.

""

Response parameters

ParameterTypeDescriptionExample
object
TaskIdstring

The task ID.

t-0000iwdggbhaordhk***
Messagestring

The returned message.

successful
RequestIdstring

The request ID.

151BB31D-571D-4BB9-9A02-D4210E5BF5DB
Codestring

The status code. The status code 200 indicates that the request was successful.

200
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "TaskId": "t-0000iwdggbhaordhk***",
  "Message": "successful",
  "RequestId": "151BB31D-571D-4BB9-9A02-D4210E5BF5DB",
  "Code": 200,
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
400EmptyGatewayIdYou must enter a valid ID for the gateway.You must enter a valid ID for the gateway.
400GatewayNotExistThe specified gateway does not exist. You must specify a valid parameter.The specified gateway does not exist. You must specify a valid parameter.
400GatewayOperationNotAllowedYou cannot perform the operation when the gateway is in the current state.You cannot perform the operation when the gateway is in the current state.
400GatewayInOperationThe gateway is processing requests . Try again later.The gateway is busy. Try again later.
400BadRequestInvalid request. You must specify valid parameters in the request. Invalid request. You must specify valid parameters in the request. 
400GatewayNotEmptyThere are file shares or block volumes still under the gateway, please delete them first and then delete the gateway.There are file shares or block volumes still under the gateway, please delete them first and then delete the gateway.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history