Interface NetworkApi
@Path("/networks")
@Consumes("application/json")
public interface NetworkApi
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncreate
(NetworkCreationOptions options) Creates a persistent network resource in the specified project with the specified options.createCustom
(String networkName) Creates a custom persistent network resource in the specified project with the specified range.createLegacy
(String networkName, String IPv4Range) Creates a legacy persistent network resource in the specified project with the specified range.Deletes a network by name and returns the operation in progress, or null if not found.Returns a network by name or null if not found.list()
list
(ListOptions options) listPage
(String pageToken, ListOptions listOptions) Retrieves the list of network resources available to the specified project.
-
Method Details
-
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
- See Also:
-
list
- See Also:
-