Skip to content

Latest commit

 

History

History
540 lines (381 loc) · 13.8 KB

ServerGroupApi.md

File metadata and controls

540 lines (381 loc) · 13.8 KB

ServerGroupApi

All URIs are relative to http://127.0.0.1:18776/api/v1/module

Method HTTP request Description
addServerGroup POST /server-group add server-group
addServerGroupInUpstream POST /upstream/{ups}/server-group add server-group into upstream
describeServerGroup GET /server-group/{sg}/detail get detailed info of one server-group
describeServerGroupInUpstream GET /upstream/{ups}/server-group/{sg}/detail get detailed info of one server-group in upstream
getServerGroup GET /server-group/{sg} get server-group
getServerGroupInUpstream GET /upstream/{ups}/server-group/{sg} get server-group in upstream
listServerGroup GET /server-group retrieve server-group list
listServerGroupInUpstream GET /upstream/{ups}/server-group retrieve server-group list from upstream
removeServerGroup DELETE /server-group/{sg} remove server-group
removeServerGroupInUpstream DELETE /upstream/{ups}/server-group/{sg} remove server-group from upstream
updateServerGroup PUT /server-group/{sg} update server-group
updateServerGroupInUpstream PUT /upstream/{ups}/server-group/{sg} update server-group in upstream

addServerGroup

addServerGroup(body)

add server-group

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
ServerGroupCreate body = new ServerGroupCreate(); // ServerGroupCreate | 
try {
    apiInstance.addServerGroup(body);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#addServerGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ServerGroupCreate

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

addServerGroupInUpstream

addServerGroupInUpstream(ups, body)

add server-group into upstream

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String ups = "ups_example"; // String | name of the upstream
ServerGroupInUpstreamCreate body = new ServerGroupInUpstreamCreate(); // ServerGroupInUpstreamCreate | 
try {
    apiInstance.addServerGroupInUpstream(ups, body);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#addServerGroupInUpstream");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
ups String name of the upstream
body ServerGroupInUpstreamCreate

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

describeServerGroup

ServerGroupDetail describeServerGroup(sg)

get detailed info of one server-group

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String sg = "sg_example"; // String | name of the server-group
try {
    ServerGroupDetail result = apiInstance.describeServerGroup(sg);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#describeServerGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
sg String name of the server-group

Return type

ServerGroupDetail

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

describeServerGroupInUpstream

ServerGroupInUpstreamDetail describeServerGroupInUpstream(ups, sg)

get detailed info of one server-group in upstream

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String ups = "ups_example"; // String | name of the upstream
String sg = "sg_example"; // String | name of the server-group
try {
    ServerGroupInUpstreamDetail result = apiInstance.describeServerGroupInUpstream(ups, sg);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#describeServerGroupInUpstream");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
ups String name of the upstream
sg String name of the server-group

Return type

ServerGroupInUpstreamDetail

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getServerGroup

ServerGroup getServerGroup(sg)

get server-group

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String sg = "sg_example"; // String | name of the server-group
try {
    ServerGroup result = apiInstance.getServerGroup(sg);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#getServerGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
sg String name of the server-group

Return type

ServerGroup

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getServerGroupInUpstream

ServerGroupInUpstream getServerGroupInUpstream(ups, sg)

get server-group in upstream

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String ups = "ups_example"; // String | name of the upstream
String sg = "sg_example"; // String | name of the server-group
try {
    ServerGroupInUpstream result = apiInstance.getServerGroupInUpstream(ups, sg);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#getServerGroupInUpstream");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
ups String name of the upstream
sg String name of the server-group

Return type

ServerGroupInUpstream

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listServerGroup

List<ServerGroup> listServerGroup()

retrieve server-group list

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
try {
    List<ServerGroup> result = apiInstance.listServerGroup();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#listServerGroup");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<ServerGroup>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listServerGroupInUpstream

List<ServerGroupInUpstream> listServerGroupInUpstream(ups)

retrieve server-group list from upstream

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String ups = "ups_example"; // String | name of the upstream
try {
    List<ServerGroupInUpstream> result = apiInstance.listServerGroupInUpstream(ups);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#listServerGroupInUpstream");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
ups String name of the upstream

Return type

List<ServerGroupInUpstream>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

removeServerGroup

removeServerGroup(sg)

remove server-group

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String sg = "sg_example"; // String | name of the server-group
try {
    apiInstance.removeServerGroup(sg);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#removeServerGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
sg String name of the server-group

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

removeServerGroupInUpstream

removeServerGroupInUpstream(ups, sg)

remove server-group from upstream

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String ups = "ups_example"; // String | name of the upstream
String sg = "sg_example"; // String | name of the server-group
try {
    apiInstance.removeServerGroupInUpstream(ups, sg);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#removeServerGroupInUpstream");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
ups String name of the upstream
sg String name of the server-group

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

updateServerGroup

updateServerGroup(sg, body)

update server-group

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String sg = "sg_example"; // String | name of the server-group
ServerGroupUpdate body = new ServerGroupUpdate(); // ServerGroupUpdate | 
try {
    apiInstance.updateServerGroup(sg, body);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#updateServerGroup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
sg String name of the server-group
body ServerGroupUpdate

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateServerGroupInUpstream

updateServerGroupInUpstream(ups, sg, body)

update server-group in upstream

Example

// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerGroupApi;


ServerGroupApi apiInstance = new ServerGroupApi();
String ups = "ups_example"; // String | name of the upstream
String sg = "sg_example"; // String | name of the server-group
ServerGroupInUpstreamUpdate body = new ServerGroupInUpstreamUpdate(); // ServerGroupInUpstreamUpdate | 
try {
    apiInstance.updateServerGroupInUpstream(ups, sg, body);
} catch (ApiException e) {
    System.err.println("Exception when calling ServerGroupApi#updateServerGroupInUpstream");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
ups String name of the upstream
sg String name of the server-group
body ServerGroupInUpstreamUpdate

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json