Debian Codegraph @

docs/dyn/vmwareengine_v1.projects.locations.networkPolicies.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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="vmwareengine_v1.html">VMware Engine API</a> . <a href="vmwareengine_v1.projects.html">projects</a> . <a href="vmwareengine_v1.projects.locations.html">locations</a> . <a href="vmwareengine_v1.projects.locations.networkPolicies.html">networkPolicies</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="vmwareengine_v1.projects.locations.networkPolicies.externalAccessRules.html">externalAccessRules()</a></code>
79 </p>
80 <p class="firstline">Returns the externalAccessRules Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#close">close()</a></code></p>
84 <p class="firstline">Close httplib2 connections.</p>
85 <p class="toc_element">
86 <code><a href="#create">create(parent, body=None, networkPolicyId=None, requestId=None, validateOnly=None, x__xgafv=None)</a></code></p>
87 <p class="firstline">Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.</p>
88 <p class="toc_element">
89 <code><a href="#delete">delete(name, requestId=None, x__xgafv=None)</a></code></p>
90 <p class="firstline">Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.</p>
91 <p class="toc_element">
92 <code><a href="#fetchExternalAddresses">fetchExternalAddresses(networkPolicy, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
93 <p class="firstline">Lists external IP addresses assigned to VMware workload VMs within the scope of the given network policy.</p>
94 <p class="toc_element">
95 <code><a href="#fetchExternalAddresses_next">fetchExternalAddresses_next()</a></code></p>
96 <p class="firstline">Retrieves the next page of results.</p>
97 <p class="toc_element">
98 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
99 <p class="firstline">Retrieves a `NetworkPolicy` resource by its resource name.</p>
100 <p class="toc_element">
101 <code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
102 <p class="firstline">Lists `NetworkPolicy` resources in a specified project and location.</p>
103 <p class="toc_element">
104 <code><a href="#list_next">list_next()</a></code></p>
105 <p class="firstline">Retrieves the next page of results.</p>
106 <p class="toc_element">
107 <code><a href="#patch">patch(name, body=None, requestId=None, updateMask=None, validateOnly=None, x__xgafv=None)</a></code></p>
108 <p class="firstline">Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.</p>
109 <h3>Method Details</h3>
110 <div class="method">
111 <code class="details" id="close">close()</code>
112 <pre>Close httplib2 connections.</pre>
113 </div>
114
115 <div class="method">
116 <code class="details" id="create">create(parent, body=None, networkPolicyId=None, requestId=None, validateOnly=None, x__xgafv=None)</code>
117 <pre>Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.
118
119 Args:
120 parent: string, Required. The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1` (required)
121 body: object, The request body.
122 The object takes the form of:
123
124 { # Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.
125 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Creation time of this resource.
126 &quot;description&quot;: &quot;A String&quot;, # Optional. User-provided description for this network policy.
127 &quot;edgeServicesCidr&quot;: &quot;A String&quot;, # Required. IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a &quot;/26&quot; prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
128 &quot;externalIp&quot;: { # Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet. # Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when `internet_access` is also enabled.
129 &quot;enabled&quot;: True or False, # True if the service is enabled; false otherwise.
130 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the service. New values may be added to this enum when appropriate.
131 },
132 &quot;internetAccess&quot;: { # Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet. # Network service that allows VMware workloads to access the internet.
133 &quot;enabled&quot;: True or False, # True if the service is enabled; false otherwise.
134 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the service. New values may be added to this enum when appropriate.
135 },
136 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
137 &quot;uid&quot;: &quot;A String&quot;, # Output only. System-generated unique identifier for the resource.
138 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Last update time of this resource.
139 &quot;vmwareEngineNetwork&quot;: &quot;A String&quot;, # Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.
140 &quot;vmwareEngineNetworkCanonical&quot;: &quot;A String&quot;, # Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
141 }
142
143 networkPolicyId: string, Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
144 requestId: string, Optional. A 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. The server guarantees that a request doesn&#x27;t result in creation of duplicate commitments for at least 60 minutes. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
145 validateOnly: boolean, Optional. If set to `true`, only validates the request but doesn’t execute the request. If set to `false`, validates and executes the request.
146 x__xgafv: string, V1 error format.
147 Allowed values
148 1 - v1 error format
149 2 - v2 error format
150
151 Returns:
152 An object of the form:
153
154 { # This resource represents a long-running operation that is the result of a network API call.
155 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
156 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
157 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
158 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
159 {
160 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
161 },
162 ],
163 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
164 },
165 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
166 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
167 },
168 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
169 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
170 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
171 },
172 }</pre>
173 </div>
174
175 <div class="method">
176 <code class="details" id="delete">delete(name, requestId=None, x__xgafv=None)</code>
177 <pre>Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.
178
179 Args:
180 name: string, Required. The resource name of the network policy to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` (required)
181 requestId: string, Optional. A 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. The server guarantees that a request doesn&#x27;t result in creation of duplicate commitments for at least 60 minutes. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
182 x__xgafv: string, V1 error format.
183 Allowed values
184 1 - v1 error format
185 2 - v2 error format
186
187 Returns:
188 An object of the form:
189
190 { # This resource represents a long-running operation that is the result of a network API call.
191 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
192 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
193 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
194 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
195 {
196 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
197 },
198 ],
199 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
200 },
201 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
202 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
203 },
204 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
205 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
206 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
207 },
208 }</pre>
209 </div>
210
211 <div class="method">
212 <code class="details" id="fetchExternalAddresses">fetchExternalAddresses(networkPolicy, pageSize=None, pageToken=None, x__xgafv=None)</code>
213 <pre>Lists external IP addresses assigned to VMware workload VMs within the scope of the given network policy.
214
215 Args:
216 networkPolicy: string, Required. The resource name of the network policy to query for assigned external IP addresses. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy` (required)
217 pageSize: integer, The maximum number of external IP addresses to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.
218 pageToken: string, A page token, received from a previous `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the subsequent page. When paginating, all parameters provided to `FetchNetworkPolicyExternalAddresses`, except for `page_size` and `page_token`, must match the call that provided the page token.
219 x__xgafv: string, V1 error format.
220 Allowed values
221 1 - v1 error format
222 2 - v2 error format
223
224 Returns:
225 An object of the form:
226
227 { # Response message for VmwareEngine.FetchNetworkPolicyExternalAddresses
228 &quot;externalAddresses&quot;: [ # A list of external IP addresses assigned to VMware workload VMs within the scope of the given network policy.
229 { # Represents an allocated external IP address and its corresponding internal IP address in a private cloud.
230 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Creation time of this resource.
231 &quot;description&quot;: &quot;A String&quot;, # User-provided description for this resource.
232 &quot;externalIp&quot;: &quot;A String&quot;, # Output only. The external IP address of a workload VM.
233 &quot;internalIp&quot;: &quot;A String&quot;, # The internal IP address of a workload VM.
234 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of this external IP address. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`
235 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the resource.
236 &quot;uid&quot;: &quot;A String&quot;, # Output only. System-generated unique identifier for the resource.
237 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Last update time of this resource.
238 },
239 ],
240 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
241 }</pre>
242 </div>
243
244 <div class="method">
245 <code class="details" id="fetchExternalAddresses_next">fetchExternalAddresses_next()</code>
246 <pre>Retrieves the next page of results.
247
248 Args:
249 previous_request: The request for the previous page. (required)
250 previous_response: The response from the request for the previous page. (required)
251
252 Returns:
253 A request object that you can call &#x27;execute()&#x27; on to request the next
254 page. Returns None if there are no more items in the collection.
255 </pre>
256 </div>
257
258 <div class="method">
259 <code class="details" id="get">get(name, x__xgafv=None)</code>
260 <pre>Retrieves a `NetworkPolicy` resource by its resource name.
261
262 Args:
263 name: string, Required. The resource name of the network policy to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` (required)
264 x__xgafv: string, V1 error format.
265 Allowed values
266 1 - v1 error format
267 2 - v2 error format
268
269 Returns:
270 An object of the form:
271
272 { # Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.
273 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Creation time of this resource.
274 &quot;description&quot;: &quot;A String&quot;, # Optional. User-provided description for this network policy.
275 &quot;edgeServicesCidr&quot;: &quot;A String&quot;, # Required. IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a &quot;/26&quot; prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
276 &quot;externalIp&quot;: { # Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet. # Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when `internet_access` is also enabled.
277 &quot;enabled&quot;: True or False, # True if the service is enabled; false otherwise.
278 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the service. New values may be added to this enum when appropriate.
279 },
280 &quot;internetAccess&quot;: { # Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet. # Network service that allows VMware workloads to access the internet.
281 &quot;enabled&quot;: True or False, # True if the service is enabled; false otherwise.
282 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the service. New values may be added to this enum when appropriate.
283 },
284 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
285 &quot;uid&quot;: &quot;A String&quot;, # Output only. System-generated unique identifier for the resource.
286 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Last update time of this resource.
287 &quot;vmwareEngineNetwork&quot;: &quot;A String&quot;, # Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.
288 &quot;vmwareEngineNetworkCanonical&quot;: &quot;A String&quot;, # Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
289 }</pre>
290 </div>
291
292 <div class="method">
293 <code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
294 <pre>Lists `NetworkPolicy` resources in a specified project and location.
295
296 Args:
297 parent: string, Required. The resource name of the location (region) to query for network policies. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1` (required)
298 filter: string, A filter expression that matches resources returned 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 `=`, `!=`, `&gt;`, or `&lt;`. For example, if you are filtering a list of network policies, you can exclude the ones named `example-policy` by specifying `name != &quot;example-policy&quot;`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = &quot;example-policy&quot;) (createTime &gt; &quot;2021-04-12T08:15:10.40Z&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = &quot;example-policy-1&quot;) AND (createTime &gt; &quot;2021-04-12T08:15:10.40Z&quot;) OR (name = &quot;example-policy-2&quot;) ```
299 orderBy: string, Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=&quot;name desc&quot;`. Currently, only ordering by `name` is supported.
300 pageSize: integer, The maximum number of network policies to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.
301 pageToken: string, A page token, received from a previous `ListNetworkPolicies` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPolicies` must match the call that provided the page token.
302 x__xgafv: string, V1 error format.
303 Allowed values
304 1 - v1 error format
305 2 - v2 error format
306
307 Returns:
308 An object of the form:
309
310 { # Response message for VmwareEngine.ListNetworkPolicies
311 &quot;networkPolicies&quot;: [ # A list of network policies.
312 { # Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.
313 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Creation time of this resource.
314 &quot;description&quot;: &quot;A String&quot;, # Optional. User-provided description for this network policy.
315 &quot;edgeServicesCidr&quot;: &quot;A String&quot;, # Required. IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a &quot;/26&quot; prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
316 &quot;externalIp&quot;: { # Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet. # Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when `internet_access` is also enabled.
317 &quot;enabled&quot;: True or False, # True if the service is enabled; false otherwise.
318 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the service. New values may be added to this enum when appropriate.
319 },
320 &quot;internetAccess&quot;: { # Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet. # Network service that allows VMware workloads to access the internet.
321 &quot;enabled&quot;: True or False, # True if the service is enabled; false otherwise.
322 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the service. New values may be added to this enum when appropriate.
323 },
324 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
325 &quot;uid&quot;: &quot;A String&quot;, # Output only. System-generated unique identifier for the resource.
326 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Last update time of this resource.
327 &quot;vmwareEngineNetwork&quot;: &quot;A String&quot;, # Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.
328 &quot;vmwareEngineNetworkCanonical&quot;: &quot;A String&quot;, # Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
329 },
330 ],
331 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token, which can be send as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
332 &quot;unreachable&quot;: [ # Locations that could not be reached when making an aggregated query using wildcards.
333 &quot;A String&quot;,
334 ],
335 }</pre>
336 </div>
337
338 <div class="method">
339 <code class="details" id="list_next">list_next()</code>
340 <pre>Retrieves the next page of results.
341
342 Args:
343 previous_request: The request for the previous page. (required)
344 previous_response: The response from the request for the previous page. (required)
345
346 Returns:
347 A request object that you can call &#x27;execute()&#x27; on to request the next
348 page. Returns None if there are no more items in the collection.
349 </pre>
350 </div>
351
352 <div class="method">
353 <code class="details" id="patch">patch(name, body=None, requestId=None, updateMask=None, validateOnly=None, x__xgafv=None)</code>
354 <pre>Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can&#x27;t update the resource. Use the operation status to determine when the processing fully completes.
355
356 Args:
357 name: string, Output only. Identifier. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` (required)
358 body: object, The request body.
359 The object takes the form of:
360
361 { # Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.
362 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Creation time of this resource.
363 &quot;description&quot;: &quot;A String&quot;, # Optional. User-provided description for this network policy.
364 &quot;edgeServicesCidr&quot;: &quot;A String&quot;, # Required. IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a &quot;/26&quot; prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
365 &quot;externalIp&quot;: { # Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet. # Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when `internet_access` is also enabled.
366 &quot;enabled&quot;: True or False, # True if the service is enabled; false otherwise.
367 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the service. New values may be added to this enum when appropriate.
368 },
369 &quot;internetAccess&quot;: { # Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet. # Network service that allows VMware workloads to access the internet.
370 &quot;enabled&quot;: True or False, # True if the service is enabled; false otherwise.
371 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the service. New values may be added to this enum when appropriate.
372 },
373 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
374 &quot;uid&quot;: &quot;A String&quot;, # Output only. System-generated unique identifier for the resource.
375 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Last update time of this resource.
376 &quot;vmwareEngineNetwork&quot;: &quot;A String&quot;, # Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.
377 &quot;vmwareEngineNetworkCanonical&quot;: &quot;A String&quot;, # Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
378 }
379
380 requestId: string, Optional. A 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. The server guarantees that a request doesn&#x27;t result in creation of duplicate commitments for at least 60 minutes. For 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. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
381 updateMask: string, Required. Field mask is used to specify the fields to be overwritten in the `NetworkPolicy` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
382 validateOnly: boolean, Optional. If set to `true`, only validates the request but doesn’t execute the request. If set to `false`, validates and executes the request.
383 x__xgafv: string, V1 error format.
384 Allowed values
385 1 - v1 error format
386 2 - v2 error format
387
388 Returns:
389 An object of the form:
390
391 { # This resource represents a long-running operation that is the result of a network API call.
392 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
393 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
394 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
395 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
396 {
397 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
398 },
399 ],
400 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
401 },
402 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
403 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
404 },
405 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
406 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
407 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
408 },
409 }</pre>
410 </div>
411
412 </body></html>