Interface NodeApi
-
public interface NodeApi
Provides access to CloudLoadBalancers Node features.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<Node>
add(Iterable<AddNode> addNodes)
Add a new node 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.boolean
deleteMetadata(int id, Iterable<Integer> metadataIds)
Batch delete metadata given the specified ids.boolean
deleteMetadatum(int id, int metadatumId)
Delete metadatum.Node
get(int id)
Get a node.Metadata
getMetadata(int lb)
List a load balancer's metadata.PagedIterable<Node>
list()
List the nodes.IterableWithMarker<Node>
list(PaginationOptions options)
List the nodes with full control of pagination.void
remove(int id)
Remove a node from the load balancer.void
remove(Iterable<Integer> ids)
Batch remove nodes from the load balancer.void
update(int id, UpdateNode updateNode)
Update the attributes of a node.boolean
updateMetadatum(int id, int metadatumId, String value)
Update metadatum.
-
-
-
Method Detail
-
add
@Named("node:add") @POST @Consumes("application/json") @Path("/nodes") Set<Node> add(Iterable<AddNode> addNodes)
Add a new node with the configuration defined by the request.
-
update
@Named("node:update") @PUT @Consumes("application/json") @Path("/nodes/{id}") void update(@PathParam("id") int id, UpdateNode updateNode)
Update the attributes of a node.
-
list
@Named("node:list") @GET @Consumes("application/json") @Path("/nodes") PagedIterable<Node> list()
List the nodes.
-
list
@Named("node:list") @GET @Consumes("application/json") @Path("/nodes") IterableWithMarker<Node> list(PaginationOptions options)
List the nodes with full control of pagination.
-
get
@Named("node:get") @GET @Consumes("application/json") @Path("/nodes/{id}") Node get(@PathParam("id") int id)
Get a node.
-
remove
@Named("node:remove") @DELETE @Path("/nodes/{id}") @Consumes("*/*") void remove(@PathParam("id") int id)
Remove a node from the load balancer.
-
remove
@Named("node:remove") @DELETE @Path("/nodes") @Consumes("*/*") void remove(@QueryParam("id") Iterable<Integer> ids)
Batch remove nodes from the load balancer.
-
createMetadata
@Named("node:createmetadata") @POST @Consumes("application/json") @Path("/nodes/{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("node:getmetadata") @GET @Consumes("application/json") @Path("/nodes/{id}/metadata") Metadata getMetadata(@PathParam("id") int lb)
List a load balancer's metadata.
-
updateMetadatum
@Named("node:updatemetadatum") @PUT @Produces("application/json") @Consumes("*/*") @Path("/nodes/{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("node:deletemetadatum") @DELETE @Consumes("*/*") @Path("/nodes/{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("node:deletemetadata") @DELETE @Consumes("*/*") @Path("/nodes/{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
-
-