Interface LoadBalancerApi
-
public interface LoadBalancerApi
Provides access to CloudLoadBalancers LoadBalancer features.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LoadBalancer
create(CreateLoadBalancer createLB)
Create a new load balancer with the configuration defined by the request.Metadata
createMetadata(int id, Map<String,String> metadata)
When a metadata item is added, it is assigned a unique identifier that can be used for mutating operations such as changing the value attribute or removing it.void
delete(int id)
Delete a load balancer.boolean
deleteMetadata(int id, Iterable<Integer> metadataIds)
Batch delete metadata given the specified ids.boolean
deleteMetadatum(int id, int metadatumId)
Delete metadatum.LoadBalancer
get(int id)
Get a load balancer.Metadata
getMetadata(int id)
List a load balancer's metadata.PagedIterable<LoadBalancer>
list()
List the load balancers.IterableWithMarker<LoadBalancer>
list(PaginationOptions options)
List the load balancers with full control of pagination.void
update(int id, UpdateLoadBalancer updateLB)
Update the properties of a load balancer.boolean
updateMetadatum(int id, int metadatumId, String value)
Update metadatum.
-
-
-
Method Detail
-
create
@Named("lb:create") @POST @Consumes("application/json") @Path("/loadbalancers") LoadBalancer create(CreateLoadBalancer createLB)
Create a new load balancer with the configuration defined by the request.- Returns:
- The object will contain a unique identifier and status of the request. Using the
identifier, the caller can check on the progress of the operation by performing a
get(int)
.
-
update
@Named("lb:update") @PUT @Consumes("application/json") @Path("/loadbalancers/{id}") void update(@PathParam("id") int id, UpdateLoadBalancer updateLB)
Update the properties of a load balancer.
-
list
@Named("lb:list") @GET @Consumes("application/json") @Path("/loadbalancers") PagedIterable<LoadBalancer> list()
List the load balancers.
-
list
@Named("lb:list") @GET @Consumes("application/json") @Path("/loadbalancers") IterableWithMarker<LoadBalancer> list(PaginationOptions options)
List the load balancers with full control of pagination.
-
get
@Named("lb:get") @GET @Consumes("application/json") @Path("/loadbalancers/{id}") LoadBalancer get(@PathParam("id") int id)
Get a load balancer.
-
delete
@Named("lb:delete") @DELETE @Path("/loadbalancers/{id}") @Consumes("*/*") void delete(@PathParam("id") int id)
Delete a load balancer.
-
createMetadata
@Named("lb:createmetadata") @POST @Consumes("application/json") @Path("/loadbalancers/{id}/metadata") Metadata createMetadata(@PathParam("id") int id, Map<String,String> metadata)
When a metadata item is added, it is assigned a unique identifier that can be used for mutating operations such as changing the value attribute or removing it. Key and value must be 256 characters or less. All UTF-8 characters are valid.
-
getMetadata
@Named("lb:getmetadata") @GET @Consumes("application/json") @Path("/loadbalancers/{id}/metadata") Metadata getMetadata(@PathParam("id") int id)
List a load balancer's metadata.
-
updateMetadatum
@Named("lb:updatemetadatum") @PUT @Produces("application/json") @Consumes("*/*") @Path("/loadbalancers/{id}/metadata/{metadatumId}") boolean updateMetadatum(@PathParam("id") int id, @PathParam("metadatumId") int metadatumId, String value)
Update metadatum. Key and value must be 256 characters or less. All UTF-8 characters are valid.- Returns:
- true on a successful update, false if the metadatum was not found
-
deleteMetadatum
@Named("lb:deletemetadatum") @DELETE @Consumes("*/*") @Path("/loadbalancers/{id}/metadata/{metadatumId}") boolean deleteMetadatum(@PathParam("id") int id, @PathParam("metadatumId") int metadatumId)
Delete metadatum.- Returns:
- true on a successful removal, false if the metadatum was not found
- See Also:
deleteMetadata(int, Iterable)
-
deleteMetadata
@Named("lb:deletemetadata") @DELETE @Consumes("*/*") @Path("/loadbalancers/{id}/metadata") boolean deleteMetadata(@PathParam("id") int id, @QueryParam("id") Iterable<Integer> metadataIds)
Batch delete metadata given the specified ids. The current default limit is ten ids per request. Any and all configuration data is immediately purged and is not recoverable. If one or more of the items in the list cannot be removed due to its current status, an exception is thrown along with the ids of the ones the system identified as potential failures for this request.- Returns:
- true on a successful removal, false if the metadata was not found
-
-