Package org.jclouds.softlayer.features
Interface NetworkApi
- All Superinterfaces:
AutoCloseable
,Closeable
@Path("/v{jclouds.api-version}")
@Consumes("application/json")
public interface NetworkApi
extends Closeable
Provides access to Network via their REST API.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateNetwork
(List<Network.CreateNetwork> networkToBeCreated) creates a networkcreateSubnet
(long id, List<Object> subnetToBeCreated) creates a subnet on the given networkboolean
deleteNetwork
(long id) deletes a network with the given idboolean
deleteSubnet
(long id, List<Subnet.DeleteSubnet> subnetToBeDeleted) removes the subnet of the given networkboolean
editNetwork
(long id, List<Network.EditNetwork> networkToBeEdited) modifies a network with the given idgetName
(long id) returns the name of the network of the given idgetNetwork
(long id) returns the details of the network of the given idgetNotes
(long id) returns the notes of the network of the given idgetSubnets
(long id) returns the subnets of the network of the given idreturns a list of networks belong to the account
-
Field Details
-
NAME_MASK
- See Also:
-
-
Method Details
-
listNetworks
@GET @Named("Network:getAlllObjects") @Path("/SoftLayer_Network/getAllObjects") @Produces("application/json") List<Network> listNetworks()returns a list of networks belong to the account- Returns:
- an account's associated network objects.
- See Also:
-
getName
@GET @Named("Network:getName") @Path("/SoftLayer_Network/{id}/getName") @Produces("application/json") String getName(@PathParam("id") long id) returns the name of the network of the given id- Parameters:
id
- id of the network- Returns:
- String or null
- See Also:
-
getNotes
@GET @Named("Network:getNotes") @Path("/SoftLayer_Network/{id}/getNotes") @Produces("application/json") String getNotes(@PathParam("id") long id) returns the notes of the network of the given id- Parameters:
id
- id of the network- Returns:
- String or null
- See Also:
-
getNetwork
@GET @Named("Network:getObject") @Path("/SoftLayer_Network/{id}/getObject") @Produces("application/json") Network getNetwork(@PathParam("id") long id) returns the details of the network of the given id- Parameters:
id
- id of the network- Returns:
- String or null
- See Also:
-
getSubnets
@GET @Named("Network:getSubnets") @Path("/SoftLayer_Network/{id}/getSubnets") @Produces("application/json") List<Subnet> getSubnets(@PathParam("id") long id) returns the subnets of the network of the given id- Parameters:
id
- id of the network- Returns:
- list of subnets under the network or null
- See Also:
-
createNetwork
@POST @Named("network:createObject") @Path("/SoftLayer_Network/createObject") @Produces("application/json") Network createNetwork(List<Network.CreateNetwork> networkToBeCreated) creates a network- Parameters:
networkToBeCreated
- the network creation definition of Network.CreateNetwork- Returns:
- Network created
- See Also:
-
editNetwork
@PUT @Named("Network:editObject") @Path("/SoftLayer_Network/{id}/editObject") boolean editNetwork(@PathParam("id") long id, List<Network.EditNetwork> networkToBeEdited) modifies a network with the given id- Parameters:
id
- the id of the network to be editednetworkToBeEdited
- the network edition definition of Network.EditNetwork- Returns:
- true when edition was successful and false for unsuccessful edition
- See Also:
-
deleteNetwork
@DELETE @Named("network:deleteObject") @Path("/SoftLayer_Network/{id}") boolean deleteNetwork(@PathParam("id") long id) deletes a network with the given id- Parameters:
id
- the id of the network to be deleted- Returns:
- boolean value true for successful deletion and false for failed deletion
- See Also:
-
createSubnet
@POST @Named("Network:createSubnet") @Path("/SoftLayer_Network/{id}/createSubnet") @Produces("application/json") Subnet createSubnet(@PathParam("id") long id, List<Object> subnetToBeCreated) creates a subnet on the given network- Parameters:
id
- the id of the network to be editedsubnetToBeCreated
- the subnet creation definition of Subnet.CreateSubnet- Returns:
- subnet created
- See Also:
-
deleteSubnet
@POST @Named("Network:deleteSubnet") @Path("/SoftLayer_Network/{id}/deleteSubnet") @Produces("application/json") boolean deleteSubnet(@PathParam("id") long id, List<Subnet.DeleteSubnet> subnetToBeDeleted) removes the subnet of the given network- Parameters:
id
- id of the targeted seurity groupsubnetToBeDeleted
- the subnet deletion definition of Subnet.DeleteSubnet- See Also:
-