ForwardingRule class

Represents a Forwarding Rule resource.

Forwarding rule resources in GCP can be either regional or global in scope:

Global

A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud Platform load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic gateways (targetVpnGateway).

For more information, read Forwarding rule concepts and Using protocol forwarding.

(== resource_for {$api_version}.forwardingRules ==) (== resource_for {$api_version}.globalForwardingRules ==) (== resource_for {$api_version}.regionForwardingRules ==)

Constructors

ForwardingRule()
ForwardingRule.fromJson(Map _json)

Properties

allowGlobalAccess bool
This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. If the field is set to TRUE, clients can access ILB from all regions. Otherwise only allows access from clients in the same region as the internal load balancer.
read / write
allPorts bool
This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. This field cannot be used with port or portRange fields. [...]
read / write
backendService String
This field is only used for INTERNAL load balancing. [...]
read / write
creationTimestamp String
Output Only Creation timestamp in RFC3339 text format.
read / write
description String
An optional description of this resource. Provide this property when you create the resource.
read / write
fingerprint String
Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ForwardingRule. Include the fingerprint in patch request to ensure that you do not overwrite changes that were applied from another concurrent request. [...]
read / write
fingerprintAsBytes List<int>
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
id String
Output Only The unique identifier for the resource. This identifier is defined by the server.
read / write
IPAddress String
IP address that this forwarding rule serves. When a client sends traffic to this IP address, the forwarding rule directs the traffic to the target that you specify in the forwarding rule. [...]
read / write
IPProtocol String
The IP protocol to which this rule applies. For protocol forwarding, valid options are TCP, UDP, ESP, AH, SCTP or ICMP. [...]
read / write
ipVersion String
The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for an external global forwarding rule. Possible string values are: [...]
read / write
isMirroringCollector bool
Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL.
read / write
kind String
Output Only Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.
read / write
loadBalancingScheme String
Specifies the forwarding rule type. [...]
read / write
metadataFilters List<MetadataFilter>
Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant configuration is made available to those proxies. Otherwise, all the resources (e.g. TargetHttpProxy, UrlMap) referenced by the ForwardingRule will not be visible to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. metadataFilters specified here will be applifed before those specified in the UrlMap that this ForwardingRule references. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
read / write
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.
read / write
network String
This field is not used for external load balancing. [...]
read / write
networkTier String
This signifies the networking tier used for configuring this load balancer and can only take the following values: PREMIUM, STANDARD. [...]
read / write
portRange String
When the load balancing scheme is EXTERNAL, INTERNAL_SELF_MANAGED and INTERNAL_MANAGED, you can specify a port_range. Use with a forwarding rule that points to a target proxy or a target pool. Do not use with a forwarding rule that points to a backend service. This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. [...]
read / write
ports List<String>
This field is used along with the backend_service field for internal load balancing. [...]
read / write
region String
Output Only URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
Output Only Server-defined URL for the resource.
read / write
serviceLabel String
An optional prefix to the service name for this Forwarding Rule. If specified, the prefix is the first label of the fully qualified service name. [...]
read / write
serviceName String
Output Only The internal fully qualified service name for this Forwarding Rule. [...]
read / write
subnetwork String
This field is only used for INTERNAL load balancing. [...]
read / write
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 load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only targetHttpProxy is valid, not targetHttpsProxy.
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, Object>
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited