• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.forwardingRules.html">forwardingRules</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
79<p class="firstline">Retrieves an aggregated list of forwarding rules.</p>
80<p class="toc_element">
81  <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
84  <code><a href="#delete">delete(project, region, forwardingRule)</a></code></p>
85<p class="firstline">Deletes the specified ForwardingRule resource.</p>
86<p class="toc_element">
87  <code><a href="#get">get(project, region, forwardingRule)</a></code></p>
88<p class="firstline">Returns the specified ForwardingRule resource.</p>
89<p class="toc_element">
90  <code><a href="#insert">insert(project, region, body)</a></code></p>
91<p class="firstline">Creates a ForwardingRule resource in the specified project and region using the data included in the request.</p>
92<p class="toc_element">
93  <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
94<p class="firstline">Retrieves a list of ForwardingRule resources available to the specified project and region.</p>
95<p class="toc_element">
96  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
99  <code><a href="#setTarget">setTarget(project, region, forwardingRule, body)</a></code></p>
100<p class="firstline">Changes target URL for forwarding rule. The new target should be of the same type as the old target.</p>
101<p class="toc_element">
102  <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p>
103<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
104<h3>Method Details</h3>
105<div class="method">
106    <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
107  <pre>Retrieves an aggregated list of forwarding rules.
108
109Args:
110  project: string, Project ID for this request. (required)
111  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
112
113You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
114
115Currently, only sorting by name or creationTimestamp desc is supported.
116  maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
117  pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
118  filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
119
120The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
121
122For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
123
124You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
125
126To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
127
128Returns:
129  An object of the form:
130
131    {
132    "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
133    "items": { # A map of scoped forwarding rule lists.
134      "a_key": { # Name of the scope containing this set of addresses.
135        "forwardingRules": [ # List of forwarding rules contained in this scope.
136          { # 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, ports] tuple.
137              "kind": "compute#forwardingRule", # [Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.
138              "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
139              "serviceName": "A String", # [Output Only] The internal fully qualified service name for this Forwarding Rule.
140                  #
141                  # This field is only used for internal load balancing.
142              "serviceLabel": "A String", # An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.
143                  #
144                  # The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label 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.
145                  #
146                  # This field is only used for internal load balancing.
147              "IPAddress": "A String", # The IP address that this forwarding rule is serving on behalf of.
148                  #
149                  # 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. By default, this field is empty and an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.
150                  #
151                  # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule.
152              "region": "A String", # [Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules.
153              "ports": [ # This field is used along with the backend_service field for internal load balancing.
154                  #
155                  # When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.
156                  #
157                  # You may specify a maximum of up to 5 ports.
158                "A String",
159              ],
160              "ipVersion": "A String", # The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.
161              "network": "A String", # This field is not used for external load balancing.
162                  #
163                  # For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used.
164              "loadBalancingScheme": "A String", # This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)
165              "target": "A 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.
166                  #
167                  # This field is not used for internal load balancing.
168              "portRange": "A String", # This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.
169                  #
170                  # 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.
171                  #
172                  # Some types of forwarding target have constraints on the acceptable ports:
173                  # - TargetHttpProxy: 80, 8080
174                  # - TargetHttpsProxy: 443
175                  # - TargetSslProxy: 443
176                  # - TargetVpnGateway: 500, 4500
177                  # -
178              "backendService": "A String", # This field is not used for external load balancing.
179                  #
180                  # For internal load balancing, this field identifies the BackendService resource to receive the matched traffic.
181              "IPProtocol": "A String", # The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.
182                  #
183                  # When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
184              "subnetwork": "A String", # This field is not used for external load balancing.
185                  #
186                  # For internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.
187                  #
188                  # If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.
189              "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
190              "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
191              "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
192              "name": "A 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.
193            },
194        ],
195        "warning": { # Informational warning which replaces the list of forwarding rules when the list is empty.
196          "message": "A String", # [Output Only] A human-readable description of the warning code.
197          "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
198          "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
199              # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
200            {
201              "value": "A String", # [Output Only] A warning data value corresponding to the key.
202              "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
203            },
204          ],
205        },
206      },
207    },
208    "kind": "compute#forwardingRuleAggregatedList", # [Output Only] Type of resource. Always compute#forwardingRuleAggregatedList for lists of forwarding rules.
209    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
210    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
211  }</pre>
212</div>
213
214<div class="method">
215    <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
216  <pre>Retrieves the next page of results.
217
218Args:
219  previous_request: The request for the previous page. (required)
220  previous_response: The response from the request for the previous page. (required)
221
222Returns:
223  A request object that you can call 'execute()' on to request the next
224  page. Returns None if there are no more items in the collection.
225    </pre>
226</div>
227
228<div class="method">
229    <code class="details" id="delete">delete(project, region, forwardingRule)</code>
230  <pre>Deletes the specified ForwardingRule resource.
231
232Args:
233  project: string, Project ID for this request. (required)
234  region: string, Name of the region scoping this request. (required)
235  forwardingRule: string, Name of the ForwardingRule resource to delete. (required)
236
237Returns:
238  An object of the form:
239
240    { # An Operation resource, used to manage asynchronous API requests.
241    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
242    "clientOperationId": "A String", # [Output Only] Reserved for future use.
243    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
244    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
245    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
246    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
247    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
248    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
249    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
250    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
251    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
252    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
253    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
254    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
255      {
256        "message": "A String", # [Output Only] A human-readable description of the warning code.
257        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
258        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
259            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
260          {
261            "value": "A String", # [Output Only] A warning data value corresponding to the key.
262            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
263          },
264        ],
265      },
266    ],
267    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
268    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
269    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
270    "name": "A String", # [Output Only] Name of the resource.
271    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
272    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
273      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
274        {
275          "message": "A String", # [Output Only] An optional, human-readable error message.
276          "code": "A String", # [Output Only] The error type identifier for this error.
277          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
278        },
279      ],
280    },
281    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
282    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
283    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
284  }</pre>
285</div>
286
287<div class="method">
288    <code class="details" id="get">get(project, region, forwardingRule)</code>
289  <pre>Returns the specified ForwardingRule resource.
290
291Args:
292  project: string, Project ID for this request. (required)
293  region: string, Name of the region scoping this request. (required)
294  forwardingRule: string, Name of the ForwardingRule resource to return. (required)
295
296Returns:
297  An object of the form:
298
299    { # 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, ports] tuple.
300      "kind": "compute#forwardingRule", # [Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.
301      "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
302      "serviceName": "A String", # [Output Only] The internal fully qualified service name for this Forwarding Rule.
303          #
304          # This field is only used for internal load balancing.
305      "serviceLabel": "A String", # An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.
306          #
307          # The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label 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.
308          #
309          # This field is only used for internal load balancing.
310      "IPAddress": "A String", # The IP address that this forwarding rule is serving on behalf of.
311          #
312          # 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. By default, this field is empty and an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.
313          #
314          # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule.
315      "region": "A String", # [Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules.
316      "ports": [ # This field is used along with the backend_service field for internal load balancing.
317          #
318          # When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.
319          #
320          # You may specify a maximum of up to 5 ports.
321        "A String",
322      ],
323      "ipVersion": "A String", # The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.
324      "network": "A String", # This field is not used for external load balancing.
325          #
326          # For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used.
327      "loadBalancingScheme": "A String", # This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)
328      "target": "A 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.
329          #
330          # This field is not used for internal load balancing.
331      "portRange": "A String", # This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.
332          #
333          # 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.
334          #
335          # Some types of forwarding target have constraints on the acceptable ports:
336          # - TargetHttpProxy: 80, 8080
337          # - TargetHttpsProxy: 443
338          # - TargetSslProxy: 443
339          # - TargetVpnGateway: 500, 4500
340          # -
341      "backendService": "A String", # This field is not used for external load balancing.
342          #
343          # For internal load balancing, this field identifies the BackendService resource to receive the matched traffic.
344      "IPProtocol": "A String", # The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.
345          #
346          # When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
347      "subnetwork": "A String", # This field is not used for external load balancing.
348          #
349          # For internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.
350          #
351          # If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.
352      "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
353      "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
354      "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
355      "name": "A 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.
356    }</pre>
357</div>
358
359<div class="method">
360    <code class="details" id="insert">insert(project, region, body)</code>
361  <pre>Creates a ForwardingRule resource in the specified project and region using the data included in the request.
362
363Args:
364  project: string, Project ID for this request. (required)
365  region: string, Name of the region scoping this request. (required)
366  body: object, The request body. (required)
367    The object takes the form of:
368
369{ # 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, ports] tuple.
370    "kind": "compute#forwardingRule", # [Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.
371    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
372    "serviceName": "A String", # [Output Only] The internal fully qualified service name for this Forwarding Rule.
373        #
374        # This field is only used for internal load balancing.
375    "serviceLabel": "A String", # An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.
376        #
377        # The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label 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.
378        #
379        # This field is only used for internal load balancing.
380    "IPAddress": "A String", # The IP address that this forwarding rule is serving on behalf of.
381        #
382        # 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. By default, this field is empty and an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.
383        #
384        # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule.
385    "region": "A String", # [Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules.
386    "ports": [ # This field is used along with the backend_service field for internal load balancing.
387        #
388        # When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.
389        #
390        # You may specify a maximum of up to 5 ports.
391      "A String",
392    ],
393    "ipVersion": "A String", # The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.
394    "network": "A String", # This field is not used for external load balancing.
395        #
396        # For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used.
397    "loadBalancingScheme": "A String", # This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)
398    "target": "A 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.
399        #
400        # This field is not used for internal load balancing.
401    "portRange": "A String", # This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.
402        #
403        # 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.
404        #
405        # Some types of forwarding target have constraints on the acceptable ports:
406        # - TargetHttpProxy: 80, 8080
407        # - TargetHttpsProxy: 443
408        # - TargetSslProxy: 443
409        # - TargetVpnGateway: 500, 4500
410        # -
411    "backendService": "A String", # This field is not used for external load balancing.
412        #
413        # For internal load balancing, this field identifies the BackendService resource to receive the matched traffic.
414    "IPProtocol": "A String", # The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.
415        #
416        # When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
417    "subnetwork": "A String", # This field is not used for external load balancing.
418        #
419        # For internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.
420        #
421        # If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.
422    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
423    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
424    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
425    "name": "A 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.
426  }
427
428
429Returns:
430  An object of the form:
431
432    { # An Operation resource, used to manage asynchronous API requests.
433    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
434    "clientOperationId": "A String", # [Output Only] Reserved for future use.
435    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
436    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
437    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
438    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
439    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
440    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
441    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
442    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
443    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
444    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
445    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
446    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
447      {
448        "message": "A String", # [Output Only] A human-readable description of the warning code.
449        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
450        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
451            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
452          {
453            "value": "A String", # [Output Only] A warning data value corresponding to the key.
454            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
455          },
456        ],
457      },
458    ],
459    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
460    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
461    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
462    "name": "A String", # [Output Only] Name of the resource.
463    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
464    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
465      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
466        {
467          "message": "A String", # [Output Only] An optional, human-readable error message.
468          "code": "A String", # [Output Only] The error type identifier for this error.
469          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
470        },
471      ],
472    },
473    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
474    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
475    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
476  }</pre>
477</div>
478
479<div class="method">
480    <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
481  <pre>Retrieves a list of ForwardingRule resources available to the specified project and region.
482
483Args:
484  project: string, Project ID for this request. (required)
485  region: string, Name of the region scoping this request. (required)
486  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
487
488You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
489
490Currently, only sorting by name or creationTimestamp desc is supported.
491  maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
492  pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
493  filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
494
495The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
496
497For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
498
499You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
500
501To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
502
503Returns:
504  An object of the form:
505
506    { # Contains a list of ForwardingRule resources.
507    "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
508    "items": [ # A list of ForwardingRule resources.
509      { # 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, ports] tuple.
510          "kind": "compute#forwardingRule", # [Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.
511          "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
512          "serviceName": "A String", # [Output Only] The internal fully qualified service name for this Forwarding Rule.
513              #
514              # This field is only used for internal load balancing.
515          "serviceLabel": "A String", # An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.
516              #
517              # The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label 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.
518              #
519              # This field is only used for internal load balancing.
520          "IPAddress": "A String", # The IP address that this forwarding rule is serving on behalf of.
521              #
522              # 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. By default, this field is empty and an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.
523              #
524              # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule.
525          "region": "A String", # [Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules.
526          "ports": [ # This field is used along with the backend_service field for internal load balancing.
527              #
528              # When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.
529              #
530              # You may specify a maximum of up to 5 ports.
531            "A String",
532          ],
533          "ipVersion": "A String", # The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.
534          "network": "A String", # This field is not used for external load balancing.
535              #
536              # For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used.
537          "loadBalancingScheme": "A String", # This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)
538          "target": "A 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.
539              #
540              # This field is not used for internal load balancing.
541          "portRange": "A String", # This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.
542              #
543              # 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.
544              #
545              # Some types of forwarding target have constraints on the acceptable ports:
546              # - TargetHttpProxy: 80, 8080
547              # - TargetHttpsProxy: 443
548              # - TargetSslProxy: 443
549              # - TargetVpnGateway: 500, 4500
550              # -
551          "backendService": "A String", # This field is not used for external load balancing.
552              #
553              # For internal load balancing, this field identifies the BackendService resource to receive the matched traffic.
554          "IPProtocol": "A String", # The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.
555              #
556              # When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
557          "subnetwork": "A String", # This field is not used for external load balancing.
558              #
559              # For internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.
560              #
561              # If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.
562          "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
563          "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
564          "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
565          "name": "A 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.
566        },
567    ],
568    "kind": "compute#forwardingRuleList", # Type of resource.
569    "id": "A String", # [Output Only] Unique identifier for the resource. Set by the server.
570    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
571  }</pre>
572</div>
573
574<div class="method">
575    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
576  <pre>Retrieves the next page of results.
577
578Args:
579  previous_request: The request for the previous page. (required)
580  previous_response: The response from the request for the previous page. (required)
581
582Returns:
583  A request object that you can call 'execute()' on to request the next
584  page. Returns None if there are no more items in the collection.
585    </pre>
586</div>
587
588<div class="method">
589    <code class="details" id="setTarget">setTarget(project, region, forwardingRule, body)</code>
590  <pre>Changes target URL for forwarding rule. The new target should be of the same type as the old target.
591
592Args:
593  project: string, Project ID for this request. (required)
594  region: string, Name of the region scoping this request. (required)
595  forwardingRule: string, Name of the ForwardingRule resource in which target is to be set. (required)
596  body: object, The request body. (required)
597    The object takes the form of:
598
599{
600    "target": "A String",
601  }
602
603
604Returns:
605  An object of the form:
606
607    { # An Operation resource, used to manage asynchronous API requests.
608    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
609    "clientOperationId": "A String", # [Output Only] Reserved for future use.
610    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
611    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
612    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
613    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
614    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
615    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
616    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
617    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
618    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
619    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
620    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
621    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
622      {
623        "message": "A String", # [Output Only] A human-readable description of the warning code.
624        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
625        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
626            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
627          {
628            "value": "A String", # [Output Only] A warning data value corresponding to the key.
629            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
630          },
631        ],
632      },
633    ],
634    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
635    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
636    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
637    "name": "A String", # [Output Only] Name of the resource.
638    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
639    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
640      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
641        {
642          "message": "A String", # [Output Only] An optional, human-readable error message.
643          "code": "A String", # [Output Only] The error type identifier for this error.
644          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
645        },
646      ],
647    },
648    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
649    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
650    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
651  }</pre>
652</div>
653
654<div class="method">
655    <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code>
656  <pre>Returns permissions that a caller has on the specified resource.
657
658Args:
659  project: string, Project ID for this request. (required)
660  region: string, The name of the region for this request. (required)
661  resource: string, Name of the resource for this request. (required)
662  body: object, The request body. (required)
663    The object takes the form of:
664
665{
666    "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
667      "A String",
668    ],
669  }
670
671
672Returns:
673  An object of the form:
674
675    {
676    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
677      "A String",
678    ],
679  }</pre>
680</div>
681
682</body></html>