blob: e3f17d8b18c9824dca46c3edef1d3297399fa879 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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_v1.html">Compute Engine API</a> . <a href="compute_v1.firewalls.html">firewalls</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, firewall)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Deletes the specified firewall.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
81 <code><a href="#get">get(project, firewall)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Returns the specified firewall.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
84 <code><a href="#insert">insert(project, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<p class="firstline">Creates a firewall rule in the specified project using the data included in the request.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
87 <code><a href="#list">list(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<p class="firstline">Retrieves the list of firewall rules available to the specified project.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<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">
93 <code><a href="#patch">patch(project, firewall, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Updates the specified firewall rule with the data included in the request. This method supports patch semantics.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
96 <code><a href="#update">update(project, firewall, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Updates the specified firewall rule with the data included in the request.</p>
John Asmuth614db982014-04-24 15:46:26 -040098<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="delete">delete(project, firewall)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800101 <pre>Deletes the specified firewall.
John Asmuth614db982014-04-24 15:46:26 -0400102
103Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000104 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800105 firewall: string, Name of the firewall rule to delete. (required)
John Asmuth614db982014-04-24 15:46:26 -0400106
107Returns:
108 An object of the form:
109
Takashi Matsuo06694102015-09-11 13:55:40 -0700110 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800111 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
112 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000113 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800114 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
115 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
116 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
117 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000118 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800119 "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.
120 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800121 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800122 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
123 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000124 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400125 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800126 "message": "A String", # [Output Only] A human-readable description of the warning code.
127 "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.
128 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
129 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400130 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000131 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700132 "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).
John Asmuth614db982014-04-24 15:46:26 -0400133 },
134 ],
135 },
136 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000137 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800138 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
139 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000140 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800141 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000142 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800143 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400144 {
Craig Citroe633be12015-03-02 13:40:36 -0800145 "message": "A String", # [Output Only] An optional, human-readable error message.
146 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700147 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400148 },
149 ],
150 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800151 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700152 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800153 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400154 }</pre>
155</div>
156
157<div class="method">
158 <code class="details" id="get">get(project, firewall)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800159 <pre>Returns the specified firewall.
John Asmuth614db982014-04-24 15:46:26 -0400160
161Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000162 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800163 firewall: string, Name of the firewall rule to return. (required)
John Asmuth614db982014-04-24 15:46:26 -0400164
165Returns:
166 An object of the form:
167
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800168 { # Represents a Firewall resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000169 "kind": "compute#firewall", # [Output Ony] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800170 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000171 "sourceTags": [ # A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set.
172 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700173 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700174 #
175 # Source tags cannot be used to allow access to an instance's external IP address. Because tags are associated with an instance, not an IP address, source tags can only be used to control traffic traveling from an instance inside the same network as the firewall.
John Asmuth614db982014-04-24 15:46:26 -0400176 "A String",
177 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000178 "sourceRanges": [ # The IP address blocks that this rule applies to, expressed in CIDR format. One or both of sourceRanges and sourceTags may be set.
179 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700180 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
John Asmuth614db982014-04-24 15:46:26 -0400181 "A String",
182 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800183 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000184 # global/networks/default
185 # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
186 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
187 # - projects/myproject/global/networks/my-network
188 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700189 "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
John Asmuth614db982014-04-24 15:46:26 -0400190 "A String",
191 ],
192 "allowed": [ # The list of rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
193 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800194 "IPProtocol": "A String", # The IP protocol that is allowed for this rule. 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, sctp), or the IP protocol number.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000195 "ports": [ # An optional list of ports which are allowed. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, connections through any port are allowed
John Asmuth614db982014-04-24 15:46:26 -0400196 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000197 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400198 "A String",
199 ],
200 },
201 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700202 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800203 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700204 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000205 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
John Asmuth614db982014-04-24 15:46:26 -0400206 }</pre>
207</div>
208
209<div class="method">
210 <code class="details" id="insert">insert(project, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800211 <pre>Creates a firewall rule in the specified project using the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400212
213Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000214 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400215 body: object, The request body. (required)
216 The object takes the form of:
217
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800218{ # Represents a Firewall resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000219 "kind": "compute#firewall", # [Output Ony] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800220 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000221 "sourceTags": [ # A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set.
222 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700223 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700224 #
225 # Source tags cannot be used to allow access to an instance's external IP address. Because tags are associated with an instance, not an IP address, source tags can only be used to control traffic traveling from an instance inside the same network as the firewall.
John Asmuth614db982014-04-24 15:46:26 -0400226 "A String",
227 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000228 "sourceRanges": [ # The IP address blocks that this rule applies to, expressed in CIDR format. One or both of sourceRanges and sourceTags may be set.
229 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700230 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
John Asmuth614db982014-04-24 15:46:26 -0400231 "A String",
232 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800233 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000234 # global/networks/default
235 # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
236 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
237 # - projects/myproject/global/networks/my-network
238 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700239 "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
John Asmuth614db982014-04-24 15:46:26 -0400240 "A String",
241 ],
242 "allowed": [ # The list of rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
243 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800244 "IPProtocol": "A String", # The IP protocol that is allowed for this rule. 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, sctp), or the IP protocol number.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000245 "ports": [ # An optional list of ports which are allowed. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, connections through any port are allowed
John Asmuth614db982014-04-24 15:46:26 -0400246 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000247 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400248 "A String",
249 ],
250 },
251 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700252 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800253 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700254 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000255 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
John Asmuth614db982014-04-24 15:46:26 -0400256 }
257
258
259Returns:
260 An object of the form:
261
Takashi Matsuo06694102015-09-11 13:55:40 -0700262 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800263 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
264 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000265 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800266 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
267 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
268 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
269 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000270 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800271 "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.
272 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800273 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800274 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
275 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000276 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400277 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800278 "message": "A String", # [Output Only] A human-readable description of the warning code.
279 "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.
280 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
281 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400282 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000283 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700284 "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).
John Asmuth614db982014-04-24 15:46:26 -0400285 },
286 ],
287 },
288 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000289 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800290 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
291 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000292 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800293 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000294 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800295 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400296 {
Craig Citroe633be12015-03-02 13:40:36 -0800297 "message": "A String", # [Output Only] An optional, human-readable error message.
298 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700299 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400300 },
301 ],
302 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800303 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700304 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800305 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400306 }</pre>
307</div>
308
309<div class="method">
310 <code class="details" id="list">list(project, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800311 <pre>Retrieves the list of firewall rules available to the specified project.
John Asmuth614db982014-04-24 15:46:26 -0400312
313Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000314 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800315 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.
316 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.
317 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
Takashi Matsuo06694102015-09-11 13:55:40 -0700318
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800319The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -0700320
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700321For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800322
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700323Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800324
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700325The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
John Asmuth614db982014-04-24 15:46:26 -0400326
327Returns:
328 An object of the form:
329
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800330 { # Contains a list of firewalls.
331 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000332 "items": [ # [Output Only] A list of Firewall resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800333 { # Represents a Firewall resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000334 "kind": "compute#firewall", # [Output Ony] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800335 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000336 "sourceTags": [ # A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set.
337 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700338 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700339 #
340 # Source tags cannot be used to allow access to an instance's external IP address. Because tags are associated with an instance, not an IP address, source tags can only be used to control traffic traveling from an instance inside the same network as the firewall.
John Asmuth614db982014-04-24 15:46:26 -0400341 "A String",
342 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000343 "sourceRanges": [ # The IP address blocks that this rule applies to, expressed in CIDR format. One or both of sourceRanges and sourceTags may be set.
344 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700345 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
John Asmuth614db982014-04-24 15:46:26 -0400346 "A String",
347 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800348 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000349 # global/networks/default
350 # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
351 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
352 # - projects/myproject/global/networks/my-network
353 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700354 "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
John Asmuth614db982014-04-24 15:46:26 -0400355 "A String",
356 ],
357 "allowed": [ # The list of rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
358 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800359 "IPProtocol": "A String", # The IP protocol that is allowed for this rule. 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, sctp), or the IP protocol number.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000360 "ports": [ # An optional list of ports which are allowed. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, connections through any port are allowed
John Asmuth614db982014-04-24 15:46:26 -0400361 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000362 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400363 "A String",
364 ],
365 },
366 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700367 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800368 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700369 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000370 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
John Asmuth614db982014-04-24 15:46:26 -0400371 },
372 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000373 "kind": "compute#firewallList", # [Output Only] Type of resource. Always compute#firewallList for lists of firewalls.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800374 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700375 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400376 }</pre>
377</div>
378
379<div class="method">
380 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
381 <pre>Retrieves the next page of results.
382
383Args:
384 previous_request: The request for the previous page. (required)
385 previous_response: The response from the request for the previous page. (required)
386
387Returns:
388 A request object that you can call 'execute()' on to request the next
389 page. Returns None if there are no more items in the collection.
390 </pre>
391</div>
392
393<div class="method">
394 <code class="details" id="patch">patch(project, firewall, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800395 <pre>Updates the specified firewall rule with the data included in the request. This method supports patch semantics.
John Asmuth614db982014-04-24 15:46:26 -0400396
397Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000398 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800399 firewall: string, Name of the firewall rule to update. (required)
John Asmuth614db982014-04-24 15:46:26 -0400400 body: object, The request body. (required)
401 The object takes the form of:
402
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800403{ # Represents a Firewall resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000404 "kind": "compute#firewall", # [Output Ony] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800405 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000406 "sourceTags": [ # A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set.
407 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700408 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700409 #
410 # Source tags cannot be used to allow access to an instance's external IP address. Because tags are associated with an instance, not an IP address, source tags can only be used to control traffic traveling from an instance inside the same network as the firewall.
John Asmuth614db982014-04-24 15:46:26 -0400411 "A String",
412 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000413 "sourceRanges": [ # The IP address blocks that this rule applies to, expressed in CIDR format. One or both of sourceRanges and sourceTags may be set.
414 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700415 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
John Asmuth614db982014-04-24 15:46:26 -0400416 "A String",
417 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800418 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000419 # global/networks/default
420 # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
421 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
422 # - projects/myproject/global/networks/my-network
423 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700424 "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
John Asmuth614db982014-04-24 15:46:26 -0400425 "A String",
426 ],
427 "allowed": [ # The list of rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
428 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800429 "IPProtocol": "A String", # The IP protocol that is allowed for this rule. 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, sctp), or the IP protocol number.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000430 "ports": [ # An optional list of ports which are allowed. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, connections through any port are allowed
John Asmuth614db982014-04-24 15:46:26 -0400431 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000432 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400433 "A String",
434 ],
435 },
436 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700437 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800438 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700439 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000440 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
John Asmuth614db982014-04-24 15:46:26 -0400441 }
442
443
444Returns:
445 An object of the form:
446
Takashi Matsuo06694102015-09-11 13:55:40 -0700447 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800448 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
449 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000450 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800451 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
452 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
453 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
454 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000455 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800456 "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.
457 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800458 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800459 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
460 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000461 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400462 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800463 "message": "A String", # [Output Only] A human-readable description of the warning code.
464 "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.
465 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
466 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400467 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000468 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700469 "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).
John Asmuth614db982014-04-24 15:46:26 -0400470 },
471 ],
472 },
473 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000474 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800475 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
476 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000477 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800478 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000479 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800480 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400481 {
Craig Citroe633be12015-03-02 13:40:36 -0800482 "message": "A String", # [Output Only] An optional, human-readable error message.
483 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700484 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400485 },
486 ],
487 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800488 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700489 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800490 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400491 }</pre>
492</div>
493
494<div class="method">
495 <code class="details" id="update">update(project, firewall, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800496 <pre>Updates the specified firewall rule with the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400497
498Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000499 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800500 firewall: string, Name of the firewall rule to update. (required)
John Asmuth614db982014-04-24 15:46:26 -0400501 body: object, The request body. (required)
502 The object takes the form of:
503
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800504{ # Represents a Firewall resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000505 "kind": "compute#firewall", # [Output Ony] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800506 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000507 "sourceTags": [ # A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set.
508 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700509 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700510 #
511 # Source tags cannot be used to allow access to an instance's external IP address. Because tags are associated with an instance, not an IP address, source tags can only be used to control traffic traveling from an instance inside the same network as the firewall.
John Asmuth614db982014-04-24 15:46:26 -0400512 "A String",
513 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000514 "sourceRanges": [ # The IP address blocks that this rule applies to, expressed in CIDR format. One or both of sourceRanges and sourceTags may be set.
515 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700516 # If both properties are set, an inbound connection is allowed if the range matches the sourceRanges OR the tag of the source matches the sourceTags property. The connection does not need to match both properties.
John Asmuth614db982014-04-24 15:46:26 -0400517 "A String",
518 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800519 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000520 # global/networks/default
521 # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
522 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
523 # - projects/myproject/global/networks/my-network
524 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700525 "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
John Asmuth614db982014-04-24 15:46:26 -0400526 "A String",
527 ],
528 "allowed": [ # The list of rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
529 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800530 "IPProtocol": "A String", # The IP protocol that is allowed for this rule. 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, sctp), or the IP protocol number.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000531 "ports": [ # An optional list of ports which are allowed. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, connections through any port are allowed
John Asmuth614db982014-04-24 15:46:26 -0400532 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000533 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400534 "A String",
535 ],
536 },
537 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700538 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800539 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700540 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000541 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
John Asmuth614db982014-04-24 15:46:26 -0400542 }
543
544
545Returns:
546 An object of the form:
547
Takashi Matsuo06694102015-09-11 13:55:40 -0700548 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800549 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
550 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000551 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800552 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
553 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
554 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
555 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000556 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800557 "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.
558 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800559 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800560 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
561 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000562 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400563 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800564 "message": "A String", # [Output Only] A human-readable description of the warning code.
565 "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.
566 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
567 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400568 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000569 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700570 "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).
John Asmuth614db982014-04-24 15:46:26 -0400571 },
572 ],
573 },
574 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000575 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800576 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
577 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000578 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800579 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000580 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800581 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400582 {
Craig Citroe633be12015-03-02 13:40:36 -0800583 "message": "A String", # [Output Only] An optional, human-readable error message.
584 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700585 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400586 },
587 ],
588 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800589 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700590 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800591 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400592 }</pre>
593</div>
594
595</body></html>