Update Entry Whitelist - UpdatePathXWhitelist
Overview
Update the entry whitelist, only for GlobalSSH instances. It does not take effect for other uga- instances.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is UpdatePathXWhitelist . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID, such as org-xxxx. Please refer to GetProjectList interface | Yes |
InstanceId | string | GlobalSSH Instance ID, unique resource identifier | Yes |
Whitelist.N | string | Whitelist rules, for example “Whitelist.0”: “192.168.1.1/24|tcp|22”, “Whitelist.1”: “192.168.1.2|tcp|8080:8090”, the first parameter is the IP or IP range, the second parameter represents the protocol (tcp/udp), the third parameter represents the port number or port range (separated by ’:’); multiple rules can be added (increment the n value in the Whitelist.n field); this interface needs to list all rules, for example, if not filled in, it means to clear the whitelist rules, if you need to add incrementally, use the InsertPathXWhitelist interface, globalssh does not have a port range: the port is set to the acceleration port, the protocol is set to tcp:ip|tcp|acceleration port”. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Example
Request Example
https://api.dezai.com/?Action=UpdatePathXWhitelist
&ProjectId=org-xxx
&InstanceId=uga-xxxx
&Whitelist.0=1.1.1.1|tcp|22
&Whitelist.1=192.168.1.1/24|tcp|22
&Whitelist.2=2.2.2.2|tcp|22
Response Example
{
"Action": "UpdatePathXWhitelistResponse",
"Message": "",
"RetCode": 0
}