A ForwardingRule resource. A ForwardingRule resource specifies which pool of target VMs to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple.
For a list of methods for this resource, see the end of this page.
Resource representations
A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple.
{
"kind": "compute#forwardingRule",
"id": unsigned long,
"creationTimestamp": string,
"name": string,
"description": string,
"region": string,
"IPAddress": string,
"IPProtocol": string,
"portRange": string,
"target": string,
"selfLink": string
}
| Property name | Value | Description | Notes |
|---|---|---|---|
IPAddress |
string |
The external IP address that this forwarding rule is serving on behalf of. For global forwarding rules, the address must be a global IP address. For regional forwarding rules, the address must live in the same region as the forwarding rule. IBy default, this is empty and an ephemeral is assigned. | |
IPProtocol |
string |
The IP protocol to which this rule applies. Thevalid options are TCP, UDP, ESP, AH, or SCTP. If not specified, the default value used is TCP. |
|
creationTimestamp |
string |
[Output Only] Creation timestamp in RFC3339 text format. | |
description |
string |
An optional textual description of the resource; provided by the client when the resource is created. | |
id |
unsigned long |
[Output Only] Unique identifier for the resource, which is defined by the server. | |
kind |
string |
[Output Only] Type of the resource. Always compute#forwardingRule. |
|
name |
string |
Name of the resource, which is provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?, which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
|
portRange |
string |
If IPProtocol is TCP or UDP, packets addressed to ports in the specified range will be forwarded to backend. By default, this is empty and all ports are allowed. Forwarding rules with the same [IPAddress, IPProtocol] pair must have different port ranges. |
|
region |
string |
Output of the URL of the region where the forwarding pool resides. Returned in the format: https://www.googleapis.com/compute/v1/projects/project/regions/region |
|
selfLink |
string |
[Output Only] Server defined URL for the resource. | |
target |
string |
The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy resource. |
Methods
The following are valid Forwarding Rule resource methods:
- aggregatedList
- Retrieves the list of forwarding rules grouped by scope.
- delete
- Deletes the specified
ForwardingRuleresource. - get
- Returns the specified
ForwardingRuleresource. - insert
- Creates a
ForwardingRuleresource in the specified project and region using the data included in the request. - list
- Retrieves the list of
ForwardingRuleresources available to the specified project and region. - setTarget
- Changes the target URL for the forwarding rule.