Deletes an SMB user from a gateway.

When you call the operation, take note of the following information:

  • Make sure that you have created a gateway. To create a gateway, call the CreateGateway operation.
  • If you configure Active Directory (AD) or Lightweight Directory Access Protocol (LDAP) for the gateway, the API call may fail. In this case, you can delete an SMB user on the AD server or the LDAP server.

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 DeleteGatewaySMBUser

The operation that you want to perform. Set the value to DeleteGatewaySMBUser.

GatewayId String Yes gw-000c6hshwukkbrypj***

The ID of the gateway.

Username String Yes username

The name of the SMB user. The name must be 1 to 32 characters in length and can contain letters, digits, hyphens (-), and underscores (_).

Response parameters

Parameter Type Example Description
Code String 200

The HTTP status code. If the request is successful, 200 is returned.

Message String successful

The description of the status code.

RequestId String 89398CFB-4EB6-4C7E-BB3C-EF213AC8FA50

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

TaskId String t-000c6hshwukkcfn3k**

The ID of the task.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeleteGatewaySMBUser
&GatewayId=gw-000c6hshwukkbrypj***
&Username=username
&<Common request parameters>

Sample success responses

XML format

<DeleteGatewaySMBUserResponse>
      <TaskId>t-000c6hshwukkcfn3k**</TaskId>
      <RequestId>DDB1D7FE-FFDF-4049-9**-AD2C2A590C00</RequestId>
      <Message>successful</Message>
      <Code>200</Code>
      <Success>true</Success>
</DeleteGatewaySMBUserResponse>

JSON format

{
    "TaskId": "t-000c6hshwukkcfn3k**",
    "RequestId": "DDB1D7FE-FFDF-4049-9**-AD2C2A590C00",
    "Message": "successful",
    "Code": 200,
    "Success": true
}

Error codes

HttpCode Error code Error message Description
400 EmptySMBUserName You must enter a valid SMB username. The error message returned because the name of the SMB user is not specified.
400 GatewayNotExist The specified gateway does not exist. You must specify a valid parameter. The error message returned because the specified gateway does not exist. Check whether the parameters are valid.
400 GatewayInUpgrading The gateway is upgrading. Try again later. The error message returned because the gateway is being upgraded. Try again later.
400 GatewayInOperation The gateway is processing requests . Try again later. The error message returned because another operation is in progress. Try again later.
400 GatewayStatusRunningRequired The gateway is not in the Running state. Try again later. The error message returned because the gateway is not in the Running state. Try again later.
500 InternalError Unexpected error. Try again later. If the error persists after several tries, we recommend that you submit a ticket. The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket.
400 InvalidSMBUserName You must enter a valid SMB username. The error message returned because the name of the SMB user is invalid.
400 CouldNotDeleteSMBUser The gateway is already linked with an AD or LDAP service. You cannot delete an SMB user on the gateway. We recommend that you delete an SMB user in the AD or LDAP service. The error message returned because AD or LDAP is configured for the gateway. Delete the gateway on the AD server or the LDAP server.

For a list of error codes, visit the API Error Center.