blob: ad17d64153fb28554bcc4d906ade55c5fcc43c84 [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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#delete">delete(project, firewall, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Deletes the specified firewall.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, firewall)</a></code></p>
82<p class="firstline">Returns the specified firewall.</p>
83<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#insert">insert(project, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Creates a firewall rule in the specified project using the data included in the request.</p>
86<p class="toc_element">
87 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
88<p class="firstline">Retrieves the list of firewall rules available to the specified project.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="#patch">patch(project, firewall, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<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 -070095<p class="toc_element">
96 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body)</a></code></p>
97<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
98<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#update">update(project, firewall, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<h3>Method Details</h3>
102<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400103 <code class="details" id="delete">delete(project, firewall, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104 <pre>Deletes the specified firewall.
105
106Args:
107 project: string, Project ID for this request. (required)
108 firewall: string, Name of the firewall rule to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 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.
110
111For 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.
112
113The 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 -0700114
115Returns:
116 An object of the form:
117
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 { # Represents an Operation resource.
119 #
120 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
121 #
122 # Operations can be global, regional or zonal.
123 # - For global operations, use the globalOperations resource.
124 # - For regional operations, use the regionOperations resource.
125 # - For zonal operations, use the zonalOperations resource.
126 #
127 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700128 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400130 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700131 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
134 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
135 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
136 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
137 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
138 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
139 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
140 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
141 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
142 {
143 "message": "A String", # [Output Only] A human-readable description of the warning code.
144 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
145 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
146 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
147 {
148 "value": "A String", # [Output Only] A warning data value corresponding to the key.
149 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
150 },
151 ],
152 },
153 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
156 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
157 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
158 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
161 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
162 {
163 "message": "A String", # [Output Only] An optional, human-readable error message.
164 "code": "A String", # [Output Only] The error type identifier for this error.
165 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
166 },
167 ],
168 },
169 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
170 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800171 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172 }</pre>
173</div>
174
175<div class="method">
176 <code class="details" id="get">get(project, firewall)</code>
177 <pre>Returns the specified firewall.
178
179Args:
180 project: string, Project ID for this request. (required)
181 firewall: string, Name of the firewall rule to return. (required)
182
183Returns:
184 An object of the form:
185
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186 { # Represents a Firewall Rule resource.
187 #
188 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
189 "priority": 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`.
190 "direction": "A String", # 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.
191 "sourceRanges": [ # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400192 "A String",
193 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 "sourceServiceAccounts": [ # 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'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800195 "A String",
196 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700197 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
198 "destinationRanges": [ # 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.
199 "A String",
200 ],
201 "sourceTags": [ # 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'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700202 "A String",
203 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800204 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
205 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206 "IPProtocol": "A String", # 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.
207 "ports": [ # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800208 #
209 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
210 "A String",
211 ],
212 },
213 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214 "enableLogging": 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 to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400215 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 "logConfig": { # 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 Stackdriver.
217 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
218 "metadata": "A String", # 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.
219 },
220 "disabled": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700221 "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
222 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 # 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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700224 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
225 # - projects/myproject/global/networks/my-network
226 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400227 "targetServiceAccounts": [ # 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.
228 "A String",
229 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230 "targetTags": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700231 "A String",
232 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700235 "IPProtocol": "A String", # 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.
236 "ports": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700237 #
238 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
239 "A String",
240 ],
241 },
242 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700244 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
245 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
246 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700248 }</pre>
249</div>
250
251<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400252 <code class="details" id="insert">insert(project, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700253 <pre>Creates a firewall rule in the specified project using the data included in the request.
254
255Args:
256 project: string, Project ID for this request. (required)
257 body: object, The request body. (required)
258 The object takes the form of:
259
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260{ # Represents a Firewall Rule resource.
261 #
262 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
263 "priority": 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`.
264 "direction": "A String", # 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.
265 "sourceRanges": [ # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400266 "A String",
267 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 "sourceServiceAccounts": [ # 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'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800269 "A String",
270 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
272 "destinationRanges": [ # 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.
273 "A String",
274 ],
275 "sourceTags": [ # 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'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700276 "A String",
277 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800278 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
279 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 "IPProtocol": "A String", # 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.
281 "ports": [ # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800282 #
283 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
284 "A String",
285 ],
286 },
287 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 "enableLogging": 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 to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400289 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 "logConfig": { # 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 Stackdriver.
291 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
292 "metadata": "A String", # 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.
293 },
294 "disabled": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700295 "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
296 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700297 # 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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700298 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
299 # - projects/myproject/global/networks/my-network
300 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400301 "targetServiceAccounts": [ # 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.
302 "A String",
303 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 "targetTags": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700305 "A String",
306 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700308 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 "IPProtocol": "A String", # 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.
310 "ports": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700311 #
312 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
313 "A String",
314 ],
315 },
316 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700318 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
319 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
320 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700321 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700322 }
323
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 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.
325
326For 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.
327
328The 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 -0700329
330Returns:
331 An object of the form:
332
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 { # Represents an Operation resource.
334 #
335 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
336 #
337 # Operations can be global, regional or zonal.
338 # - For global operations, use the globalOperations resource.
339 # - For regional operations, use the regionOperations resource.
340 # - For zonal operations, use the zonalOperations resource.
341 #
342 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700343 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700344 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400345 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700346 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700347 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700348 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
349 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
350 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
351 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
352 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
353 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
354 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
355 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
356 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
357 {
358 "message": "A String", # [Output Only] A human-readable description of the warning code.
359 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
360 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
361 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
362 {
363 "value": "A String", # [Output Only] A warning data value corresponding to the key.
364 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
365 },
366 ],
367 },
368 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700369 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700370 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
371 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
372 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
373 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700375 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
376 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
377 {
378 "message": "A String", # [Output Only] An optional, human-readable error message.
379 "code": "A String", # [Output Only] The error type identifier for this error.
380 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
381 },
382 ],
383 },
384 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
385 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800386 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700387 }</pre>
388</div>
389
390<div class="method">
391 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
392 <pre>Retrieves the list of firewall rules available to the specified project.
393
394Args:
395 project: string, Project ID for this request. (required)
396 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
397
398You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
399
400Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400401 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)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700402 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 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 =, !=, >, or <.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700404
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700405For 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 -0700406
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700407You 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 -0700408
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700409To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700410
411Returns:
412 An object of the form:
413
414 { # Contains a list of firewalls.
415 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 "kind": "compute#firewallList", # [Output Only] Type of resource. Always compute#firewallList for lists of firewalls.
417 "items": [ # A list of Firewall resources.
418 { # Represents a Firewall Rule resource.
419 #
420 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
421 "priority": 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`.
422 "direction": "A String", # 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.
423 "sourceRanges": [ # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400424 "A String",
425 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700426 "sourceServiceAccounts": [ # 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'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800427 "A String",
428 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
430 "destinationRanges": [ # 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.
431 "A String",
432 ],
433 "sourceTags": [ # 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'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700434 "A String",
435 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800436 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
437 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 "IPProtocol": "A String", # 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.
439 "ports": [ # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800440 #
441 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
442 "A String",
443 ],
444 },
445 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 "enableLogging": 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 to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400447 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 "logConfig": { # 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 Stackdriver.
449 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
450 "metadata": "A String", # 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.
451 },
452 "disabled": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700453 "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
454 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455 # 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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700456 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
457 # - projects/myproject/global/networks/my-network
458 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400459 "targetServiceAccounts": [ # 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.
460 "A String",
461 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 "targetTags": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700463 "A String",
464 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700466 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700467 "IPProtocol": "A String", # 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.
468 "ports": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700469 #
470 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
471 "A String",
472 ],
473 },
474 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700476 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
477 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
478 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700480 },
481 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700482 "warning": { # [Output Only] Informational warning message.
483 "message": "A String", # [Output Only] A human-readable description of the warning code.
484 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
485 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
486 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
487 {
488 "value": "A String", # [Output Only] A warning data value corresponding to the key.
489 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
490 },
491 ],
492 },
493 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700494 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
495 }</pre>
496</div>
497
498<div class="method">
499 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
500 <pre>Retrieves the next page of results.
501
502Args:
503 previous_request: The request for the previous page. (required)
504 previous_response: The response from the request for the previous page. (required)
505
506Returns:
507 A request object that you can call 'execute()' on to request the next
508 page. Returns None if there are no more items in the collection.
509 </pre>
510</div>
511
512<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400513 <code class="details" id="patch">patch(project, firewall, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700514 <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 -0700515
516Args:
517 project: string, Project ID for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400518 firewall: string, Name of the firewall rule to patch. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700519 body: object, The request body. (required)
520 The object takes the form of:
521
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700522{ # Represents a Firewall Rule resource.
523 #
524 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
525 "priority": 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`.
526 "direction": "A String", # 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.
527 "sourceRanges": [ # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400528 "A String",
529 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700530 "sourceServiceAccounts": [ # 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'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800531 "A String",
532 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
534 "destinationRanges": [ # 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.
535 "A String",
536 ],
537 "sourceTags": [ # 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'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700538 "A String",
539 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800540 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
541 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 "IPProtocol": "A String", # 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.
543 "ports": [ # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800544 #
545 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
546 "A String",
547 ],
548 },
549 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700550 "enableLogging": 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 to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400551 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700552 "logConfig": { # 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 Stackdriver.
553 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
554 "metadata": "A String", # 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.
555 },
556 "disabled": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700557 "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
558 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559 # 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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700560 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
561 # - projects/myproject/global/networks/my-network
562 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400563 "targetServiceAccounts": [ # 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.
564 "A String",
565 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700566 "targetTags": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700567 "A String",
568 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700570 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700571 "IPProtocol": "A String", # 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.
572 "ports": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700573 #
574 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
575 "A String",
576 ],
577 },
578 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700579 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700580 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
581 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
582 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700584 }
585
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700586 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.
587
588For 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.
589
590The 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 -0700591
592Returns:
593 An object of the form:
594
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700595 { # Represents an Operation resource.
596 #
597 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
598 #
599 # Operations can be global, regional or zonal.
600 # - For global operations, use the globalOperations resource.
601 # - For regional operations, use the regionOperations resource.
602 # - For zonal operations, use the zonalOperations resource.
603 #
604 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700605 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400607 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700608 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700610 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
611 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
612 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
613 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
614 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
615 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
616 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
617 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
618 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
619 {
620 "message": "A String", # [Output Only] A human-readable description of the warning code.
621 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
622 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
623 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
624 {
625 "value": "A String", # [Output Only] A warning data value corresponding to the key.
626 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
627 },
628 ],
629 },
630 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700632 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
633 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
634 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
635 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700637 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
638 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
639 {
640 "message": "A String", # [Output Only] An optional, human-readable error message.
641 "code": "A String", # [Output Only] The error type identifier for this error.
642 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
643 },
644 ],
645 },
646 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
647 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800648 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700649 }</pre>
650</div>
651
652<div class="method">
653 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body)</code>
654 <pre>Returns permissions that a caller has on the specified resource.
655
656Args:
657 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700659 body: object, The request body. (required)
660 The object takes the form of:
661
662{
663 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
664 "A String",
665 ],
666 }
667
668
669Returns:
670 An object of the form:
671
672 {
673 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
674 "A String",
675 ],
676 }</pre>
677</div>
678
679<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400680 <code class="details" id="update">update(project, firewall, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700681 <pre>Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700682
683Args:
684 project: string, Project ID for this request. (required)
685 firewall: string, Name of the firewall rule to update. (required)
686 body: object, The request body. (required)
687 The object takes the form of:
688
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689{ # Represents a Firewall Rule resource.
690 #
691 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
692 "priority": 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`.
693 "direction": "A String", # 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.
694 "sourceRanges": [ # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400695 "A String",
696 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 "sourceServiceAccounts": [ # 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'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800698 "A String",
699 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
701 "destinationRanges": [ # 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.
702 "A String",
703 ],
704 "sourceTags": [ # 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'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700705 "A String",
706 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800707 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
708 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 "IPProtocol": "A String", # 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.
710 "ports": [ # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800711 #
712 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
713 "A String",
714 ],
715 },
716 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 "enableLogging": 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 to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400718 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 "logConfig": { # 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 Stackdriver.
720 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
721 "metadata": "A String", # 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.
722 },
723 "disabled": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700724 "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
725 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700726 # 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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700727 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
728 # - projects/myproject/global/networks/my-network
729 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400730 "targetServiceAccounts": [ # 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.
731 "A String",
732 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700733 "targetTags": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700734 "A String",
735 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700737 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700738 "IPProtocol": "A String", # 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.
739 "ports": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700740 #
741 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
742 "A String",
743 ],
744 },
745 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700747 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
748 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
749 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700750 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700751 }
752
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 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.
754
755For 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.
756
757The 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 -0700758
759Returns:
760 An object of the form:
761
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700762 { # Represents an Operation resource.
763 #
764 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
765 #
766 # Operations can be global, regional or zonal.
767 # - For global operations, use the globalOperations resource.
768 # - For regional operations, use the regionOperations resource.
769 # - For zonal operations, use the zonalOperations resource.
770 #
771 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700772 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700773 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400774 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700775 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700776 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700777 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
778 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
779 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
780 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
781 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
782 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
783 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
784 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
785 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
786 {
787 "message": "A String", # [Output Only] A human-readable description of the warning code.
788 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
789 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
790 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
791 {
792 "value": "A String", # [Output Only] A warning data value corresponding to the key.
793 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
794 },
795 ],
796 },
797 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700799 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
800 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
801 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
802 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700804 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
805 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
806 {
807 "message": "A String", # [Output Only] An optional, human-readable error message.
808 "code": "A String", # [Output Only] The error type identifier for this error.
809 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
810 },
811 ],
812 },
813 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
814 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800815 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700816 }</pre>
817</div>
818
819</body></html>