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 VMs 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
|
Value of the reserved IP address that this forwarding rule is serving on behalf of. For global forwarding rules, the address must be a global IP; for regional forwarding rules, the address must live in the same region as the forwarding rule. If left empty (default value), an ephemeral IP from the same scope (global or regional) will be assigned. | |
IPProtocol
|
string
|
The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'
Acceptable values are:
|
|
creationTimestamp
|
string
|
Creation timestamp in RFC3339 text format (output only). | |
description
|
string
|
An optional textual description of the resource; provided by the client when the resource is created. | |
id
|
unsigned long
|
Unique identifier for the resource; defined by the server (output only). | |
kind
|
string
|
Type of the resource. | |
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. | |
portRange
|
string
|
Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets addressed to ports in the specified range will be forwarded to 'target'. If 'portRange' is left empty (default value), all ports are forwarded. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. @pattern: \d+(?:-\d+)? | |
region
|
string
|
URL of the region where the regional forwarding rule resides (output only). This field is not applicable to global forwarding rules. | |
selfLink
|
string
|
Server defined URL for the resource (output only). | |
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
- 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.
- setTarget
- Changes target url for forwarding rule.