Interface NetworkApi
-
@Path("/networks") @Consumes("application/json") public interface NetworkApi
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
NetworkApi.NetworkPages
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Operation
create(NetworkCreationOptions options)
Creates a persistent network resource in the specified project with the specified options.Operation
createCustom(String networkName)
Creates a custom persistent network resource in the specified project with the specified range.Operation
createLegacy(String networkName, String IPv4Range)
Creates a legacy persistent network resource in the specified project with the specified range.Operation
delete(String networkName)
Deletes a network by name and returns the operation in progress, or null if not found.Network
get(String networkName)
Returns a network by name or null if not found.Iterator<ListPage<Network>>
list()
Iterator<ListPage<Network>>
list(ListOptions options)
ListPage<Network>
listPage(String pageToken, ListOptions listOptions)
Retrieves the list of network resources available to the specified project.
-
-
-
Method Detail
-
get
@Named("Networks:get") @GET @Path("/{network}") Network get(@PathParam("network") String networkName)
Returns a network by name or null if not found.
-
createLegacy
@Named("Networks:insert") @POST @Produces("application/json") Operation createLegacy(String networkName, String IPv4Range)
Creates a legacy persistent network resource in the specified project with the specified range.- Parameters:
networkName
- the network nameIPv4Range
- the range of the network to be inserted.- Returns:
- an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
-
createCustom
@Named("Networks:insert") @POST @Produces("application/json") Operation createCustom(String networkName)
Creates a custom persistent network resource in the specified project with the specified range.- Parameters:
networkName
- the network name- Returns:
- an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
-
create
@Named("Networks:insert") @POST @Produces("application/json") Operation create(NetworkCreationOptions options)
Creates a persistent network resource in the specified project with the specified options.- Parameters:
options
- the network options.- Returns:
- an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
-
delete
@Named("Networks:delete") @DELETE @Path("/{network}") Operation delete(@PathParam("network") String networkName)
Deletes a network by name and returns the operation in progress, or null if not found.
-
listPage
@Named("Networks:list") @GET ListPage<Network> listPage(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions)
Retrieves the list of network resources available to the specified project. By default the list as a maximum size of 100, if no options are provided or ListOptions#getMaxResults() has not been set.- Parameters:
pageToken
- marks the beginning of the next list pagelistOptions
- listing options- Returns:
- a page of the list
-
list
@Named("Networks:list") @GET Iterator<ListPage<Network>> list()
- See Also:
listPage(String, ListOptions)
-
list
@Named("Networks:list") @GET Iterator<ListPage<Network>> list(ListOptions options)
- See Also:
listPage(String, ListOptions)
-
-