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. 1
Ver.. Edited On Changes Ver.1.0 2013/3/23 Created first version 2
Table of Contents 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) 3
1-1) Overview of Service This manual explains how to use Cloud n Load Balancing Advanced (LBA). LBA is a load balancing service which automatically distributes application traffic to multiple virtual servers on Cloud n 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. First, we distribute any traffic by DNS round robin. 4
1-2) Preliminary Preparations Make the following preparations to use Cloud n LBA APIs. Start using LBA service Please start using LBA service from Cloud n portal. Please refer "3-1) Start using services" from " Cloud n Portal Operation Manual. Get API access and private keys from Cloud n Portal Please get API access key and private key in Common Services in the Cloud n portal. Please refer "3-3) Manage API access key/private key" from "Cloud n Portal Operation Manual". 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". LBA service cannot be used from virtual servers on Compute (VLAN Type). 5
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 server (endpoint) URL : [Format of API Request] 2-1) Format of API Request API requests are sent in Query API format as follows. lba-api.jp-e1.cloudn-service.com/ https://lba-api.jp-e1.cloudn-service.com/?action=describeloadbalancers&version=2012-06-01&signatureversion=2&signaturemethod=hmacsha256×tamp=2013-02- 01T05%3A54%3A53.578Z&AWSAccessKeyId=<APIKey>&Signature=<Signature> 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. 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> First Row: Second Row: Third Row: Fourth to Eighth Row: API server / endpoint URL Specifies the action you want LBA to perform Options passed to commands and their values Signature information The procedure to add signature to the API request is explained hereafter. 6
2-2 ) Create API Request 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 Cloud n 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. 1 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> The key specified is case-sensitive. Timestamp key have to be created for API request issuance time in iso8601 format. Please refer "5 LBA API Reference" for details on Parameter. 7
Next, create a signature. 2-2 ) Create API Request 2 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.) Parameter (key) Value AWSAccessKeyId <APIKEY> Action DescribeLoadBalancers SignatureMethod HmacSHA256 SignatureVersion 2 Timestamp 2013-01-30T18%3A09%3A45Z Version 2012-06-01 Please ensure that the sorting order of key is in ascending order of ASCII, and not alphabetical order. 3 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". GET https://lba-api.jp-e1.cloudn-service.com / AWSAccessKeyId=<APIKey>&Action=DescribeLoadBalancers&SignatureMethod=Hma csha256&signatureversion=2×tamp=2013-01- 30T18%3A09%3A45Z&Version=2012-06-01 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
2-2 ) Create API Request 4 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 Cloud n Portal. Signature sample by HMAC: 5df60c66d6715d33c5b49af3428c0cbb84918a0baa96c29f3b32670a742bdc29 Sample signature: (Base64 Encoded) XfYMZtZxXTPFtJrzQowMu4SRiguqlsKfOzJnCnQr3Ck= Please make sure that there are no line feeds in the signature. 5 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. Action=DescribeLoadBalancers&SignatureMethod=HmacSHA256&SignatureVers ion=2&awsaccesskeyid=<apikey>&version=2012-06-01×tamp=2013-01- 30T18%3A09%3A45Z&Signature=XfYMZtZxXTPFtJrzQowMu4SRiguqlsKfOzJnC nqr3ck%3d Create without line feed 6 Execute API request created in HTTPS and GET method. The endpoint of LBA is https://lba-api.jp-e1.cloudn-service.com. GET /? Action=DescribeLoadBalancers&SignatureMethod=HmacSHA256&SignatureVers ion=2&awsaccesskeyid=<apikey>&version=2012-06-01×tamp=2013-01- 30T18%3A09%3A45Z&Signature=XfYMZtZxXTPFtJrzQowMu4SRiguqlsKfOzJnC nqr3ck%3d Create without line feed. 9
1 2-3 ) Confirm Response 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> <LoadBalancers> <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> 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. 10
3-1) Create Load Balancer Specific examples are provided below to illustrate how to create load balancer. 1 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 80 ncerport Listeners.member.1.Instance HTTP Protocol Listeners.member.1.Instance 80 Port SignatureMethod HmacSHA256 Version 2012-06-01 Timestamp 2013-01-30T18%3A09%3A45Z AWSAccessKeyId <APIKEY> Please refer "5 LBA API Reference" for details on Parameter. 11
3-1) Create Load Balancer 2 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> Ensure that <DNSName> tag is the DNS name of your load balancer. 12
3-2) Register Virtual Servers under Load Balancer Specific examples are provided below to illustrate how to register virtual servers under load balancer created in 3-1). 1 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 <InstanceId> Id Instances.member. 2 <InstanceId>.InstanceId SignatureMethod HmacSHA256 Version 2012-06-01 Timestamp 2013-01-30T18%3A09%3A45Z AWSAccessKeyId <APIKEY> Please refer "5 LBA API Reference" for details on Parameter. 13
3-2) Register Virtual Servers under Load Balancer 2 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> Ensure that Instance ID is stored in <InstanceId> tag. 14
3-3) Confirm Status of Virtual Servers under Load Balancer Specific examples are provided below to illustrate how to confirm the status of virtual server registered under load balancer in 2-2). 1 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 <InstanceId> eid Instances.member. 2 <InstanceId>.InstanceId SignatureMethod HmacSHA256 Version 2012-06-01 Timestamp 2013-01-30T18%3A09%3A45Z AWSAccessKeyId <APIKEY> Please refer "5 LBA API Reference" for details on Parameter. 15
3-3) Confirm Status of Virtual Server under Load Balancer 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> <>N/A</> <InstanceId>7c9f2cb1-23bd-4458-b9c9-2c745269e91d</InstanceId> <State>InService</State> <ReasonCode>N/A</ReasonCode> </member> <member> <>N/A</> <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> Confirm that <State> tag is InService. 16
1 3-4) Delete Load Balancer Specific examples are provided below to illustrate how to delete load balancer. 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> Please refer "5 LBA API Reference" for details on Parameter. 2 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> 17
Cloud n 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. CentOS release 6.2 (Final) Elastic Load Balancing-1.0.17.0 1 2 3 4-1) Install CLI Tool Install openjdk required for the execution of ELB Tools. # su - # yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel Install CLI tool. Subsequently, work under /elb_tools (User s home directory). $ export WORK=${HOME}/elb_tools $ cd $WORK $ wget http://ec2-downloads.s3.amazonaws.com/elasticloadbalancing.zip $ unzip ElasticLoadBalancing.zip Create setup file ".aws_elb_credential" which describes access key etc. $ cd $WORK $ vi.aws_elb_credential $ cat.aws_elb_credential AWSAccessKeyId=XXXXXXXXXXXXXXXXX AWSSecretKey=YYYYYYYYYYYYYYYYYYY ( Must insert a line feed) 4 Input cloud n APIKEY in AWSAccessKeyId, and cloud n SECRETKEY in AWSSecretKey. Set the environment variable. $ 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.com 18
4-2) Manage Load Balancer using CLI tool Specific examples are provided below to illustrate how to manage load balancer using CLI tool. 1 2 Create a load balancer named "cnlbatest". $ elb-create-lb cnlbatest --availability-zones <ZONE_NAME> --listener lb-port=80,instance-port=80,protocol=http,instance-protocol=http "--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. 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-aa1bdc967f1dde22". $ elb-register-instances-with-lb cnlbatest --instances 7eed2527-d1f7-497f-9f6e-ae69e0e1a8fb,65c3b304-09b8-4278-aa1b-dc967f1dde22 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. 19
3 Confirm the information of created load balancer. 4 5 4-2) Manage Load Balancer using CLI tool $ elb-describe-lbs cnlbatest --headers --show-request --show-xml Confirm the information of registerd virtual server instance. $ elb-describe-instance-health cnlbatest --instances 7eed2527-d1f7-497f-9f6e-ae69e0e1a8fb,65c3b304-09b8-4278-aa1b-dc967f1dde22 --headers --show-request --show-xml Delete a load balancer. $ elb-delete-lb cnlbatest 20
5-1) LBA API List (Action) The available actions in this service are as follows. Actions Parameter 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. Cloud n 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. 21
5-1) LBA API List (Action) The available actions in this service are as follows. Actions Parameter DeleteLoadBalancerListeners DeregisterInstancesFromLoadBalancer DescribeInstanceHealth Deletes the specified listener from the load balancer for the port. Deregisters instances from the load balancer. Once the instance is deregistered, it will stop receiving traffic from the load balancer. Returns the status of the instances of the specified load balancer. DescribeLoadBalancers <te> It s necessary to use the same account credentials as those that were used to create the load balancer. Returns detailed configuration information for the specified load balancer. If no load balancers are specified, return configuration information for all your load balancers. DisableAvailabilityZonesForLoadBalancer EnableAvailabilityZonesForLoadBalancer <te> It s necessary to use the same account credentials as those that were used to create the load balancer. 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. Adds the specified Availability Zone to the load balancer. <te> The Availability Zone to be added must be in the same region as the Availability Zones for which the load balancer was created. 22
5-1) LBA API List (Action) The available actions in this service are as follows. Actions Parameter 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. <te> 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. These APIs are not supported. AttachLoadBalancerToSubnets CreateAppCookieStickinessPolicy CreateLBCookieStickinessPolicy CreateLoadBalancerPolicy DeleteLoadBalancerPolicy DescribeLoadBalancerPolicies DescribeLoadBalancerPolicyTypes DetachLoadBalancerFromSubnets SetLoadBalancerListenerSSLCertificate SetLoadBalancerPoliciesForBackendServer SetLoadBalancerPoliciesOfListener 23
5-2) LBA API List (Data Type) The available data types in this service are as follows. Data Types Parameter ApplySecurityGroupsToLoadBalancerResult BackendServer ConfigureHealthCheckResult CreateLoadBalancerListenersResult CreateLoadBalancerResult DeleteLoadBalancerListenersResult DeleteLoadBalancerResult DeregisterInstancesFromLoadBalancerResult DescribeInstanceHealthResult DescribeLoadBalancersResult DisableAvailabilityZonesForLoadBalancerResult EnableAvailabilityZonesForLoadBalancerResult RegisterInstancesWithLoadBalancerResult HealthCheck Instance InstanceState Listener Listener LoadBalancer SourceSecurityGroup 24
5-3) LBA API Common Information 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 Clound n Load Balancing Advanced. Common Parameters Parameter Required Action Action executed Default : ne AuthParams Unsupported AWSAccessKeyId Specify Access Key ID which is necessary for the API request certification. Default : ne Expires Unsupported SecurityToken Unsupported Signature SignatureMethod SignatureVersion Timestamp Version The digital signature created for the API request. As for the methods to create Signature, please refer to documents for service developers. Default : ne The hash algorithm used to create the API request signature. Default : ne Valid Values : HmacSHA256 HmacSHA1 The version of signature to the API request. Default : ne Valid Values : 2 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 : ne API version to use. Default : ne Valid Values : 2012-06-01 25
ApplySecurityGroupsToLoadBalancer 5-4) LBA API Details (Action) 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 Path,Parameters, etc Header Body GET Specify parameters described in Common Parameters, and /or following Request Parameters. * Specify ApplySecurityGroupsToLoadBalancer for Action. ne ne Request Parameters Parameter Required LoadBalancerName SecurityGroups.member.N Response Data Type The name associated with the load balancer. A list of security group IDs (Security Group IDs for Cloud n Compute) to associate with load balancer list ApplySecurityGroupsToLoadBalancerResult Response Elements Parameter SecurityGroups The applied Security Group ID(Security Group ID for Cloud n Compute) list 26
ConfigureHealthCheck 5-4) LBA API Details (Action) Configures a healthcheck for the instances. Cloud n 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 Path,Parameters, etc Header Body GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify ConfigureHealthCheck for Action. ne ne Request Parameters Parameter Required HealthCheck LoadBalancerName The applied configuration of healthcheck. Type : Please refer to HealthCheck. The name associated with the load balancer. Response Data Type ConfigureHealthCheckResult Response Elements Parameter HealthCheck The configuration of healthcheck after the operation. Type : Please refer to HealthCheck. 27
CreateLoadBalancer 5-4) LBA API Details (Action) 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 Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify CreateLoadBalancer for Action. Header Body ne ne Request Parameters Parameter Required AvailabilityZones.member.N A list of availability zones of load balancer. It s necessary to specify the same zone as the instance. list 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.) LoadBalancerName Scheme SecurityGroups.members.N Subnets.member.N The name of load balancer Unsupported It s not necessary to specify this. A list of security group IDs (Security group IDs for Cloud n 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. Unsupported It s not necessary to specify this. list Response Data Type CreateLoadBalancerResult Response Elements Parameter DNSName The DNS name of load balancer. 28
CreateLoadBalancerListeners 5-4) LBA API Details (Action) 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 Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify CreateLoadBalancerListeners for Action. Header Body ne ne Request Parameters Parameter Required Listeners.member.N LoadBalancerName A list of listener items Type : Listener list (Please refer to Listener.) The name associated with the load balancer. Response Data Type CreateLoadBalancerListenersResult 29
DeleteLoadBalancer 5-4) LBA API Details (Action) 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. Request Request Method Path,Parameters, etc * IP address of the deleted load balancer will be reused by other virtual server. GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify DeleteLoadBalancer for Action. Header Body ne ne Request Parameters Parameter Required LoadBalancerName The name associated with the load balancer. Response Data Type DeleteLoadBalancerResult 30
5-4) LBA API Details (Action) DeleteLoadBalancerListeners Deletes the specified listener from the load balancer for the port. Request Request Method Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or Request Parameters. * Specify DeleteLoadBalancerListeners for Action. Header Body ne ne Request Parameters Parameter Required LoadBalancerPorts.member.N LoadBalancerName The port numbers of listener (LoadBalancerPort) to be removed. Type : Interger list The name associated with the load balancer. Response Data Type DeleteLoadBalancerListenersResult 31
DeregisterInstancesFromLoadBalancer 5-4) LBA API Details (Action) Deregisters instances from the load balancer. Once the instance is deregistered, it will stop receiving traffic from the load balancer. Request Request Method Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify DeregisterInstancesFromLoadBalancer for Action. Header Body ne ne Request Parameters Parameter Required Instances.member.N LoadBalancerName A list of instance IDs to be deregistered. Type : Instance list (Please refer to Instance.) The name associated with the load balancer. Response Data Type DeregisterInstancesFromLoadBalancerResult Response Elements Parameter Instance An updated list of remaining instances. Type : Instance list (Please refer to Instance.) 32
DescribeInstanceHealth 5-4) LBA API Details (Action) Returns the status of the instances of the specified load balancer. <te> It s necessary to use the same account credentials as those that were used to create the load balancer. Request Request Method Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify DescribeInstanceHealth for Action. Header Body ne ne Request Parameters Parameter Required Instances.member.N LoadBalancerName A list of instance IDs Type : Instance list (Please refer to Instance.) The name associated with the load balancer. Response Data Type DescribeInstanceHealthResult Response Elements Parameter InstanceStates A list containing health information of the specified instances. Type : InstanceState list (Please refer to InstanceState.) 33
DescribeLoadBalancers 5-4) LBA API Details (Action) Returns detailed configuration information for the specified load balancer. If no load balancers are specified, return configuration information for all your load balancers. <te> It s necessary to use the same account credentials as those that were used to create the load balancer. Request Request Method Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify DescribeLoadBalancers for Action. Header Body ne ne Request Parameters Parameter Required LoadBalancerNames.member.N Marker A list of names associated with the load balancer. list Unsupported It s not necessary to specify this. Response Data Type DescribeLoadBalancersResult Response Elements Parameter LoadBalancers NextMarker 説 明 The information of load balancer. Type : LoadBalancer list (Please refer to LoadBalancer.) Unsupported 34
DisableAvailabilityZonesForLoadBalancer 5-4) LBA API Details (Action) 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 Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify DisableAvailabilityZonesForLoadBalancer for Action. Header Body ne ne Request Parameters Parameter Required AvailabilityZones.member.N LoadBalancerName A list of availability zones to be removed. list The name associated with the load balancer. Response Data Type DisableAvailabilityZonesForLoadBalancerResult Response Elements Parameter AvailabilityZones An updated list of AvailabilityZone list 35
5-4) LBA API Details (Action) EnableAvailabilityZonesForLoadBalancer Adds the specified Availability Zone to the load balancer. <te> 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 Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify EnableAvailabilityZonesForLoadBalancer for Action. Header Body ne ne Request Parameters Parameter Required AvailabilityZones.member.N LoadBalancerName A list of new availability zones. list The name associated with the load balancer. Response Data Type EnableAvailabilityAZonesForLoadBalancerResult Response Elements Parameter AvailabilityZones An updated list of AvailabilityZone list 36
RegisterInstancesWithLoadBalancer 5-4) LBA API Details (Action) 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. <te> 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 Path,Parameters, etc GET Specify parameters described in Common Parameters, and/or following Request Parameters. * Specify RegisterInstancesWithLoadBalancer for Action. Header Body ne ne Request Parameters Parameter Required Instances.member.N LoadBalancerName A list of instance IDs. Type : Instance list (Please refer to Instance.) The name associated with the load balancer. Response Data Type RegisterInstancesWithLoadBalancerResult Response Elements Parameter Instances An updated list of instances for the load balancer. Type : Please refer to Instance. 37
BackendServer 5-5) LBA API Details (Data Type) The data type to indicate the information of the instance. This is used as a response element in the DescribeLoadBalancers. Contents Parameter Required InstancePort PolicyNames Port number of the instance Type : Integer Unsupported list 38
HealthCheck 5-5) LBA API Details (Data Type) The data type to indicate the configuration of the healthcheck. Contents Parameter Required HealthyThreshold Interval Target Timeout UnhealthyThreshold 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 The interval between healthchecks of an individual instance (sec.) Type : Interger The instance being checked. HTTP and HTTPS are supported. Example: HTTP:80/index.html The amount of time during which no response means a failed health probe. Type : Integer The number of consecutive health probe failures required before moving the instance to the Unhealthy state. Type : Integer 39
5-5) LBA API Details (Data Type) Instance The data type to indicate the instance. Contents Parameter Required InstanceId Instance ID 40
InstanceState 5-5) LBA API Details (Data Type) The data type to indicate the status of the instance. Contents Parameter InstanceId ReasonCode State Information of Instance Instance ID Information about the cause of OutOfService instances. The current state of the instance. Valid value is InService or OutOfService. 41
5-5) LBA API Details (Data Type) Listener The data type to indicate the listener. Contents Parameter Required InstancePort InstanceProtocol LoadBalancerPort Protocol SSLCertificateId The port number of the instance This cannot be modified for the life of the load balancer. Type : Integer The protocol name of instance Valid value is HTTP or HTTPS. The port number of load balancer. Type : Integer Protocol name of load balancer Valid value is HTTP or HTTPS. Unsupported 42
Listener 5-5) LBA API Details (Data Type) The data type to indicate the listener Contents Parameter Required Listener PolicyNames listener Type : Please refer to Listener Unsupported list 43
5-5) LBA API Details (Data Type) LoadBalancer The data type to indicate the result of DescribeLoadBalancers. Contents Parameter Required AvailabilityZones BackendServers CanonicalHostedZoneNameID CreatedTime DNSName HealthCheck Instances Listeners LoadBalancerName Policies Scheme SecurityGroups SourceSecutrityGroup subnet VPCId The information of Availability Zone list The information of the instance. Type : BackendServer list (Please refer to BackendServer.) Unsupported The date and time when load balancer was created. Type : Date Time The DNS name of load balancer. The information of healthcheck. Type : Please refer to HealthCheck. The information of Instance. Type : Instance list (Please refer to Instance.) The information of listener. Type : Listener list (Please refer to Listener.) The name of load balancer. Unsupported Type : Policies The type of load balancer. Only Internet-facing is available. Security group (Security group ID of Cloud n Compute) list The source Security group (Security group ID of Cloud n Compute) to apply Type : Please refer to SourceSecurityGroup. Unsupported list Unsupported 44
SourceSecurityGroup 5-5) LBA API Details (Data Type) The data type to indicate the source security group to apply. Security group of Cloud n Compute. Contents Parameter Required GroupName OwnerAlias The name of security group The owner of security group 45