Interface ForwardingRuleApi
-
@Path("/forwardingRules") @Consumes("application/json") public interface ForwardingRuleApi
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ForwardingRuleApi.ForwardingRulePages
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Operation
create(String forwardingRuleName, ForwardingRuleCreationOptions options)
Creates a ForwardingRule resource in the specified project and region using the data included in the request.Operation
delete(String forwardingRule)
Deletes a forwarding rule by name and returns the operation in progress, or null if not found.ForwardingRule
get(String forwardingRule)
Returns a forwarding rule by name or null if not found.Iterator<ListPage<ForwardingRule>>
list()
Iterator<ListPage<ForwardingRule>>
list(ListOptions options)
ListPage<ForwardingRule>
listPage(String pageToken, ListOptions listOptions)
Retrieves the list of forwarding rule resources available to the specified project.Operation
setTarget(String forwardingRule, URI target)
Changes the target url for a forwarding rule.
-
-
-
Method Detail
-
get
@Named("ForwardingRules:get") @GET @Path("/{forwardingRule}") @Nullable ForwardingRule get(@PathParam("forwardingRule") String forwardingRule)
Returns a forwarding rule by name or null if not found.
-
create
@Named("ForwardingRules:insert") @POST @Produces("application/json") Operation create(String forwardingRuleName, ForwardingRuleCreationOptions options)
Creates a ForwardingRule resource in the specified project and region using the data included in the request.- Parameters:
forwardingRuleName
- the name of the forwarding rule.- 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("ForwardingRules:delete") @DELETE @Path("/{forwardingRule}") @Nullable Operation delete(@PathParam("forwardingRule") String forwardingRule)
Deletes a forwarding rule by name and returns the operation in progress, or null if not found.
-
setTarget
@Named("ForwardingRules:setTarget") @POST @Path("/{forwardingRule}/setTarget") @Nullable Operation setTarget(@PathParam("forwardingRule") String forwardingRule, URI target)
Changes the target url for a forwarding rule.- Parameters:
forwardingRule
- the name of the ForwardingRule resource in which target is to be set.target
- The URL of the target resource to receive traffic from this forwarding rule. It must live in the same region as this forwarding rule.- 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.
-
listPage
@Named("ForwardingRules:list") @GET ListPage<ForwardingRule> listPage(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions)
Retrieves the list of forwarding rule 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("ForwardingRules:list") @GET Iterator<ListPage<ForwardingRule>> list()
- See Also:
listPage(String, ListOptions)
-
list
@Named("ForwardingRules:list") @GET Iterator<ListPage<ForwardingRule>> list(ListOptions options)
- See Also:
listPage(String, ListOptions)
-
-