Debian Codegraph @

docs/dyn/networkmanagement_v1.projects.locations.vpcFlowLogsConfigs.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="networkmanagement_v1.html">Network Management API</a> . <a href="networkmanagement_v1.projects.html">projects</a> . <a href="networkmanagement_v1.projects.locations.html">locations</a> . <a href="networkmanagement_v1.projects.locations.vpcFlowLogsConfigs.html">vpcFlowLogsConfigs</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#create">create(parent, body=None, vpcFlowLogsConfigId=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with `state=DISABLED` will fail 2. The following fields are not considered as settings for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: * name * create_time * update_time * labels * description</p>
83 <p class="toc_element">
84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85 <p class="firstline">Deletes a specific `VpcFlowLogsConfig`.</p>
86 <p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88 <p class="firstline">Gets the details of a specific `VpcFlowLogsConfig`.</p>
89 <p class="toc_element">
90 <code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Lists all `VpcFlowLogsConfigs` in a given project.</p>
92 <p class="toc_element">
93 <code><a href="#list_next">list_next()</a></code></p>
94 <p class="firstline">Retrieves the next page of results.</p>
95 <p class="toc_element">
96 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Updating a configuration with `state=DISABLED` will fail. 2. The following fields are not considered as settings for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: * name * create_time * update_time * labels * description</p>
98 <p class="toc_element">
99 <code><a href="#queryOrgVpcFlowLogsConfigs">queryOrgVpcFlowLogsConfigs(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC Flow Logs configurations applicable to the specified project.</p>
101 <p class="toc_element">
102 <code><a href="#queryOrgVpcFlowLogsConfigs_next">queryOrgVpcFlowLogsConfigs_next()</a></code></p>
103 <p class="firstline">Retrieves the next page of results.</p>
104 <p class="toc_element">
105 <code><a href="#showEffectiveFlowLogsConfigs">showEffectiveFlowLogsConfigs(parent, filter=None, pageSize=None, pageToken=None, resource=None, x__xgafv=None)</a></code></p>
106 <p class="firstline">ShowEffectiveFlowLogsConfigs returns a list of all VPC Flow Logs configurations applicable to a specified resource.</p>
107 <p class="toc_element">
108 <code><a href="#showEffectiveFlowLogsConfigs_next">showEffectiveFlowLogsConfigs_next()</a></code></p>
109 <p class="firstline">Retrieves the next page of results.</p>
110 <h3>Method Details</h3>
111 <div class="method">
112 <code class="details" id="close">close()</code>
113 <pre>Close httplib2 connections.</pre>
114 </div>
115
116 <div class="method">
117 <code class="details" id="create">create(parent, body=None, vpcFlowLogsConfigId=None, x__xgafv=None)</code>
118 <pre>Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with `state=DISABLED` will fail 2. The following fields are not considered as settings for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: * name * create_time * update_time * labels * description
119
120 Args:
121 parent: string, Required. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats: - For project-level resources: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global` (required)
122 body: object, The request body.
123 The object takes the form of:
124
125 { # A configuration to generate VPC Flow Logs.
126 &quot;aggregationInterval&quot;: &quot;A String&quot;, # Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
127 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the config was created.
128 &quot;crossProjectMetadata&quot;: &quot;A String&quot;, # Optional. Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.
129 &quot;description&quot;: &quot;A String&quot;, # Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.
130 &quot;filterExpr&quot;: &quot;A String&quot;, # Optional. Export filter used to define which VPC Flow Logs should be logged.
131 &quot;flowSampling&quot;: 3.14, # Optional. The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.
132 &quot;interconnectAttachment&quot;: &quot;A String&quot;, # Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
133 &quot;labels&quot;: { # Optional. Resource labels to represent user-provided metadata.
134 &quot;a_key&quot;: &quot;A String&quot;,
135 },
136 &quot;metadata&quot;: &quot;A String&quot;, # Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.
137 &quot;metadataFields&quot;: [ # Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if &quot;metadata&quot; was set to CUSTOM_METADATA.
138 &quot;A String&quot;,
139 ],
140 &quot;name&quot;: &quot;A String&quot;, # Identifier. Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For organization-level configurations: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}`
141 &quot;network&quot;: &quot;A String&quot;, # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}
142 &quot;state&quot;: &quot;A String&quot;, # Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.
143 &quot;subnet&quot;: &quot;A String&quot;, # Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}
144 &quot;targetResourceState&quot;: &quot;A String&quot;, # Output only. Describes the state of the configured target resource for diagnostic purposes.
145 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the config was updated.
146 &quot;vpnTunnel&quot;: &quot;A String&quot;, # Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
147 }
148
149 vpcFlowLogsConfigId: string, Required. ID of the `VpcFlowLogsConfig`.
150 x__xgafv: string, V1 error format.
151 Allowed values
152 1 - v1 error format
153 2 - v2 error format
154
155 Returns:
156 An object of the form:
157
158 { # This resource represents a long-running operation that is the result of a network API call.
159 &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.
160 &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.
161 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
162 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
163 {
164 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
165 },
166 ],
167 &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.
168 },
169 &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.
170 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
171 },
172 &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}`.
173 &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`.
174 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
175 },
176 }</pre>
177 </div>
178
179 <div class="method">
180 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
181 <pre>Deletes a specific `VpcFlowLogsConfig`.
182
183 Args:
184 name: string, Required. The resource name of the VpcFlowLogsConfig, in one of the following formats: - For a project-level resource: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For an organization-level resource: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` (required)
185 x__xgafv: string, V1 error format.
186 Allowed values
187 1 - v1 error format
188 2 - v2 error format
189
190 Returns:
191 An object of the form:
192
193 { # This resource represents a long-running operation that is the result of a network API call.
194 &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.
195 &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.
196 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
197 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
198 {
199 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
200 },
201 ],
202 &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.
203 },
204 &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.
205 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
206 },
207 &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}`.
208 &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`.
209 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
210 },
211 }</pre>
212 </div>
213
214 <div class="method">
215 <code class="details" id="get">get(name, x__xgafv=None)</code>
216 <pre>Gets the details of a specific `VpcFlowLogsConfig`.
217
218 Args:
219 name: string, Required. The resource name of the VpcFlowLogsConfig, in one of the following formats: - For project-level resources: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For organization-level resources: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` (required)
220 x__xgafv: string, V1 error format.
221 Allowed values
222 1 - v1 error format
223 2 - v2 error format
224
225 Returns:
226 An object of the form:
227
228 { # A configuration to generate VPC Flow Logs.
229 &quot;aggregationInterval&quot;: &quot;A String&quot;, # Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
230 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the config was created.
231 &quot;crossProjectMetadata&quot;: &quot;A String&quot;, # Optional. Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.
232 &quot;description&quot;: &quot;A String&quot;, # Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.
233 &quot;filterExpr&quot;: &quot;A String&quot;, # Optional. Export filter used to define which VPC Flow Logs should be logged.
234 &quot;flowSampling&quot;: 3.14, # Optional. The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.
235 &quot;interconnectAttachment&quot;: &quot;A String&quot;, # Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
236 &quot;labels&quot;: { # Optional. Resource labels to represent user-provided metadata.
237 &quot;a_key&quot;: &quot;A String&quot;,
238 },
239 &quot;metadata&quot;: &quot;A String&quot;, # Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.
240 &quot;metadataFields&quot;: [ # Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if &quot;metadata&quot; was set to CUSTOM_METADATA.
241 &quot;A String&quot;,
242 ],
243 &quot;name&quot;: &quot;A String&quot;, # Identifier. Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For organization-level configurations: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}`
244 &quot;network&quot;: &quot;A String&quot;, # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}
245 &quot;state&quot;: &quot;A String&quot;, # Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.
246 &quot;subnet&quot;: &quot;A String&quot;, # Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}
247 &quot;targetResourceState&quot;: &quot;A String&quot;, # Output only. Describes the state of the configured target resource for diagnostic purposes.
248 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the config was updated.
249 &quot;vpnTunnel&quot;: &quot;A String&quot;, # Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
250 }</pre>
251 </div>
252
253 <div class="method">
254 <code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
255 <pre>Lists all `VpcFlowLogsConfigs` in a given project.
256
257 Args:
258 parent: string, Required. The parent resource of the VpcFlowLogsConfig, in one of the following formats: - For project-level resources: `projects/{project_id}/locations/global` - For organization-level resources: `organizations/{organization_id}/locations/global` (required)
259 filter: string, Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. A filter expression must use the supported [CEL logic operators] (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators).
260 orderBy: string, Optional. Field to use to sort the list.
261 pageSize: integer, Optional. Number of `VpcFlowLogsConfigs` to return.
262 pageToken: string, Optional. Page token from an earlier query, as returned in `next_page_token`.
263 x__xgafv: string, V1 error format.
264 Allowed values
265 1 - v1 error format
266 2 - v2 error format
267
268 Returns:
269 An object of the form:
270
271 { # Response for the `ListVpcFlowLogsConfigs` method.
272 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token to fetch the next set of configurations.
273 &quot;unreachable&quot;: [ # Locations that could not be reached (when querying all locations with `-`).
274 &quot;A String&quot;,
275 ],
276 &quot;vpcFlowLogsConfigs&quot;: [ # List of VPC Flow Log configurations.
277 { # A configuration to generate VPC Flow Logs.
278 &quot;aggregationInterval&quot;: &quot;A String&quot;, # Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
279 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the config was created.
280 &quot;crossProjectMetadata&quot;: &quot;A String&quot;, # Optional. Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.
281 &quot;description&quot;: &quot;A String&quot;, # Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.
282 &quot;filterExpr&quot;: &quot;A String&quot;, # Optional. Export filter used to define which VPC Flow Logs should be logged.
283 &quot;flowSampling&quot;: 3.14, # Optional. The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.
284 &quot;interconnectAttachment&quot;: &quot;A String&quot;, # Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
285 &quot;labels&quot;: { # Optional. Resource labels to represent user-provided metadata.
286 &quot;a_key&quot;: &quot;A String&quot;,
287 },
288 &quot;metadata&quot;: &quot;A String&quot;, # Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.
289 &quot;metadataFields&quot;: [ # Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if &quot;metadata&quot; was set to CUSTOM_METADATA.
290 &quot;A String&quot;,
291 ],
292 &quot;name&quot;: &quot;A String&quot;, # Identifier. Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For organization-level configurations: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}`
293 &quot;network&quot;: &quot;A String&quot;, # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}
294 &quot;state&quot;: &quot;A String&quot;, # Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.
295 &quot;subnet&quot;: &quot;A String&quot;, # Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}
296 &quot;targetResourceState&quot;: &quot;A String&quot;, # Output only. Describes the state of the configured target resource for diagnostic purposes.
297 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the config was updated.
298 &quot;vpnTunnel&quot;: &quot;A String&quot;, # Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
299 },
300 ],
301 }</pre>
302 </div>
303
304 <div class="method">
305 <code class="details" id="list_next">list_next()</code>
306 <pre>Retrieves the next page of results.
307
308 Args:
309 previous_request: The request for the previous page. (required)
310 previous_response: The response from the request for the previous page. (required)
311
312 Returns:
313 A request object that you can call &#x27;execute()&#x27; on to request the next
314 page. Returns None if there are no more items in the collection.
315 </pre>
316 </div>
317
318 <div class="method">
319 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
320 <pre>Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Updating a configuration with `state=DISABLED` will fail. 2. The following fields are not considered as settings for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: * name * create_time * update_time * labels * description
321
322 Args:
323 name: string, Identifier. Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For organization-level configurations: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` (required)
324 body: object, The request body.
325 The object takes the form of:
326
327 { # A configuration to generate VPC Flow Logs.
328 &quot;aggregationInterval&quot;: &quot;A String&quot;, # Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
329 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the config was created.
330 &quot;crossProjectMetadata&quot;: &quot;A String&quot;, # Optional. Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.
331 &quot;description&quot;: &quot;A String&quot;, # Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.
332 &quot;filterExpr&quot;: &quot;A String&quot;, # Optional. Export filter used to define which VPC Flow Logs should be logged.
333 &quot;flowSampling&quot;: 3.14, # Optional. The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.
334 &quot;interconnectAttachment&quot;: &quot;A String&quot;, # Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
335 &quot;labels&quot;: { # Optional. Resource labels to represent user-provided metadata.
336 &quot;a_key&quot;: &quot;A String&quot;,
337 },
338 &quot;metadata&quot;: &quot;A String&quot;, # Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.
339 &quot;metadataFields&quot;: [ # Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if &quot;metadata&quot; was set to CUSTOM_METADATA.
340 &quot;A String&quot;,
341 ],
342 &quot;name&quot;: &quot;A String&quot;, # Identifier. Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For organization-level configurations: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}`
343 &quot;network&quot;: &quot;A String&quot;, # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}
344 &quot;state&quot;: &quot;A String&quot;, # Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.
345 &quot;subnet&quot;: &quot;A String&quot;, # Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}
346 &quot;targetResourceState&quot;: &quot;A String&quot;, # Output only. Describes the state of the configured target resource for diagnostic purposes.
347 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the config was updated.
348 &quot;vpnTunnel&quot;: &quot;A String&quot;, # Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
349 }
350
351 updateMask: string, Required. Mask of fields to update. At least one path must be supplied in this field. For example, to change the state of the configuration to ENABLED, specify `update_mask` = `&quot;state&quot;`, and the `vpc_flow_logs_config` would be: `vpc_flow_logs_config = { name = &quot;projects/my-project/locations/global/vpcFlowLogsConfigs/my-config&quot; state = &quot;ENABLED&quot; }`
352 x__xgafv: string, V1 error format.
353 Allowed values
354 1 - v1 error format
355 2 - v2 error format
356
357 Returns:
358 An object of the form:
359
360 { # This resource represents a long-running operation that is the result of a network API call.
361 &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.
362 &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.
363 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
364 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
365 {
366 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
367 },
368 ],
369 &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.
370 },
371 &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.
372 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
373 },
374 &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}`.
375 &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`.
376 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
377 },
378 }</pre>
379 </div>
380
381 <div class="method">
382 <code class="details" id="queryOrgVpcFlowLogsConfigs">queryOrgVpcFlowLogsConfigs(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
383 <pre>QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC Flow Logs configurations applicable to the specified project.
384
385 Args:
386 parent: string, Required. The parent resource of the VpcFlowLogsConfig, specified in the following format: `projects/{project_id}/locations/global` (required)
387 filter: string, Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. A filter expression must use the supported [CEL logic operators] (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators).
388 pageSize: integer, Optional. Number of `VpcFlowLogsConfigs` to return.
389 pageToken: string, Optional. Page token from an earlier query, as returned in `next_page_token`.
390 x__xgafv: string, V1 error format.
391 Allowed values
392 1 - v1 error format
393 2 - v2 error format
394
395 Returns:
396 An object of the form:
397
398 { # Response for the `QueryVpcFlowLogsConfigs` method.
399 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token to fetch the next set of configurations.
400 &quot;unreachable&quot;: [ # Locations that could not be reached (when querying all locations with `-`).
401 &quot;A String&quot;,
402 ],
403 &quot;vpcFlowLogsConfigs&quot;: [ # List of VPC Flow Log configurations.
404 { # A configuration to generate VPC Flow Logs.
405 &quot;aggregationInterval&quot;: &quot;A String&quot;, # Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
406 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the config was created.
407 &quot;crossProjectMetadata&quot;: &quot;A String&quot;, # Optional. Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.
408 &quot;description&quot;: &quot;A String&quot;, # Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.
409 &quot;filterExpr&quot;: &quot;A String&quot;, # Optional. Export filter used to define which VPC Flow Logs should be logged.
410 &quot;flowSampling&quot;: 3.14, # Optional. The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.
411 &quot;interconnectAttachment&quot;: &quot;A String&quot;, # Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
412 &quot;labels&quot;: { # Optional. Resource labels to represent user-provided metadata.
413 &quot;a_key&quot;: &quot;A String&quot;,
414 },
415 &quot;metadata&quot;: &quot;A String&quot;, # Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.
416 &quot;metadataFields&quot;: [ # Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if &quot;metadata&quot; was set to CUSTOM_METADATA.
417 &quot;A String&quot;,
418 ],
419 &quot;name&quot;: &quot;A String&quot;, # Identifier. Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For organization-level configurations: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}`
420 &quot;network&quot;: &quot;A String&quot;, # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}
421 &quot;state&quot;: &quot;A String&quot;, # Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.
422 &quot;subnet&quot;: &quot;A String&quot;, # Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}
423 &quot;targetResourceState&quot;: &quot;A String&quot;, # Output only. Describes the state of the configured target resource for diagnostic purposes.
424 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the config was updated.
425 &quot;vpnTunnel&quot;: &quot;A String&quot;, # Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
426 },
427 ],
428 }</pre>
429 </div>
430
431 <div class="method">
432 <code class="details" id="queryOrgVpcFlowLogsConfigs_next">queryOrgVpcFlowLogsConfigs_next()</code>
433 <pre>Retrieves the next page of results.
434
435 Args:
436 previous_request: The request for the previous page. (required)
437 previous_response: The response from the request for the previous page. (required)
438
439 Returns:
440 A request object that you can call &#x27;execute()&#x27; on to request the next
441 page. Returns None if there are no more items in the collection.
442 </pre>
443 </div>
444
445 <div class="method">
446 <code class="details" id="showEffectiveFlowLogsConfigs">showEffectiveFlowLogsConfigs(parent, filter=None, pageSize=None, pageToken=None, resource=None, x__xgafv=None)</code>
447 <pre>ShowEffectiveFlowLogsConfigs returns a list of all VPC Flow Logs configurations applicable to a specified resource.
448
449 Args:
450 parent: string, Required. The parent resource of the VpcFlowLogsConfig, specified in the following format: `projects/{project_id}/locations/global` (required)
451 filter: string, Optional. Lists the `EffectiveVpcFlowLogsConfigs` that match the filter expression. A filter expression must use the supported [CEL logic operators] (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators).
452 pageSize: integer, Optional. Number of `EffectiveVpcFlowLogsConfigs` to return. Default is 30.
453 pageToken: string, Optional. Page token from an earlier query, as returned in `next_page_token`.
454 resource: string, Required. The resource to get the effective VPC Flow Logs configuration for. The resource must belong to the same project as the parent. The resource must be a network, subnetwork, interconnect attachment, VPN tunnel, or a project.
455 x__xgafv: string, V1 error format.
456 Allowed values
457 1 - v1 error format
458 2 - v2 error format
459
460 Returns:
461 An object of the form:
462
463 { # Response for the `ShowEffectiveFlowLogsConfigs` method.
464 &quot;effectiveFlowLogsConfigs&quot;: [ # List of Effective Vpc Flow Logs configurations.
465 { # A configuration to generate a response for GetEffectiveVpcFlowLogsConfig request.
466 &quot;aggregationInterval&quot;: &quot;A String&quot;, # The aggregation interval for the logs. Default value is INTERVAL_5_SEC.
467 &quot;crossProjectMetadata&quot;: &quot;A String&quot;, # Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.
468 &quot;filterExpr&quot;: &quot;A String&quot;, # Export filter used to define which VPC Flow Logs should be logged.
469 &quot;flowSampling&quot;: 3.14, # The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.
470 &quot;interconnectAttachment&quot;: &quot;A String&quot;, # Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}
471 &quot;metadata&quot;: &quot;A String&quot;, # Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.
472 &quot;metadataFields&quot;: [ # Custom metadata fields to include in the reported VPC flow logs. Can only be specified if &quot;metadata&quot; was set to CUSTOM_METADATA.
473 &quot;A String&quot;,
474 ],
475 &quot;name&quot;: &quot;A String&quot;, # Unique name of the configuration. The name can have one of the following forms: - For project-level configurations: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For organization-level configurations: `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - For a Compute config, the name will be the path of the subnet: `projects/{project_id}/regions/{region}/subnetworks/{subnet_id}`
476 &quot;network&quot;: &quot;A String&quot;, # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}
477 &quot;scope&quot;: &quot;A String&quot;, # Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..).
478 &quot;state&quot;: &quot;A String&quot;, # The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.
479 &quot;subnet&quot;: &quot;A String&quot;, # Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}
480 &quot;vpnTunnel&quot;: &quot;A String&quot;, # Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}
481 },
482 ],
483 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token to fetch the next set of configurations.
484 &quot;unreachable&quot;: [ # Locations that could not be reached (when querying all locations with `-`).
485 &quot;A String&quot;,
486 ],
487 }</pre>
488 </div>
489
490 <div class="method">
491 <code class="details" id="showEffectiveFlowLogsConfigs_next">showEffectiveFlowLogsConfigs_next()</code>
492 <pre>Retrieves the next page of results.
493
494 Args:
495 previous_request: The request for the previous page. (required)
496 previous_response: The response from the request for the previous page. (required)
497
498 Returns:
499 A request object that you can call &#x27;execute()&#x27; on to request the next
500 page. Returns None if there are no more items in the collection.
501 </pre>
502 </div>
503
504 </body></html>