1
NTT Communications
Cloudⁿ
LBA API
Manual
Ver.1.0.1
Please refrain from redistribution (distribution, reproduction, provision etc.) of the contents published in this document.
2
Ver.No. Edited On
Changes
3
1 Introduction
P4 ~
1) Overview of Service
2) Preliminary Preparations
2 How to Use API Request
P6 ~
1) Format of API Request
2) Create API Request
3) Confirm Response
3 Using LBA Service
P11 ~
1) Create Load Balancer
2) Register Virtual Servers under Load Balancer
3) Confirm Status of Virtual Servers under Load Balancer
4 Using CLI Tool
P18 ~
1) Install CLI Tool
2) Manage Load Balancer using CLI Tool
5 LBA API Reference
P21 ~
1) LBA API List (Action)
2) LBA API List (Data Type)
3) LBA Common Information
4) LBA API Details (Action) 5) LBA API Details (Data Type)
This manual explains how to use Cloudn Load Balancing Advanced (LBA).
LBA is a load balancing service which automatically distributes application traffic to multiple virtual servers on Cloudn Compute, and is equivalent to Elastic Load Balancing (ELB) in AWS.
By using LBA, large amount of traffic flowing from the Internet is effectively distributed to your multiple virtual servers, and you can build a scalable system which is not tied to the
performance limit of virtual servers.
The functions primarily provided are as follows.
■Distribution of Application Traffic
When you require a load balancer, a special virtual server called load balancer instance (LBI) is created in a specified zone, and the application traffic (HTTP and HTTPS) reaching the virtual server is distributed to your multiple virtual servers which is registered in advance by LBI.
The number of LBIs automatically increase or decrease based on the number of average concurrent connections of TCP sessions.
We use HTTP/HTTPS by the load balancing method. HTTP/HTTPS sessions from any clients are terminated at LBI.
(However, SSL certification must be installed in your multiple virtual servers of load balanced.)
■Health Check
LBA services perform health check for your multiple virtual servers distributed traffic. If your virtual servers do not respond to our health check normally, we do not distribute any traffic to the servers.
We will keep performing health check for not to respond your virtual servers. If they can respond to our health check, we restart to distribute any traffic to the servers again.
Health check is determined by accessing specific URL path with HTTP/HTTPS protocol, and we decide health check status is normal whether we can receive a succeccsul response (200 series) as HTTP response or not.
1-1) Overview of Service
4
First, we distribute any traffic by DNS round robin.
Get API access and private keys from Cloud
nPortal
Please get API access key and private key in “Common Services” in the Cloudn portal.
Please refer "3-3) Manage API access key/private key" from "Cloudn Portal Operation
Manual".
5
Start using LBA service
Please start using LBA service from Cloudn portal. Please refer "3-1) Start using
services" from " Cloudn Portal Operation Manual”.
Make the following preparations to use Cloudn LBA APIs.
1-2) Preliminary Preparations
Create your virtual servers on Compute (FLAT Type) on which LBA
services are applied
Please create your virtual servers (Linux OS/CentOS, Ubuntu) on Compute (FLAT Type/Eastern Japan).
For information on how to create virtual servers, please refer to "Cloud ⁿ Compute (FLAT type) Operation Manual".
This service offers APIs to create and delete load balancers of LBA service.
It is possible to directly operate the resources from the customer‘s program by using APIs. Furthermore, these APIs are Amazon Web Services (AWS) Elastic Load Balancing
compatible APIs (2012-06-01 Version). API Server (endpoint) URL, which is the destination URL to use APIs, is as follows.
API requests are sent in Query API format as follows.
This API request is example that you can use to want to get your load balancer information.
API request consists of types of instructions and its optional values primarily. [Format of API Request]
https://lba-api.jp-e1.cloudn-service.com/ ?Action=DescribeLoadBalancers&Version=2012- 06-01&SignatureVersion=2&SignatureMethod=HmacSHA256&Timestamp=2013-02-01T05%3A54%3A53.578Z&AWSAccessKeyId=<APIKey>&Signature=<Signature>
API server (endpoint) URL : lba-api.jp-e1.cloudn-service.com/
1. https://lba-api.jp-e1.cloudn-service.com/ 2. Action=DescribeLoadBalancers 3. Version=2012-06-01 4. SignatureVersion=2 5. SignatureMethod=HmacSHA256 6. Timestamp=2013-02-01T05%3A54%3A53.578Z 7. AWSAccessKeyId=<APIKey> 8. Signature=<Signature>
2-1) Format of API Request
First Row: API server / endpoint URL
Second Row: Specifies the action you want LBA to perform Third Row: Options passed to commands and their values Fourth to Eighth Row: Signature information
The procedure to add signature to the API request is explained hereafter.
You have to add a Signature to API requests for proving your right request. You generate a Signature by a combination of user's SECRETKEY and HMAC-SHA-256 hash algorithm and all Parameter - Value pairs.
You can get public and private keys that need to use this service in the Cloudn Portal. We
call public key APIKEY, and call private key SECRETKEY on this service. How to generate a signature and a API request are explained below.
Create Parameters of API request.
These Parameters are examples that you can use to want to get your load balancer information.
Parameter (key) Value
Action DescribeLoadBalancers Version 2012-06-01 SignatureVersion 2 SignatureMethod HmacSHA256 Timestamp 2013-01-30T18%3A09%3A45Z AWSAccessKeyId <APIKEY>
1
Timestamp key have to be created for API request issuance time in iso8601 format. The key specified is case-sensitive.
Please refer "5 LBA API Reference" for details on Parameter.
7
Parameter (key) Value AWSAccessKeyId <APIKEY> Action DescribeLoadBalancers SignatureMethod HmacSHA256 SignatureVersion 2 Timestamp 2013-01-30T18%3A09%3A45Z Version 2012-06-01 GET
◁
https://lba-api.jp-e1.cloudn-service.com◁
/◁
AWSAccessKeyId=<APIKey>&Action=DescribeLoadBalancers&SignatureMethod=Hma cSHA256&SignatureVersion=2&Timestamp=2013-01-30T18%3A09%3A45Z&Version=2012-06-01 Next, create a signature.Sort the Parameters created in step 1 in ascending order of ASCII, and URL-encode the value. This operation is used to create signatures, and does not imply sorting of the API request text itself. (The text of requests need not be sorted.)
2
Please ensure that the sorting order of key is in ascending order of ASCII, and not alphabetical order.
Each Parameter and Value in step 2 which are linked by "=" are connected by "&", and strings for signature are created in alignment with the elements of API request. Here, the following string is assumed as "data".
3
Line feeds are inserted for each element up to "AWSAccessKeyId=~" (◁ mark in the above, but query part is created as a single line without line feed.
8
Action=DescribeLoadBalancers&SignatureMethod=HmacSHA256&SignatureVers ion=2&AWSAccessKeyId=<APIKEY>&Version=2012-06-01&Timestamp=2013-
01-30T18%3A09%3A45Z&Signature=XfYMZtZxXTPFtJrzQowMu4SRiguqlsKfOzJnC nQr3Ck%3D
※Create without line feed
GET /? Action=DescribeLoadBalancers&SignatureMethod=HmacSHA256&SignatureVers ion=2&AWSAccessKeyId=<APIKEY>&Version=2012-06-01&Timestamp=2013- 01-30T18%3A09%3A45Z&Signature=XfYMZtZxXTPFtJrzQowMu4SRiguqlsKfOzJnC nQr3Ck%3D
※Create without line feed.
For the "data" string created in step 3, signature is generated from SECRETKEY and HMAC-SHA256, and encoded with Base64 such that these are included in API request.
HMAC-SHA256:
Use library function such as OpenSSL.
(Example: in case of Ruby, "ruby-hmac(0.4.0)" of gem library etc.)
SECRETKEY:
Please use the key distributed by our company in the Cloudn Portal.
Signature sample by HMAC:
5df60c66d6715d33c5b49af3428c0cbb84918a0baa96c29f3b32670a742bdc29
Sample signature: (Base64 Encoded)
XfYMZtZxXTPFtJrzQowMu4SRiguqlsKfOzJnCnQr3Ck=
4
Create the text of API request with a Signature attached. The Value of Parameter is pre-encoded as URL. The description for Parameter and Value is written as key=value (value is URL encoded), and each Parameter is connected with &. In addition, items need not be sorted in API request.
5
Please make sure that there are no line feeds in the signature.
Execute API request created in HTTPS and GET method. The endpoint of LBA is
https://lba-api.jp-e1.cloudn-service.com.
6
9
If the API request is successful, response is returned in the following xml format. <DescribeLoadBalancersResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/"> <DescribeLoadBalancersResult> <LoadBalancerDescriptions> <member> ... <LoadBalancerName>lba_sample</LoadBalancerName> <CreatedTime>2013-01-04T01:29:25Z</CreatedTime> ... <CanonicalHostedZoneName>****.example.com</CanonicalHostedZoneName> ... <ResponseMetadata> <RequestId>8c108443-b9c8-604b-467d-8a1fce082fe9</RequestId> </ResponseMetadata> </DescribeLoadBalancersResponse>
10
This is the response when load balancer called "lba_sample" is created in
advance. Please refer "3-1) Create Load Balancer " on how to create load balancer.
2-3 ) Confirm Response
The API request to create load balancer is created as specified below. Action value・・・"CreateLoadBalancer"
LoadBalancerName value ・・・ Load Balancer Name
AvailabilityZones.member.N value ・・・ Availability Zone Name
Listeners.member.N.Protocol value ・・・ Load Balancer Protocol Name Listeners.member.N.LoadBalancerPort value ・・・ Load Balancer Port Name
Listeners.member.N.InstanceProtocol value ・・・ Load Balanced Instance Protocol Name Listeners.member.N.InstancePort value ・・・ Load Balanced Instance Port Name
Parameter (key) Value
Action CreateLoadBalancer LoadBalancerName <LoadBalancerName> AvailabilityZones.member.1 <AvailabilityZonesMemberName> AvailabilityZones.member.2 <AvailabilityZonesMemberName> Listeners.member.1.Protocol HTTP Listeners.member.1.LoadBala ncerPort 80 Listeners.member.1.Instance Protocol HTTP Listeners.member.1.Instance Port 80 SignatureMethod HmacSHA256 Version 2012-06-01 Timestamp 2013-01-30T18%3A09%3A45Z AWSAccessKeyId <APIKEY>
3-1) Create Load Balancer
11
1
Specific examples are provided below to illustrate how to create load balancer.
If the API request is successful, response is returned in the following xml format. <CreateLoadBalancerResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/"> <CreateLoadBalancerResult> <DNSName>loadbalancername.*.example.com</DNSName> </CreateLoadBalancerResult> <ResponseMetadata> <RequestId>1efb303b-2567-6f9b-77f2-19bee674ec91</RequestId> </ResponseMetadata> </CreateLoadBalancerResponse>
12
2
Ensure that <DNSName> tag is the DNS name of your load balancer.
3-1) Create Load Balancer
The API request to register instance in load balancer is created as specified below. Action value・・・"RegisterInstancesWithLoadBalancer"
LoadBalancerName value ・・・ Load Balancer Name Instances.member.N.InstanceId value ・・・ Instance ID
Parameter (key) Value
Action RegisterInstancesWithLoadBalancer LoadBalancerName <LoadBalancerName> Instances.member.1.Instance Id <InstanceId> Instances.member. 2 .InstanceId <InstanceId> SignatureMethod HmacSHA256 Version 2012-06-01 Timestamp 2013-01-30T18%3A09%3A45Z AWSAccessKeyId <APIKEY>
3-2) Register Virtual Servers under Load Balancer
13
1
Specific examples are provided below to illustrate how to register virtual servers under load balancer created in 3-1).
If the API request is successful, response is returned in the following xml format. <RegisterInstancesWithLoadBalancerResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/"> <RegisterInstancesWithLoadBalancerResult> <Instances> <member> <InstanceId>7c9f2cb1-23bd-4458-b9c9-2c745269e91d</InstanceId> </member> <member> <InstanceId>5094567f-956e-40e5-ba82-a7b899513b04</InstanceId> </member> </Instances> </RegisterInstancesWithLoadBalancerResult> <ResponseMetadata> <RequestId>8911624b-e1ce-3198-6a52-0411a717c693</RequestId> </ResponseMetadata> </RegisterInstancesWithLoadBalancerResponse>
14
2
Ensure that Instance ID is stored in <InstanceId> tag.
The API request to check status for instances in load balancer is created as specified below.
Action value ・・・ "RegisterInstancesWithLoadBalancer" LoadBalancerName value ・・・ Load Balancer Name Instances.member.N.InstanceId value ・・・ Instance ID
Parameter (key) Value
Action DescribeInstanceHealth LoadBalancerName <LoadBalancerName> Instances.member.1.Instanc eId <InstanceId> Instances.member. 2 .InstanceId <InstanceId> SignatureMethod HmacSHA256 Version 2012-06-01 Timestamp 2013-01-30T18%3A09%3A45Z AWSAccessKeyId <APIKEY>
3-3) Confirm Status of Virtual Servers under Load Balancer
15
1
Specific examples are provided below to illustrate how to confirm the status of virtual server registered under load balancer in 2-2).
If the API request is successful, response is returned in the following xml format. <DescribeInstanceHealthResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/"> <DescribeInstanceHealthResult> <InstanceStates> <member> <Description>N/A</Description> <InstanceId>7c9f2cb1-23bd-4458-b9c9-2c745269e91d</InstanceId> <State>InService</State> <ReasonCode>N/A</ReasonCode> </member> <member> <Description>N/A</Description> <InstanceId>5094567f-956e-40e5-ba82-a7b899513b04</InstanceId> <State>InService</State> <ReasonCode>N/A</ReasonCode> </member> </InstanceStates> </DescribeInstanceHealthResult> <ResponseMetadata> <RequestId>f982538e-4195-4302-adb3-1321e184b455</RequestId> </ResponseMetadata> </DescribeInstanceHealthResponse>
16
2
Confirm that <State> tag is “InService”.
The API request to delete load balancer is created as specified below. Action value ・・・ "DeleteLoadBalancer"
LoadBalancerName value ・・・ Load Balancer Name
Parameter (key) Value
Action DeleteLoadBalancer LoadBalancerName <LoadBalancerName> SignatureMethod HmacSHA256 Version 2012-06-01 Timestamp 2013-01-30T18%3A09%3A45Z AWSAccessKeyId <APIKEY>
3-4) Delete Load Balancer
17
1
Specific examples are provided below to illustrate how to delete load balancer.
Please refer "5 LBA API Reference" for details on Parameter.
If the API request is successful, response is returned in the following xml format.
<DeleteLoadBalancerResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/"> <DeleteLoadBalancerResult/> <ResponseMetadata> <RequestId>bd9a9e10-97ed-4d70-0852-9dfe9982758a</RequestId> </ResponseMetadata> </DeleteLoadBalancerResponse>
2
Cloudn LBA API is compatible with AWS. Therefore, Elastic Load Balancing API Tools
(hereafter referred to as ELB Tools) which enables usage of API from command line provided by AWS can also be used. The confirmation is done in the following environment.
Install openjdk required for the execution of ELB Tools. ・CentOS release 6.2 (Final)
・Elastic Load Balancing-1.0.17.0
Install CLI tool. Subsequently, work under /elb_tools (User’s home directory).
Create setup file ".aws_elb_credential" which describes access key etc.
4-1) Install CLI Tool
Set the environment variable.
18
1
# su -
# yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel
2
$ export WORK=${HOME}/elb_tools $ cd $WORK $ wget http://ec2-downloads.s3.amazonaws.com/ElasticLoadBalancing.zip $ unzip ElasticLoadBalancing.zip3
$ cd $WORK $ vi .aws_elb_credential $ cat .aws_elb_credential AWSAccessKeyId=XXXXXXXXXXXXXXXXXAWSSecretKey=YYYYYYYYYYYYYYYYYYY (←Must insert a line feed)
4
$ export WORK=${HOME}/elb_tools $ export JAVA_HOME=/usr/lib/jvm/jre $ export AWS_ELB_HOME=${WORK}/ElasticLoadBalancing-1.0.17.0 $ export AWS_CREDENTIAL_FILE=${WORK}/.aws_elb_credential $ export PATH=$PATH:${AWS_ELB_HOME}/bin $ export AWS_ELB_URL=https://lba-api.jp-e1.cloudn-service.comInput cloudn APIKEY in AWSAccessKeyId, and cloudn SECRETKEY in
Create a load balancer named "cnlbatest".
"--availability-zones" is an option to specify locations on which instances are running. "—listener" is an option used to specify protocol, the port number of destination of back-end, the port number listening in front load balancer.
After creating, FQDN of the created load balancer will be displayed. It will take some time until it is registered in DNS.
4-2) Manage Load Balancer using CLI tool
19
Specific examples are provided below to illustrate how to manage load balancer using CLI tool.
1
$ elb-create-lb cnlbatest ¥
--availability-zones <ZONE_NAME> ¥
--listener lb-port=80,instance-port=80,protocol=http,instance-protocol=http
The Instance ID of virtual server can be confirmed from Compute console. Click "Instance" from the menu on the left side, and select the virtual server which is assumed as distributed from the list of virtual servers displayed. This can be confirmed from the bottom-most "ID" column by clicking "Advanced" tab.
Register the virtual server (instance) to which load is to be distributed to the created load balancer. In this example, the Instance ID of distributed destination is assumed as "7eed2527-d1f7-497f-9f6e-ae69e0e1a8fb", and "65c3b304-09b8-4278-aa1b-dc967f1dde22".
2
$ elb-register-instances-with-lb cnlbatest ¥ --instances ¥
Confirm the information of created load balancer.
Confirm the information of registerd virtual server instance.
Delete a load balancer.
20
3
$ elb-describe-lbs cnlbatest ¥
--headers --show-request --show-xml
4
$ elb-describe-instance-health cnlbatest ¥ --instances ¥
7eed2527-d1f7-497f-9f6e-ae69e0e1a8fb,65c3b304-09b8-4278-aa1b-dc967f1dde22 ¥ --headers --show-request --show-xml
5
$ elb-delete-lb cnlbatest
21
Actions
Parameter Description
ApplySecurityGroupsToLoadBalancer Associates one or more security groups with load balancer.
Accesses to ports 80 and 443 are allowed for load balancer by default. To enable accesses to other ports, apply security group which defines access rule in this API.
ConfigureHealthCheck Configures a healthcheck for the instances.
Cloudn Load Balancing Advanced service executes the
healthcheck for the instances, and if they don’t respond, they are excluded from the list of the instances distributed.
To the excluded instances, the healthcheck is
executed continuously, and they are added to the list of distributed instances when they respond.
As the method of healthcheck, access to a specific URL path with HTTP/HTTPS protocol, and check whether HTTP response is success (200-299) or not.
CreateLoadBalancer Creates new load balancer.
After the API call has completed, new load balancer is created. If lookup of IP address is successfully done by DNS name included in Response, load balancer is available.
CreateLoadBalancerListeners Creates new listener on a specified load balancer. In case that the port of load balancer (load balancer port) for the specified listener doesn’t exist, new listener is created.
DeleteLoadBalancer Deletes the specified load balancer.
In case of creating load balancer again, it’s necessary to re-configure all settings. DNS name related to the deleted load balancer will not be available. Once it’s deleted, the name and the associated DNS record no longer exist, traffic sent to the IP address will not be delivered to the virtual server.
Even if a new load balancer with the same load balancer name is created, the DNS name will not be the same.
It’s necessary to use the same account credentials as those that were used to create the load balancer. If load balancer doesn’t exist, or has already been deleted, this API request still succeeds.
The available actions in this service are as follows.
22
Actions
Parameter Description
DeleteLoadBalancerListeners Deletes the specified listener from the load balancer for the port.
DeregisterInstancesFromLoadBalancer Deregisters instances from the load balancer. Once the instance is
deregistered, it will stop receiving traffic from the load balancer.
DescribeInstanceHealth Returns the status of the instances of the specified load balancer.
<Note>
It’s necessary to use the same account credentials as those that were used to create the load balancer.
DescribeLoadBalancers Returns detailed configuration information for the specified load balancer. If no load balancers are specified, return configuration
information for all your load balancers. <Note>
It’s necessary to use the same account credentials as those that were used to create the load balancer.
DisableAvailabilityZonesForLoadBalancer Removes the specified Availability Zone from the registered Availability Zones for the load balancer.
There must be at least one Availability Zone registered with load balancer. Once Availability Zone is removed, traffic doesn’t go to the instances in the removed Availability Zone.Trying to remove an Availability Zone that was not associated with the load balancer does nothing.
EnableAvailabilityZonesForLoadBalancer Adds the specified Availability Zone to the load balancer.
<Note>
The Availability Zone to be added must be in the same region as the Availability Zones for which the load balancer was created.
The available actions in this service are as follows.
23
Actions
Parameter Description
RegisterInstancesWithLoadBalancer Adds the specified instance to the load balancer.
Once the instance is added, it starts receiving traffic from the load balancer. Any instance that is not in any of the Availability Zone registered for the load balancer will be moved to the OutOfService state. In this case, it will move to InService state when the Availability Zone is added to the load balancer.
<Note>
To use this API, load balancer must have been created in advance.
And, it’s necessary to use the same account credentials as those that were used to create the load balancer.
The available actions in this service are as follows.
5-1) LBA API List (Action)
These APIs are not supported. AttachLoadBalancerToSubnets CreateAppCookieStickinessPolicy CreateLBCookieStickinessPolicy CreateLoadBalancerPolicy DeleteLoadBalancerPolicy DescribeLoadBalancerPolicies DescribeLoadBalancerPolicyTypes DetachLoadBalancerFromSubnets SetLoadBalancerListenerSSLCertificate SetLoadBalancerPoliciesForBackendServer SetLoadBalancerPoliciesOfListener
24
Data TypesParameter ApplySecurityGroupsToLoadBalancerResult BackendServerDescription ConfigureHealthCheckResult CreateLoadBalancerListenersResult CreateLoadBalancerResult DeleteLoadBalancerListenersResult DeleteLoadBalancerResult DeregisterInstancesFromLoadBalancerResult DescribeInstanceHealthResult DescribeLoadBalancersResult DisableAvailabilityZonesForLoadBalancerResult EnableAvailabilityZonesForLoadBalancerResult RegisterInstancesWithLoadBalancerResult HealthCheck Instance InstanceState Listener ListenerDescription LoadBalancerDescription SourceSecurityGroup
The available data types in this service are as follows.
25
The available API Server (endpoint) in this service is as follows.
https://lba-api.jp-e1.cloudn-service.com/
Following table shows formats used for Query API Request of Cloundn Load
Balancing Advanced. Common Parameters
Parameter Description Required
Action Action executed Default : None Type : String
Yes
AuthParams Unsupported No
AWSAccessKeyId Specify Access Key ID which is necessary for the API request certification. Default : None
Type : String
Yes
Expires Unsupported No
SecurityToken Unsupported No
Signature The digital signature created for the API request. As for the methods to create Signature, please refer to documents for service developers.
Default : None Type : String
Yes
SignatureMethod The hash algorithm used to create the API request signature. Default : None
Valid Values : HmacSHA256 | HmacSHA1 Type : String
Yes
SignatureVersion The version of signature to the API request. Default : None
Valid Values : 2 Type : String
Yes
Timestamp The date and time when the API request was submitted. It’s expressed in the format “YYYY-MM-DDThh:mm:ssZ” , as specified in the ISO8601 standard. Default : None
Type : String
Yes
Version API version to use. Default : None
Valid Values : 2012-06-01 Type : String
Yes
26
ApplySecurityGroupsToLoadBalancer
Description Associates one or more security groups with load balancer.
Accesses to ports 80 and 443 are allowed for load balancer by default. To enable accesses to other ports, apply security group which defines access rule in this API.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters”, and /or following ”Request Parameters”. * Specify ”ApplySecurityGroupsToLoadBalancer” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
LoadBalancerName The name associated with the load balancer.
Type : String Yes
SecurityGroups.member.N A list of security group IDs (Security Group IDs for Cloudn Compute) to associate with load balancer
Type : String list
Yes
Response Elements
Parameter Description
SecurityGroups The applied Security Group ID(Security Group ID for Cloudn Compute) Type : String list
Response
Data Type ApplySecurityGroupsToLoadBalancerResult
27
ConfigureHealthCheck
Description Configures a healthcheck for the instances.
Cloudn Load Balancing Advanced service executes the healthcheck for
the instances, and if they don’t respond, they are excluded from the list of the instances distributed.
To the excluded instances, the healthcheck is executed continuously, and they are added to the list of distributed instances when they respond.
As the method of healthcheck, access to a specific URL path with HTTP/HTTPS protocol, and check whether HTTP response is success (200-299) or not.
* Only 1 is available to be specified for HealthyThreshold of the healthcheck. (The number of continued check until the instance will be recognized as normal.)
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters“, and/or following “Request Parameters”. * Specify “ConfigureHealthCheck” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
HealthCheck The applied configuration of healthcheck. Type :
Please refer to HealthCheck.
Yes
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response Elements
Parameter Description
HealthCheck The configuration of healthcheck after the operation. Type :
Please refer to HealthCheck.
Response
Data Type ConfigureHealthCheckResult
28
CreateLoadBalancer
Description Creates new load balancer.
After the API call has completed, new load balancer is created. If lookup of IP address is successfully done by DNS name included in Response, load balancer is available.
* In case of distributing to different zones, it’s necessary to specify zone name explicitly in Availability Zones.
* In case of specifying other than 80 or 443 as ports to load balancer,
it will not be available until ApplySecurityGroupsToLoadBalancer is executed.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters”, and/or following “Request Parameters”. * Specify “CreateLoadBalancer” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
AvailabilityZones.member.N A list of availability zones of load balancer.
It’s necessary to specify the same zone as the instance. Type : String list
Yes
Listeners.member.N A list of listener items (Port, Protocol that load balancer receives , Port, Protocol for instance.)
Type :
Listener list (Please refer to Listener.)
Yes
LoadBalancerName The name of load balancer
Type : String Yes
Scheme Unsupported
It’s not necessary to specify this. Type : String
No
SecurityGroups.members.N A list of security group IDs (Security group IDs for Cloudn Compute) to associate with load balancer
In case of using other than 80 or 443 as access ports to load balancer, it’s necessary to specify security group that the access is allowed .
No
Subnets.member.N Unsupported
It’s not necessary to specify this. Type : String list
No
Response Elements
Parameter Description
DNSName The DNS name of load balancer. Type : String
Response
Data Type CreateLoadBalancerResult
29
CreateLoadBalancerListeners
Description Creates new listener on a specified load balancer.
In case that the port of load balancer (load balancer port) for the specified listener doesn’t exist, new listener is created.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters” , and/or following “Request Parameters”. * Specify “CreateLoadBalancerListeners” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
Listeners.member.N A list of listener items Type :
Listener list (Please refer to Listener.)
Yes
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response
Data Type CreateLoadBalancerListenersResult
30
DeleteLoadBalancer
Description Deletes the specified load balancer.
In case of creating load balancer again, it’s necessary to re-configure all settings. DNS name related to the deleted load balancer will not be available. Once it’s deleted, the name and the associated DNS record no longer exist, traffic sent to the IP address will not be delivered to the virtual server.Even if a new load balancer with the same load balancer name is created, the DNS name will not be the same.
It’s necessary to use the same account credentials as those that were used to create the load balancer.
If load balancer doesn’t exist, or has already been deleted, this API request still succeeds.
* IP address of the deleted load balancer will be reused by other virtual server.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters”, and/or following “Request Parameters”. * Specify “DeleteLoadBalancer” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response
Data Type DeleteLoadBalancerResult
31
DeleteLoadBalancerListeners
Description Deletes the specified listener from the load balancer for the port.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters”, and/or “Request Parameters”. * Specify “DeleteLoadBalancerListeners” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
LoadBalancerPorts.member.N The port numbers of listener (LoadBalancerPort) to be removed.
Type : Interger list Yes
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response
Data Type DeleteLoadBalancerListenersResult
32
DeregisterInstancesFromLoadBalancer
Description Deregisters instances from the load balancer.
Once the instance is deregistered, it will stop receiving traffic from the load balancer.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters “, and/or following “Request Parameters”. * Specify ”DeregisterInstancesFromLoadBalancer” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
Instances.member.N A list of instance IDs to be deregistered. Type :
Instance list (Please refer to Instance.)
Yes
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response Elements
Parameter Description
Instance An updated list of remaining instances. Type :
Instance list (Please refer to Instance.)
Response
Data Type DeregisterInstancesFromLoadBalancerResult
33
DescribeInstanceHealth
Description Returns the status of the instances of the specified load balancer. <Note>
It’s necessary to use the same account credentials as those that were used to create the load balancer.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters “, and/or following “Request Parameters”. * Specify ”DescribeInstanceHealth” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
Instances.member.N A list of instance IDs Type :
Instance list (Please refer to Instance.)
Yes
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response Elements
Parameter Description
InstanceStates A list containing health information of the specified instances. Type :
InstanceState list (Please refer to InstanceState.)
Response
Data Type DescribeInstanceHealthResult
34
DescribeLoadBalancers
Description Returns detailed configuration information for the specified load balancer. If no load balancers are specified, return configuration information for all your load balancers.
<Note>
It’s necessary to use the same account credentials as those that were used to create the load balancer.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters“, and/or following “Request Parameters”. * Specify ”DescribeLoadBalancers” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
LoadBalancerNames.member.N A list of names associated with the load balancer.
Type : String list Yes
Marker Unsupported
It’s not necessary to specify this. Type : String
No
Response Elements
Parameter 説明
LoadBalancerDescriptions The information of load balancer. Type :
LoadBalancerDescription list (Please refer to LoadBalancerDescription.) NextMarker Unsupported
Type : String
Response
Data Type DescribeLoadBalancersResult
35
DisableAvailabilityZonesForLoadBalancer
Description Removes the specified Availability Zone from the registered Availability Zones for the load balancer.
There must be at least one Availability Zone registered with load balancer.
Once Availability Zone is removed, traffic doesn’t go to the instances in the removed Availability Zone.Trying to remove an Availability Zone that was not associated with the load balancer does nothing.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters “, and/or following “Request Parameters”. * Specify ”DisableAvailabilityZonesForLoadBalancer” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
AvailabilityZones.member.N A list of availability zones to be removed.
Type : String list Yes
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response Elements
Parameter Description
AvailabilityZones An updated list of AvailabilityZone Type : String list
Response
Data Type DisableAvailabilityZonesForLoadBalancerResult
36
EnableAvailabilityZonesForLoadBalancer
Description Adds the specified Availability Zone to the load balancer. <Note>
The Availability Zone to be added must be in the same region as the Availability Zones for which the load balancer was created.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters “, and/or following “Request Parameters”. * Specify ”EnableAvailabilityZonesForLoadBalancer” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
AvailabilityZones.member.N A list of new availability zones.
Type : String list Yes
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response Elements
Parameter Description
AvailabilityZones An updated list of AvailabilityZone Type : String list
Response
Data Type EnableAvailabilityAZonesForLoadBalancerResult
37
RegisterInstancesWithLoadBalancer
Description Adds the specified instance to the load balancer.
Once the instance is added, it starts receiving traffic from the load balancer. Any instance that is not in any of the Availability Zone
registered for the load balancer will be moved to the OutOfService state. In this case, it will move to InService state when the Availability Zone is added to the load balancer.
<Note>
To use this API, load balancer must have been created in advance. And, it’s necessary to use the same account credentials as those that were used to create the load balancer.
Request
Request Method GET Path,Parameters,
etc Specify parameters described in “Common Parameters “, and/or following “Request Parameters”. * Specify ”RegisterInstancesWithLoadBalancer” for Action.
Header None
Body None
Request Parameters
Parameter Description Required
Instances.member.N A list of instance IDs. Type :
Instance list (Please refer to Instance.)
Yes
LoadBalancerName The name associated with the load balancer.
Type : String Yes
Response Elements
Parameter Description
Instances An updated list of instances for the load balancer. Type :
Please refer to Instance.
Response
Data Type RegisterInstancesWithLoadBalancerResult
38
BackendServerDescription
Description The data type to indicate the information of the instance.
This is used as a response element in the DescribeLoadBalancers.
Contents
Parameter Description Required
InstancePort Port number of the instance
Type : Integer No
PolicyNames Unsupported
Type : String list No
39
HealthCheck
Description The data type to indicate the configuration of the healthcheck.
Contents
Parameter Description Required
HealthyThreshold The number of consecutive health probe successes before moving the instance to the Healthy state.
Only 1 is available to be specified, and it’s not possible to be changed.
Type : Integer
Yes
Interval The interval between healthchecks of an individual instance (sec.) Type : Interger
Yes
Target The instance being checked. HTTP and HTTPS are supported. Example: HTTP:80/index.html Type : String
Yes
Timeout The amount of time during which no response means a failed health probe.
Type : Integer
Yes
UnhealthyThreshold The number of consecutive health probe failures required before moving the instance to the Unhealthy state.
Type : Integer
Yes
40
Instance
Description The data type to indicate the instance.
Contents
Parameter Description Required
InstanceId Instance ID
Type : String No
41
InstanceState
Description The data type to indicate the status of the instance.
Contents
Parameter Description
Description Information of Instance
Type : String No
InstanceId Instance ID
Type : String No
ReasonCode Information about the cause of OutOfService instances.
Type : String No
State The current state of the instance. Valid value is InService or OutOfService. Type : String
No
42
Listener
Description The data type to indicate the listener.
Contents
Parameter Description Required
InstancePort The port number of the instance
This cannot be modified for the life of the load balancer. Type : Integer
Yes
InstanceProtocol The protocol name of instance Valid value is HTTP or HTTPS. Type : String
No
LoadBalancerPort The port number of load balancer.
Type : Integer Yes
Protocol Protocol name of load balancer Valid value is HTTP or HTTPS. Type : String
Yes
SSLCertificateId Unsupported
Type : String No
43
ListenerDescription
Description The data type to indicate the listener
Contents
Parameter Description Required
Listener listener Type :
Please refer to Listener
No
PolicyNames Unsupported
Type : String list No
44
LoadBalancerDescription
Description The data type to indicate the result of DescribeLoadBalancers.
Contents
Parameter Description Required
AvailabilityZones The information of Availability Zone
Type : String list No
BackendServerDescriptions The information of the instance. Type :
BackendServerDescription list (Please refer to BackendServerDescription.)
No
CanonicalHostedZoneNameID Unsupported
Type : String No
CreatedTime The date and time when load balancer was created.
Type : Date Time No
DNSName The DNS name of load balancer.
Type : String No
HealthCheck The information of healthcheck. Type :
Please refer to HealthCheck.
No
Instances The information of Instance. Type :
Instance list (Please refer to Instance.)
No
ListenerDescriptions The information of listener. Type :
ListenerDescription list (Please refer to ListenerDescription.)
No
LoadBalancerName The name of load balancer.
Type : String No
Policies Unsupported
Type : Policies No
Scheme The type of load balancer. Only Internet-facing is available. Type : String
No
SecurityGroups Security group (Security group ID of Cloudn Compute)
Type : String list No
SourceSecutrityGroup The source Security group (Security group ID of Cloudn Compute) to apply
Type :
Please refer to SourceSecurityGroup.
No
subnet Unsupported
Type : String list No
VPCId Unsupported
Type : String No
45
SourceSecurityGroup
Description The data type to indicate the source security group to apply. Security group of Cloudn Compute.
Contents
Parameter Description Required
GroupName The name of security group
Type : String No
OwnerAlias The owner of security group
Type : String No