blob: 427a3e0baf69dd5c828c292671f1ebd7f65b9740 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.firewalls.html">firewalls</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040081 <code><a href="#delete">delete(project, firewall, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Deletes the specified firewall.</p>
83<p class="toc_element">
84 <code><a href="#get">get(project, firewall)</a></code></p>
85<p class="firstline">Returns the specified firewall.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Creates a firewall rule in the specified project using the data included in the request.</p>
89<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Retrieves the list of firewall rules available to the specified project.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(project, firewall, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#update">update(project, firewall, body=None, requestId=None)</a></code></p>
103<p class="firstline">Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<h3>Method Details</h3>
105<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400111 <code class="details" id="delete">delete(project, firewall, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112 <pre>Deletes the specified firewall.
113
114Args:
115 project: string, Project ID for this request. (required)
116 firewall: string, Name of the firewall rule to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
118
119For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
120
121The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122
123Returns:
124 An object of the form:
125
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800127 #
128 # Google Compute Engine has three Operation resources:
129 #
130 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
131 #
132 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
133 #
134 # Operations can be global, regional or zonal.
135 # - For global operations, use the `globalOperations` resource.
136 # - For regional operations, use the `regionOperations` resource.
137 # - For zonal operations, use the `zonalOperations` resource.
138 #
139 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
140 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
141 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
142 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
143 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
144 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
145 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800147 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
148 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 },
151 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800152 },
153 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
154 &quot;httpErrorStatusCode&quot;: 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.
155 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
156 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
157 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800158 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
159 #
160 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
161 #
162 # Example 1: Pack and unpack a message in C++.
163 #
164 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
165 #
166 # Example 2: Pack and unpack a message in Java.
167 #
168 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
169 #
170 # Example 3: Pack and unpack a message in Python.
171 #
172 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
173 #
174 # Example 4: Pack and unpack a message in Go
175 #
176 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
177 #
178 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
179 #
180 #
181 #
182 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
183 #
184 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
185 #
186 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
187 #
188 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
189 #
190 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
191 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
192 #
193 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
194 #
195 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
196 #
197 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
198 #
199 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
200 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
201 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800202 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800203 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800204 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
205 &quot;progress&quot;: 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.
206 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
207 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
208 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
209 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
210 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
211 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
212 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
213 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
214 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
215 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
216 {
217 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
218 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
219 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
220 {
221 &quot;key&quot;: &quot;A String&quot;, # [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).
222 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
223 },
224 ],
225 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
226 },
227 ],
228 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
229}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700230</div>
231
232<div class="method">
233 <code class="details" id="get">get(project, firewall)</code>
234 <pre>Returns the specified firewall.
235
236Args:
237 project: string, Project ID for this request. (required)
238 firewall: string, Name of the firewall rule to return. (required)
239
240Returns:
241 An object of the form:
242
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 { # Represents a Firewall Rule resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 #
245 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
246 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
247 {
248 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
249 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
250 #
251 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
252 &quot;A String&quot;,
253 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800255 ],
256 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
257 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
258 {
259 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
260 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
261 #
262 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
263 &quot;A String&quot;,
264 ],
265 },
266 ],
267 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
268 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
269 &quot;A String&quot;,
270 ],
271 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
272 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
273 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
274 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
275 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
276 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
277 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
278 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
279 },
280 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
281 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
282 # global/networks/default
283 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
284 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
285 # - projects/myproject/global/networks/my-network
286 # - global/networks/default
287 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
288 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
289 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
290 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
291 &quot;A String&quot;,
292 ],
293 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
294 &quot;A String&quot;,
295 ],
296 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
297 &quot;A String&quot;,
298 ],
299 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
300 &quot;A String&quot;,
301 ],
302 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
303 &quot;A String&quot;,
304 ],
305}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700306</div>
307
308<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700310 <pre>Creates a firewall rule in the specified project using the data included in the request.
311
312Args:
313 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700315 The object takes the form of:
316
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317{ # Represents a Firewall Rule resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700318 #
319 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
320 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
321 {
322 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
323 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
324 #
325 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
326 &quot;A String&quot;,
327 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700328 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700329 ],
330 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
331 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
332 {
333 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
334 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
335 #
336 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
337 &quot;A String&quot;,
338 ],
339 },
340 ],
341 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
342 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
343 &quot;A String&quot;,
344 ],
345 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
346 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700347 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700348 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
349 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700350 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
352 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
353 },
354 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
355 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
356 # global/networks/default
357 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
358 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
359 # - projects/myproject/global/networks/my-network
360 # - global/networks/default
361 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
362 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
363 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
364 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
365 &quot;A String&quot;,
366 ],
367 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
368 &quot;A String&quot;,
369 ],
370 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
371 &quot;A String&quot;,
372 ],
373 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
374 &quot;A String&quot;,
375 ],
376 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
377 &quot;A String&quot;,
378 ],
379}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700380
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
382
383For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
384
385The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700386
387Returns:
388 An object of the form:
389
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700390 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800391 #
392 # Google Compute Engine has three Operation resources:
393 #
394 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
395 #
396 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
397 #
398 # Operations can be global, regional or zonal.
399 # - For global operations, use the `globalOperations` resource.
400 # - For regional operations, use the `regionOperations` resource.
401 # - For zonal operations, use the `zonalOperations` resource.
402 #
403 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
404 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
405 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
406 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
407 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
408 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
409 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800411 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
412 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
413 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700414 },
415 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800416 },
417 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
418 &quot;httpErrorStatusCode&quot;: 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.
419 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
420 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
421 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800422 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
423 #
424 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
425 #
426 # Example 1: Pack and unpack a message in C++.
427 #
428 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
429 #
430 # Example 2: Pack and unpack a message in Java.
431 #
432 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
433 #
434 # Example 3: Pack and unpack a message in Python.
435 #
436 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
437 #
438 # Example 4: Pack and unpack a message in Go
439 #
440 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
441 #
442 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
443 #
444 #
445 #
446 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
447 #
448 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
449 #
450 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
451 #
452 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
453 #
454 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
455 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
456 #
457 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
458 #
459 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
460 #
461 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
462 #
463 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
464 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
465 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800466 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800467 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800468 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
469 &quot;progress&quot;: 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.
470 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
471 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
472 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
473 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
474 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
475 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
476 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
477 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
478 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
479 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
480 {
481 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
482 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
483 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
484 {
485 &quot;key&quot;: &quot;A String&quot;, # [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).
486 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
487 },
488 ],
489 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
490 },
491 ],
492 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
493}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700494</div>
495
496<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700497 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700498 <pre>Retrieves the list of firewall rules available to the specified project.
499
500Args:
501 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700502 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700503
Dan O'Mearadd494642020-05-01 07:42:23 -0700504For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700505
Dan O'Mearadd494642020-05-01 07:42:23 -0700506You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700507
Bu Sun Kim65020912020-05-20 12:08:20 -0700508To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
509 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`)
510 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
511
512You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
513
514Currently, only sorting by `name` or `creationTimestamp desc` is supported.
515 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800516 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700517
518Returns:
519 An object of the form:
520
521 { # Contains a list of firewalls.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800522 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
523 &quot;items&quot;: [ # A list of Firewall resources.
524 { # Represents a Firewall Rule resource.
525 #
526 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
527 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800529 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
530 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
531 #
532 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
533 &quot;A String&quot;,
534 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 },
536 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800537 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
538 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
539 {
540 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
541 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
542 #
543 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
544 &quot;A String&quot;,
545 ],
546 },
547 ],
548 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
549 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
550 &quot;A String&quot;,
551 ],
552 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
553 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
554 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
555 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
556 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
557 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
558 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
559 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
560 },
561 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
562 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
563 # global/networks/default
564 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
565 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
566 # - projects/myproject/global/networks/my-network
567 # - global/networks/default
568 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
569 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
570 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
571 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
572 &quot;A String&quot;,
573 ],
574 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
575 &quot;A String&quot;,
576 ],
577 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
578 &quot;A String&quot;,
579 ],
580 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
581 &quot;A String&quot;,
582 ],
583 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
584 &quot;A String&quot;,
585 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700586 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800587 ],
588 &quot;kind&quot;: &quot;compute#firewallList&quot;, # [Output Only] Type of resource. Always compute#firewallList for lists of firewalls.
589 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
590 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
591 &quot;warning&quot;: { # [Output Only] Informational warning message.
592 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
593 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
594 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
595 {
596 &quot;key&quot;: &quot;A String&quot;, # [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).
597 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
598 },
599 ],
600 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
601 },
602}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700603</div>
604
605<div class="method">
606 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
607 <pre>Retrieves the next page of results.
608
609Args:
610 previous_request: The request for the previous page. (required)
611 previous_response: The response from the request for the previous page. (required)
612
613Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700615 page. Returns None if there are no more items in the collection.
616 </pre>
617</div>
618
619<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700620 <code class="details" id="patch">patch(project, firewall, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700621 <pre>Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700622
623Args:
624 project: string, Project ID for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400625 firewall: string, Name of the firewall rule to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700626 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700627 The object takes the form of:
628
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629{ # Represents a Firewall Rule resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 #
631 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
632 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
633 {
634 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
635 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
636 #
637 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
638 &quot;A String&quot;,
639 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700641 ],
642 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
643 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
644 {
645 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
646 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
647 #
648 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
649 &quot;A String&quot;,
650 ],
651 },
652 ],
653 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
654 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
655 &quot;A String&quot;,
656 ],
657 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
658 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700659 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
661 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700662 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
664 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
665 },
666 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
667 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
668 # global/networks/default
669 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
670 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
671 # - projects/myproject/global/networks/my-network
672 # - global/networks/default
673 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
674 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
675 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
676 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
677 &quot;A String&quot;,
678 ],
679 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
680 &quot;A String&quot;,
681 ],
682 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
683 &quot;A String&quot;,
684 ],
685 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
686 &quot;A String&quot;,
687 ],
688 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
689 &quot;A String&quot;,
690 ],
691}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700692
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700693 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
694
695For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
696
697The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700698
699Returns:
700 An object of the form:
701
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700702 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800703 #
704 # Google Compute Engine has three Operation resources:
705 #
706 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
707 #
708 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
709 #
710 # Operations can be global, regional or zonal.
711 # - For global operations, use the `globalOperations` resource.
712 # - For regional operations, use the `regionOperations` resource.
713 # - For zonal operations, use the `zonalOperations` resource.
714 #
715 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
716 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
717 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
718 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
719 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
720 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
721 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800723 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
724 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
725 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 },
727 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800728 },
729 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
730 &quot;httpErrorStatusCode&quot;: 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.
731 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
732 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
733 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800734 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
735 #
736 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
737 #
738 # Example 1: Pack and unpack a message in C++.
739 #
740 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
741 #
742 # Example 2: Pack and unpack a message in Java.
743 #
744 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
745 #
746 # Example 3: Pack and unpack a message in Python.
747 #
748 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
749 #
750 # Example 4: Pack and unpack a message in Go
751 #
752 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
753 #
754 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
755 #
756 #
757 #
758 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
759 #
760 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
761 #
762 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
763 #
764 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
765 #
766 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
767 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
768 #
769 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
770 #
771 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
772 #
773 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
774 #
775 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
776 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
777 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800778 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800779 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800780 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
781 &quot;progress&quot;: 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.
782 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
783 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
784 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
785 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
786 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
787 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
788 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
789 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
790 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
791 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
792 {
793 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
794 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
795 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
796 {
797 &quot;key&quot;: &quot;A String&quot;, # [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).
798 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
799 },
800 ],
801 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
802 },
803 ],
804 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
805}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700806</div>
807
808<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700809 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700810 <pre>Returns permissions that a caller has on the specified resource.
811
812Args:
813 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700815 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700816 The object takes the form of:
817
818{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800819 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
820 &quot;A String&quot;,
821 ],
822}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700823
824
825Returns:
826 An object of the form:
827
828 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800829 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
830 &quot;A String&quot;,
831 ],
832}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700833</div>
834
835<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700836 <code class="details" id="update">update(project, firewall, body=None, requestId=None)</code>
837 <pre>Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700838
839Args:
840 project: string, Project ID for this request. (required)
841 firewall: string, Name of the firewall rule to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700842 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700843 The object takes the form of:
844
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845{ # Represents a Firewall Rule resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 #
847 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
848 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
849 {
850 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
851 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
852 #
853 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
854 &quot;A String&quot;,
855 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 ],
858 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
859 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
860 {
861 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
862 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
863 #
864 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
865 &quot;A String&quot;,
866 ],
867 },
868 ],
869 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
870 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
871 &quot;A String&quot;,
872 ],
873 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
874 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700875 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
877 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700878 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700879 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
880 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
881 },
882 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
883 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
884 # global/networks/default
885 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
886 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
887 # - projects/myproject/global/networks/my-network
888 # - global/networks/default
889 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
890 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
891 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
892 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
893 &quot;A String&quot;,
894 ],
895 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
896 &quot;A String&quot;,
897 ],
898 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
899 &quot;A String&quot;,
900 ],
901 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
902 &quot;A String&quot;,
903 ],
904 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
905 &quot;A String&quot;,
906 ],
907}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700908
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
910
911For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
912
913The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700914
915Returns:
916 An object of the form:
917
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800919 #
920 # Google Compute Engine has three Operation resources:
921 #
922 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
923 #
924 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
925 #
926 # Operations can be global, regional or zonal.
927 # - For global operations, use the `globalOperations` resource.
928 # - For regional operations, use the `regionOperations` resource.
929 # - For zonal operations, use the `zonalOperations` resource.
930 #
931 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
932 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
933 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
934 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
935 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
936 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
937 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700938 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800939 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
940 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
941 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700942 },
943 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800944 },
945 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
946 &quot;httpErrorStatusCode&quot;: 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.
947 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
948 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
949 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800950 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
951 #
952 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
953 #
954 # Example 1: Pack and unpack a message in C++.
955 #
956 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
957 #
958 # Example 2: Pack and unpack a message in Java.
959 #
960 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
961 #
962 # Example 3: Pack and unpack a message in Python.
963 #
964 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
965 #
966 # Example 4: Pack and unpack a message in Go
967 #
968 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
969 #
970 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
971 #
972 #
973 #
974 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
975 #
976 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
977 #
978 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
979 #
980 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
981 #
982 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
983 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
984 #
985 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
986 #
987 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
988 #
989 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
990 #
991 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
992 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
993 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800994 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800995 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800996 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
997 &quot;progress&quot;: 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.
998 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
999 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1000 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1001 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1002 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1003 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1004 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1005 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1006 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1007 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1008 {
1009 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1010 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1011 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1012 {
1013 &quot;key&quot;: &quot;A String&quot;, # [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).
1014 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1015 },
1016 ],
1017 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1018 },
1019 ],
1020 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1021}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001022</div>
1023
1024</body></html>