VLB Service API (1.0.0)

Download OpenAPI specification:Download

API documentation for VLB Service

Load Balancer Pools

API for managing Load Balancer Pools

Get a specific pool

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

poolId
required
string

The listener id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/pools/%7BpoolId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update a pool

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

poolId
required
string

The pool id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
algorithm
required
string^(ROUND_ROBIN|LEAST_CONNECTIONS|SOURCE_IP)$
Enum: "ROUND_ROBIN" "LEAST_CONNECTIONS" "SOURCE_IP"

Algorithm of the pool. The algorithm can be "ROUND_ROBIN" or "LEAST_CONNECTIONS" or "SOURCE_IP"

stickiness
boolean

Enable sticky sessions.

tlsEncryption
boolean

Enable TLS Encryption.

object (UpdateHMonitorRequest)

Request body for updating a Health Monitor in a pool

Responses

Request samples

Content type
application/json
{
  • "algorithm": "ROUND_ROBIN",
  • "stickiness": true,
  • "tlsEncryption": true,
  • "healthMonitor": {
    }
}

Delete a pool

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

poolId
required
string

The pool id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/pools/%7BpoolId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get members from a pool

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

poolId
required
string

pool id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/pools/%7BpoolId%7D/members',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Change list members

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

poolId
required
string

The pool id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
required
Array of objects (MemberRequest)

List of members of the pool.

Responses

Request samples

Content type
application/json
{
  • "members": [
    ]
}

Get list of pools

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/pools',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create a new pool

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
poolName
required
string^[a-zA-Z0-9_\-.]{5,50}$

Name of the pool. Only letters (a-z, A-Z, 0-9, '_', '-') are allowed and must be between 5 and 50 characters.

poolProtocol
required
string
Enum: "HTTP" "TCP" "UDP" "PROXY"

Protocol of the pool.

algorithm
required
string^(ROUND_ROBIN|LEAST_CONNECTIONS|SOURCE_IP)$
Enum: "ROUND_ROBIN" "LEAST_CONNECTIONS" "SOURCE_IP"

Algorithm of the pool. The algorithm can be ROUND_ROBIN, LEAST_CONNECTIONS, or SOURCE_IP.

stickiness
boolean

Enable sticky sessions.

tlsEncryption
boolean

Enable TLS Encryption.

required
object (CreateHMonitorRequest)

Request body for creating a Health Monitor in Load Balancer pool

Array of objects (MemberRequest)

List of members of the pool.

Responses

Request samples

Content type
application/json
{
  • "poolName": "pool_01",
  • "poolProtocol": "HTTP",
  • "algorithm": "ROUND_ROBIN",
  • "stickiness": true,
  • "tlsEncryption": true,
  • "healthMonitor": {
    },
  • "members": [
    ]
}

Get the health monitor associated with a specific pool

path Parameters
projectId
required
string

The project id

poolId
required
string

pool id

loadBalancerId
required
string

The Load Balancer id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/pools/%7BpoolId%7D/healthMonitor',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Load Balancer Listeners

API for managing Load Balancer Listeners

Get a specific listener

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

listenerId
required
string

The listener id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/listeners/%7BlistenerId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update a listener

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

listenerId
required
string

The listener id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
defaultPoolId
string

Id of the pool that this listener will forward to.

timeoutClient
required
integer <int32>

Idle timeout of client. The value can be in range from 1 to 3600 seconds

timeoutMember
required
integer <int32>

Idle timeout of member. The value can be in range from 1 to 3600 seconds

timeoutConnection
required
integer <int32>

Idle timeout of connection. The value can be in range from 1 to 3600 seconds

allowedCidrs
required
string

Allowed cidr.

certificateAuthorities
Array of strings

List of Certificates

defaultCertificateAuthority
string

Default Certificate.

clientCertificate
string

The TLS client authentication mode

Array of objects (Header)

List of headers to insert. Each header object must include a 'headerName' and a 'headerValue'.

alpnProtocols
Array of strings
Items Enum: "http/1.1" "http/1.0" "h2"

List of ALPN protocols supported by this listener. ALPN allows negotiation of protocols like HTTP/1.1 or H2 over secure connections.

tlsSecurityPolicy
string^(COMPATIBLE|MODERN|STRICT)$
Enum: "COMPATIBLE" "MODERN" "STRICT"

TLS security policy for the listener. It can be one of the predefined policies.

Responses

Request samples

Content type
application/json
{
  • "defaultPoolId": "pool-1a007f28-bafa-450f-963b-3d177730c3b8",
  • "timeoutClient": 50,
  • "timeoutMember": 50,
  • "timeoutConnection": 5,
  • "allowedCidrs": "0.0.0.0/0",
  • "certificateAuthorities": [
    ],
  • "defaultCertificateAuthority": "secret-4ea86b49-9427-4b14-b080-8ac88a1f5efe",
  • "clientCertificate": "secret-4ea86b49-9427-4b14-b080-8ac88a1f5efe",
  • "insertHeaders": [
    ],
  • "alpnProtocols": [
    ],
  • "tlsSecurityPolicy": "COMPATIBLE"
}

Delete a listener

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

listenerId
required
string

The listener id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/listeners/%7BlistenerId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Reorder the L7 policies

path Parameters
loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

listenerId
required
string

The listener id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
required
Array of objects (ReorderPolicyRequest)

List of policies to reorder, start from 1 to ...

Responses

Request samples

Content type
application/json
{
  • "policies": [
    ]
}

Update a policy

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

listenerId
required
string

The listener id

policyId
required
string

The policy id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
redirectPoolId
string

Pool for forwarding.

redirectUrl
string^(?=.{1,100}$)(https?|ftp|file)://[-a-zA-Z0-9...

URL for forwarding.

action
required
string
Enum: "REDIRECT_TO_POOL" "REDIRECT_TO_URL"

Action. This indicates how the listener will route traffic.

redirectHttpCode
integer <int32>
Enum: 301 302

Redirect HTTP code for redirecting to other URL.

keepQueryString
boolean

Keep the query string or not.

Array of objects (L7RuleRequest)

List of rules of the policy.

Responses

Request samples

Content type
application/json
{
  • "redirectPoolId": "pool-1a007f28-bafa-450f-963b-3d177730c3b8",
  • "redirectUrl": "https://www.example.com",
  • "action": "REDIRECT_TO_URL",
  • "redirectHttpCode": 302,
  • "keepQueryString": false,
  • "rules": [
    ]
}

Delete a policy

path Parameters
projectId
required
string

project id

loadBalancerId
required
string

The Load Balancer id

listenerId
required
string

listener id

policyId
required
string

policy id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/listeners/%7BlistenerId%7D/l7policies/%7BpolicyId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get list of listeners

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/listeners',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create a listener

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
listenerName
required
string^[a-zA-Z0-9_\-.]{5,50}$

Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '-') are allowed and must be between 5 and 50 characters.

defaultPoolId
string

Id of the pool that this listener will forward to.

listenerProtocolPort
required
integer <int32>

Port of the listener.

listenerProtocol
required
string
Enum: "HTTP" "HTTPS" "TCP" "UDP"

Protocol of the listener.

timeoutClient
required
integer <int32>

Idle timeout of client in seconds. Must be in range 1–3600.

timeoutMember
required
integer <int32>

Idle timeout of member in seconds. Must be in range 1–3600.

timeoutConnection
required
integer <int32>

Idle timeout of connection in seconds. Must be in range 1–3600.

allowedCidrs
required
string

Allowed CIDR.

certificateAuthorities
Array of strings

List of Certificates.

defaultCertificateAuthority
string

Default Certificate used by the listener.

clientCertificate
string

TLS client authentication mode.

Array of objects (Header)

List of headers to insert. Each object must include a 'headerName' and 'headerValue'.

alpnProtocols
Array of strings
Items Enum: "http/1.1" "http/1.0" "h2"

List of ALPN protocols supported. ALPN allows negotiation of protocols like HTTP/1.1 or H2 over secure connections.

tlsSecurityPolicy
string^(COMPATIBLE|MODERN|STRICT)$
Enum: "COMPATIBLE" "MODERN" "STRICT"

TLS security policy for the listener.

Responses

Request samples

Content type
application/json
{
  • "listenerName": "listener_02",
  • "defaultPoolId": "pool-1a007f28-bafa-450f-963b-3d177730c3b8",
  • "listenerProtocolPort": 80,
  • "listenerProtocol": "HTTP",
  • "timeoutClient": 50,
  • "timeoutMember": 50,
  • "timeoutConnection": 5,
  • "allowedCidrs": "0.0.0.0/0",
  • "certificateAuthorities": [
    ],
  • "defaultCertificateAuthority": "secret-4ea86b49-9427-4b14-b080-8ac88a1f5efe",
  • "clientCertificate": "secret-4ea86b49-9427-4b14-b080-8ac88a1f5efe",
  • "insertHeaders": [
    ],
  • "alpnProtocols": [
    ],
  • "tlsSecurityPolicy": "COMPATIBLE"
}

Get list of policies

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

listenerId
required
string

The listener id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/listeners/%7BlistenerId%7D/l7policies',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create a l7 policy

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

listenerId
required
string

The listener id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
name
required
string^[a-zA-Z0-9_\-.]{5,50}$

Policy name. Only letters (a-z, A-Z, 0-9, '_', '-') are allowed and must be between 5 and 50 characters.

redirectPoolId
string

Pool for forwarding.

redirectUrl
string^(?=.{1,100}$)(https?|ftp|file)://[-a-zA-Z0-9...

URL for forwarding.

action
required
string
Enum: "REDIRECT_TO_POOL" "REDIRECT_TO_URL"

Action. This indicates how the listener will route traffic. The value can be REDIRECT_TO_POOL or REDIRECT_TO_URL.

redirectHttpCode
integer <int32>
Enum: 301 302

Redirect HTTP code for redirecting to other URL.

keepQueryString
boolean

Keep the query string or not.

Array of objects (L7RuleRequest)

List of rules of the policy.

Responses

Request samples

Content type
application/json
{
  • "name": "l7policy_1",
  • "redirectPoolId": "pool-1a007f28-bafa-450f-963b-3d177730c3b8",
  • "redirectUrl": "https://www.example.com",
  • "action": "REDIRECT_TO_URL",
  • "redirectHttpCode": 301,
  • "keepQueryString": true,
  • "rules": [
    ]
}

Get a specific l7 policy

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

listenerId
required
string

The listener id

l7PolicyId
required
string

The l7Policy id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/listeners/%7BlistenerId%7D/l7policies/%7Bl7PolicyId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Load Balancers

API for managing Load Balancers

Update the number of Load Balancers in an AutoScale group

path Parameters
projectId
required
string

Project ID

loadBalancerId
required
string

AutoScale LoadBalancer ID

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
minSize
required
integer <int32>

Minimum number of instances allowed for the load balancer group. Must be a positive integer less than the maxSize.

maxSize
required
integer <int32>

Maximum number of instances allowed for the load balancer group.

Responses

Request samples

Content type
application/json
{
  • "minSize": 1,
  • "maxSize": 5
}

Resize a load balancer

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
packageId
required
string

Package ID

Responses

Request samples

Content type
application/json
{
  • "packageId": "package-1a007f28-bafa-450f-963b-3d177730c3b8"
}

List LoadBalancers Paging

path Parameters
projectId
required
string

project id

query Parameters
required
object
required
object
header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers',
  qs: {filter: 'SOME_OBJECT_VALUE', pageRequest: 'SOME_OBJECT_VALUE'},
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create a new load balancer

path Parameters
projectId
required
string

The project id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
Array of objects (TagRequest)

Tags of resource

zoneId
string

Id of zone

name
required
string^[a-zA-Z0-9_\-.]{5,50}$

Load balancer's name. Only letters (a-z, A-Z, 0-9, '_','-', '.') are allowed and your input data must be between 5 and 50 characters.

packageId
required
string

Package ID of the load balancer.

scheme
required
string
Enum: "Internet" "Internal"

Scheme of the load balancer. Can be Internet or Internal.

subnetId
required
string

Subnet ID for the load balancer.

type
required
string
Enum: "Layer 4" "Layer 7"

Type of the load balancer. It may be Layer 4 or Layer 7

object (LbListener)

Listener configuration for the load balancer

object (LbPool)

Pool configuration for the load balancer

autoScalable
boolean

Enable autoscale mode. Default is false.

Responses

Request samples

Content type
application/json
{
  • "tags": [
    ],
  • "zoneId": "HCM03-1A",
  • "name": "loadbalancer_01",
  • "packageId": "f8e62cf2-d84c-11e9-8a34-2a2ae2dbcce4",
  • "scheme": "Internet",
  • "subnetId": "sub-375e0685-f828-40bc-b8e9-53271fd7860d",
  • "type": "Layer 7",
  • "listener": {
    },
  • "pool": {
    },
  • "autoScalable": true
}

Clone a load balancer from existed load balancer

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
name
required
string^[a-zA-Z0-9_\-.]{5,50}$

Load balancer's name. Only letters (a-z, A-Z, 0-9, '_','-', '.') are allowed and your input data must be between 5 and 50 characters.

packageId
required
string

Package ID of the load balancer.

Array of objects (Certificates)

List of certificate changing

Responses

Request samples

Content type
application/json
{
  • "name": "loadbalancer_01",
  • "packageId": "f8e62cf2-d84c-11e9-8a34-2a2ae2dbcce4",
  • "certificates": [
    ]
}

Get Load Balancer by ID

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete a load balancer

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Load Balancer Metadata for Clone

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The load balancer id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/cloneMetadata',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get LoadBalancer By Subnet Id

path Parameters
projectId
required
string

the project id

subnetId
required
string

subnetId

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/subnet/%7BsubnetId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get list packages Active

path Parameters
projectId
required
string

The project id

query Parameters
zoneId
string
Default: "HCM03-1A"
header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/packages',
  qs: {zoneId: 'SOME_STRING_VALUE'},
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get list headers

path Parameters
projectId
required
string

project id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/headers',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get All list packages

path Parameters
projectId
required
string

The project id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/all_packages',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Certificates

API for managing Certificates

List Certificates with Paging

path Parameters
projectId
required
string

Project ID

query Parameters
name
string
page
integer <int32>
Default: 1
size
integer <int32>
Default: 10
header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/cas',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Import Certificate

path Parameters
projectId
required
string

Project ID

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
name
required
string^[a-zA-Z0-9.-]{5,50}$

Name of the CA

certificate
string

Certificate of the CA

privateKey
string

Private key of the CA

certificateChain
string

A certificate chain is an ordered list of certificates, containing an SSL/TLS Certificate and (CA) Certificates, that enable the receiver to verify that the sender and all CA's are trustworthy.

passphrase
string

The password of the private key.

type
required
string
Enum: "CA" "TLS/SSL"

Type of the certificate (CA or TLS/SSL)

Responses

Request samples

Content type
application/json
{
  • "name": "ca_01",
  • "certificate": "string",
  • "privateKey": "string",
  • "certificateChain": "string",
  • "passphrase": "string",
  • "type": "TLS/SSL"
}

Get Certificate

path Parameters
projectId
required
string

Project ID

caId
required
string

Certificate ID

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/cas/%7BcaId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Certificate

path Parameters
projectId
required
string

Project ID

caId
required
string

Certificate ID

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/cas/%7BcaId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Load Balancer Scale History

API for managing Load Balancer Scale History

List scale history of a Load Balancer

path Parameters
projectId
required
string

The project id

loadBalancerId
required
string

The Load Balancer id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/loadBalancers/%7BloadBalancerId%7D/scale-history',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Tagging

API for managing Tagging

List tag by Resource Id

path Parameters
projectId
required
string

The project id

resourceId
required
string

The resource id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/tag/resource/%7BresourceId%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update tag

path Parameters
projectId
required
string

The project id

resourceId
required
string

The resource id

header Parameters
portal-user-id
required
integer <int32>
Request Body schema: application/json
Array of objects (TagRequest)

Tags of resource

zoneId
string

Id of zone

resourceId
required
string

Resource Id

resourceType
required
string

Resource Type

Array of objects (TagRequest)

List of tags to update

Responses

Request samples

Content type
application/json
{
  • "tags": [
    ],
  • "zoneId": "HCM03-1A",
  • "resourceId": "ins-2ca9132c-bf4c-467e-b57c-92a971225947",
  • "resourceType": "Server",
  • "tagRequestList": [
    ]
}

List Tag

path Parameters
projectId
required
string

The project id

query Parameters
name
string
page
integer <int32>
size
integer <int32>
header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/tag',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Tag Detail

path Parameters
projectId
required
string

The project id

tagId
required
string

The tag id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/tag/%7BtagId%7D/resource-types/%7Bresource-types%7D',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List Tag Key

path Parameters
projectId
required
string

The project id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/tag/tag-key',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Tag Value

path Parameters
projectId
required
string

The project id

tagKey
required
string

The tag key

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/tag/tag-key/%7BtagKey%7D/tag-value',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Tag Quota

path Parameters
projectId
required
string

The project id

header Parameters
portal-user-id
required
integer <int32>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'http://localhost:8089/v2/%7BprojectId%7D/tag/quota',
  headers: {'portal-user-id': 'SOME_INTEGER_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});