class ForwardingRules extends Resource (View source)

The "forwardingRules" collection of methods.

Typical usage is:

 $computeService = new Google\Service\Compute(...);
 $forwardingRules = $computeService->forwardingRules;

Methods

aggregatedList(string $project, array $optParams = [])

Retrieves an aggregated list of forwarding rules. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

delete(string $project, string $region, string $forwardingRule, array $optParams = [])

Deletes the specified ForwardingRule resource. (forwardingRules.delete)

get(string $project, string $region, string $forwardingRule, array $optParams = [])

Returns the specified ForwardingRule resource. (forwardingRules.get)

insert(string $project, string $region, ForwardingRule $postBody, array $optParams = [])

Creates a ForwardingRule resource in the specified project and region using the data included in the request. (forwardingRules.insert)

listForwardingRules(string $project, string $region, array $optParams = [])

Retrieves a list of ForwardingRule resources available to the specified project and region. (forwardingRules.listForwardingRules)

patch(string $project, string $region, string $forwardingRule, ForwardingRule $postBody, array $optParams = [])

Updates the specified forwarding rule with the data included in the request.

setLabels(string $project, string $region, string $resource, RegionSetLabelsRequest $postBody, array $optParams = [])

Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (forwardingRules.setLabels)

setTarget(string $project, string $region, string $forwardingRule, TargetReference $postBody, array $optParams = [])

Changes target URL for forwarding rule. The new target should be of the same type as the old target. (forwardingRules.setTarget)

Details

ForwardingRuleAggregatedList aggregatedList(string $project, array $optParams = [])

Retrieves an aggregated list of forwarding rules. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

(forwardingRules.aggregatedList)

Parameters

string $project

Project ID for this request.

array $optParams

Optional parameters.

Return Value

ForwardingRuleAggregatedList

Exceptions

Exception

Operation delete(string $project, string $region, string $forwardingRule, array $optParams = [])

Deletes the specified ForwardingRule resource. (forwardingRules.delete)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $forwardingRule

Name of the ForwardingRule resource to delete.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

ForwardingRule get(string $project, string $region, string $forwardingRule, array $optParams = [])

Returns the specified ForwardingRule resource. (forwardingRules.get)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $forwardingRule

Name of the ForwardingRule resource to return.

array $optParams

Optional parameters.

Return Value

ForwardingRule

Exceptions

Exception

Operation insert(string $project, string $region, ForwardingRule $postBody, array $optParams = [])

Creates a ForwardingRule resource in the specified project and region using the data included in the request. (forwardingRules.insert)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

ForwardingRule $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

ForwardingRuleList listForwardingRules(string $project, string $region, array $optParams = [])

Retrieves a list of ForwardingRule resources available to the specified project and region. (forwardingRules.listForwardingRules)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

array $optParams

Optional parameters.

Return Value

ForwardingRuleList

Exceptions

Exception

Operation patch(string $project, string $region, string $forwardingRule, ForwardingRule $postBody, array $optParams = [])

Updates the specified forwarding rule with the data included in the request.

This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (forwardingRules.patch)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $forwardingRule

Name of the ForwardingRule resource to patch.

ForwardingRule $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setLabels(string $project, string $region, string $resource, RegionSetLabelsRequest $postBody, array $optParams = [])

Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (forwardingRules.setLabels)

Parameters

string $project

Project ID for this request.

string $region

The region for this request.

string $resource

Name or id of the resource for this request.

RegionSetLabelsRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setTarget(string $project, string $region, string $forwardingRule, TargetReference $postBody, array $optParams = [])

Changes target URL for forwarding rule. The new target should be of the same type as the old target. (forwardingRules.setTarget)

Parameters

string $project

Project ID for this request.

string $region

Name of the region scoping this request.

string $forwardingRule

Name of the ForwardingRule resource in which target is to be set.

TargetReference $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception