class Google::Apis::ComputeV1::ForwardingRule
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.
Attributes
- Output Only
-
Creation timestamp in RFC3339 text format.
Corresponds to the JSON property `creationTimestamp` @return [String]
An optional description of this resource. Provide this property when you create the resource. Corresponds to the JSON property `description` @return [String]
- Output Only
-
The unique identifier for the resource. This identifier is
defined by the server. Corresponds to the JSON property `id` @return [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. Corresponds to the JSON property `IPAddress` @return [String]
The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH or SCTP. Corresponds to the JSON property `IPProtocol` @return [String]
- Output Only
-
Type of the resource. Always compute#forwardingRule for
Forwarding Rule resources. Corresponds to the JSON property `kind` @return [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]*)? 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. Corresponds to the JSON property `name` @return [String]
Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Corresponds to the JSON property `portRange` @return [String]
- Output Only
-
URL of the region where the regional forwarding rule resides.
This field is not applicable to global forwarding rules. Corresponds to the JSON property `region` @return [String]
- Output Only
-
Server-defined URL for the resource.
Corresponds to the JSON property `selfLink` @return [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 or TargetHttpsProxy resource. The forwarded traffic must be of a type appropriate to the target object. For example, TargetHttpProxy requires HTTP traffic, and TargetHttpsProxy requires HTTPS traffic. Corresponds to the JSON property `target` @return [String]
Public Class Methods
# File generated/google/apis/compute_v1/classes.rb, line 2183 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/compute_v1/classes.rb, line 2188 def update!(**args) @ip_address = args[:ip_address] if args.key?(:ip_address) @ip_protocol = args[:ip_protocol] if args.key?(:ip_protocol) @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp) @description = args[:description] if args.key?(:description) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @name = args[:name] if args.key?(:name) @port_range = args[:port_range] if args.key?(:port_range) @region = args[:region] if args.key?(:region) @self_link = args[:self_link] if args.key?(:self_link) @target = args[:target] if args.key?(:target) end