Interface Account.Service
-
- All Superinterfaces:
Maskable
,ResultLimitable
,Service
- Enclosing class:
- Account
@ApiService("SoftLayer_Network_LoadBalancer_Global_Account") public static interface Account.Service extends Service
A global load balancer account enables you to load balance traffic between servers that are in geographically diverse locations. SoftLayer's global load balancers act as a highly modified DNS server. SoftLayer's global load balancers work by accepting DNS requests for a specific hostname, choosing a host from a load balancing pool using the load balance method specified, and returning a destination IP address through a DNS response.
A global load balancer account can be created by ordering it as an additional service through the SoftLayer customer portal. You can modify your new global load balancer account once it's created and provisioned. There is a delay before your global load balancer account is created because the purchase has to be approved by SoftLayer sales and provisioned.
Hosts are created and modified through the [[SoftLayer_Network_LoadBalancer_Global_Account::editObject|editObject]] method instead of directly through the [[SoftLayer_Network_LoadBalancer_Global_Host|global load balancer host service]]. This allows you to update the properties of a global load balancer account and the hosts that make up the load balancing pool in a single request.
To have SoftLayer's global load balancers respond to DNS requests, a nameserver resource record must be added for the hostname on your global load balancer account. If your globally load balanced domain is hosted on the SoftLayer nameservers, the [[SoftLayer_Network_LoadBalancer_Global_Account::addNsRecord|addNsRecord]] method will create the required nameserver resource record in the zone file for you. If your globally load balanced domain is hosted on any other nameservers, you will need to add the nameserver resource record yourself. The SoftLayer Knowledge Layer contains information about [http://knowledgelayer.softlayer.com/questions/421/ configuring DNS] for a globally load balanced domain.
Use the [[SoftLayer_Network_LoadBalancer_Global_Host::deleteObject]] method to remove a host from your global load balancing pool.
Global load balancer accounts can only be removed by opening a ticket with the SoftLayer accounting team and request that the global load balancer service be canceled.
-
-
Method Summary
Modifier and Type Method Description Boolean
addNsRecord()
If your globally load balanced domain is hosted on the SoftLayer nameservers this method will add the required NS resource record to your DNS zone file and remove any A records that match the host portion of a global load balancer account hostname.Account.ServiceAsync
asAsync()
Get an async version of this serviceBoolean
editObject(Account templateObject)
Edit the properties of a global load balancer account by passing in a modified instance of the object.Account
getAccount()
Your SoftLayer customer account.Item
getBillingItem()
The current billing item for a Global Load Balancer account.List<Host>
getHosts()
The hosts in the load balancing pool for a global load balancer account.Type
getLoadBalanceType()
The load balance method of a global load balancer accountBoolean
getManagedResourceFlag()
A flag indicating that the global load balancer is a managed resource.Account
getObject()
getObject retrieves the SoftLayer_Network_LoadBalancer_Global_Account object whose ID number corresponds to the ID number of the init paramater passed to the SoftLayer_Network_LoadBalancer_Global_Account service.Boolean
removeNsRecord()
If your globally load balanced domain is hosted on the SoftLayer nameservers this method will remove the NS resource record from your DNS zone file.void
setMask(Account.Mask mask)
Account.Mask
withMask()
Use the existing mask on this service or create it if not presentAccount.Mask
withNewMask()
Overwrite the existing mask on this service with a new one and return it-
Methods inherited from interface com.softlayer.api.ResultLimitable
getLastResponseTotalItemCount, getResultLimit, setResultLimit
-
-
-
-
Method Detail
-
asAsync
Account.ServiceAsync asAsync()
Description copied from interface:Service
Get an async version of this service
-
withNewMask
Account.Mask withNewMask()
Description copied from interface:Maskable
Overwrite the existing mask on this service with a new one and return it- Specified by:
withNewMask
in interfaceMaskable
-
withMask
Account.Mask withMask()
Description copied from interface:Maskable
Use the existing mask on this service or create it if not present
-
setMask
void setMask(Account.Mask mask)
-
addNsRecord
@ApiMethod(instanceRequired=true) Boolean addNsRecord()
If your globally load balanced domain is hosted on the SoftLayer nameservers this method will add the required NS resource record to your DNS zone file and remove any A records that match the host portion of a global load balancer account hostname. A NS resource record is required to be able to use your SoftLayer global load balancer account. Please make sure the zone file for the hostname listed on your SoftLayer global load balancer account is setup prior to using this method. If your globally load balanced domain is hosted on any other nameservers this method will not be able to add the required NS record.
-
editObject
@ApiMethod(instanceRequired=true) Boolean editObject(Account templateObject)
Edit the properties of a global load balancer account by passing in a modified instance of the object. The global load balancer account properties you are able to edit are: fallback ip, load balance type id, and notes. Hosts that belong to your SoftLayer global load balancer account are created and modified through this method. An example templateObject that updates global load balancer account properties, updates the properties of a host, and adds a new host is shown below:
* id: 2
* loadBalanceTypeId: 2
* notes: Notes updated
* fallbackIp: 1.1.1.1
* hosts:
** id: 19
** destinationIp: 2.2.2.2
** weight: 25
** healthCheck: http
** destinationPort: 80
** enabled: 1
** destinationIp: 3.3.3.3
** weight: 25
** healthCheck: http
** destinationPort: 80
** enabled: 1
The first section contains the properties of the global load balancer account that will be updated, while the second section contains the elements of the 'hosts' property of the global load balancer account. The first host listed will have its properties updated because the 'id' property of the host is set, meaning the global load balancer host with an id of 19 will be updated. The second host listed will be created because it lacks the 'id' property.
There is a limit to the maximum number of hosts that you are allowed to add, and is defined by the allowedNumberOfHosts property on the global load balancer account. The destination IP address of a host must be an IP address that belongs to your SoftLayer Account, or a local load balancer virtual IP address that belongs to your account. The destination IP address and destination port are required and must be provided when creating a host.
-
getObject
@ApiMethod(instanceRequired=true) Account getObject()
getObject retrieves the SoftLayer_Network_LoadBalancer_Global_Account object whose ID number corresponds to the ID number of the init paramater passed to the SoftLayer_Network_LoadBalancer_Global_Account service. You can only retrieve a global load balancer account that is assigned to your SoftLayer customer account.
-
removeNsRecord
@ApiMethod(instanceRequired=true) Boolean removeNsRecord()
If your globally load balanced domain is hosted on the SoftLayer nameservers this method will remove the NS resource record from your DNS zone file. Removing the NS resource record will basically disable your global load balancer account since no DNS requests will be forwarded to the global load balancers. Any A records that were removed when the NS resource record was added will not be created for you. If your globally load balanced domain is hosted on any other nameservers this method will not be able to remove the required NS record.
-
getAccount
@ApiMethod(instanceRequired=true) Account getAccount()
Your SoftLayer customer account.
-
getBillingItem
@ApiMethod(instanceRequired=true) Item getBillingItem()
The current billing item for a Global Load Balancer account.
-
getHosts
@ApiMethod(instanceRequired=true) List<Host> getHosts()
The hosts in the load balancing pool for a global load balancer account.
-
getLoadBalanceType
@ApiMethod(instanceRequired=true) Type getLoadBalanceType()
The load balance method of a global load balancer account
-
getManagedResourceFlag
@ApiMethod(instanceRequired=true) Boolean getManagedResourceFlag()
A flag indicating that the global load balancer is a managed resource.
-
-