The SLB SNAT settings are used to configure Source Network Address Translation (SNAT) rule for the virtual service. For a virtual service working in transparent mode and configured with an SNAT rule, if the source IP address of the client request belongs to the IP network segment defined in the SNAT rule, the client request will be forwarded through the reverse proxy mode; otherwise, the client request will be forwarded through the transparent mode. A maximum of 10 SNAT rules can be configured for one virtual service.
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| default | vs_name | asso | |
| default | ip | ipaddr | |
| default | mask_prefix | UnionField |
{
"SLBSNAT": {
"meta": {
"abstract": false,
"verbose_name": SLB SNAT,
},
"fieldgroups": [
{
"fields": [
{
"verbose_name": field_verbose_name1,
"field_name": field_name1
},
...
],
"group_name": field_group_name1
},
...
]
}
}
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| vs_name | asso | ||||||||||
| ip | ipaddr (Nested Field. It should be a dict.)
|
||||||||||
| mask_prefix | UnionField (Nested Field. It should be a dict.)
|
{
"SLBSNAT": {
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
}
}
{
"SLBSNAT": [
{
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
},
...
]
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
| field_group_name | URI | (optional) Target field group name to query. Available names are: default, Notice: There could only be one field_group_name or field_name in the URL. And if both field_group_name and field_name are not specified, will try to query default field_group data. |
| field_name | URI | (optional) Target field name to query. Available names are: vs_name, ip, mask_prefix, Notice: There could only be one field_group_name or field_name in the URL. |
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| default | vs_name | asso | |
| default | ip | ipaddr | |
| default | mask_prefix | UnionField |
{
"SLBSNAT": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field_group name is provided:
{
"SLBSNAT": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field name is provided:
{
"SLBSNAT": {
"instance_id":<instance_id>,
<field>:<value>,
}
}
{
"msg": <success-or-error-msg>
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
{
"SLBSNAT": {
"instance_id":<instance_id>,
"vs_name":<value>
}
}