blob: 471b5f0b967cbeb47f1e974c65a87e39720474ab [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_v1.html">Cloud Asset API</a> . <a href="cloudasset_v1.v1.html">v1</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#batchGetAssetsHistory">batchGetAssetsHistory(parent, assetNames=None, contentType=None, readTimeWindow_endTime=None, readTimeWindow_startTime=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Batch gets the update history of assets that overlap a time window.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#exportAssets">exportAssets(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Exports assets with time and resource types to a given Cloud Storage</p>
83<h3>Method Details</h3>
84<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -070085 <code class="details" id="batchGetAssetsHistory">batchGetAssetsHistory(parent, assetNames=None, contentType=None, readTimeWindow_endTime=None, readTimeWindow_startTime=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086 <pre>Batch gets the update history of assets that overlap a time window.
87For RESOURCE content, this API outputs history with asset in both
88non-delete or deleted status.
89For IAM_POLICY content, this API outputs history when the asset and its
90attached IAM POLICY both exist. This can create gaps in the output history.
91If a specified asset does not exist, this API returns an INVALID_ARGUMENT
92error.
93
94Args:
95 parent: string, Required. The relative name of the root asset. It can only be an
Bu Sun Kim65020912020-05-20 12:08:20 -070096organization number (such as &quot;organizations/123&quot;), a project ID (such as
97&quot;projects/my-project-id&quot;)&quot;, or a project number (such as &quot;projects/12345&quot;). (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 assetNames: string, A list of the full names of the assets. For example:
99`//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
100See [Resource
101Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
102and [Resource Name
Dan O'Mearadd494642020-05-01 07:42:23 -0700103Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104for more info.
105
106The request becomes a no-op if the asset name list is empty, and the max
107size of the asset name list is 100 in one request. (repeated)
Bu Sun Kim65020912020-05-20 12:08:20 -0700108 contentType: string, Optional. The content type.
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 readTimeWindow_endTime: string, End time of the time window (inclusive). If not specified, the current
110timestamp is used instead.
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 readTimeWindow_startTime: string, Start time of the time window (exclusive).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 x__xgafv: string, V1 error format.
113 Allowed values
114 1 - v1 error format
115 2 - v2 error format
116
117Returns:
118 An object of the form:
119
120 { # Batch get assets history response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;assets&quot;: [ # A list of assets with valid time windows.
Dan O'Mearadd494642020-05-01 07:42:23 -0700122 { # An asset in Google Cloud and its temporal metadata, including the time window
123 # when it was observed and its status during that window.
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 &quot;deleted&quot;: True or False, # Whether the asset has been deleted or not.
125 &quot;window&quot;: { # A time window specified by its &quot;start_time&quot; and &quot;end_time&quot;. # The time window when the asset data and state was observed.
126 &quot;endTime&quot;: &quot;A String&quot;, # End time of the time window (inclusive). If not specified, the current
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 # timestamp is used instead.
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the time window (exclusive).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 &quot;asset&quot;: { # An asset in Google Cloud. An asset can be any resource in the Google Cloud # An asset in Google Cloud.
Dan O'Mearadd494642020-05-01 07:42:23 -0700131 # [resource
132 # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
133 # a resource outside the Google Cloud resource hierarchy (such as Google
134 # Kubernetes Engine clusters and objects), or a Cloud IAM policy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 &quot;assetType&quot;: &quot;A String&quot;, # The type of the asset. For example: &quot;compute.googleapis.com/Disk&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 #
137 # See [Supported asset
138 # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
139 # for more information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &quot;accessPolicy&quot;: { # `AccessPolicy` is a container for `AccessLevels` (which define the necessary
141 # attributes to use Google Cloud services) and `ServicePerimeters` (which
142 # define regions of services able to freely pass data within a perimeter). An
143 # access policy is globally visible within an organization, and the
144 # restrictions it specifies apply to all projects within an organization.
145 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the `AccessPolicy`. Format:
146 # `accessPolicies/{policy_id}`
147 &quot;etag&quot;: &quot;A String&quot;, # Output only. An opaque identifier for the current version of the
148 # `AccessPolicy`. This will always be a strongly validated etag, meaning that
149 # two Access Polices will be identical if and only if their etags are
150 # identical. Clients should not expect this to be in any specific format.
151 &quot;parent&quot;: &quot;A String&quot;, # Required. The parent of this `AccessPolicy` in the Cloud Resource
152 # Hierarchy. Currently immutable once created. Format:
153 # `organizations/{organization_id}`
154 &quot;title&quot;: &quot;A String&quot;, # Required. Human readable title. Does not affect behavior.
155 },
156 &quot;ancestors&quot;: [ # The ancestry path of an asset in Google Cloud [resource
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
158 # represented as a list of relative resource names. An ancestry path starts
159 # with the closest ancestor in the hierarchy and ends at root. If the asset
160 # is a project, folder, or organization, the ancestry path starts from the
161 # asset itself.
162 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700163 # For example: `[&quot;projects/123456789&quot;, &quot;folders/5432&quot;, &quot;organizations/1234&quot;]`
164 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 &quot;servicePerimeter&quot;: { # `ServicePerimeter` describes a set of Google Cloud resources which can freely
167 # import and export data amongst themselves, but not export outside of the
168 # `ServicePerimeter`. If a request with a source within this `ServicePerimeter`
169 # has a target outside of the `ServicePerimeter`, the request will be blocked.
170 # Otherwise the request is allowed. There are two types of Service Perimeter -
171 # Regular and Bridge. Regular Service Perimeters cannot overlap, a single
172 # Google Cloud project can only belong to a single regular Service Perimeter.
173 # Service Perimeter Bridges can contain only Google Cloud projects as members,
174 # a single Google Cloud project may belong to multiple Service Perimeter
175 # Bridges.
176 &quot;name&quot;: &quot;A String&quot;, # Required. Resource name for the ServicePerimeter. The `short_name`
177 # component must begin with a letter and only include alphanumeric and &#x27;_&#x27;.
178 # Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}`
179 &quot;perimeterType&quot;: &quot;A String&quot;, # Perimeter type indicator. A single project is
180 # allowed to be a member of single regular perimeter, but multiple service
181 # perimeter bridges. A project cannot be a included in a perimeter bridge
182 # without being included in regular perimeter. For perimeter bridges,
183 # the restricted service list as well as access level lists must be
184 # empty.
185 &quot;title&quot;: &quot;A String&quot;, # Human readable title. Must be unique within the Policy.
186 &quot;useExplicitDryRunSpec&quot;: True or False, # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly
187 # exists for all Service Perimeters, and that spec is identical to the
188 # status for those Service Perimeters. When this flag is set, it inhibits the
189 # generation of the implicit spec, thereby allowing the user to explicitly
190 # provide a configuration (&quot;spec&quot;) to use in a dry-run version of the Service
191 # Perimeter. This allows the user to test changes to the enforced config
192 # (&quot;status&quot;) without actually enforcing them. This testing is done through
193 # analyzing the differences between currently enforced and suggested
194 # restrictions. use_explicit_dry_run_spec must bet set to True if any of the
195 # fields in the spec are set to non-default values.
196 &quot;description&quot;: &quot;A String&quot;, # Description of the `ServicePerimeter` and its use. Does not affect
197 # behavior.
198 &quot;status&quot;: { # `ServicePerimeterConfig` specifies a set of Google Cloud resources that # Current ServicePerimeter configuration. Specifies sets of resources,
199 # restricted services and access levels that determine perimeter
200 # content and boundaries.
201 # describe specific Service Perimeter configuration.
202 &quot;resources&quot;: [ # A list of Google Cloud resources that are inside of the service perimeter.
203 # Currently only projects are allowed. Format: `projects/{project_number}`
204 &quot;A String&quot;,
205 ],
206 &quot;accessLevels&quot;: [ # A list of `AccessLevel` resource names that allow resources within the
207 # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed
208 # must be in the same policy as this `ServicePerimeter`. Referencing a
209 # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are
210 # listed, resources within the perimeter can only be accessed via Google
211 # Cloud calls with request origins within the perimeter. Example:
212 # `&quot;accessPolicies/MY_POLICY/accessLevels/MY_LEVEL&quot;`.
213 # For Service Perimeter Bridge, must be empty.
214 &quot;A String&quot;,
215 ],
216 &quot;restrictedServices&quot;: [ # Google Cloud services that are subject to the Service Perimeter
217 # restrictions. For example, if `storage.googleapis.com` is specified, access
218 # to the storage buckets inside the perimeter must meet the perimeter&#x27;s
219 # access restrictions.
220 &quot;A String&quot;,
221 ],
222 &quot;vpcAccessibleServices&quot;: { # Specifies how APIs are allowed to communicate within the Service # Configuration for APIs allowed within Perimeter.
223 # Perimeter.
224 &quot;enableRestriction&quot;: True or False, # Whether to restrict API calls within the Service Perimeter to the list of
225 # APIs specified in &#x27;allowed_services&#x27;.
226 &quot;allowedServices&quot;: [ # The list of APIs usable within the Service Perimeter. Must be empty
227 # unless &#x27;enable_restriction&#x27; is True.
228 &quot;A String&quot;,
229 ],
230 },
231 },
232 &quot;spec&quot;: { # `ServicePerimeterConfig` specifies a set of Google Cloud resources that # Proposed (or dry run) ServicePerimeter configuration. This configuration
233 # allows to specify and test ServicePerimeter configuration without enforcing
234 # actual access restrictions. Only allowed to be set when the
235 # &quot;use_explicit_dry_run_spec&quot; flag is set.
236 # describe specific Service Perimeter configuration.
237 &quot;resources&quot;: [ # A list of Google Cloud resources that are inside of the service perimeter.
238 # Currently only projects are allowed. Format: `projects/{project_number}`
239 &quot;A String&quot;,
240 ],
241 &quot;accessLevels&quot;: [ # A list of `AccessLevel` resource names that allow resources within the
242 # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed
243 # must be in the same policy as this `ServicePerimeter`. Referencing a
244 # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are
245 # listed, resources within the perimeter can only be accessed via Google
246 # Cloud calls with request origins within the perimeter. Example:
247 # `&quot;accessPolicies/MY_POLICY/accessLevels/MY_LEVEL&quot;`.
248 # For Service Perimeter Bridge, must be empty.
249 &quot;A String&quot;,
250 ],
251 &quot;restrictedServices&quot;: [ # Google Cloud services that are subject to the Service Perimeter
252 # restrictions. For example, if `storage.googleapis.com` is specified, access
253 # to the storage buckets inside the perimeter must meet the perimeter&#x27;s
254 # access restrictions.
255 &quot;A String&quot;,
256 ],
257 &quot;vpcAccessibleServices&quot;: { # Specifies how APIs are allowed to communicate within the Service # Configuration for APIs allowed within Perimeter.
258 # Perimeter.
259 &quot;enableRestriction&quot;: True or False, # Whether to restrict API calls within the Service Perimeter to the list of
260 # APIs specified in &#x27;allowed_services&#x27;.
261 &quot;allowedServices&quot;: [ # The list of APIs usable within the Service Perimeter. Must be empty
262 # unless &#x27;enable_restriction&#x27; is True.
263 &quot;A String&quot;,
264 ],
265 },
266 },
267 },
268 &quot;resource&quot;: { # A representation of a Google Cloud resource. # A representation of the resource.
269 &quot;discoveryName&quot;: &quot;A String&quot;, # The JSON schema name listed in the discovery document. For example:
270 # &quot;Project&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700271 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 # This value is unspecified for resources that do not have an API based on a
273 # discovery document, such as Cloud Bigtable.
274 &quot;version&quot;: &quot;A String&quot;, # The API version. For example: &quot;v1&quot;
275 &quot;data&quot;: { # The content of the resource, in which some sensitive fields are removed
276 # and may not be present.
277 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
278 },
279 &quot;discoveryDocumentUri&quot;: &quot;A String&quot;, # The URL of the discovery document containing the resource&#x27;s JSON schema.
280 # For example:
281 # &quot;https://www.googleapis.com/discovery/v1/apis/compute/v1/rest&quot;
282 #
283 # This value is unspecified for resources that do not have an API based on a
284 # discovery document, such as Cloud Bigtable.
285 &quot;parent&quot;: &quot;A String&quot;, # The full name of the immediate parent of this resource. See
Dan O'Mearadd494642020-05-01 07:42:23 -0700286 # [Resource
287 # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
288 # for more information.
289 #
290 # For Google Cloud assets, this value is the parent resource defined in the
291 # [Cloud IAM policy
292 # hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
293 # For example:
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 # &quot;//cloudresourcemanager.googleapis.com/projects/my_project_123&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700295 #
296 # For third-party assets, this field may be set differently.
Bu Sun Kim65020912020-05-20 12:08:20 -0700297 &quot;resourceUrl&quot;: &quot;A String&quot;, # The REST URL for accessing the resource. An HTTP `GET` request using this
298 # URL returns the resource itself. For example:
299 # &quot;https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 # This value is unspecified for resources without a REST API.
Dan O'Mearadd494642020-05-01 07:42:23 -0700302 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 &quot;name&quot;: &quot;A String&quot;, # The full name of the asset. For example:
304 # &quot;//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 #
306 # See [Resource
307 # names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
308 # for more information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;orgPolicy&quot;: [ # A representation of an [organization
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 # policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
311 # There can be more than one organization policy with different constraints
312 # set on a given resource.
313 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
314 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700316 # resource.
317 #
318 # `ListPolicy` can define specific values and subtrees of Cloud Resource
319 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
320 # are allowed or denied by setting the `allowed_values` and `denied_values`
321 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
322 # The `under:` prefix is used to denote resource subtree values.
323 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Dan O'Mearadd494642020-05-01 07:42:23 -0700325 # same as values with no prefix.
326 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700327 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
328 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
329 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700330 # The `supports_under` field of the associated `Constraint` defines whether
331 # ancestry prefixes can be used. You can set `allowed_values` and
332 # `denied_values` in the same `Policy` if `all_values` is
333 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
334 # values. If `all_values` is set to either `ALLOW` or `DENY`,
335 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700336 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700339 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700340 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
341 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
342 # is set to `ALL_VALUES_UNSPECIFIED`.
343 &quot;A String&quot;,
344 ],
345 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
346 # that matches the value specified in this `Policy`. If `suggested_value`
347 # is not set, it will inherit the value specified higher in the hierarchy,
348 # unless `inherit_from_parent` is `false`.
349 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700350 #
351 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
352 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
353 # set to `true`, then the values from the effective `Policy` of the parent
354 # resource are inherited, meaning the values set in this `Policy` are
355 # added to the values inherited up the hierarchy.
356 #
357 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 # values isn&#x27;t recommended in most circumstances to keep the configuration
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 # simple and understandable. However, it is possible to set a `Policy` with
360 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
361 # In this case, the values that are allowed must be in `allowed_values` and
362 # not present in `denied_values`.
363 #
364 # For example, suppose you have a `Constraint`
365 # `constraints/serviceuser.services`, which has a `constraint_type` of
366 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
367 # Suppose that at the Organization level, a `Policy` is applied that
368 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
369 # `Policy` is applied to a project below the Organization that has
370 # `inherit_from_parent` set to `false` and field all_values set to DENY,
371 # then an attempt to activate any API will be denied.
372 #
373 # The following examples demonstrate different possible layerings for
374 # `projects/bar` parented by `organizations/foo`:
375 #
376 # Example 1 (no inherited values):
377 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700379 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 # The accepted values at `organizations/foo` are `E1`, `E2`.
382 # The accepted values at `projects/bar` are `E3`, and `E4`.
383 #
384 # Example 2 (inherited values):
385 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700387 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700388 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Dan O'Mearadd494642020-05-01 07:42:23 -0700389 # The accepted values at `organizations/foo` are `E1`, `E2`.
390 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
391 #
392 # Example 3 (inheriting both allowed and denied values):
393 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 # {denied_values: &quot;E1&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 # The accepted values at `organizations/foo` are `E1`, `E2`.
398 # The value accepted at `projects/bar` is `E2`.
399 #
400 # Example 4 (RestoreDefault):
401 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700402 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700403 # `projects/bar` has a `Policy` with values:
404 # {RestoreDefault: {}}
405 # The accepted values at `organizations/foo` are `E1`, `E2`.
406 # The accepted values at `projects/bar` are either all or none depending on
407 # the value of `constraint_default` (if `ALLOW`, all; if
408 # `DENY`, none).
409 #
410 # Example 5 (no policy inherits parent policy):
411 # `organizations/foo` has no `Policy` set.
412 # `projects/bar` has no `Policy` set.
413 # The accepted values at both levels are either all or none depending on
414 # the value of `constraint_default` (if `ALLOW`, all; if
415 # `DENY`, none).
416 #
417 # Example 6 (ListConstraint allowing all):
418 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700419 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700420 # `projects/bar` has a `Policy` with:
421 # {all: ALLOW}
422 # The accepted values at `organizations/foo` are `E1`, E2`.
423 # Any value is accepted at `projects/bar`.
424 #
425 # Example 7 (ListConstraint allowing none):
426 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700427 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 # `projects/bar` has a `Policy` with:
429 # {all: DENY}
430 # The accepted values at `organizations/foo` are `E1`, E2`.
431 # No value is accepted at `projects/bar`.
432 #
433 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
434 # Given the following resource hierarchy
435 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
436 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 # {allowed_values: &quot;under:organizations/O1&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700438 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 # {allowed_values: &quot;under:projects/P3&quot;}
440 # {denied_values: &quot;under:folders/F2&quot;}
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 # The accepted values at `organizations/foo` are `organizations/O1`,
442 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
443 # `projects/P3`.
444 # The accepted values at `projects/bar` are `organizations/O1`,
445 # `folders/F1`, `projects/P1`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700446 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
448 # concurrency control.
449 #
450 # When the `Policy` is returned from either a `GetPolicy` or a
451 # `ListOrgPolicy` request, this `etag` indicates the version of the current
452 # `Policy` to use when executing a read-modify-write loop.
453 #
454 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
455 # `etag` will be unset.
456 #
457 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
458 # that was returned from a `GetOrgPolicy` request as part of a
459 # read-modify-write loop for concurrency control. Not setting the `etag`in a
460 # `SetOrgPolicy` request will result in an unconditional write of the
461 # `Policy`.
462 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700463 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700464 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Dan O'Mearadd494642020-05-01 07:42:23 -0700465 # configuration is acceptable.
466 #
467 # Suppose you have a `Constraint`
468 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
469 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
470 # behavior:
471 # - If the `Policy` at this resource has enforced set to `false`, serial
472 # port connection attempts will be allowed.
473 # - If the `Policy` at this resource has enforced set to `true`, serial
474 # port connection attempts will be refused.
475 # - If the `Policy` at this resource is `RestoreDefault`, serial port
476 # connection attempts will be allowed.
477 # - If no `Policy` is set at this resource or anywhere higher in the
478 # resource hierarchy, serial port connection attempts will be allowed.
479 # - If no `Policy` is set at this resource, but one exists higher in the
480 # resource hierarchy, the behavior is as if the`Policy` were set at
481 # this resource.
482 #
483 # The following examples demonstrate the different possible layerings:
484 #
485 # Example 1 (nearest `Constraint` wins):
486 # `organizations/foo` has a `Policy` with:
487 # {enforced: false}
488 # `projects/bar` has no `Policy` set.
489 # The constraint at `projects/bar` and `organizations/foo` will not be
490 # enforced.
491 #
492 # Example 2 (enforcement gets replaced):
493 # `organizations/foo` has a `Policy` with:
494 # {enforced: false}
495 # `projects/bar` has a `Policy` with:
496 # {enforced: true}
497 # The constraint at `organizations/foo` is not enforced.
498 # The constraint at `projects/bar` is enforced.
499 #
500 # Example 3 (RestoreDefault):
501 # `organizations/foo` has a `Policy` with:
502 # {enforced: true}
503 # `projects/bar` has a `Policy` with:
504 # {RestoreDefault: {}}
505 # The constraint at `organizations/foo` is enforced.
506 # The constraint at `projects/bar` is not enforced, because
507 # `constraint_default` for the `Constraint` is `ALLOW`.
508 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
510 # `constraints/serviceuser.services`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700511 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 # Immutable after creation.
513 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
514 # server, not specified by the caller, and represents the last time a call to
515 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
516 # be ignored.
517 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
518 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
519 # `Constraint` type.
520 # `constraint_default` enforcement behavior of the specific `Constraint` at
521 # this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700522 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700523 # Suppose that `constraint_default` is set to `ALLOW` for the
524 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
525 # foo.com sets a `Policy` at their Organization resource node that restricts
526 # the allowed service activations to deny all service activations. They
527 # could then set a `Policy` with the `policy_type` `restore_default` on
528 # several experimental projects, restoring the `constraint_default`
529 # enforcement of the `Constraint` for only those projects, allowing those
530 # projects to have all services activated.
531 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700532 },
533 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700535 # There can be a maximum of one Cloud IAM policy set on any given resource.
536 # In addition, Cloud IAM policies inherit their granted access scope from any
537 # policies set on parent resources in the resource hierarchy. Therefore, the
538 # effectively policy is the union of both the policy set on this resource
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 # and each policy set on all of the resource&#x27;s ancestry resource levels in
Dan O'Mearadd494642020-05-01 07:42:23 -0700540 # the hierarchy. See
541 # [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
542 # more information.
543 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700544 #
545 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700546 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
547 # `members` to a single `role`. Members can be user accounts, service accounts,
548 # Google groups, and domains (such as G Suite). A `role` is a named list of
549 # permissions; each `role` can be an IAM predefined role or a user-created
550 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700552 # Optionally, a `binding` can specify a `condition`, which is a logical
553 # expression that allows access to a resource only if the expression evaluates
554 # to `true`. A condition can add constraints based on attributes of the
555 # request, the resource, or both.
556 #
557 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 #
559 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700562 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
563 # &quot;members&quot;: [
564 # &quot;user:mike@example.com&quot;,
565 # &quot;group:admins@example.com&quot;,
566 # &quot;domain:google.com&quot;,
567 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700568 # ]
569 # },
570 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
572 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
573 # &quot;condition&quot;: {
574 # &quot;title&quot;: &quot;expirable access&quot;,
575 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
576 # &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 -0700577 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700580 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
581 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 # }
583 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700584 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 #
586 # bindings:
587 # - members:
588 # - user:mike@example.com
589 # - group:admins@example.com
590 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700591 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
592 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700594 # - user:eve@example.com
595 # role: roles/resourcemanager.organizationViewer
596 # condition:
597 # title: expirable access
598 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700600 # - etag: BwWWja0YfJA=
601 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 #
603 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700604 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700606 # `condition` that determines how and when the `bindings` are applied. Each
607 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700609 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Dan O'Mearadd494642020-05-01 07:42:23 -0700610 # NOTE: An unsatisfied condition will not allow user access via current
611 # binding. Different bindings, including their conditions, are examined
612 # independently.
613 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
614 # are documented at https://github.com/google/cel-spec.
615 #
616 # Example (Comparison):
617 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 # title: &quot;Summary size limit&quot;
619 # description: &quot;Determines if a summary is less than 100 chars&quot;
620 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700621 #
622 # Example (Equality):
623 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 # title: &quot;Requestor is owner&quot;
625 # description: &quot;Determines if requestor is the document owner&quot;
626 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 #
628 # Example (Logic):
629 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 # title: &quot;Public documents&quot;
631 # description: &quot;Determine whether the document should be publicly visible&quot;
632 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700633 #
634 # Example (Data Manipulation):
635 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 # title: &quot;Notification string&quot;
637 # description: &quot;Create a notification string with a timestamp.&quot;
638 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700639 #
640 # The exact variables and functions that may be referenced within an expression
641 # are determined by the service that evaluates it. See the service
642 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
Dan O'Mearadd494642020-05-01 07:42:23 -0700644 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -0700646 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -0700647 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Dan O'Mearadd494642020-05-01 07:42:23 -0700648 # its purpose. This can be used e.g. in UIs which allow to enter the
649 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
651 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 # `members` can have the following values:
655 #
656 # * `allUsers`: A special identifier that represents anyone who is
657 # on the internet; with or without a Google account.
658 #
659 # * `allAuthenticatedUsers`: A special identifier that represents anyone
660 # who is authenticated with a Google account or a service account.
661 #
662 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700663 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700664 #
665 #
666 # * `serviceAccount:{emailid}`: An email address that represents a service
667 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
668 #
669 # * `group:{emailid}`: An email address that represents a Google group.
670 # For example, `admins@example.com`.
671 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700672 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
673 # identifier) representing a user that has been recently deleted. For
674 # example, `alice@example.com?uid=123456789012345678901`. If the user is
675 # recovered, this value reverts to `user:{emailid}` and the recovered user
676 # retains the role in the binding.
677 #
678 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
679 # unique identifier) representing a service account that has been recently
680 # deleted. For example,
681 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
682 # If the service account is undeleted, this value reverts to
683 # `serviceAccount:{emailid}` and the undeleted service account retains the
684 # role in the binding.
685 #
686 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
687 # identifier) representing a Google group that has been recently
688 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
689 # the group is recovered, this value reverts to `group:{emailid}` and the
690 # recovered group retains the role in the binding.
691 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700692 #
693 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
694 # users of that domain. For example, `google.com` or `example.com`.
695 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
699 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 },
701 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700702 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 # prevent simultaneous updates of a policy from overwriting each other.
704 # It is strongly suggested that systems make use of the `etag` in the
705 # read-modify-write cycle to perform policy updates in order to avoid race
706 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
707 # systems are expected to put that etag in the request to `setIamPolicy` to
708 # ensure that their change will be applied to the same version of the policy.
709 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700710 # **Important:** If you use IAM Conditions, you must include the `etag` field
711 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
712 # you to overwrite a version `3` policy with a version `1` policy, and all of
713 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 &quot;version&quot;: 42, # Specifies the format of the policy.
Dan O'Mearadd494642020-05-01 07:42:23 -0700715 #
716 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
717 # are rejected.
718 #
719 # Any operation that affects conditional role bindings must specify version
720 # `3`. This requirement applies to the following operations:
721 #
722 # * Getting a policy that includes a conditional role binding
723 # * Adding a conditional role binding to a policy
724 # * Changing a conditional role binding in a policy
725 # * Removing any role binding, with or without a condition, from a policy
726 # that includes conditions
727 #
728 # **Important:** If you use IAM Conditions, you must include the `etag` field
729 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
730 # you to overwrite a version `3` policy with a version `1` policy, and all of
731 # the conditions in the version `3` policy are lost.
732 #
733 # If a policy does not include any conditions, operations on that policy may
734 # specify any valid version or leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
736 { # Specifies the audit configuration for a service.
737 # The configuration determines which permission types are logged, and what
738 # identities, if any, are exempted from logging.
739 # An AuditConfig must have one or more AuditLogConfigs.
740 #
741 # If there are AuditConfigs for both `allServices` and a specific service,
742 # the union of the two AuditConfigs is used for that service: the log_types
743 # specified in each AuditConfig are enabled, and the exempted_members in each
744 # AuditLogConfig are exempted.
745 #
746 # Example Policy with multiple AuditConfigs:
747 #
748 # {
749 # &quot;audit_configs&quot;: [
750 # {
751 # &quot;service&quot;: &quot;allServices&quot;
752 # &quot;audit_log_configs&quot;: [
753 # {
754 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
755 # &quot;exempted_members&quot;: [
756 # &quot;user:jose@example.com&quot;
757 # ]
758 # },
759 # {
760 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
761 # },
762 # {
763 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
764 # }
765 # ]
766 # },
767 # {
768 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
769 # &quot;audit_log_configs&quot;: [
770 # {
771 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
772 # },
773 # {
774 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
775 # &quot;exempted_members&quot;: [
776 # &quot;user:aliya@example.com&quot;
777 # ]
778 # }
779 # ]
780 # }
781 # ]
782 # }
783 #
784 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
785 # logging. It also exempts jose@example.com from DATA_READ logging, and
786 # aliya@example.com from DATA_WRITE logging.
787 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
788 { # Provides the configuration for logging a type of permissions.
789 # Example:
790 #
791 # {
792 # &quot;audit_log_configs&quot;: [
793 # {
794 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
795 # &quot;exempted_members&quot;: [
796 # &quot;user:jose@example.com&quot;
797 # ]
798 # },
799 # {
800 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
801 # }
802 # ]
803 # }
804 #
805 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
806 # jose@example.com from DATA_READ logging.
807 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
808 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
809 # permission.
810 # Follows the same format of Binding.members.
811 &quot;A String&quot;,
812 ],
813 },
814 ],
815 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
816 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
817 # `allServices` is a special value that covers all services.
818 },
819 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700821 &quot;accessLevel&quot;: { # An `AccessLevel` is a label that can be applied to requests to Google Cloud
Dan O'Mearadd494642020-05-01 07:42:23 -0700822 # services, along with a list of requirements necessary for the label to be
823 # applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700824 &quot;custom&quot;: { # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language # A `CustomLevel` written in the Common Expression Language.
Dan O'Mearadd494642020-05-01 07:42:23 -0700825 # to represent the necessary conditions for the level to apply to a request.
826 # See CEL spec at: https://github.com/google/cel-spec
Bu Sun Kim65020912020-05-20 12:08:20 -0700827 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # Required. A Cloud CEL expression evaluating to a boolean.
Dan O'Mearadd494642020-05-01 07:42:23 -0700828 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
829 # are documented at https://github.com/google/cel-spec.
830 #
831 # Example (Comparison):
832 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 # title: &quot;Summary size limit&quot;
834 # description: &quot;Determines if a summary is less than 100 chars&quot;
835 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700836 #
837 # Example (Equality):
838 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700839 # title: &quot;Requestor is owner&quot;
840 # description: &quot;Determines if requestor is the document owner&quot;
841 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700842 #
843 # Example (Logic):
844 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700845 # title: &quot;Public documents&quot;
846 # description: &quot;Determine whether the document should be publicly visible&quot;
847 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700848 #
849 # Example (Data Manipulation):
850 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 # title: &quot;Notification string&quot;
852 # description: &quot;Create a notification string with a timestamp.&quot;
853 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700854 #
855 # The exact variables and functions that may be referenced within an expression
856 # are determined by the service that evaluates it. See the service
857 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700858 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
Dan O'Mearadd494642020-05-01 07:42:23 -0700859 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700860 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -0700862 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Dan O'Mearadd494642020-05-01 07:42:23 -0700863 # its purpose. This can be used e.g. in UIs which allow to enter the
864 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
866 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700867 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;title&quot;: &quot;A String&quot;, # Human readable title. Must be unique within the Policy.
870 &quot;name&quot;: &quot;A String&quot;, # Required. Resource name for the Access Level. The `short_name` component
871 # must begin with a letter and only include alphanumeric and &#x27;_&#x27;. Format:
872 # `accessPolicies/{policy_id}/accessLevels/{short_name}`. The maximum length
873 # of the `short_name` component is 50 characters.
874 &quot;basic&quot;: { # `BasicLevel` is an `AccessLevel` using a set of recommended features. # A `BasicLevel` composed of `Conditions`.
875 &quot;conditions&quot;: [ # Required. A list of requirements for the `AccessLevel` to be granted.
Dan O'Mearadd494642020-05-01 07:42:23 -0700876 { # A condition necessary for an `AccessLevel` to be granted. The Condition is an
877 # AND over its fields. So a Condition is true if: 1) the request IP is from one
878 # of the listed subnetworks AND 2) the originating device complies with the
879 # listed device policy AND 3) all listed access levels are granted AND 4) the
880 # request was sent at a time allowed by the DateTimeRestriction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &quot;regions&quot;: [ # The request must originate from one of the provided countries/regions.
882 # Must be valid ISO 3166-1 alpha-2 codes.
883 &quot;A String&quot;,
884 ],
885 &quot;requiredAccessLevels&quot;: [ # A list of other access levels defined in the same `Policy`, referenced by
Dan O'Mearadd494642020-05-01 07:42:23 -0700886 # resource name. Referencing an `AccessLevel` which does not exist is an
887 # error. All access levels listed must be granted for the Condition
888 # to be true. Example:
Bu Sun Kim65020912020-05-20 12:08:20 -0700889 # &quot;`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME&quot;`
890 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700891 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700892 &quot;devicePolicy&quot;: { # `DevicePolicy` specifies device specific restrictions necessary to acquire a # Device specific restrictions, all restrictions must hold for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700893 # Condition to be true. If not specified, all devices are allowed.
894 # given access level. A `DevicePolicy` specifies requirements for requests from
895 # devices to be granted access levels, it does not do any enforcement on the
896 # device. `DevicePolicy` acts as an AND over all specified fields, and each
897 # repeated field is an OR over its elements. Any unset fields are ignored. For
898 # example, if the proto is { os_type : DESKTOP_WINDOWS, os_type :
899 # DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be
900 # true for requests originating from encrypted Linux desktops and encrypted
901 # Windows desktops.
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 &quot;allowedEncryptionStatuses&quot;: [ # Allowed encryptions statuses, an empty list allows all statuses.
903 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700904 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 &quot;allowedDeviceManagementLevels&quot;: [ # Allowed device management levels, an empty list allows all management
906 # levels.
907 &quot;A String&quot;,
908 ],
909 &quot;osConstraints&quot;: [ # Allowed OS versions, an empty list allows all types and all versions.
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 { # A restriction on the OS type and version of devices making requests.
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;minimumVersion&quot;: &quot;A String&quot;, # The minimum allowed OS version. If not set, any version of this OS
912 # satisfies the constraint. Format: `&quot;major.minor.patch&quot;`.
913 # Examples: `&quot;10.5.301&quot;`, `&quot;9.2.1&quot;`.
914 &quot;osType&quot;: &quot;A String&quot;, # Required. The allowed OS type.
915 &quot;requireVerifiedChromeOs&quot;: True or False, # Only allows requests from devices with a verified Chrome OS.
Dan O'Mearadd494642020-05-01 07:42:23 -0700916 # Verifications includes requirements that the device is enterprise-managed,
917 # conformant to domain policies, and the caller has permission to call
918 # the API targeted by the request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700919 },
920 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700921 &quot;requireCorpOwned&quot;: True or False, # Whether the device needs to be corp owned.
922 &quot;requireAdminApproval&quot;: True or False, # Whether the device needs to be approved by the customer admin.
923 &quot;requireScreenlock&quot;: True or False, # Whether or not screenlock is required for the DevicePolicy to be true.
Dan O'Mearadd494642020-05-01 07:42:23 -0700924 # Defaults to `false`.
925 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 &quot;members&quot;: [ # The request must be made by one of the provided user or service
Dan O'Mearadd494642020-05-01 07:42:23 -0700927 # accounts. Groups are not supported.
928 # Syntax:
929 # `user:{emailid}`
930 # `serviceAccount:{emailid}`
931 # If not specified, a request may come from any user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700932 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700933 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700934 &quot;negate&quot;: True or False, # Whether to negate the Condition. If true, the Condition becomes a NAND over
Dan O'Mearadd494642020-05-01 07:42:23 -0700935 # its non-empty fields, each field must be false for the Condition overall to
936 # be satisfied. Defaults to false.
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 &quot;ipSubnetworks&quot;: [ # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for
938 # a CIDR IP address block, the specified IP address portion must be properly
939 # truncated (i.e. all the host bits must be zero) or the input is considered
940 # malformed. For example, &quot;192.0.2.0/24&quot; is accepted but &quot;192.0.2.1/24&quot; is
941 # not. Similarly, for IPv6, &quot;2001:db8::/32&quot; is accepted whereas
942 # &quot;2001:db8::1/32&quot; is not. The originating IP of a request must be in one of
943 # the listed subnets in order for this Condition to be true. If empty, all IP
944 # addresses are allowed.
945 &quot;A String&quot;,
946 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700947 },
948 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 &quot;combiningFunction&quot;: &quot;A String&quot;, # How the `conditions` list should be combined to determine if a request is
950 # granted this `AccessLevel`. If AND is used, each `Condition` in
951 # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR
952 # is used, at least one `Condition` in `conditions` must be satisfied for the
953 # `AccessLevel` to be applied. Default behavior is AND.
Dan O'Mearadd494642020-05-01 07:42:23 -0700954 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700955 &quot;description&quot;: &quot;A String&quot;, # Description of the `AccessLevel` and its use. Does not affect behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700956 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 },
958 },
959 ],
960 }</pre>
961</div>
962
963<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 <code class="details" id="exportAssets">exportAssets(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700965 <pre>Exports assets with time and resource types to a given Cloud Storage
966location. The output format is newline-delimited JSON.
967This API implements the google.longrunning.Operation API allowing you
968to keep track of the export.
969
970Args:
971 parent: string, Required. The relative name of the root asset. This can only be an
Bu Sun Kim65020912020-05-20 12:08:20 -0700972organization number (such as &quot;organizations/123&quot;), a project ID (such as
973&quot;projects/my-project-id&quot;), or a project number (such as &quot;projects/12345&quot;),
974or a folder number (such as &quot;folders/123&quot;). (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700975 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700976 The object takes the form of:
977
978{ # Export asset request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700979 &quot;readTime&quot;: &quot;A String&quot;, # Timestamp to take an asset snapshot. This can only be set to a timestamp
980 # between the current time and the current time minus 35 days (inclusive).
981 # If not specified, the current time will be used. Due to delays in resource
982 # data collection and indexing, there is a volatile window during which
983 # running the same query may get different results.
984 &quot;contentType&quot;: &quot;A String&quot;, # Asset content type. If not specified, no content but the asset name will be
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 # returned.
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 &quot;outputConfig&quot;: { # Output configuration for export assets destination. # Required. Output configuration indicating where the results will be output
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700987 # to. All results will be in newline delimited JSON format.
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &quot;bigqueryDestination&quot;: { # A BigQuery destination. # Destination on BigQuery. The output table stores the fields in asset
Dan O'Mearadd494642020-05-01 07:42:23 -0700989 # proto as columns in BigQuery. The resource/iam_policy field is converted
990 # to a record with each field to a column, except metadata to a single JSON
991 # string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 &quot;dataset&quot;: &quot;A String&quot;, # Required. The BigQuery dataset in format
993 # &quot;projects/projectId/datasets/datasetId&quot;, to which the snapshot result
994 # should be exported. If this dataset does not exist, the export call returns
995 # an INVALID_ARGUMENT error.
996 &quot;force&quot;: True or False, # If the destination table already exists and this flag is `TRUE`, the
Dan O'Mearadd494642020-05-01 07:42:23 -0700997 # table will be overwritten by the contents of assets snapshot. If the flag
998 # is `FALSE` or unset and the destination table already exists, the export
999 # call returns an INVALID_ARGUMEMT error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001000 &quot;table&quot;: &quot;A String&quot;, # Required. The BigQuery table to which the snapshot result should be
1001 # written. If this table does not exist, a new table with the given name
1002 # will be created.
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001004 &quot;gcsDestination&quot;: { # A Cloud Storage location. # Destination on Cloud Storage.
1005 &quot;uriPrefix&quot;: &quot;A String&quot;, # The uri prefix of all generated Cloud Storage objects. For example:
1006 # &quot;gs://bucket_name/object_name_prefix&quot;. Each object uri is in format:
1007 # &quot;gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
Dan O'Mearadd494642020-05-01 07:42:23 -07001008 # contains assets for that type. &lt;shard number&gt; starts from 0. For example:
Bu Sun Kim65020912020-05-20 12:08:20 -07001009 # &quot;gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0&quot; is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001010 # the first shard of output objects containing all
1011 # compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
Bu Sun Kim65020912020-05-20 12:08:20 -07001012 # returned if file with the same name &quot;gs://bucket_name/object_name_prefix&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001013 # already exists.
Bu Sun Kim65020912020-05-20 12:08:20 -07001014 &quot;uri&quot;: &quot;A String&quot;, # The uri of the Cloud Storage object. It&#x27;s the same uri that is used by
1015 # gsutil. For example: &quot;gs://bucket_name/object_name&quot;. See [Viewing and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 # Editing Object
1017 # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
1018 # for more information.
1019 },
1020 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001021 &quot;assetTypes&quot;: [ # A list of asset types of which to take a snapshot for. For example:
1022 # &quot;compute.googleapis.com/Disk&quot;. If specified, only matching assets will be
1023 # returned. See [Introduction to Cloud Asset
1024 # Inventory](https://cloud.google.com/asset-inventory/docs/overview)
1025 # for all supported asset types.
1026 &quot;A String&quot;,
1027 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028 }
1029
1030 x__xgafv: string, V1 error format.
1031 Allowed values
1032 1 - v1 error format
1033 2 - v2 error format
1034
1035Returns:
1036 An object of the form:
1037
1038 { # This resource represents a long-running operation that is the result of a
1039 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001040 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1041 # If `true`, the operation is completed, and either `error` or `response` is
1042 # available.
1043 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -07001044 # method returns no data on success, such as `Delete`, the response is
1045 # `google.protobuf.Empty`. If the original method is standard
1046 # `Get`/`Create`/`Update`, the response should be the resource. For other
1047 # methods, the response should have the type `XxxResponse`, where `Xxx`
1048 # is the original method name. For example, if the original method name
1049 # is `TakeSnapshot()`, the inferred response type is
1050 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001051 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001052 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Dan O'Mearadd494642020-05-01 07:42:23 -07001054 # 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;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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001057 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -07001058 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1059 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001061 # You can find out more about this error model and how to work with it in the
1062 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -07001063 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1064 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001065 # user-facing error message should be localized and sent in the
1066 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001068 # message types for APIs to use.
1069 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001070 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001071 },
1072 ],
1073 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001074 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1075 # contains progress information and common metadata such as create time.
1076 # Some services might not provide such metadata. Any method that returns a
1077 # long-running operation should document the metadata type, if any.
1078 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1079 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 }</pre>
1081</div>
1082
1083</body></html>