blob: 90c5180cdafb3e1a253a34913fefe1c70b0c4827 [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">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070087 <code><a href="#list">list(project, orderBy=None, 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>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040094<p class="firstline">Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. 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>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040097<p class="firstline">Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.</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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400113 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
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 Parrott692617a2017-01-06 09:58:29 -0800153 "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.
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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400169 "kind": "compute#firewall", # [Output Only] 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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700171 "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
John Asmuth614db982014-04-24 15:46:26 -0400172 "A String",
173 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400174 "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has 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 properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
John Asmuth614db982014-04-24 15:46:26 -0400175 "A String",
176 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800177 "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 +0000178 # global/networks/default
179 # 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:
180 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
181 # - projects/myproject/global/networks/my-network
182 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700183 "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 -0400184 "A String",
185 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700186 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
John Asmuth614db982014-04-24 15:46:26 -0400187 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700188 "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, sctp), or the IP protocol number.
189 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for 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.
John Asmuth614db982014-04-24 15:46:26 -0400190 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000191 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400192 "A String",
193 ],
194 },
195 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700196 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800197 "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 -0700198 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000199 "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 -0400200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="insert">insert(project, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800205 <pre>Creates a firewall rule in the specified project using the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400206
207Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000208 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400209 body: object, The request body. (required)
210 The object takes the form of:
211
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800212{ # Represents a Firewall resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400213 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800214 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700215 "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
John Asmuth614db982014-04-24 15:46:26 -0400216 "A String",
217 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400218 "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has 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 properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
John Asmuth614db982014-04-24 15:46:26 -0400219 "A String",
220 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800221 "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 +0000222 # global/networks/default
223 # 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:
224 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
225 # - projects/myproject/global/networks/my-network
226 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700227 "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 -0400228 "A String",
229 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700230 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
John Asmuth614db982014-04-24 15:46:26 -0400231 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700232 "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, sctp), or the IP protocol number.
233 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for 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.
John Asmuth614db982014-04-24 15:46:26 -0400234 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000235 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400236 "A String",
237 ],
238 },
239 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700240 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800241 "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 -0700242 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000243 "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 -0400244 }
245
246
247Returns:
248 An object of the form:
249
Takashi Matsuo06694102015-09-11 13:55:40 -0700250 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800251 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
252 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400253 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800254 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
255 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
256 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
257 "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 +0000258 "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 -0800259 "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.
260 "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 -0800261 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800262 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
263 "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 +0000264 "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 -0400265 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800266 "message": "A String", # [Output Only] A human-readable description of the warning code.
267 "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.
268 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
269 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400270 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000271 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700272 "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 -0400273 },
274 ],
275 },
276 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000277 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800278 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
279 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000280 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800281 "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 +0000282 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800283 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400284 {
Craig Citroe633be12015-03-02 13:40:36 -0800285 "message": "A String", # [Output Only] An optional, human-readable error message.
286 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700287 "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 -0400288 },
289 ],
290 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800291 "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 -0700292 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800293 "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.
John Asmuth614db982014-04-24 15:46:26 -0400294 }</pre>
295</div>
296
297<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700298 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800299 <pre>Retrieves the list of firewall rules available to the specified project.
John Asmuth614db982014-04-24 15:46:26 -0400300
301Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000302 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700303 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
304
305You 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.
306
307Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400308 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)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800309 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.
310 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 -0700311
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800312The 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 -0700313
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700314For 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 -0800315
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700316You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800317
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700318To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
John Asmuth614db982014-04-24 15:46:26 -0400319
320Returns:
321 An object of the form:
322
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800323 { # Contains a list of firewalls.
324 "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 +0000325 "items": [ # [Output Only] A list of Firewall resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800326 { # Represents a Firewall resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400327 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800328 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700329 "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
John Asmuth614db982014-04-24 15:46:26 -0400330 "A String",
331 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400332 "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has 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 properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
John Asmuth614db982014-04-24 15:46:26 -0400333 "A String",
334 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800335 "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 +0000336 # global/networks/default
337 # 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:
338 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
339 # - projects/myproject/global/networks/my-network
340 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700341 "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 -0400342 "A String",
343 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700344 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
John Asmuth614db982014-04-24 15:46:26 -0400345 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700346 "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, sctp), or the IP protocol number.
347 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for 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.
John Asmuth614db982014-04-24 15:46:26 -0400348 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000349 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400350 "A String",
351 ],
352 },
353 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700354 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800355 "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 -0700356 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000357 "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 -0400358 },
359 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000360 "kind": "compute#firewallList", # [Output Only] Type of resource. Always compute#firewallList for lists of firewalls.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800361 "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 -0700362 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400363 }</pre>
364</div>
365
366<div class="method">
367 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
368 <pre>Retrieves the next page of results.
369
370Args:
371 previous_request: The request for the previous page. (required)
372 previous_response: The response from the request for the previous page. (required)
373
374Returns:
375 A request object that you can call 'execute()' on to request the next
376 page. Returns None if there are no more items in the collection.
377 </pre>
378</div>
379
380<div class="method">
381 <code class="details" id="patch">patch(project, firewall, body)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400382 <pre>Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. This method supports patch semantics.
John Asmuth614db982014-04-24 15:46:26 -0400383
384Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000385 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800386 firewall: string, Name of the firewall rule to update. (required)
John Asmuth614db982014-04-24 15:46:26 -0400387 body: object, The request body. (required)
388 The object takes the form of:
389
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800390{ # Represents a Firewall resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400391 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800392 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700393 "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
John Asmuth614db982014-04-24 15:46:26 -0400394 "A String",
395 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400396 "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has 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 properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
John Asmuth614db982014-04-24 15:46:26 -0400397 "A String",
398 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800399 "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 +0000400 # global/networks/default
401 # 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:
402 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
403 # - projects/myproject/global/networks/my-network
404 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700405 "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 -0400406 "A String",
407 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700408 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
John Asmuth614db982014-04-24 15:46:26 -0400409 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700410 "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, sctp), or the IP protocol number.
411 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for 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.
John Asmuth614db982014-04-24 15:46:26 -0400412 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000413 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400414 "A String",
415 ],
416 },
417 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700418 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800419 "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 -0700420 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000421 "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 -0400422 }
423
424
425Returns:
426 An object of the form:
427
Takashi Matsuo06694102015-09-11 13:55:40 -0700428 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800429 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
430 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400431 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800432 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
433 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
434 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
435 "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 +0000436 "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 -0800437 "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.
438 "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 -0800439 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800440 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
441 "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 +0000442 "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 -0400443 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800444 "message": "A String", # [Output Only] A human-readable description of the warning code.
445 "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.
446 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
447 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400448 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000449 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700450 "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 -0400451 },
452 ],
453 },
454 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000455 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800456 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
457 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000458 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800459 "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 +0000460 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800461 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400462 {
Craig Citroe633be12015-03-02 13:40:36 -0800463 "message": "A String", # [Output Only] An optional, human-readable error message.
464 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700465 "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 -0400466 },
467 ],
468 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800469 "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 -0700470 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800471 "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.
John Asmuth614db982014-04-24 15:46:26 -0400472 }</pre>
473</div>
474
475<div class="method">
476 <code class="details" id="update">update(project, firewall, body)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400477 <pre>Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.
John Asmuth614db982014-04-24 15:46:26 -0400478
479Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000480 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800481 firewall: string, Name of the firewall rule to update. (required)
John Asmuth614db982014-04-24 15:46:26 -0400482 body: object, The request body. (required)
483 The object takes the form of:
484
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800485{ # Represents a Firewall resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400486 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800487 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700488 "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
John Asmuth614db982014-04-24 15:46:26 -0400489 "A String",
490 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400491 "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has 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 properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
John Asmuth614db982014-04-24 15:46:26 -0400492 "A String",
493 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800494 "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 +0000495 # global/networks/default
496 # 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:
497 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
498 # - projects/myproject/global/networks/my-network
499 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700500 "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 -0400501 "A String",
502 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700503 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
John Asmuth614db982014-04-24 15:46:26 -0400504 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700505 "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, sctp), or the IP protocol number.
506 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for 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.
John Asmuth614db982014-04-24 15:46:26 -0400507 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000508 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400509 "A String",
510 ],
511 },
512 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700513 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800514 "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 -0700515 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000516 "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 -0400517 }
518
519
520Returns:
521 An object of the form:
522
Takashi Matsuo06694102015-09-11 13:55:40 -0700523 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800524 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
525 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400526 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800527 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
528 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
529 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
530 "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 +0000531 "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 -0800532 "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.
533 "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 -0800534 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800535 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
536 "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 +0000537 "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 -0400538 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800539 "message": "A String", # [Output Only] A human-readable description of the warning code.
540 "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.
541 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
542 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400543 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000544 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700545 "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 -0400546 },
547 ],
548 },
549 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000550 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800551 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
552 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000553 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800554 "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 +0000555 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800556 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400557 {
Craig Citroe633be12015-03-02 13:40:36 -0800558 "message": "A String", # [Output Only] An optional, human-readable error message.
559 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700560 "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 -0400561 },
562 ],
563 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800564 "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 -0700565 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800566 "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.
John Asmuth614db982014-04-24 15:46:26 -0400567 }</pre>
568</div>
569
570</body></html>