blob: 5ef358387e4a0a74a322f7e662c994a77d578b0b [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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="cloudasset_v1beta1.html">Cloud Asset API</a> . <a href="cloudasset_v1beta1.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudasset_v1beta1.projects.operations.html">operations()</a></code>
79</p>
80<p class="firstline">Returns the operations Resource.</p>
81
82<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070083 <code><a href="#batchGetAssetsHistory">batchGetAssetsHistory(parent, contentType=None, assetNames=None, readTimeWindow_endTime=None, readTimeWindow_startTime=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084<p class="firstline">Batch gets the update history of assets that overlap a time window.</p>
85<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070086 <code><a href="#exportAssets">exportAssets(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087<p class="firstline">Exports assets with time and resource types to a given Cloud Storage</p>
88<h3>Method Details</h3>
89<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070090 <code class="details" id="batchGetAssetsHistory">batchGetAssetsHistory(parent, contentType=None, assetNames=None, readTimeWindow_endTime=None, readTimeWindow_startTime=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091 <pre>Batch gets the update history of assets that overlap a time window.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092For IAM_POLICY content, this API outputs history when the asset and its
93attached IAM POLICY both exist. This can create gaps in the output history.
Bu Sun Kimd059ad82020-07-22 17:02:09 -070094Otherwise, this API outputs history with asset in both non-delete or
95deleted status.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096If a specified asset does not exist, this API returns an INVALID_ARGUMENT
97error.
98
99Args:
100 parent: string, Required. The relative name of the root asset. It can only be an
Bu Sun Kim65020912020-05-20 12:08:20 -0700101organization number (such as &quot;organizations/123&quot;), a project ID (such as
102&quot;projects/my-project-id&quot;)&quot;, or a project number (such as &quot;projects/12345&quot;). (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 contentType: string, Optional. The content type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104 assetNames: string, A list of the full names of the assets. For example:
105`//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
106See [Resource
107Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
108for more info.
109
110The request becomes a no-op if the asset name list is empty, and the max
111size of the asset name list is 100 in one request. (repeated)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700112 readTimeWindow_endTime: string, End time of the time window (inclusive). If not specified, the current
113timestamp is used instead.
114 readTimeWindow_startTime: string, Start time of the time window (exclusive).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115 x__xgafv: string, V1 error format.
116 Allowed values
117 1 - v1 error format
118 2 - v2 error format
119
120Returns:
121 An object of the form:
122
123 { # Batch get assets history response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 &quot;assets&quot;: [ # A list of assets with valid time windows.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700125 { # An asset in Google Cloud and its temporal metadata, including the time window
126 # when it was observed and its status during that window.
127 &quot;window&quot;: { # A time window specified by its `start_time` and `end_time`. # The time window when the asset data and state was observed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700128 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the time window (exclusive).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700129 &quot;endTime&quot;: &quot;A String&quot;, # End time of the time window (inclusive). If not specified, the current
130 # timestamp is used instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700132 &quot;deleted&quot;: True or False, # Whether the asset has been deleted or not.
133 &quot;asset&quot;: { # An asset in Google Cloud. An asset can be any resource in the Google Cloud # An asset in Google Cloud.
134 # [resource
135 # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
136 # a resource outside the Google Cloud resource hierarchy (such as Google
137 # Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
138 # See [Supported asset
139 # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
140 # for more information.
141 &quot;servicePerimeter&quot;: { # `ServicePerimeter` describes a set of Google Cloud resources which can freely # Please also refer to the [service perimeter user
142 # guide](https://cloud.google.com/vpc-service-controls/docs/overview).
143 # import and export data amongst themselves, but not export outside of the
144 # `ServicePerimeter`. If a request with a source within this `ServicePerimeter`
145 # has a target outside of the `ServicePerimeter`, the request will be blocked.
146 # Otherwise the request is allowed. There are two types of Service Perimeter -
147 # Regular and Bridge. Regular Service Perimeters cannot overlap, a single
148 # Google Cloud project can only belong to a single regular Service Perimeter.
149 # Service Perimeter Bridges can contain only Google Cloud projects as members,
150 # a single Google Cloud project may belong to multiple Service Perimeter
151 # Bridges.
152 &quot;perimeterType&quot;: &quot;A String&quot;, # Perimeter type indicator. A single project is
153 # allowed to be a member of single regular perimeter, but multiple service
154 # perimeter bridges. A project cannot be a included in a perimeter bridge
155 # without being included in regular perimeter. For perimeter bridges,
156 # the restricted service list as well as access level lists must be
157 # empty.
158 &quot;status&quot;: { # `ServicePerimeterConfig` specifies a set of Google Cloud resources that # Current ServicePerimeter configuration. Specifies sets of resources,
159 # restricted services and access levels that determine perimeter
160 # content and boundaries.
161 # describe specific Service Perimeter configuration.
162 &quot;restrictedServices&quot;: [ # Google Cloud services that are subject to the Service Perimeter
163 # restrictions. For example, if `storage.googleapis.com` is specified, access
164 # to the storage buckets inside the perimeter must meet the perimeter&#x27;s
165 # access restrictions.
166 &quot;A String&quot;,
167 ],
168 &quot;accessLevels&quot;: [ # A list of `AccessLevel` resource names that allow resources within the
169 # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed
170 # must be in the same policy as this `ServicePerimeter`. Referencing a
171 # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are
172 # listed, resources within the perimeter can only be accessed via Google
173 # Cloud calls with request origins within the perimeter. Example:
174 # `&quot;accessPolicies/MY_POLICY/accessLevels/MY_LEVEL&quot;`.
175 # For Service Perimeter Bridge, must be empty.
176 &quot;A String&quot;,
177 ],
178 &quot;vpcAccessibleServices&quot;: { # Specifies how APIs are allowed to communicate within the Service # Configuration for APIs allowed within Perimeter.
179 # Perimeter.
180 &quot;enableRestriction&quot;: True or False, # Whether to restrict API calls within the Service Perimeter to the list of
181 # APIs specified in &#x27;allowed_services&#x27;.
182 &quot;allowedServices&quot;: [ # The list of APIs usable within the Service Perimeter. Must be empty
183 # unless &#x27;enable_restriction&#x27; is True.
184 &quot;A String&quot;,
185 ],
186 },
187 &quot;resources&quot;: [ # A list of Google Cloud resources that are inside of the service perimeter.
188 # Currently only projects are allowed. Format: `projects/{project_number}`
189 &quot;A String&quot;,
190 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700191 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700192 &quot;useExplicitDryRunSpec&quot;: True or False, # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly
193 # exists for all Service Perimeters, and that spec is identical to the
194 # status for those Service Perimeters. When this flag is set, it inhibits the
195 # generation of the implicit spec, thereby allowing the user to explicitly
196 # provide a configuration (&quot;spec&quot;) to use in a dry-run version of the Service
197 # Perimeter. This allows the user to test changes to the enforced config
198 # (&quot;status&quot;) without actually enforcing them. This testing is done through
199 # analyzing the differences between currently enforced and suggested
200 # restrictions. use_explicit_dry_run_spec must bet set to True if any of the
201 # fields in the spec are set to non-default values.
202 &quot;description&quot;: &quot;A String&quot;, # Description of the `ServicePerimeter` and its use. Does not affect
203 # behavior.
204 &quot;name&quot;: &quot;A String&quot;, # Required. Resource name for the ServicePerimeter. The `short_name`
205 # component must begin with a letter and only include alphanumeric and &#x27;_&#x27;.
206 # Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}`
207 &quot;title&quot;: &quot;A String&quot;, # Human readable title. Must be unique within the Policy.
208 &quot;spec&quot;: { # `ServicePerimeterConfig` specifies a set of Google Cloud resources that # Proposed (or dry run) ServicePerimeter configuration. This configuration
209 # allows to specify and test ServicePerimeter configuration without enforcing
210 # actual access restrictions. Only allowed to be set when the
211 # &quot;use_explicit_dry_run_spec&quot; flag is set.
212 # describe specific Service Perimeter configuration.
213 &quot;restrictedServices&quot;: [ # Google Cloud services that are subject to the Service Perimeter
214 # restrictions. For example, if `storage.googleapis.com` is specified, access
215 # to the storage buckets inside the perimeter must meet the perimeter&#x27;s
216 # access restrictions.
217 &quot;A String&quot;,
218 ],
219 &quot;accessLevels&quot;: [ # A list of `AccessLevel` resource names that allow resources within the
220 # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed
221 # must be in the same policy as this `ServicePerimeter`. Referencing a
222 # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are
223 # listed, resources within the perimeter can only be accessed via Google
224 # Cloud calls with request origins within the perimeter. Example:
225 # `&quot;accessPolicies/MY_POLICY/accessLevels/MY_LEVEL&quot;`.
226 # For Service Perimeter Bridge, must be empty.
227 &quot;A String&quot;,
228 ],
229 &quot;vpcAccessibleServices&quot;: { # Specifies how APIs are allowed to communicate within the Service # Configuration for APIs allowed within Perimeter.
230 # Perimeter.
231 &quot;enableRestriction&quot;: True or False, # Whether to restrict API calls within the Service Perimeter to the list of
232 # APIs specified in &#x27;allowed_services&#x27;.
233 &quot;allowedServices&quot;: [ # The list of APIs usable within the Service Perimeter. Must be empty
234 # unless &#x27;enable_restriction&#x27; is True.
235 &quot;A String&quot;,
236 ],
237 },
238 &quot;resources&quot;: [ # A list of Google Cloud resources that are inside of the service perimeter.
239 # Currently only projects are allowed. Format: `projects/{project_number}`
240 &quot;A String&quot;,
241 ],
242 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700243 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700244 &quot;iamPolicy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # A representation of the Cloud IAM policy set on a Google Cloud resource.
245 # There can be a maximum of one Cloud IAM policy set on any given resource.
246 # In addition, Cloud IAM policies inherit their granted access scope from any
247 # policies set on parent resources in the resource hierarchy. Therefore, the
248 # effectively policy is the union of both the policy set on this resource
249 # and each policy set on all of the resource&#x27;s ancestry resource levels in
250 # the hierarchy. See
251 # [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
252 # more information.
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 #
255 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
257 # `members` to a single `role`. Members can be user accounts, service accounts,
258 # Google groups, and domains (such as G Suite). A `role` is a named list of
259 # permissions; each `role` can be an IAM predefined role or a user-created
260 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700261 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700262 # For some types of Google Cloud resources, a `binding` can also specify a
263 # `condition`, which is a logical expression that allows access to a resource
264 # only if the expression evaluates to `true`. A condition can add constraints
265 # based on attributes of the request, the resource, or both. To learn which
266 # resources support conditions in their IAM policies, see the
267 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700268 #
269 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700270 #
271 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
275 # &quot;members&quot;: [
276 # &quot;user:mike@example.com&quot;,
277 # &quot;group:admins@example.com&quot;,
278 # &quot;domain:google.com&quot;,
279 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # ]
281 # },
282 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700284 # &quot;members&quot;: [
285 # &quot;user:eve@example.com&quot;
286 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 # &quot;condition&quot;: {
288 # &quot;title&quot;: &quot;expirable access&quot;,
289 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
290 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700293 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
295 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 # }
297 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700298 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 #
300 # bindings:
301 # - members:
302 # - user:mike@example.com
303 # - group:admins@example.com
304 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
306 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700308 # - user:eve@example.com
309 # role: roles/resourcemanager.organizationViewer
310 # condition:
311 # title: expirable access
312 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 # - etag: BwWWja0YfJA=
315 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 #
317 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700318 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 # `condition` that determines how and when the `bindings` are applied. Each
321 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700322 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700323 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
324 #
325 # If the condition evaluates to `true`, then this binding applies to the
326 # current request.
327 #
328 # If the condition evaluates to `false`, then this binding does not apply to
329 # the current request. However, a different role binding might grant the same
330 # role to one or more of the members in this binding.
331 #
332 # To learn which resources support conditions in their IAM policies, see the
333 # [IAM
334 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
335 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
336 # are documented at https://github.com/google/cel-spec.
337 #
338 # Example (Comparison):
339 #
340 # title: &quot;Summary size limit&quot;
341 # description: &quot;Determines if a summary is less than 100 chars&quot;
342 # expression: &quot;document.summary.size() &lt; 100&quot;
343 #
344 # Example (Equality):
345 #
346 # title: &quot;Requestor is owner&quot;
347 # description: &quot;Determines if requestor is the document owner&quot;
348 # expression: &quot;document.owner == request.auth.claims.email&quot;
349 #
350 # Example (Logic):
351 #
352 # title: &quot;Public documents&quot;
353 # description: &quot;Determine whether the document should be publicly visible&quot;
354 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
355 #
356 # Example (Data Manipulation):
357 #
358 # title: &quot;Notification string&quot;
359 # description: &quot;Create a notification string with a timestamp.&quot;
360 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
361 #
362 # The exact variables and functions that may be referenced within an expression
363 # are determined by the service that evaluates it. See the service
364 # documentation for additional information.
365 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
366 # reporting, e.g. a file name and a position in the file.
367 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
368 # describes the expression, e.g. when hovered over it in a UI.
369 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
370 # its purpose. This can be used e.g. in UIs which allow to enter the
371 # expression.
372 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
373 # syntax.
374 },
375 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
376 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700378 # `members` can have the following values:
379 #
380 # * `allUsers`: A special identifier that represents anyone who is
381 # on the internet; with or without a Google account.
382 #
383 # * `allAuthenticatedUsers`: A special identifier that represents anyone
384 # who is authenticated with a Google account or a service account.
385 #
386 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700387 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 #
389 #
390 # * `serviceAccount:{emailid}`: An email address that represents a service
391 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
392 #
393 # * `group:{emailid}`: An email address that represents a Google group.
394 # For example, `admins@example.com`.
395 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700396 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
397 # identifier) representing a user that has been recently deleted. For
398 # example, `alice@example.com?uid=123456789012345678901`. If the user is
399 # recovered, this value reverts to `user:{emailid}` and the recovered user
400 # retains the role in the binding.
401 #
402 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
403 # unique identifier) representing a service account that has been recently
404 # deleted. For example,
405 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
406 # If the service account is undeleted, this value reverts to
407 # `serviceAccount:{emailid}` and the undeleted service account retains the
408 # role in the binding.
409 #
410 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
411 # identifier) representing a Google group that has been recently
412 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
413 # the group is recovered, this value reverts to `group:{emailid}` and the
414 # recovered group retains the role in the binding.
415 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 #
417 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
418 # users of that domain. For example, `google.com` or `example.com`.
419 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700420 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700421 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700422 },
423 ],
424 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
425 { # Specifies the audit configuration for a service.
426 # The configuration determines which permission types are logged, and what
427 # identities, if any, are exempted from logging.
428 # An AuditConfig must have one or more AuditLogConfigs.
429 #
430 # If there are AuditConfigs for both `allServices` and a specific service,
431 # the union of the two AuditConfigs is used for that service: the log_types
432 # specified in each AuditConfig are enabled, and the exempted_members in each
433 # AuditLogConfig are exempted.
434 #
435 # Example Policy with multiple AuditConfigs:
436 #
437 # {
438 # &quot;audit_configs&quot;: [
439 # {
440 # &quot;service&quot;: &quot;allServices&quot;,
441 # &quot;audit_log_configs&quot;: [
442 # {
443 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
444 # &quot;exempted_members&quot;: [
445 # &quot;user:jose@example.com&quot;
446 # ]
447 # },
448 # {
449 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
450 # },
451 # {
452 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
453 # }
454 # ]
455 # },
456 # {
457 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
458 # &quot;audit_log_configs&quot;: [
459 # {
460 # &quot;log_type&quot;: &quot;DATA_READ&quot;
461 # },
462 # {
463 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
464 # &quot;exempted_members&quot;: [
465 # &quot;user:aliya@example.com&quot;
466 # ]
467 # }
468 # ]
469 # }
470 # ]
471 # }
472 #
473 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
474 # logging. It also exempts jose@example.com from DATA_READ logging, and
475 # aliya@example.com from DATA_WRITE logging.
476 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
477 { # Provides the configuration for logging a type of permissions.
478 # Example:
479 #
480 # {
481 # &quot;audit_log_configs&quot;: [
482 # {
483 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
484 # &quot;exempted_members&quot;: [
485 # &quot;user:jose@example.com&quot;
486 # ]
487 # },
488 # {
489 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
490 # }
491 # ]
492 # }
493 #
494 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
495 # jose@example.com from DATA_READ logging.
496 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
497 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
498 # permission.
499 # Follows the same format of Binding.members.
500 &quot;A String&quot;,
501 ],
502 },
503 ],
504 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
505 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
506 # `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 },
508 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Dan O'Mearadd494642020-05-01 07:42:23 -0700510 # prevent simultaneous updates of a policy from overwriting each other.
511 # It is strongly suggested that systems make use of the `etag` in the
512 # read-modify-write cycle to perform policy updates in order to avoid race
513 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
514 # systems are expected to put that etag in the request to `setIamPolicy` to
515 # ensure that their change will be applied to the same version of the policy.
516 #
517 # **Important:** If you use IAM Conditions, you must include the `etag` field
518 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
519 # you to overwrite a version `3` policy with a version `1` policy, and all of
520 # the conditions in the version `3` policy are lost.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700521 &quot;version&quot;: 42, # Specifies the format of the policy.
522 #
523 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
524 # are rejected.
525 #
526 # Any operation that affects conditional role bindings must specify version
527 # `3`. This requirement applies to the following operations:
528 #
529 # * Getting a policy that includes a conditional role binding
530 # * Adding a conditional role binding to a policy
531 # * Changing a conditional role binding in a policy
532 # * Removing any role binding, with or without a condition, from a policy
533 # that includes conditions
534 #
535 # **Important:** If you use IAM Conditions, you must include the `etag` field
536 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
537 # you to overwrite a version `3` policy with a version `1` policy, and all of
538 # the conditions in the version `3` policy are lost.
539 #
540 # If a policy does not include any conditions, operations on that policy may
541 # specify any valid version or leave the field unset.
542 #
543 # To learn which resources support conditions in their IAM policies, see the
544 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700546 &quot;accessLevel&quot;: { # An `AccessLevel` is a label that can be applied to requests to Google Cloud # Please also refer to the [access level user
547 # guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
548 # services, along with a list of requirements necessary for the label to be
549 # applied.
550 &quot;description&quot;: &quot;A String&quot;, # Description of the `AccessLevel` and its use. Does not affect behavior.
551 &quot;name&quot;: &quot;A String&quot;, # Required. Resource name for the Access Level. The `short_name` component
552 # must begin with a letter and only include alphanumeric and &#x27;_&#x27;. Format:
553 # `accessPolicies/{policy_id}/accessLevels/{short_name}`. The maximum length
554 # of the `short_name` component is 50 characters.
555 &quot;custom&quot;: { # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language # A `CustomLevel` written in the Common Expression Language.
556 # to represent the necessary conditions for the level to apply to a request.
557 # See CEL spec at: https://github.com/google/cel-spec
558 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # Required. A Cloud CEL expression evaluating to a boolean.
559 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
560 # are documented at https://github.com/google/cel-spec.
561 #
562 # Example (Comparison):
563 #
564 # title: &quot;Summary size limit&quot;
565 # description: &quot;Determines if a summary is less than 100 chars&quot;
566 # expression: &quot;document.summary.size() &lt; 100&quot;
567 #
568 # Example (Equality):
569 #
570 # title: &quot;Requestor is owner&quot;
571 # description: &quot;Determines if requestor is the document owner&quot;
572 # expression: &quot;document.owner == request.auth.claims.email&quot;
573 #
574 # Example (Logic):
575 #
576 # title: &quot;Public documents&quot;
577 # description: &quot;Determine whether the document should be publicly visible&quot;
578 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
579 #
580 # Example (Data Manipulation):
581 #
582 # title: &quot;Notification string&quot;
583 # description: &quot;Create a notification string with a timestamp.&quot;
584 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
585 #
586 # The exact variables and functions that may be referenced within an expression
587 # are determined by the service that evaluates it. See the service
588 # documentation for additional information.
589 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
590 # reporting, e.g. a file name and a position in the file.
591 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
592 # describes the expression, e.g. when hovered over it in a UI.
593 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
594 # its purpose. This can be used e.g. in UIs which allow to enter the
595 # expression.
596 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
597 # syntax.
598 },
599 },
600 &quot;basic&quot;: { # `BasicLevel` is an `AccessLevel` using a set of recommended features. # A `BasicLevel` composed of `Conditions`.
601 &quot;combiningFunction&quot;: &quot;A String&quot;, # How the `conditions` list should be combined to determine if a request is
602 # granted this `AccessLevel`. If AND is used, each `Condition` in
603 # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR
604 # is used, at least one `Condition` in `conditions` must be satisfied for the
605 # `AccessLevel` to be applied. Default behavior is AND.
606 &quot;conditions&quot;: [ # Required. A list of requirements for the `AccessLevel` to be granted.
607 { # A condition necessary for an `AccessLevel` to be granted. The Condition is an
608 # AND over its fields. So a Condition is true if: 1) the request IP is from one
609 # of the listed subnetworks AND 2) the originating device complies with the
610 # listed device policy AND 3) all listed access levels are granted AND 4) the
611 # request was sent at a time allowed by the DateTimeRestriction.
612 &quot;regions&quot;: [ # The request must originate from one of the provided countries/regions.
613 # Must be valid ISO 3166-1 alpha-2 codes.
614 &quot;A String&quot;,
615 ],
616 &quot;members&quot;: [ # The request must be made by one of the provided user or service
617 # accounts. Groups are not supported.
618 # Syntax:
619 # `user:{emailid}`
620 # `serviceAccount:{emailid}`
621 # If not specified, a request may come from any user.
622 &quot;A String&quot;,
623 ],
624 &quot;devicePolicy&quot;: { # `DevicePolicy` specifies device specific restrictions necessary to acquire a # Device specific restrictions, all restrictions must hold for the
625 # Condition to be true. If not specified, all devices are allowed.
626 # given access level. A `DevicePolicy` specifies requirements for requests from
627 # devices to be granted access levels, it does not do any enforcement on the
628 # device. `DevicePolicy` acts as an AND over all specified fields, and each
629 # repeated field is an OR over its elements. Any unset fields are ignored. For
630 # example, if the proto is { os_type : DESKTOP_WINDOWS, os_type :
631 # DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be
632 # true for requests originating from encrypted Linux desktops and encrypted
633 # Windows desktops.
634 &quot;requireCorpOwned&quot;: True or False, # Whether the device needs to be corp owned.
635 &quot;osConstraints&quot;: [ # Allowed OS versions, an empty list allows all types and all versions.
636 { # A restriction on the OS type and version of devices making requests.
637 &quot;osType&quot;: &quot;A String&quot;, # Required. The allowed OS type.
638 &quot;minimumVersion&quot;: &quot;A String&quot;, # The minimum allowed OS version. If not set, any version of this OS
639 # satisfies the constraint. Format: `&quot;major.minor.patch&quot;`.
640 # Examples: `&quot;10.5.301&quot;`, `&quot;9.2.1&quot;`.
641 &quot;requireVerifiedChromeOs&quot;: True or False, # Only allows requests from devices with a verified Chrome OS.
642 # Verifications includes requirements that the device is enterprise-managed,
643 # conformant to domain policies, and the caller has permission to call
644 # the API targeted by the request.
645 },
646 ],
647 &quot;requireScreenlock&quot;: True or False, # Whether or not screenlock is required for the DevicePolicy to be true.
648 # Defaults to `false`.
649 &quot;allowedDeviceManagementLevels&quot;: [ # Allowed device management levels, an empty list allows all management
650 # levels.
651 &quot;A String&quot;,
652 ],
653 &quot;allowedEncryptionStatuses&quot;: [ # Allowed encryptions statuses, an empty list allows all statuses.
654 &quot;A String&quot;,
655 ],
656 &quot;requireAdminApproval&quot;: True or False, # Whether the device needs to be approved by the customer admin.
657 },
658 &quot;ipSubnetworks&quot;: [ # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for
659 # a CIDR IP address block, the specified IP address portion must be properly
660 # truncated (i.e. all the host bits must be zero) or the input is considered
661 # malformed. For example, &quot;192.0.2.0/24&quot; is accepted but &quot;192.0.2.1/24&quot; is
662 # not. Similarly, for IPv6, &quot;2001:db8::/32&quot; is accepted whereas
663 # &quot;2001:db8::1/32&quot; is not. The originating IP of a request must be in one of
664 # the listed subnets in order for this Condition to be true. If empty, all IP
665 # addresses are allowed.
666 &quot;A String&quot;,
667 ],
668 &quot;negate&quot;: True or False, # Whether to negate the Condition. If true, the Condition becomes a NAND over
669 # its non-empty fields, each field must be false for the Condition overall to
670 # be satisfied. Defaults to false.
671 &quot;requiredAccessLevels&quot;: [ # A list of other access levels defined in the same `Policy`, referenced by
672 # resource name. Referencing an `AccessLevel` which does not exist is an
673 # error. All access levels listed must be granted for the Condition
674 # to be true. Example:
675 # &quot;`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME&quot;`
676 &quot;A String&quot;,
677 ],
678 },
679 ],
680 },
681 &quot;title&quot;: &quot;A String&quot;, # Human readable title. Must be unique within the Policy.
682 },
683 &quot;name&quot;: &quot;A String&quot;, # The full name of the asset. Example:
684 # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
685 #
686 # See [Resource
687 # names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
688 # for more information.
689 &quot;accessPolicy&quot;: { # `AccessPolicy` is a container for `AccessLevels` (which define the necessary # Please also refer to the [access policy user
690 # guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
691 # attributes to use Google Cloud services) and `ServicePerimeters` (which
692 # define regions of services able to freely pass data within a perimeter). An
693 # access policy is globally visible within an organization, and the
694 # restrictions it specifies apply to all projects within an organization.
695 &quot;title&quot;: &quot;A String&quot;, # Required. Human readable title. Does not affect behavior.
696 &quot;parent&quot;: &quot;A String&quot;, # Required. The parent of this `AccessPolicy` in the Cloud Resource
697 # Hierarchy. Currently immutable once created. Format:
698 # `organizations/{organization_id}`
699 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the `AccessPolicy`. Format:
700 # `accessPolicies/{policy_id}`
701 &quot;etag&quot;: &quot;A String&quot;, # Output only. An opaque identifier for the current version of the
702 # `AccessPolicy`. This will always be a strongly validated etag, meaning that
703 # two Access Polices will be identical if and only if their etags are
704 # identical. Clients should not expect this to be in any specific format.
705 },
706 &quot;orgPolicy&quot;: [ # A representation of an [organization
707 # policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
708 # There can be more than one organization policy with different constraints
709 # set on a given resource.
710 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
711 # for configurations of Cloud Platform resources.
712 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
713 # concurrency control.
714 #
715 # When the `Policy` is returned from either a `GetPolicy` or a
716 # `ListOrgPolicy` request, this `etag` indicates the version of the current
717 # `Policy` to use when executing a read-modify-write loop.
718 #
719 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
720 # `etag` will be unset.
721 #
722 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
723 # that was returned from a `GetOrgPolicy` request as part of a
724 # read-modify-write loop for concurrency control. Not setting the `etag`in a
725 # `SetOrgPolicy` request will result in an unconditional write of the
726 # `Policy`.
727 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
728 # `constraints/serviceuser.services`.
729 #
730 # A [list of available
731 # constraints](/resource-manager/docs/organization-policy/org-policy-constraints)
732 # is available.
733 #
734 # Immutable after creation.
735 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
736 # resource.
737 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
738 # configuration is acceptable.
739 #
740 # Suppose you have a `Constraint`
741 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
742 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
743 # behavior:
744 # - If the `Policy` at this resource has enforced set to `false`, serial
745 # port connection attempts will be allowed.
746 # - If the `Policy` at this resource has enforced set to `true`, serial
747 # port connection attempts will be refused.
748 # - If the `Policy` at this resource is `RestoreDefault`, serial port
749 # connection attempts will be allowed.
750 # - If no `Policy` is set at this resource or anywhere higher in the
751 # resource hierarchy, serial port connection attempts will be allowed.
752 # - If no `Policy` is set at this resource, but one exists higher in the
753 # resource hierarchy, the behavior is as if the`Policy` were set at
754 # this resource.
755 #
756 # The following examples demonstrate the different possible layerings:
757 #
758 # Example 1 (nearest `Constraint` wins):
759 # `organizations/foo` has a `Policy` with:
760 # {enforced: false}
761 # `projects/bar` has no `Policy` set.
762 # The constraint at `projects/bar` and `organizations/foo` will not be
763 # enforced.
764 #
765 # Example 2 (enforcement gets replaced):
766 # `organizations/foo` has a `Policy` with:
767 # {enforced: false}
768 # `projects/bar` has a `Policy` with:
769 # {enforced: true}
770 # The constraint at `organizations/foo` is not enforced.
771 # The constraint at `projects/bar` is enforced.
772 #
773 # Example 3 (RestoreDefault):
774 # `organizations/foo` has a `Policy` with:
775 # {enforced: true}
776 # `projects/bar` has a `Policy` with:
777 # {RestoreDefault: {}}
778 # The constraint at `organizations/foo` is enforced.
779 # The constraint at `projects/bar` is not enforced, because
780 # `constraint_default` for the `Constraint` is `ALLOW`.
781 },
782 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
783 # server, not specified by the caller, and represents the last time a call to
784 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
785 # be ignored.
786 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
787 # resource.
788 #
789 # `ListPolicy` can define specific values and subtrees of Cloud Resource
790 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
791 # are allowed or denied by setting the `allowed_values` and `denied_values`
792 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
793 # The `under:` prefix is used to denote resource subtree values.
794 # The `is:` prefix is used to denote specific values, and is required only
795 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
796 # same as values with no prefix.
797 # Ancestry subtrees must be in one of the following formats:
798 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
799 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
800 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
801 # The `supports_under` field of the associated `Constraint` defines whether
802 # ancestry prefixes can be used. You can set `allowed_values` and
803 # `denied_values` in the same `Policy` if `all_values` is
804 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
805 # values. If `all_values` is set to either `ALLOW` or `DENY`,
806 # `allowed_values` and `denied_values` must be unset.
807 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
808 #
809 # By default, a `ListPolicy` set at a resource supersedes any `Policy` set
810 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
811 # set to `true`, then the values from the effective `Policy` of the parent
812 # resource are inherited, meaning the values set in this `Policy` are
813 # added to the values inherited up the hierarchy.
814 #
815 # Setting `Policy` hierarchies that inherit both allowed values and denied
816 # values isn&#x27;t recommended in most circumstances to keep the configuration
817 # simple and understandable. However, it is possible to set a `Policy` with
818 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
819 # In this case, the values that are allowed must be in `allowed_values` and
820 # not present in `denied_values`.
821 #
822 # For example, suppose you have a `Constraint`
823 # `constraints/serviceuser.services`, which has a `constraint_type` of
824 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
825 # Suppose that at the Organization level, a `Policy` is applied that
826 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
827 # `Policy` is applied to a project below the Organization that has
828 # `inherit_from_parent` set to `false` and field all_values set to DENY,
829 # then an attempt to activate any API will be denied.
830 #
831 # The following examples demonstrate different possible layerings for
832 # `projects/bar` parented by `organizations/foo`:
833 #
834 # Example 1 (no inherited values):
835 # `organizations/foo` has a `Policy` with values:
836 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
837 # `projects/bar` has `inherit_from_parent` `false` and values:
838 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
839 # The accepted values at `organizations/foo` are `E1`, `E2`.
840 # The accepted values at `projects/bar` are `E3`, and `E4`.
841 #
842 # Example 2 (inherited values):
843 # `organizations/foo` has a `Policy` with values:
844 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
845 # `projects/bar` has a `Policy` with values:
846 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
847 # The accepted values at `organizations/foo` are `E1`, `E2`.
848 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
849 #
850 # Example 3 (inheriting both allowed and denied values):
851 # `organizations/foo` has a `Policy` with values:
852 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
853 # `projects/bar` has a `Policy` with:
854 # {denied_values: &quot;E1&quot;}
855 # The accepted values at `organizations/foo` are `E1`, `E2`.
856 # The value accepted at `projects/bar` is `E2`.
857 #
858 # Example 4 (RestoreDefault):
859 # `organizations/foo` has a `Policy` with values:
860 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
861 # `projects/bar` has a `Policy` with values:
862 # {RestoreDefault: {}}
863 # The accepted values at `organizations/foo` are `E1`, `E2`.
864 # The accepted values at `projects/bar` are either all or none depending on
865 # the value of `constraint_default` (if `ALLOW`, all; if
866 # `DENY`, none).
867 #
868 # Example 5 (no policy inherits parent policy):
869 # `organizations/foo` has no `Policy` set.
870 # `projects/bar` has no `Policy` set.
871 # The accepted values at both levels are either all or none depending on
872 # the value of `constraint_default` (if `ALLOW`, all; if
873 # `DENY`, none).
874 #
875 # Example 6 (ListConstraint allowing all):
876 # `organizations/foo` has a `Policy` with values:
877 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
878 # `projects/bar` has a `Policy` with:
879 # {all: ALLOW}
880 # The accepted values at `organizations/foo` are `E1`, E2`.
881 # Any value is accepted at `projects/bar`.
882 #
883 # Example 7 (ListConstraint allowing none):
884 # `organizations/foo` has a `Policy` with values:
885 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
886 # `projects/bar` has a `Policy` with:
887 # {all: DENY}
888 # The accepted values at `organizations/foo` are `E1`, E2`.
889 # No value is accepted at `projects/bar`.
890 #
891 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
892 # Given the following resource hierarchy
893 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
894 # `organizations/foo` has a `Policy` with values:
895 # {allowed_values: &quot;under:organizations/O1&quot;}
896 # `projects/bar` has a `Policy` with:
897 # {allowed_values: &quot;under:projects/P3&quot;}
898 # {denied_values: &quot;under:folders/F2&quot;}
899 # The accepted values at `organizations/foo` are `organizations/O1`,
900 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
901 # `projects/P3`.
902 # The accepted values at `projects/bar` are `organizations/O1`,
903 # `folders/F1`, `projects/P1`.
904 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
905 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
906 # is set to `ALL_VALUES_UNSPECIFIED`.
907 &quot;A String&quot;,
908 ],
909 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
910 # is set to `ALL_VALUES_UNSPECIFIED`.
911 &quot;A String&quot;,
912 ],
913 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
914 # that matches the value specified in this `Policy`. If `suggested_value`
915 # is not set, it will inherit the value specified higher in the hierarchy,
916 # unless `inherit_from_parent` is `false`.
917 },
918 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
919 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
920 # `Constraint` type.
921 # `constraint_default` enforcement behavior of the specific `Constraint` at
922 # this resource.
923 #
924 # Suppose that `constraint_default` is set to `ALLOW` for the
925 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
926 # foo.com sets a `Policy` at their Organization resource node that restricts
927 # the allowed service activations to deny all service activations. They
928 # could then set a `Policy` with the `policy_type` `restore_default` on
929 # several experimental projects, restoring the `constraint_default`
930 # enforcement of the `Constraint` for only those projects, allowing those
931 # projects to have all services activated.
932 },
933 },
934 ],
935 &quot;resource&quot;: { # A representation of a Google Cloud resource. # A representation of the resource.
936 &quot;resourceUrl&quot;: &quot;A String&quot;, # The REST URL for accessing the resource. An HTTP `GET` request using this
937 # URL returns the resource itself. Example:
938 # `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
939 #
940 # This value is unspecified for resources without a REST API.
941 &quot;discoveryName&quot;: &quot;A String&quot;, # The JSON schema name listed in the discovery document. Example:
942 # `Project`
943 #
944 # This value is unspecified for resources that do not have an API based on a
945 # discovery document, such as Cloud Bigtable.
946 &quot;version&quot;: &quot;A String&quot;, # The API version. Example: `v1`
947 &quot;data&quot;: { # The content of the resource, in which some sensitive fields are removed
948 # and may not be present.
949 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
950 },
951 &quot;parent&quot;: &quot;A String&quot;, # The full name of the immediate parent of this resource. See
952 # [Resource
953 # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
954 # for more information.
955 #
956 # For Google Cloud assets, this value is the parent resource defined in the
957 # [Cloud IAM policy
958 # hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
959 # Example:
960 # `//cloudresourcemanager.googleapis.com/projects/my_project_123`
961 #
962 # For third-party assets, this field may be set differently.
963 &quot;discoveryDocumentUri&quot;: &quot;A String&quot;, # The URL of the discovery document containing the resource&#x27;s JSON schema.
964 # Example:
965 # `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
966 #
967 # This value is unspecified for resources that do not have an API based on a
968 # discovery document, such as Cloud Bigtable.
969 },
970 &quot;assetType&quot;: &quot;A String&quot;, # The type of the asset. Example: `compute.googleapis.com/Disk`
971 #
972 # See [Supported asset
973 # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
974 # for more information.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 },
976 },
977 ],
978 }</pre>
979</div>
980
981<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700982 <code class="details" id="exportAssets">exportAssets(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700983 <pre>Exports assets with time and resource types to a given Cloud Storage
984location. The output format is newline-delimited JSON.
985This API implements the google.longrunning.Operation API allowing you
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700986to keep track of the export. We recommend intervals of at least 2 seconds
987with exponential retry to poll the export operation result. For
988regular-size resource parent, the export operation usually finishes within
9895 minutes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700990
991Args:
992 parent: string, Required. The relative name of the root asset. This can only be an
Bu Sun Kim65020912020-05-20 12:08:20 -0700993organization number (such as &quot;organizations/123&quot;), a project ID (such as
994&quot;projects/my-project-id&quot;), a project number (such as &quot;projects/12345&quot;), or
995a folder number (such as &quot;folders/123&quot;). (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700996 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700997 The object takes the form of:
998
999{ # Export asset request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001000 &quot;outputConfig&quot;: { # Output configuration for export assets destination. # Required. Output configuration indicating where the results will be output
1001 # to. All results will be in newline delimited JSON format.
1002 &quot;gcsDestination&quot;: { # A Cloud Storage location. # Destination on Cloud Storage.
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 &quot;uriPrefix&quot;: &quot;A String&quot;, # The uri prefix of all generated Cloud Storage objects. For example:
1004 # &quot;gs://bucket_name/object_name_prefix&quot;. Each object uri is in format:
1005 # &quot;gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
1006 # contains assets for that type. &lt;shard number&gt; starts from 0. For example:
1007 # &quot;gs://bucket_name/object_name_prefix/google.compute.disk/0&quot; is the first
1008 # shard of output objects containing all google.compute.disk assets.
1009 # An INVALID_ARGUMENT error will be returned if file with the same name
1010 # &quot;gs://bucket_name/object_name_prefix&quot; already exists.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001011 &quot;uri&quot;: &quot;A String&quot;, # The uri of the Cloud Storage object. It&#x27;s the same uri that is used by
1012 # gsutil. For example: &quot;gs://bucket_name/object_name&quot;. See [Viewing and
1013 # Editing Object
1014 # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
1015 # for more information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 },
1017 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001018 &quot;readTime&quot;: &quot;A String&quot;, # Timestamp to take an asset snapshot. This can only be set to a timestamp
1019 # between 2018-10-02 UTC (inclusive) and the current time. If not specified,
1020 # the current time will be used. Due to delays in resource data collection
1021 # and indexing, there is a volatile window during which running the same
1022 # query may get different results.
1023 &quot;contentType&quot;: &quot;A String&quot;, # Asset content type. If not specified, no content but the asset name will be
1024 # returned.
1025 &quot;assetTypes&quot;: [ # A list of asset types of which to take a snapshot for. For example:
1026 # &quot;google.compute.Disk&quot;. If specified, only matching assets will be returned.
1027 # See [Introduction to Cloud Asset
1028 # Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1029 # for all supported asset types.
1030 &quot;A String&quot;,
1031 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001032 }
1033
1034 x__xgafv: string, V1 error format.
1035 Allowed values
1036 1 - v1 error format
1037 2 - v2 error format
1038
1039Returns:
1040 An object of the form:
1041
1042 { # This resource represents a long-running operation that is the result of a
1043 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001044 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1045 # contains progress information and common metadata such as create time.
1046 # Some services might not provide such metadata. Any method that returns a
1047 # long-running operation should document the metadata type, if any.
1048 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1049 },
1050 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1051 # If `true`, the operation is completed, and either `error` or `response` is
1052 # available.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001053 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
1054 # originally returns it. If you use the default HTTP mapping, the
1055 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001056 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001057 # method returns no data on success, such as `Delete`, the response is
1058 # `google.protobuf.Empty`. If the original method is standard
1059 # `Get`/`Create`/`Update`, the response should be the resource. For other
1060 # methods, the response should have the type `XxxResponse`, where `Xxx`
1061 # is the original method name. For example, if the original method name
1062 # is `TakeSnapshot()`, the inferred response type is
1063 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001065 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001066 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1067 # different programming environments, including REST APIs and RPC APIs. It is
1068 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1069 # three pieces of data: error code, error message, and error details.
1070 #
1071 # You can find out more about this error model and how to work with it in the
1072 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1073 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1074 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1075 # message types for APIs to use.
1076 {
1077 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1078 },
1079 ],
1080 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1081 # user-facing error message should be localized and sent in the
1082 # google.rpc.Status.details field, or localized by the client.
1083 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001084 }</pre>
1085</div>
1086
1087</body></html>