Interface NetworkApi


  • public interface NetworkApi
    Provides synchronous access to cloudstack via their REST API.

    See Also:
    • Method Detail

      • listNetworks

        @Named("listNetworks")
        @GET
        @Consumes("application/json")
        Set<Network> listNetworks​(ListNetworksOptions... options)
        Lists networks
        Parameters:
        options - if present, how to constrain the list.
        Returns:
        networks matching query, or empty set, if no networks are found
      • getNetwork

        @Named("listNetworks")
        @GET
        @Consumes("application/json")
        Network getNetwork​(@QueryParam("id")
                           String id)
        get a specific network by id
        Parameters:
        id - network to get
        Returns:
        network or null if not found
      • createNetworkInZone

        @Named("createNetwork")
        @GET
        @Consumes("application/json")
        Network createNetworkInZone​(@QueryParam("zoneid")
                                    String zoneId,
                                    @QueryParam("networkofferingid")
                                    String networkOfferingId,
                                    @QueryParam("name")
                                    String name,
                                    @QueryParam("displaytext")
                                    String displayText,
                                    CreateNetworkOptions... options)
        Creates a network
        Parameters:
        zoneId - the Zone ID for the Vlan ip range
        networkOfferingId - the network offering id
        name - the name of the network
        displayText - the display text of the network
        options - optional parameters
        Returns:
        newly created network
      • deleteNetwork

        @Named("deleteNetwork")
        @GET
        @Consumes("application/json")
        String deleteNetwork​(@QueryParam("id")
                             String id)
        Deletes a network
        Parameters:
        id - the ID of the network
        Returns:
        job id related to destroying the network, or null if resource was not found