1<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.savedQueries.html">savedQueries</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#create">create(parent, body=None, savedQueryId=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a saved query in a parent project/folder/organization.</p>
83<p class="toc_element">
84  <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Deletes a saved query.</p>
86<p class="toc_element">
87  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88<p class="firstline">Gets details about a saved query.</p>
89<p class="toc_element">
90  <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Lists all saved queries in a parent project/folder/organization.</p>
92<p class="toc_element">
93  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Updates a saved query.</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="close">close()</code>
101  <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
105    <code class="details" id="create">create(parent, body=None, savedQueryId=None, x__xgafv=None)</code>
106  <pre>Creates a saved query in a parent project/folder/organization.
107
108Args:
109  parent: string, Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as &quot;organizations/123&quot;), a folder number (such as &quot;folders/123&quot;), a project ID (such as &quot;projects/my-project-id&quot;)&quot;, or a project number (such as &quot;projects/12345&quot;). (required)
110  body: object, The request body.
111    The object takes the form of:
112
113{ # A saved query which can be shared with others or used later.
114  &quot;content&quot;: { # The query content. # The query content.
115    &quot;iamPolicyAnalysisQuery&quot;: { # IAM policy analysis query message. # An IAM Policy Analysis query, which could be used in the AssetService.AnalyzeIamPolicy rpc or the AssetService.AnalyzeIamPolicyLongrunning rpc.
116      &quot;accessSelector&quot;: { # Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10. # Optional. Specifies roles or permissions for analysis. This is optional.
117        &quot;permissions&quot;: [ # Optional. The permissions to appear in result.
118          &quot;A String&quot;,
119        ],
120        &quot;roles&quot;: [ # Optional. The roles to appear in result.
121          &quot;A String&quot;,
122        ],
123      },
124      &quot;conditionContext&quot;: { # The IAM conditions context. # Optional. The hypothetical context for IAM conditions evaluation.
125        &quot;accessTime&quot;: &quot;A String&quot;, # The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.
126      },
127      &quot;identitySelector&quot;: { # Specifies an identity for which to determine resource access, based on roles assigned either directly to them or to the groups they belong to, directly or indirectly. # Optional. Specifies an identity for analysis.
128        &quot;identity&quot;: &quot;A String&quot;, # Required. The identity appear in the form of principals in [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of supported forms are: &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot;. Notice that wildcard characters (such as * and ?) are not supported. You must give a specific identity.
129      },
130      &quot;options&quot;: { # Contains query options. # Optional. The query options.
131        &quot;analyzeServiceAccountImpersonation&quot;: True or False, # Optional. If true, the response will include access analysis from identities to resources via service account impersonation. This is a very expensive operation, because many derived queries will be executed. We highly recommend you use AssetService.AnalyzeIamPolicyLongrunning rpc instead. For example, if the request analyzes for which resources user A has permission P, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.getAccessToken permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to a GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another example, if the request analyzes for who has permission P to a GCP folder F, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.actAs permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to the GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Default is false.
132        &quot;expandGroups&quot;: True or False, # Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set. Default is false.
133        &quot;expandResources&quot;: True or False, # Optional. If true and IamPolicyAnalysisQuery.resource_selector is not specified, the resource section of the result will expand any resource attached to an IAM policy to include resources lower in the resource hierarchy. For example, if the request analyzes for which resources user A has permission P, and the results include an IAM policy with P on a GCP folder, the results will also include resources in that folder with permission P. If true and IamPolicyAnalysisQuery.resource_selector is specified, the resource section of the result will expand the specified resource to include resources lower in the resource hierarchy. Only project or lower resources are supported. Folder and organization resource cannot be used together with this option. For example, if the request analyzes for which users have permission P on a GCP project with this option enabled, the results will include all users who have permission P on that project or any lower resource. Default is false.
134        &quot;expandRoles&quot;: True or False, # Optional. If true, the access section of result will expand any roles appearing in IAM policy bindings to include their permissions. If IamPolicyAnalysisQuery.access_selector is specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
135        &quot;outputGroupEdges&quot;: True or False, # Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false.
136        &quot;outputResourceEdges&quot;: True or False, # Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false.
137      },
138      &quot;resourceSelector&quot;: { # Specifies the resource to analyze for access policies, which may be set directly on the resource, or on ancestors such as organizations, folders or projects. # Optional. Specifies a resource for analysis.
139        &quot;fullResourceName&quot;: &quot;A String&quot;, # Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of a resource of [supported resource types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
140      },
141      &quot;scope&quot;: &quot;A String&quot;, # Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as &quot;organizations/123&quot;), a folder number (such as &quot;folders/123&quot;), a project ID (such as &quot;projects/my-project-id&quot;), or a project number (such as &quot;projects/12345&quot;). To know how to get organization id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
142    },
143  },
144  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The create time of this saved query.
145  &quot;creator&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has created this saved query.
146  &quot;description&quot;: &quot;A String&quot;, # The description of this saved query. This value should be fewer than 255 characters.
147  &quot;labels&quot;: { # Labels applied on the resource. This value should not contain more than 10 entries. The key and value of each entry must be non-empty and fewer than 64 characters.
148    &quot;a_key&quot;: &quot;A String&quot;,
149  },
150  &quot;lastUpdateTime&quot;: &quot;A String&quot;, # Output only. The last update time of this saved query.
151  &quot;lastUpdater&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has updated this saved query most recently.
152  &quot;name&quot;: &quot;A String&quot;, # The resource name of the saved query. The format must be: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
153}
154
155  savedQueryId: string, Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query&#x27;s resource name. This value should be 4-63 characters, and valid characters are /a-z-/. Notice that this field is required in the saved query creation, and the `name` field of the `saved_query` will be ignored.
156  x__xgafv: string, V1 error format.
157    Allowed values
158      1 - v1 error format
159      2 - v2 error format
160
161Returns:
162  An object of the form:
163
164    { # A saved query which can be shared with others or used later.
165  &quot;content&quot;: { # The query content. # The query content.
166    &quot;iamPolicyAnalysisQuery&quot;: { # IAM policy analysis query message. # An IAM Policy Analysis query, which could be used in the AssetService.AnalyzeIamPolicy rpc or the AssetService.AnalyzeIamPolicyLongrunning rpc.
167      &quot;accessSelector&quot;: { # Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10. # Optional. Specifies roles or permissions for analysis. This is optional.
168        &quot;permissions&quot;: [ # Optional. The permissions to appear in result.
169          &quot;A String&quot;,
170        ],
171        &quot;roles&quot;: [ # Optional. The roles to appear in result.
172          &quot;A String&quot;,
173        ],
174      },
175      &quot;conditionContext&quot;: { # The IAM conditions context. # Optional. The hypothetical context for IAM conditions evaluation.
176        &quot;accessTime&quot;: &quot;A String&quot;, # The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.
177      },
178      &quot;identitySelector&quot;: { # Specifies an identity for which to determine resource access, based on roles assigned either directly to them or to the groups they belong to, directly or indirectly. # Optional. Specifies an identity for analysis.
179        &quot;identity&quot;: &quot;A String&quot;, # Required. The identity appear in the form of principals in [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of supported forms are: &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot;. Notice that wildcard characters (such as * and ?) are not supported. You must give a specific identity.
180      },
181      &quot;options&quot;: { # Contains query options. # Optional. The query options.
182        &quot;analyzeServiceAccountImpersonation&quot;: True or False, # Optional. If true, the response will include access analysis from identities to resources via service account impersonation. This is a very expensive operation, because many derived queries will be executed. We highly recommend you use AssetService.AnalyzeIamPolicyLongrunning rpc instead. For example, if the request analyzes for which resources user A has permission P, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.getAccessToken permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to a GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another example, if the request analyzes for who has permission P to a GCP folder F, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.actAs permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to the GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Default is false.
183        &quot;expandGroups&quot;: True or False, # Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set. Default is false.
184        &quot;expandResources&quot;: True or False, # Optional. If true and IamPolicyAnalysisQuery.resource_selector is not specified, the resource section of the result will expand any resource attached to an IAM policy to include resources lower in the resource hierarchy. For example, if the request analyzes for which resources user A has permission P, and the results include an IAM policy with P on a GCP folder, the results will also include resources in that folder with permission P. If true and IamPolicyAnalysisQuery.resource_selector is specified, the resource section of the result will expand the specified resource to include resources lower in the resource hierarchy. Only project or lower resources are supported. Folder and organization resource cannot be used together with this option. For example, if the request analyzes for which users have permission P on a GCP project with this option enabled, the results will include all users who have permission P on that project or any lower resource. Default is false.
185        &quot;expandRoles&quot;: True or False, # Optional. If true, the access section of result will expand any roles appearing in IAM policy bindings to include their permissions. If IamPolicyAnalysisQuery.access_selector is specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
186        &quot;outputGroupEdges&quot;: True or False, # Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false.
187        &quot;outputResourceEdges&quot;: True or False, # Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false.
188      },
189      &quot;resourceSelector&quot;: { # Specifies the resource to analyze for access policies, which may be set directly on the resource, or on ancestors such as organizations, folders or projects. # Optional. Specifies a resource for analysis.
190        &quot;fullResourceName&quot;: &quot;A String&quot;, # Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of a resource of [supported resource types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
191      },
192      &quot;scope&quot;: &quot;A String&quot;, # Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as &quot;organizations/123&quot;), a folder number (such as &quot;folders/123&quot;), a project ID (such as &quot;projects/my-project-id&quot;), or a project number (such as &quot;projects/12345&quot;). To know how to get organization id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
193    },
194  },
195  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The create time of this saved query.
196  &quot;creator&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has created this saved query.
197  &quot;description&quot;: &quot;A String&quot;, # The description of this saved query. This value should be fewer than 255 characters.
198  &quot;labels&quot;: { # Labels applied on the resource. This value should not contain more than 10 entries. The key and value of each entry must be non-empty and fewer than 64 characters.
199    &quot;a_key&quot;: &quot;A String&quot;,
200  },
201  &quot;lastUpdateTime&quot;: &quot;A String&quot;, # Output only. The last update time of this saved query.
202  &quot;lastUpdater&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has updated this saved query most recently.
203  &quot;name&quot;: &quot;A String&quot;, # The resource name of the saved query. The format must be: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
204}</pre>
205</div>
206
207<div class="method">
208    <code class="details" id="delete">delete(name, x__xgafv=None)</code>
209  <pre>Deletes a saved query.
210
211Args:
212  name: string, Required. The name of the saved query to delete. It must be in the format of: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id (required)
213  x__xgafv: string, V1 error format.
214    Allowed values
215      1 - v1 error format
216      2 - v2 error format
217
218Returns:
219  An object of the form:
220
221    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
222}</pre>
223</div>
224
225<div class="method">
226    <code class="details" id="get">get(name, x__xgafv=None)</code>
227  <pre>Gets details about a saved query.
228
229Args:
230  name: string, Required. The name of the saved query and it must be in the format of: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id (required)
231  x__xgafv: string, V1 error format.
232    Allowed values
233      1 - v1 error format
234      2 - v2 error format
235
236Returns:
237  An object of the form:
238
239    { # A saved query which can be shared with others or used later.
240  &quot;content&quot;: { # The query content. # The query content.
241    &quot;iamPolicyAnalysisQuery&quot;: { # IAM policy analysis query message. # An IAM Policy Analysis query, which could be used in the AssetService.AnalyzeIamPolicy rpc or the AssetService.AnalyzeIamPolicyLongrunning rpc.
242      &quot;accessSelector&quot;: { # Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10. # Optional. Specifies roles or permissions for analysis. This is optional.
243        &quot;permissions&quot;: [ # Optional. The permissions to appear in result.
244          &quot;A String&quot;,
245        ],
246        &quot;roles&quot;: [ # Optional. The roles to appear in result.
247          &quot;A String&quot;,
248        ],
249      },
250      &quot;conditionContext&quot;: { # The IAM conditions context. # Optional. The hypothetical context for IAM conditions evaluation.
251        &quot;accessTime&quot;: &quot;A String&quot;, # The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.
252      },
253      &quot;identitySelector&quot;: { # Specifies an identity for which to determine resource access, based on roles assigned either directly to them or to the groups they belong to, directly or indirectly. # Optional. Specifies an identity for analysis.
254        &quot;identity&quot;: &quot;A String&quot;, # Required. The identity appear in the form of principals in [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of supported forms are: &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot;. Notice that wildcard characters (such as * and ?) are not supported. You must give a specific identity.
255      },
256      &quot;options&quot;: { # Contains query options. # Optional. The query options.
257        &quot;analyzeServiceAccountImpersonation&quot;: True or False, # Optional. If true, the response will include access analysis from identities to resources via service account impersonation. This is a very expensive operation, because many derived queries will be executed. We highly recommend you use AssetService.AnalyzeIamPolicyLongrunning rpc instead. For example, if the request analyzes for which resources user A has permission P, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.getAccessToken permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to a GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another example, if the request analyzes for who has permission P to a GCP folder F, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.actAs permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to the GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Default is false.
258        &quot;expandGroups&quot;: True or False, # Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set. Default is false.
259        &quot;expandResources&quot;: True or False, # Optional. If true and IamPolicyAnalysisQuery.resource_selector is not specified, the resource section of the result will expand any resource attached to an IAM policy to include resources lower in the resource hierarchy. For example, if the request analyzes for which resources user A has permission P, and the results include an IAM policy with P on a GCP folder, the results will also include resources in that folder with permission P. If true and IamPolicyAnalysisQuery.resource_selector is specified, the resource section of the result will expand the specified resource to include resources lower in the resource hierarchy. Only project or lower resources are supported. Folder and organization resource cannot be used together with this option. For example, if the request analyzes for which users have permission P on a GCP project with this option enabled, the results will include all users who have permission P on that project or any lower resource. Default is false.
260        &quot;expandRoles&quot;: True or False, # Optional. If true, the access section of result will expand any roles appearing in IAM policy bindings to include their permissions. If IamPolicyAnalysisQuery.access_selector is specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
261        &quot;outputGroupEdges&quot;: True or False, # Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false.
262        &quot;outputResourceEdges&quot;: True or False, # Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false.
263      },
264      &quot;resourceSelector&quot;: { # Specifies the resource to analyze for access policies, which may be set directly on the resource, or on ancestors such as organizations, folders or projects. # Optional. Specifies a resource for analysis.
265        &quot;fullResourceName&quot;: &quot;A String&quot;, # Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of a resource of [supported resource types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
266      },
267      &quot;scope&quot;: &quot;A String&quot;, # Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as &quot;organizations/123&quot;), a folder number (such as &quot;folders/123&quot;), a project ID (such as &quot;projects/my-project-id&quot;), or a project number (such as &quot;projects/12345&quot;). To know how to get organization id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
268    },
269  },
270  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The create time of this saved query.
271  &quot;creator&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has created this saved query.
272  &quot;description&quot;: &quot;A String&quot;, # The description of this saved query. This value should be fewer than 255 characters.
273  &quot;labels&quot;: { # Labels applied on the resource. This value should not contain more than 10 entries. The key and value of each entry must be non-empty and fewer than 64 characters.
274    &quot;a_key&quot;: &quot;A String&quot;,
275  },
276  &quot;lastUpdateTime&quot;: &quot;A String&quot;, # Output only. The last update time of this saved query.
277  &quot;lastUpdater&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has updated this saved query most recently.
278  &quot;name&quot;: &quot;A String&quot;, # The resource name of the saved query. The format must be: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
279}</pre>
280</div>
281
282<div class="method">
283    <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
284  <pre>Lists all saved queries in a parent project/folder/organization.
285
286Args:
287  parent: string, Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as &quot;folders/12345&quot;)&quot;, or a project ID (such as &quot;projects/my-project-id&quot;). (required)
288  filter: string, Optional. The expression to filter resources. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. When `AND` and `OR` are both used in the expression, parentheses must be appropriately used to group the combinations. The expression may also contain regular expressions. See https://google.aip.dev/160 for more information on the grammar.
289  pageSize: integer, Optional. The maximum number of saved queries to return per page. The service may return fewer than this value. If unspecified, at most 50 will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
290  pageToken: string, Optional. A page token, received from a previous `ListSavedQueries` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSavedQueries` must match the call that provided the page token.
291  x__xgafv: string, V1 error format.
292    Allowed values
293      1 - v1 error format
294      2 - v2 error format
295
296Returns:
297  An object of the form:
298
299    { # Response of listing saved queries.
300  &quot;nextPageToken&quot;: &quot;A String&quot;, # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
301  &quot;savedQueries&quot;: [ # A list of savedQueries.
302    { # A saved query which can be shared with others or used later.
303      &quot;content&quot;: { # The query content. # The query content.
304        &quot;iamPolicyAnalysisQuery&quot;: { # IAM policy analysis query message. # An IAM Policy Analysis query, which could be used in the AssetService.AnalyzeIamPolicy rpc or the AssetService.AnalyzeIamPolicyLongrunning rpc.
305          &quot;accessSelector&quot;: { # Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10. # Optional. Specifies roles or permissions for analysis. This is optional.
306            &quot;permissions&quot;: [ # Optional. The permissions to appear in result.
307              &quot;A String&quot;,
308            ],
309            &quot;roles&quot;: [ # Optional. The roles to appear in result.
310              &quot;A String&quot;,
311            ],
312          },
313          &quot;conditionContext&quot;: { # The IAM conditions context. # Optional. The hypothetical context for IAM conditions evaluation.
314            &quot;accessTime&quot;: &quot;A String&quot;, # The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.
315          },
316          &quot;identitySelector&quot;: { # Specifies an identity for which to determine resource access, based on roles assigned either directly to them or to the groups they belong to, directly or indirectly. # Optional. Specifies an identity for analysis.
317            &quot;identity&quot;: &quot;A String&quot;, # Required. The identity appear in the form of principals in [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of supported forms are: &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot;. Notice that wildcard characters (such as * and ?) are not supported. You must give a specific identity.
318          },
319          &quot;options&quot;: { # Contains query options. # Optional. The query options.
320            &quot;analyzeServiceAccountImpersonation&quot;: True or False, # Optional. If true, the response will include access analysis from identities to resources via service account impersonation. This is a very expensive operation, because many derived queries will be executed. We highly recommend you use AssetService.AnalyzeIamPolicyLongrunning rpc instead. For example, if the request analyzes for which resources user A has permission P, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.getAccessToken permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to a GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another example, if the request analyzes for who has permission P to a GCP folder F, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.actAs permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to the GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Default is false.
321            &quot;expandGroups&quot;: True or False, # Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set. Default is false.
322            &quot;expandResources&quot;: True or False, # Optional. If true and IamPolicyAnalysisQuery.resource_selector is not specified, the resource section of the result will expand any resource attached to an IAM policy to include resources lower in the resource hierarchy. For example, if the request analyzes for which resources user A has permission P, and the results include an IAM policy with P on a GCP folder, the results will also include resources in that folder with permission P. If true and IamPolicyAnalysisQuery.resource_selector is specified, the resource section of the result will expand the specified resource to include resources lower in the resource hierarchy. Only project or lower resources are supported. Folder and organization resource cannot be used together with this option. For example, if the request analyzes for which users have permission P on a GCP project with this option enabled, the results will include all users who have permission P on that project or any lower resource. Default is false.
323            &quot;expandRoles&quot;: True or False, # Optional. If true, the access section of result will expand any roles appearing in IAM policy bindings to include their permissions. If IamPolicyAnalysisQuery.access_selector is specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
324            &quot;outputGroupEdges&quot;: True or False, # Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false.
325            &quot;outputResourceEdges&quot;: True or False, # Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false.
326          },
327          &quot;resourceSelector&quot;: { # Specifies the resource to analyze for access policies, which may be set directly on the resource, or on ancestors such as organizations, folders or projects. # Optional. Specifies a resource for analysis.
328            &quot;fullResourceName&quot;: &quot;A String&quot;, # Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of a resource of [supported resource types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
329          },
330          &quot;scope&quot;: &quot;A String&quot;, # Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as &quot;organizations/123&quot;), a folder number (such as &quot;folders/123&quot;), a project ID (such as &quot;projects/my-project-id&quot;), or a project number (such as &quot;projects/12345&quot;). To know how to get organization id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
331        },
332      },
333      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The create time of this saved query.
334      &quot;creator&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has created this saved query.
335      &quot;description&quot;: &quot;A String&quot;, # The description of this saved query. This value should be fewer than 255 characters.
336      &quot;labels&quot;: { # Labels applied on the resource. This value should not contain more than 10 entries. The key and value of each entry must be non-empty and fewer than 64 characters.
337        &quot;a_key&quot;: &quot;A String&quot;,
338      },
339      &quot;lastUpdateTime&quot;: &quot;A String&quot;, # Output only. The last update time of this saved query.
340      &quot;lastUpdater&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has updated this saved query most recently.
341      &quot;name&quot;: &quot;A String&quot;, # The resource name of the saved query. The format must be: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
342    },
343  ],
344}</pre>
345</div>
346
347<div class="method">
348    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
349  <pre>Retrieves the next page of results.
350
351Args:
352  previous_request: The request for the previous page. (required)
353  previous_response: The response from the request for the previous page. (required)
354
355Returns:
356  A request object that you can call &#x27;execute()&#x27; on to request the next
357  page. Returns None if there are no more items in the collection.
358    </pre>
359</div>
360
361<div class="method">
362    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
363  <pre>Updates a saved query.
364
365Args:
366  name: string, The resource name of the saved query. The format must be: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id (required)
367  body: object, The request body.
368    The object takes the form of:
369
370{ # A saved query which can be shared with others or used later.
371  &quot;content&quot;: { # The query content. # The query content.
372    &quot;iamPolicyAnalysisQuery&quot;: { # IAM policy analysis query message. # An IAM Policy Analysis query, which could be used in the AssetService.AnalyzeIamPolicy rpc or the AssetService.AnalyzeIamPolicyLongrunning rpc.
373      &quot;accessSelector&quot;: { # Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10. # Optional. Specifies roles or permissions for analysis. This is optional.
374        &quot;permissions&quot;: [ # Optional. The permissions to appear in result.
375          &quot;A String&quot;,
376        ],
377        &quot;roles&quot;: [ # Optional. The roles to appear in result.
378          &quot;A String&quot;,
379        ],
380      },
381      &quot;conditionContext&quot;: { # The IAM conditions context. # Optional. The hypothetical context for IAM conditions evaluation.
382        &quot;accessTime&quot;: &quot;A String&quot;, # The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.
383      },
384      &quot;identitySelector&quot;: { # Specifies an identity for which to determine resource access, based on roles assigned either directly to them or to the groups they belong to, directly or indirectly. # Optional. Specifies an identity for analysis.
385        &quot;identity&quot;: &quot;A String&quot;, # Required. The identity appear in the form of principals in [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of supported forms are: &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot;. Notice that wildcard characters (such as * and ?) are not supported. You must give a specific identity.
386      },
387      &quot;options&quot;: { # Contains query options. # Optional. The query options.
388        &quot;analyzeServiceAccountImpersonation&quot;: True or False, # Optional. If true, the response will include access analysis from identities to resources via service account impersonation. This is a very expensive operation, because many derived queries will be executed. We highly recommend you use AssetService.AnalyzeIamPolicyLongrunning rpc instead. For example, if the request analyzes for which resources user A has permission P, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.getAccessToken permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to a GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another example, if the request analyzes for who has permission P to a GCP folder F, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.actAs permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to the GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Default is false.
389        &quot;expandGroups&quot;: True or False, # Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set. Default is false.
390        &quot;expandResources&quot;: True or False, # Optional. If true and IamPolicyAnalysisQuery.resource_selector is not specified, the resource section of the result will expand any resource attached to an IAM policy to include resources lower in the resource hierarchy. For example, if the request analyzes for which resources user A has permission P, and the results include an IAM policy with P on a GCP folder, the results will also include resources in that folder with permission P. If true and IamPolicyAnalysisQuery.resource_selector is specified, the resource section of the result will expand the specified resource to include resources lower in the resource hierarchy. Only project or lower resources are supported. Folder and organization resource cannot be used together with this option. For example, if the request analyzes for which users have permission P on a GCP project with this option enabled, the results will include all users who have permission P on that project or any lower resource. Default is false.
391        &quot;expandRoles&quot;: True or False, # Optional. If true, the access section of result will expand any roles appearing in IAM policy bindings to include their permissions. If IamPolicyAnalysisQuery.access_selector is specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
392        &quot;outputGroupEdges&quot;: True or False, # Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false.
393        &quot;outputResourceEdges&quot;: True or False, # Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false.
394      },
395      &quot;resourceSelector&quot;: { # Specifies the resource to analyze for access policies, which may be set directly on the resource, or on ancestors such as organizations, folders or projects. # Optional. Specifies a resource for analysis.
396        &quot;fullResourceName&quot;: &quot;A String&quot;, # Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of a resource of [supported resource types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
397      },
398      &quot;scope&quot;: &quot;A String&quot;, # Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as &quot;organizations/123&quot;), a folder number (such as &quot;folders/123&quot;), a project ID (such as &quot;projects/my-project-id&quot;), or a project number (such as &quot;projects/12345&quot;). To know how to get organization id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
399    },
400  },
401  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The create time of this saved query.
402  &quot;creator&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has created this saved query.
403  &quot;description&quot;: &quot;A String&quot;, # The description of this saved query. This value should be fewer than 255 characters.
404  &quot;labels&quot;: { # Labels applied on the resource. This value should not contain more than 10 entries. The key and value of each entry must be non-empty and fewer than 64 characters.
405    &quot;a_key&quot;: &quot;A String&quot;,
406  },
407  &quot;lastUpdateTime&quot;: &quot;A String&quot;, # Output only. The last update time of this saved query.
408  &quot;lastUpdater&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has updated this saved query most recently.
409  &quot;name&quot;: &quot;A String&quot;, # The resource name of the saved query. The format must be: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
410}
411
412  updateMask: string, Required. The list of fields to update.
413  x__xgafv: string, V1 error format.
414    Allowed values
415      1 - v1 error format
416      2 - v2 error format
417
418Returns:
419  An object of the form:
420
421    { # A saved query which can be shared with others or used later.
422  &quot;content&quot;: { # The query content. # The query content.
423    &quot;iamPolicyAnalysisQuery&quot;: { # IAM policy analysis query message. # An IAM Policy Analysis query, which could be used in the AssetService.AnalyzeIamPolicy rpc or the AssetService.AnalyzeIamPolicyLongrunning rpc.
424      &quot;accessSelector&quot;: { # Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10. # Optional. Specifies roles or permissions for analysis. This is optional.
425        &quot;permissions&quot;: [ # Optional. The permissions to appear in result.
426          &quot;A String&quot;,
427        ],
428        &quot;roles&quot;: [ # Optional. The roles to appear in result.
429          &quot;A String&quot;,
430        ],
431      },
432      &quot;conditionContext&quot;: { # The IAM conditions context. # Optional. The hypothetical context for IAM conditions evaluation.
433        &quot;accessTime&quot;: &quot;A String&quot;, # The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.
434      },
435      &quot;identitySelector&quot;: { # Specifies an identity for which to determine resource access, based on roles assigned either directly to them or to the groups they belong to, directly or indirectly. # Optional. Specifies an identity for analysis.
436        &quot;identity&quot;: &quot;A String&quot;, # Required. The identity appear in the form of principals in [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of supported forms are: &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot;. Notice that wildcard characters (such as * and ?) are not supported. You must give a specific identity.
437      },
438      &quot;options&quot;: { # Contains query options. # Optional. The query options.
439        &quot;analyzeServiceAccountImpersonation&quot;: True or False, # Optional. If true, the response will include access analysis from identities to resources via service account impersonation. This is a very expensive operation, because many derived queries will be executed. We highly recommend you use AssetService.AnalyzeIamPolicyLongrunning rpc instead. For example, if the request analyzes for which resources user A has permission P, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.getAccessToken permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to a GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another example, if the request analyzes for who has permission P to a GCP folder F, and there&#x27;s an IAM policy states user A has iam.serviceAccounts.actAs permission to a service account SA, and there&#x27;s another IAM policy states service account SA has permission P to the GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Default is false.
440        &quot;expandGroups&quot;: True or False, # Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set. Default is false.
441        &quot;expandResources&quot;: True or False, # Optional. If true and IamPolicyAnalysisQuery.resource_selector is not specified, the resource section of the result will expand any resource attached to an IAM policy to include resources lower in the resource hierarchy. For example, if the request analyzes for which resources user A has permission P, and the results include an IAM policy with P on a GCP folder, the results will also include resources in that folder with permission P. If true and IamPolicyAnalysisQuery.resource_selector is specified, the resource section of the result will expand the specified resource to include resources lower in the resource hierarchy. Only project or lower resources are supported. Folder and organization resource cannot be used together with this option. For example, if the request analyzes for which users have permission P on a GCP project with this option enabled, the results will include all users who have permission P on that project or any lower resource. Default is false.
442        &quot;expandRoles&quot;: True or False, # Optional. If true, the access section of result will expand any roles appearing in IAM policy bindings to include their permissions. If IamPolicyAnalysisQuery.access_selector is specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
443        &quot;outputGroupEdges&quot;: True or False, # Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false.
444        &quot;outputResourceEdges&quot;: True or False, # Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false.
445      },
446      &quot;resourceSelector&quot;: { # Specifies the resource to analyze for access policies, which may be set directly on the resource, or on ancestors such as organizations, folders or projects. # Optional. Specifies a resource for analysis.
447        &quot;fullResourceName&quot;: &quot;A String&quot;, # Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of a resource of [supported resource types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
448      },
449      &quot;scope&quot;: &quot;A String&quot;, # Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as &quot;organizations/123&quot;), a folder number (such as &quot;folders/123&quot;), a project ID (such as &quot;projects/my-project-id&quot;), or a project number (such as &quot;projects/12345&quot;). To know how to get organization id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project id, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
450    },
451  },
452  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The create time of this saved query.
453  &quot;creator&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has created this saved query.
454  &quot;description&quot;: &quot;A String&quot;, # The description of this saved query. This value should be fewer than 255 characters.
455  &quot;labels&quot;: { # Labels applied on the resource. This value should not contain more than 10 entries. The key and value of each entry must be non-empty and fewer than 64 characters.
456    &quot;a_key&quot;: &quot;A String&quot;,
457  },
458  &quot;lastUpdateTime&quot;: &quot;A String&quot;, # Output only. The last update time of this saved query.
459  &quot;lastUpdater&quot;: &quot;A String&quot;, # Output only. The account&#x27;s email address who has updated this saved query most recently.
460  &quot;name&quot;: &quot;A String&quot;, # The resource name of the saved query. The format must be: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
461}</pre>
462</div>
463
464</body></html>