Deletes an SMB user from a gateway.
When you call the operation, take note of the following information:
Make sure that the specified gateway exists. If the gateway does not exist, you can create one by calling 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
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 gateway ID. |
Username | String | Yes | username | The name of the SMB user. The username must be 1 to 32 characters in length and can contain letters, digits, hyphens (-), and underscores (_). |
Response parameters
Parameter | Type | Example | Description |
TaskId | String | t-000c6hshwukkcfn3k** | The task ID. |
Message | String | successful | The description of the request result. |
RequestId | String | 89398CFB-4EB6-4C7E-BB3C-EF213AC8FA50 | The request ID. |
Code | String | 200 | The returned HTTP status code. A value of 200 indicates that the request was successful. |
Success | Boolean | true | Indicates whether the request was successful. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DeleteGatewaySMBUser
&GatewayId=gw-000c6hshwukkbrypj***
&Username=username
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteGatewaySMBUserResponse>
<TaskId>t-000c6hshwukkcfn3k**</TaskId>
<Message>successful</Message>
<RequestId>89398CFB-4EB6-4C7E-BB3C-EF213AC8FA50</RequestId>
<Code>200</Code>
<Success>true</Success>
</DeleteGatewaySMBUserResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TaskId" : "t-000c6hshwukkcfn3k**",
"Message" : "successful",
"RequestId" : "89398CFB-4EB6-4C7E-BB3C-EF213AC8FA50",
"Code" : "200",
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
400 | EmptySMBUserName | You must enter a valid SMB username. | The name of the SMB user is not specified. |
400 | GatewayNotExist | The specified gateway does not exist. You must specify a valid parameter. | The specified gateway does not exist. Check whether the intended gateway is specified. |
400 | GatewayInUpgrading | The gateway is upgrading. Try again later. | The gateway is being upgraded. Try again later. |
400 | GatewayInOperation | The gateway is processing requests . Try again later. | The gateway is processing other requests. Try again later. |
400 | GatewayStatusRunningRequired | The gateway is not in the Running state. Try again later. | The gateway is not in the Running state. Try again later. |
400 | InvalidSMBUserName | You must enter a valid SMB username. | 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. | An SMB user cannot be deleted from a gateway for which AD or LDAP is configured. You need to delete the SMB user on the AD or LDAP server. |
500 | InternalError | Unexpected error. Try again later. If the error persists after several tries, we recommend that you submit a ticket. | An internal error occurred. Try again later. If the problem persists, submit a ticket. |
For a list of error codes, see Service error codes.