blob: 33499b51abd9ce313355d88bd4ae2c05f040d4cb [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.firewalls.html">firewalls</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#delete">delete(project, firewall, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Deletes the specified firewall.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, firewall)</a></code></p>
82<p class="firstline">Returns the specified firewall.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Creates a firewall rule in the specified project using the data included in the request.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Retrieves the list of firewall rules available to the specified project.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#patch">patch(project, firewall, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#update">update(project, firewall, body=None, requestId=None)</a></code></p>
100<p class="firstline">Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<h3>Method Details</h3>
102<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400103 <code class="details" id="delete">delete(project, firewall, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104 <pre>Deletes the specified firewall.
105
106Args:
107 project: string, Project ID for this request. (required)
108 firewall: string, Name of the firewall rule to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
110
111For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
112
113The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700114
115Returns:
116 An object of the form:
117
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 { # Represents an Operation resource.
119 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 # Google Compute Engine has three Operation resources:
121 #
122 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
123 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
125 #
126 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 # - For global operations, use the `globalOperations` resource.
128 # - For regional operations, use the `regionOperations` resource.
129 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700131 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700132 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400134 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700137 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
139 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700140 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700144 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
145 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
146 {
147 "message": "A String", # [Output Only] A human-readable description of the warning code.
148 "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.
149 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
150 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
151 {
152 "value": "A String", # [Output Only] A warning data value corresponding to the key.
153 "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).
154 },
155 ],
156 },
157 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700161 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
162 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700164 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
165 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
166 {
167 "message": "A String", # [Output Only] An optional, human-readable error message.
168 "code": "A String", # [Output Only] The error type identifier for this error.
169 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
170 },
171 ],
172 },
173 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
174 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800175 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700176 }</pre>
177</div>
178
179<div class="method">
180 <code class="details" id="get">get(project, firewall)</code>
181 <pre>Returns the specified firewall.
182
183Args:
184 project: string, Project ID for this request. (required)
185 firewall: string, Name of the firewall rule to return. (required)
186
187Returns:
188 An object of the form:
189
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700190 { # Represents a Firewall Rule resource.
191 #
192 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
193 "priority": 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
194 "direction": "A String", # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
195 "sourceRanges": [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400196 "A String",
197 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 "sourceServiceAccounts": [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800199 "A String",
200 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
202 "destinationRanges": [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
203 "A String",
204 ],
205 "sourceTags": [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700206 "A String",
207 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800208 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
209 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
211 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800212 #
213 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
214 "A String",
215 ],
216 },
217 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 "enableLogging": True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400219 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 "logConfig": { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
221 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
222 "metadata": "A String", # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
223 },
224 "disabled": True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700225 "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:
226 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700228 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
229 # - projects/myproject/global/networks/my-network
230 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400231 "targetServiceAccounts": [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
232 "A String",
233 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 "targetTags": [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700235 "A String",
236 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700238 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
240 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241 #
242 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
243 "A String",
244 ],
245 },
246 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700248 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
249 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
250 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700252 }</pre>
253</div>
254
255<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700257 <pre>Creates a firewall rule in the specified project using the data included in the request.
258
259Args:
260 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700262 The object takes the form of:
263
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264{ # Represents a Firewall Rule resource.
265 #
266 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
267 "priority": 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
268 "direction": "A String", # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
269 "sourceRanges": [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400270 "A String",
271 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 "sourceServiceAccounts": [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800273 "A String",
274 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
276 "destinationRanges": [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
277 "A String",
278 ],
279 "sourceTags": [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700280 "A String",
281 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800282 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
283 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
285 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800286 #
287 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
288 "A String",
289 ],
290 },
291 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 "enableLogging": True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400293 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 "logConfig": { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
295 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
296 "metadata": "A String", # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
297 },
298 "disabled": True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700299 "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:
300 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700302 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
303 # - projects/myproject/global/networks/my-network
304 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400305 "targetServiceAccounts": [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
306 "A String",
307 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 "targetTags": [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700309 "A String",
310 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700312 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
314 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700315 #
316 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
317 "A String",
318 ],
319 },
320 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700321 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700322 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
323 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
324 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700326 }
327
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700328 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
329
330For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
331
332The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700333
334Returns:
335 An object of the form:
336
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 { # Represents an Operation resource.
338 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700339 # Google Compute Engine has three Operation resources:
340 #
341 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
342 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
344 #
345 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700346 # - For global operations, use the `globalOperations` resource.
347 # - For regional operations, use the `regionOperations` resource.
348 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700350 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700351 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700352 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400353 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700356 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
358 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700359 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700360 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700361 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700363 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
364 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
365 {
366 "message": "A String", # [Output Only] A human-readable description of the warning code.
367 "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.
368 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
369 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
370 {
371 "value": "A String", # [Output Only] A warning data value corresponding to the key.
372 "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).
373 },
374 ],
375 },
376 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700378 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700379 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700380 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
381 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700383 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
384 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
385 {
386 "message": "A String", # [Output Only] An optional, human-readable error message.
387 "code": "A String", # [Output Only] The error type identifier for this error.
388 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
389 },
390 ],
391 },
392 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
393 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800394 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700395 }</pre>
396</div>
397
398<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700399 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700400 <pre>Retrieves the list of firewall rules available to the specified project.
401
402Args:
403 project: string, Project ID for this request. (required)
404 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
405
Dan O'Mearadd494642020-05-01 07:42:23 -0700406You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700407
Dan O'Mearadd494642020-05-01 07:42:23 -0700408Currently, only sorting by `name` or `creationTimestamp desc` is supported.
409 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`)
410 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.
411 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
412 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700413
Dan O'Mearadd494642020-05-01 07:42:23 -0700414For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700415
Dan O'Mearadd494642020-05-01 07:42:23 -0700416You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700417
Dan O'Mearadd494642020-05-01 07:42:23 -0700418To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700419
420Returns:
421 An object of the form:
422
423 { # Contains a list of firewalls.
424 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 "kind": "compute#firewallList", # [Output Only] Type of resource. Always compute#firewallList for lists of firewalls.
426 "items": [ # A list of Firewall resources.
427 { # Represents a Firewall Rule resource.
428 #
429 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
430 "priority": 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
431 "direction": "A String", # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
432 "sourceRanges": [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400433 "A String",
434 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435 "sourceServiceAccounts": [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800436 "A String",
437 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
439 "destinationRanges": [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
440 "A String",
441 ],
442 "sourceTags": [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700443 "A String",
444 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800445 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
446 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
448 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800449 #
450 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
451 "A String",
452 ],
453 },
454 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455 "enableLogging": True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400456 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700457 "logConfig": { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
458 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
459 "metadata": "A String", # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
460 },
461 "disabled": True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700462 "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:
463 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700464 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700465 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
466 # - projects/myproject/global/networks/my-network
467 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400468 "targetServiceAccounts": [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
469 "A String",
470 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700471 "targetTags": [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700472 "A String",
473 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700475 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
477 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700478 #
479 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
480 "A String",
481 ],
482 },
483 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700484 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700485 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
486 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
487 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700488 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700489 },
490 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491 "warning": { # [Output Only] Informational warning message.
492 "message": "A String", # [Output Only] A human-readable description of the warning code.
493 "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.
494 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
495 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
496 {
497 "value": "A String", # [Output Only] A warning data value corresponding to the key.
498 "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).
499 },
500 ],
501 },
502 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700503 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
504 }</pre>
505</div>
506
507<div class="method">
508 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
509 <pre>Retrieves the next page of results.
510
511Args:
512 previous_request: The request for the previous page. (required)
513 previous_response: The response from the request for the previous page. (required)
514
515Returns:
516 A request object that you can call 'execute()' on to request the next
517 page. Returns None if there are no more items in the collection.
518 </pre>
519</div>
520
521<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700522 <code class="details" id="patch">patch(project, firewall, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 <pre>Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700524
525Args:
526 project: string, Project ID for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400527 firewall: string, Name of the firewall rule to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700528 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700529 The object takes the form of:
530
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531{ # Represents a Firewall Rule resource.
532 #
533 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
534 "priority": 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
535 "direction": "A String", # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
536 "sourceRanges": [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400537 "A String",
538 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 "sourceServiceAccounts": [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800540 "A String",
541 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
543 "destinationRanges": [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
544 "A String",
545 ],
546 "sourceTags": [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700547 "A String",
548 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800549 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
550 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
552 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800553 #
554 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
555 "A String",
556 ],
557 },
558 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559 "enableLogging": True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400560 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 "logConfig": { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
562 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
563 "metadata": "A String", # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
564 },
565 "disabled": True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700566 "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:
567 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700568 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700569 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
570 # - projects/myproject/global/networks/my-network
571 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400572 "targetServiceAccounts": [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
573 "A String",
574 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700575 "targetTags": [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700576 "A String",
577 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700579 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
581 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700582 #
583 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
584 "A String",
585 ],
586 },
587 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700588 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700589 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
590 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
591 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700593 }
594
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700595 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
596
597For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
598
599The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700600
601Returns:
602 An object of the form:
603
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 { # Represents an Operation resource.
605 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700606 # Google Compute Engine has three Operation resources:
607 #
608 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
609 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
611 #
612 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700613 # - For global operations, use the `globalOperations` resource.
614 # - For regional operations, use the `regionOperations` resource.
615 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700617 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700618 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400620 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700621 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700623 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700624 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
625 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700626 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700628 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700630 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
631 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
632 {
633 "message": "A String", # [Output Only] A human-readable description of the warning code.
634 "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.
635 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
636 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
637 {
638 "value": "A String", # [Output Only] A warning data value corresponding to the key.
639 "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).
640 },
641 ],
642 },
643 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700645 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700646 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700647 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
648 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700650 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
651 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
652 {
653 "message": "A String", # [Output Only] An optional, human-readable error message.
654 "code": "A String", # [Output Only] The error type identifier for this error.
655 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
656 },
657 ],
658 },
659 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
660 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800661 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700662 }</pre>
663</div>
664
665<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700666 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700667 <pre>Returns permissions that a caller has on the specified resource.
668
669Args:
670 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700671 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700672 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700673 The object takes the form of:
674
675{
676 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
677 "A String",
678 ],
679 }
680
681
682Returns:
683 An object of the form:
684
685 {
686 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
687 "A String",
688 ],
689 }</pre>
690</div>
691
692<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700693 <code class="details" id="update">update(project, firewall, body=None, requestId=None)</code>
694 <pre>Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700695
696Args:
697 project: string, Project ID for this request. (required)
698 firewall: string, Name of the firewall rule to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700699 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700700 The object takes the form of:
701
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700702{ # Represents a Firewall Rule resource.
703 #
704 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
705 "priority": 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
706 "direction": "A String", # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
707 "sourceRanges": [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400708 "A String",
709 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 "sourceServiceAccounts": [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800711 "A String",
712 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
714 "destinationRanges": [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
715 "A String",
716 ],
717 "sourceTags": [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700718 "A String",
719 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800720 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
721 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
723 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800724 #
725 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
726 "A String",
727 ],
728 },
729 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 "enableLogging": True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400731 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700732 "logConfig": { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
733 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
734 "metadata": "A String", # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
735 },
736 "disabled": True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700737 "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:
738 # global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700739 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700740 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
741 # - projects/myproject/global/networks/my-network
742 # - global/networks/default
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400743 "targetServiceAccounts": [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
744 "A String",
745 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 "targetTags": [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700747 "A String",
748 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700750 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
752 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700753 #
754 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
755 "A String",
756 ],
757 },
758 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700759 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700760 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
761 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
762 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700764 }
765
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
767
768For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
769
770The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700771
772Returns:
773 An object of the form:
774
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 { # Represents an Operation resource.
776 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700777 # Google Compute Engine has three Operation resources:
778 #
779 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
780 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700781 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
782 #
783 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700784 # - For global operations, use the `globalOperations` resource.
785 # - For regional operations, use the `regionOperations` resource.
786 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700787 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700788 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700789 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700790 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400791 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700792 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700793 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700794 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700795 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
796 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700797 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700798 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700799 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700800 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700801 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
802 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
803 {
804 "message": "A String", # [Output Only] A human-readable description of the warning code.
805 "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.
806 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
807 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
808 {
809 "value": "A String", # [Output Only] A warning data value corresponding to the key.
810 "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).
811 },
812 ],
813 },
814 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700815 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700816 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700817 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700818 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
819 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700821 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
822 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
823 {
824 "message": "A String", # [Output Only] An optional, human-readable error message.
825 "code": "A String", # [Output Only] The error type identifier for this error.
826 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
827 },
828 ],
829 },
830 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
831 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800832 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700833 }</pre>
834</div>
835
836</body></html>