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.
{ "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. If this is a reserved address, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IP is assigned to the ForwardingRule. | |
IPProtocol
|
string
|
The IP protocol to which this rule applies.
If left empty, the default value used is
TCP.
Acceptable values are:
|
|
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; defined by the server. | |
kind
|
string
|
[Output Only]
Type of the resource. Always
compute#forwardingRule
.
|
|
name
|
string
|
Name of the resource; 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.
|
|
region
|
string
|
URL of the region where the forwarding pool resides. In the format:
https://www.googleapis.com/compute/v1beta16/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. The target resource must live in the same region as this forwarding rule. |
Methods
The following are valid Forwarding Rule resource methods:
- aggregatedList
- Retrieves the list of forwarding rules grouped by scope.
- delete
- Deletes the specified ForwardingRule resource.
- get
- Returns the specified ForwardingRule resource.
- insert
- Creates a ForwardingRule resource in the specified project and region using the data included in the request.
- list
- Retrieves the list of ForwardingRule resources available to the specified project and region.
- setTarget
- Changes target url for forwarding rule.