blob: faf30fa2483bf55ae0c5f80946d6bd2e10218091 [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.
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 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700174 "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.
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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000213 "kind": "compute#firewall", # [Output Ony] 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 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700218 "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.
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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000253 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
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 Parrott36e41bc2016-02-19 16:02:29 -0800293 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400294 }</pre>
295</div>
296
297<div class="method">
298 <code class="details" id="list">list(project, 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)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800303 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.
304 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.
305 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 -0700306
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800307The 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 -0700308
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700309For 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 -0800310
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700311You 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 -0800312
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700313To 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 -0400314
315Returns:
316 An object of the form:
317
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800318 { # Contains a list of firewalls.
319 "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 +0000320 "items": [ # [Output Only] A list of Firewall resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800321 { # Represents a Firewall resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000322 "kind": "compute#firewall", # [Output Ony] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800323 "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 -0700324 "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 -0400325 "A String",
326 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700327 "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.
John Asmuth614db982014-04-24 15:46:26 -0400328 "A String",
329 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800330 "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 +0000331 # global/networks/default
332 # 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:
333 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
334 # - projects/myproject/global/networks/my-network
335 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700336 "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 -0400337 "A String",
338 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700339 "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 -0400340 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700341 "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.
342 "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 -0400343 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000344 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400345 "A String",
346 ],
347 },
348 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700349 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800350 "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 -0700351 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000352 "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 -0400353 },
354 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000355 "kind": "compute#firewallList", # [Output Only] Type of resource. Always compute#firewallList for lists of firewalls.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800356 "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 -0700357 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400358 }</pre>
359</div>
360
361<div class="method">
362 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
363 <pre>Retrieves the next page of results.
364
365Args:
366 previous_request: The request for the previous page. (required)
367 previous_response: The response from the request for the previous page. (required)
368
369Returns:
370 A request object that you can call 'execute()' on to request the next
371 page. Returns None if there are no more items in the collection.
372 </pre>
373</div>
374
375<div class="method">
376 <code class="details" id="patch">patch(project, firewall, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800377 <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 -0400378
379Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000380 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800381 firewall: string, Name of the firewall rule to update. (required)
John Asmuth614db982014-04-24 15:46:26 -0400382 body: object, The request body. (required)
383 The object takes the form of:
384
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800385{ # Represents a Firewall resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000386 "kind": "compute#firewall", # [Output Ony] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800387 "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 -0700388 "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 -0400389 "A String",
390 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700391 "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.
John Asmuth614db982014-04-24 15:46:26 -0400392 "A String",
393 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800394 "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 +0000395 # global/networks/default
396 # 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:
397 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
398 # - projects/myproject/global/networks/my-network
399 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700400 "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 -0400401 "A String",
402 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700403 "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 -0400404 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700405 "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.
406 "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 -0400407 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000408 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400409 "A String",
410 ],
411 },
412 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700413 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800414 "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 -0700415 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000416 "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 -0400417 }
418
419
420Returns:
421 An object of the form:
422
Takashi Matsuo06694102015-09-11 13:55:40 -0700423 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800424 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
425 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000426 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800427 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
428 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
429 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
430 "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 +0000431 "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 -0800432 "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.
433 "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 -0800434 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800435 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
436 "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 +0000437 "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 -0400438 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800439 "message": "A String", # [Output Only] A human-readable description of the warning code.
440 "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.
441 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
442 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400443 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000444 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700445 "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 -0400446 },
447 ],
448 },
449 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000450 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800451 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
452 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000453 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800454 "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 +0000455 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800456 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400457 {
Craig Citroe633be12015-03-02 13:40:36 -0800458 "message": "A String", # [Output Only] An optional, human-readable error message.
459 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700460 "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 -0400461 },
462 ],
463 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800464 "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 -0700465 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800466 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400467 }</pre>
468</div>
469
470<div class="method">
471 <code class="details" id="update">update(project, firewall, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800472 <pre>Updates the specified firewall rule with the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400473
474Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000475 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800476 firewall: string, Name of the firewall rule to update. (required)
John Asmuth614db982014-04-24 15:46:26 -0400477 body: object, The request body. (required)
478 The object takes the form of:
479
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800480{ # Represents a Firewall resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000481 "kind": "compute#firewall", # [Output Ony] Type of the resource. Always compute#firewall for firewall rules.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800482 "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 -0700483 "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 -0400484 "A String",
485 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700486 "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.
John Asmuth614db982014-04-24 15:46:26 -0400487 "A String",
488 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800489 "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 +0000490 # global/networks/default
491 # 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:
492 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
493 # - projects/myproject/global/networks/my-network
494 # - global/networks/default
Takashi Matsuo06694102015-09-11 13:55:40 -0700495 "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 -0400496 "A String",
497 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700498 "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 -0400499 {
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700500 "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.
501 "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 -0400502 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000503 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
John Asmuth614db982014-04-24 15:46:26 -0400504 "A String",
505 ],
506 },
507 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700508 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800509 "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 -0700510 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000511 "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 -0400512 }
513
514
515Returns:
516 An object of the form:
517
Takashi Matsuo06694102015-09-11 13:55:40 -0700518 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800519 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
520 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000521 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800522 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
523 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
524 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
525 "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 +0000526 "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 -0800527 "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.
528 "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 -0800529 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800530 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
531 "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 +0000532 "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 -0400533 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800534 "message": "A String", # [Output Only] A human-readable description of the warning code.
535 "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.
536 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
537 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400538 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000539 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700540 "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 -0400541 },
542 ],
543 },
544 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000545 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800546 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
547 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000548 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800549 "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 +0000550 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800551 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400552 {
Craig Citroe633be12015-03-02 13:40:36 -0800553 "message": "A String", # [Output Only] An optional, human-readable error message.
554 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700555 "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 -0400556 },
557 ],
558 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800559 "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 -0700560 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800561 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400562 }</pre>
563</div>
564
565</body></html>