google-apis-cloudasset_v1p4beta1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-cloudasset_v1p4beta1.rb +15 -0
- data/lib/google/apis/cloudasset_v1p4beta1.rb +36 -0
- data/lib/google/apis/cloudasset_v1p4beta1/classes.rb +887 -0
- data/lib/google/apis/cloudasset_v1p4beta1/gem_version.rb +28 -0
- data/lib/google/apis/cloudasset_v1p4beta1/representations.rb +377 -0
- data/lib/google/apis/cloudasset_v1p4beta1/service.rb +226 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f7ff7f847fb076ec80f559da0b77c1ac90d5f0d7ef6cae0a84dc6c2ebbe3e286
|
4
|
+
data.tar.gz: 7ff9d505d045533dd3b1144d90c8c99ff8080e906d33bcb78947ed89a105d100
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4f5a7bf5fb9d18f0b510ebd1435750c7347c65a283b1ace376c2d749b7c81713df60ac1bd4ed4871b75520bef4cd73548ad8de1ec8d91ea343b492761ebdb81f
|
7
|
+
data.tar.gz: a0996641fbdaebd366f483b043150ed8d641f31f50aadd786019fa6653d64d30d0ff3248303ff2fdb8d625ad65baae5155afa85a5d3eb0b1033f39d17a126ecf
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-cloudasset_v1p4beta1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/cloudasset_v1p4beta1/*.rb
|
9
|
+
lib/google/apis/cloudasset_v1p4beta1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1p4beta1 of the Cloud Asset API
|
2
|
+
|
3
|
+
This is a simple client library for version V1p4beta1 of the Cloud Asset API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/cloudasset.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-cloudasset_v1p4beta1', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-cloudasset_v1p4beta1
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/cloudasset_v1p4beta1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::CloudassetV1p4beta1::CloudAssetService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Cloudasset service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Cloud Asset API, see the {Google::Apis::CloudassetV1p4beta1::CloudAssetService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-cloudasset_v1p4beta1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://cloud.google.com/asset-inventory/docs/quickstart) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/apis/cloudasset_v1p4beta1"
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/cloudasset_v1p4beta1/service.rb'
|
16
|
+
require 'google/apis/cloudasset_v1p4beta1/classes.rb'
|
17
|
+
require 'google/apis/cloudasset_v1p4beta1/representations.rb'
|
18
|
+
require 'google/apis/cloudasset_v1p4beta1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Cloud Asset API
|
23
|
+
#
|
24
|
+
# The cloud asset API manages the history and inventory of cloud resources.
|
25
|
+
#
|
26
|
+
# @see https://cloud.google.com/asset-inventory/docs/quickstart
|
27
|
+
module CloudassetV1p4beta1
|
28
|
+
# Version of the Cloud Asset API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V1p4beta1'
|
31
|
+
|
32
|
+
# View and manage your data across Google Cloud Platform services
|
33
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,887 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module CloudassetV1p4beta1
|
24
|
+
|
25
|
+
# Specifies roles and/or permissions to analyze, to determine both the
|
26
|
+
# identities possessing them and the resources they control. If multiple values
|
27
|
+
# are specified, results will include identities and resources matching any of
|
28
|
+
# them. The total number of roles and permissions should be equal or less than
|
29
|
+
# 10.
|
30
|
+
class AccessSelector
|
31
|
+
include Google::Apis::Core::Hashable
|
32
|
+
|
33
|
+
# Optional. The permissions to appear in result.
|
34
|
+
# Corresponds to the JSON property `permissions`
|
35
|
+
# @return [Array<String>]
|
36
|
+
attr_accessor :permissions
|
37
|
+
|
38
|
+
# Optional. The roles to appear in result.
|
39
|
+
# Corresponds to the JSON property `roles`
|
40
|
+
# @return [Array<String>]
|
41
|
+
attr_accessor :roles
|
42
|
+
|
43
|
+
def initialize(**args)
|
44
|
+
update!(**args)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Update properties of this object
|
48
|
+
def update!(**args)
|
49
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
50
|
+
@roles = args[:roles] if args.key?(:roles)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# A response message for AssetService.AnalyzeIamPolicy.
|
55
|
+
class AnalyzeIamPolicyResponse
|
56
|
+
include Google::Apis::Core::Hashable
|
57
|
+
|
58
|
+
# Represents whether all entries in the main_analysis and
|
59
|
+
# service_account_impersonation_analysis have been fully explored to answer the
|
60
|
+
# query in the request.
|
61
|
+
# Corresponds to the JSON property `fullyExplored`
|
62
|
+
# @return [Boolean]
|
63
|
+
attr_accessor :fully_explored
|
64
|
+
alias_method :fully_explored?, :fully_explored
|
65
|
+
|
66
|
+
# An analysis message to group the query and results.
|
67
|
+
# Corresponds to the JSON property `mainAnalysis`
|
68
|
+
# @return [Google::Apis::CloudassetV1p4beta1::IamPolicyAnalysis]
|
69
|
+
attr_accessor :main_analysis
|
70
|
+
|
71
|
+
# A list of non-critical errors happened during the request handling to explain
|
72
|
+
# why `fully_explored` is false, or empty if no error happened.
|
73
|
+
# Corresponds to the JSON property `nonCriticalErrors`
|
74
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AnalysisState>]
|
75
|
+
attr_accessor :non_critical_errors
|
76
|
+
|
77
|
+
# The service account impersonation analysis if AnalyzeIamPolicyRequest.
|
78
|
+
# analyze_service_account_impersonation is enabled.
|
79
|
+
# Corresponds to the JSON property `serviceAccountImpersonationAnalysis`
|
80
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::IamPolicyAnalysis>]
|
81
|
+
attr_accessor :service_account_impersonation_analysis
|
82
|
+
|
83
|
+
def initialize(**args)
|
84
|
+
update!(**args)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Update properties of this object
|
88
|
+
def update!(**args)
|
89
|
+
@fully_explored = args[:fully_explored] if args.key?(:fully_explored)
|
90
|
+
@main_analysis = args[:main_analysis] if args.key?(:main_analysis)
|
91
|
+
@non_critical_errors = args[:non_critical_errors] if args.key?(:non_critical_errors)
|
92
|
+
@service_account_impersonation_analysis = args[:service_account_impersonation_analysis] if args.key?(:service_account_impersonation_analysis)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# Associates `members` with a `role`.
|
97
|
+
class Binding
|
98
|
+
include Google::Apis::Core::Hashable
|
99
|
+
|
100
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
101
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
102
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
103
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
104
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
105
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
106
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
107
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
108
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
109
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
110
|
+
# string" description: "Create a notification string with a timestamp."
|
111
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
112
|
+
# exact variables and functions that may be referenced within an expression are
|
113
|
+
# determined by the service that evaluates it. See the service documentation for
|
114
|
+
# additional information.
|
115
|
+
# Corresponds to the JSON property `condition`
|
116
|
+
# @return [Google::Apis::CloudassetV1p4beta1::Expr]
|
117
|
+
attr_accessor :condition
|
118
|
+
|
119
|
+
# Specifies the identities requesting access for a Cloud Platform resource. `
|
120
|
+
# members` can have the following values: * `allUsers`: A special identifier
|
121
|
+
# that represents anyone who is on the internet; with or without a Google
|
122
|
+
# account. * `allAuthenticatedUsers`: A special identifier that represents
|
123
|
+
# anyone who is authenticated with a Google account or a service account. * `
|
124
|
+
# user:`emailid``: An email address that represents a specific Google account.
|
125
|
+
# For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
|
126
|
+
# address that represents a service account. For example, `my-other-app@appspot.
|
127
|
+
# gserviceaccount.com`. * `group:`emailid``: An email address that represents a
|
128
|
+
# Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
|
129
|
+
# `uniqueid``: An email address (plus unique identifier) representing a user
|
130
|
+
# that has been recently deleted. For example, `alice@example.com?uid=
|
131
|
+
# 123456789012345678901`. If the user is recovered, this value reverts to `user:`
|
132
|
+
# emailid`` and the recovered user retains the role in the binding. * `deleted:
|
133
|
+
# serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
|
134
|
+
# identifier) representing a service account that has been recently deleted. For
|
135
|
+
# example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
|
136
|
+
# If the service account is undeleted, this value reverts to `serviceAccount:`
|
137
|
+
# emailid`` and the undeleted service account retains the role in the binding. *
|
138
|
+
# `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
|
139
|
+
# identifier) representing a Google group that has been recently deleted. For
|
140
|
+
# example, `admins@example.com?uid=123456789012345678901`. If the group is
|
141
|
+
# recovered, this value reverts to `group:`emailid`` and the recovered group
|
142
|
+
# retains the role in the binding. * `domain:`domain``: The G Suite domain (
|
143
|
+
# primary) that represents all the users of that domain. For example, `google.
|
144
|
+
# com` or `example.com`.
|
145
|
+
# Corresponds to the JSON property `members`
|
146
|
+
# @return [Array<String>]
|
147
|
+
attr_accessor :members
|
148
|
+
|
149
|
+
# Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
|
150
|
+
# , or `roles/owner`.
|
151
|
+
# Corresponds to the JSON property `role`
|
152
|
+
# @return [String]
|
153
|
+
attr_accessor :role
|
154
|
+
|
155
|
+
def initialize(**args)
|
156
|
+
update!(**args)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Update properties of this object
|
160
|
+
def update!(**args)
|
161
|
+
@condition = args[:condition] if args.key?(:condition)
|
162
|
+
@members = args[:members] if args.key?(:members)
|
163
|
+
@role = args[:role] if args.key?(:role)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# A request message for AssetService.ExportIamPolicyAnalysis.
|
168
|
+
class ExportIamPolicyAnalysisRequest
|
169
|
+
include Google::Apis::Core::Hashable
|
170
|
+
|
171
|
+
# IAM policy analysis query message.
|
172
|
+
# Corresponds to the JSON property `analysisQuery`
|
173
|
+
# @return [Google::Apis::CloudassetV1p4beta1::IamPolicyAnalysisQuery]
|
174
|
+
attr_accessor :analysis_query
|
175
|
+
|
176
|
+
# Contains request options.
|
177
|
+
# Corresponds to the JSON property `options`
|
178
|
+
# @return [Google::Apis::CloudassetV1p4beta1::Options]
|
179
|
+
attr_accessor :options
|
180
|
+
|
181
|
+
# Output configuration for export IAM policy analysis destination.
|
182
|
+
# Corresponds to the JSON property `outputConfig`
|
183
|
+
# @return [Google::Apis::CloudassetV1p4beta1::IamPolicyAnalysisOutputConfig]
|
184
|
+
attr_accessor :output_config
|
185
|
+
|
186
|
+
def initialize(**args)
|
187
|
+
update!(**args)
|
188
|
+
end
|
189
|
+
|
190
|
+
# Update properties of this object
|
191
|
+
def update!(**args)
|
192
|
+
@analysis_query = args[:analysis_query] if args.key?(:analysis_query)
|
193
|
+
@options = args[:options] if args.key?(:options)
|
194
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
199
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
200
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
201
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
202
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
203
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
204
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
205
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
206
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
207
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
208
|
+
# string" description: "Create a notification string with a timestamp."
|
209
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
210
|
+
# exact variables and functions that may be referenced within an expression are
|
211
|
+
# determined by the service that evaluates it. See the service documentation for
|
212
|
+
# additional information.
|
213
|
+
class Expr
|
214
|
+
include Google::Apis::Core::Hashable
|
215
|
+
|
216
|
+
# Optional. Description of the expression. This is a longer text which describes
|
217
|
+
# the expression, e.g. when hovered over it in a UI.
|
218
|
+
# Corresponds to the JSON property `description`
|
219
|
+
# @return [String]
|
220
|
+
attr_accessor :description
|
221
|
+
|
222
|
+
# Textual representation of an expression in Common Expression Language syntax.
|
223
|
+
# Corresponds to the JSON property `expression`
|
224
|
+
# @return [String]
|
225
|
+
attr_accessor :expression
|
226
|
+
|
227
|
+
# Optional. String indicating the location of the expression for error reporting,
|
228
|
+
# e.g. a file name and a position in the file.
|
229
|
+
# Corresponds to the JSON property `location`
|
230
|
+
# @return [String]
|
231
|
+
attr_accessor :location
|
232
|
+
|
233
|
+
# Optional. Title for the expression, i.e. a short string describing its purpose.
|
234
|
+
# This can be used e.g. in UIs which allow to enter the expression.
|
235
|
+
# Corresponds to the JSON property `title`
|
236
|
+
# @return [String]
|
237
|
+
attr_accessor :title
|
238
|
+
|
239
|
+
def initialize(**args)
|
240
|
+
update!(**args)
|
241
|
+
end
|
242
|
+
|
243
|
+
# Update properties of this object
|
244
|
+
def update!(**args)
|
245
|
+
@description = args[:description] if args.key?(:description)
|
246
|
+
@expression = args[:expression] if args.key?(:expression)
|
247
|
+
@location = args[:location] if args.key?(:location)
|
248
|
+
@title = args[:title] if args.key?(:title)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
# A Cloud Storage location.
|
253
|
+
class GcsDestination
|
254
|
+
include Google::Apis::Core::Hashable
|
255
|
+
|
256
|
+
# Required. The uri of the Cloud Storage object. It's the same uri that is used
|
257
|
+
# by gsutil. For example: "gs://bucket_name/object_name". See [Quickstart: Using
|
258
|
+
# the gsutil tool] (https://cloud.google.com/storage/docs/quickstart-gsutil) for
|
259
|
+
# examples.
|
260
|
+
# Corresponds to the JSON property `uri`
|
261
|
+
# @return [String]
|
262
|
+
attr_accessor :uri
|
263
|
+
|
264
|
+
def initialize(**args)
|
265
|
+
update!(**args)
|
266
|
+
end
|
267
|
+
|
268
|
+
# Update properties of this object
|
269
|
+
def update!(**args)
|
270
|
+
@uri = args[:uri] if args.key?(:uri)
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
# An IAM role or permission under analysis.
|
275
|
+
class GoogleCloudAssetV1p4beta1Access
|
276
|
+
include Google::Apis::Core::Hashable
|
277
|
+
|
278
|
+
# Represents the detailed state of an entity under analysis, such as a resource,
|
279
|
+
# an identity or an access.
|
280
|
+
# Corresponds to the JSON property `analysisState`
|
281
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AnalysisState]
|
282
|
+
attr_accessor :analysis_state
|
283
|
+
|
284
|
+
# The permission.
|
285
|
+
# Corresponds to the JSON property `permission`
|
286
|
+
# @return [String]
|
287
|
+
attr_accessor :permission
|
288
|
+
|
289
|
+
# The role.
|
290
|
+
# Corresponds to the JSON property `role`
|
291
|
+
# @return [String]
|
292
|
+
attr_accessor :role
|
293
|
+
|
294
|
+
def initialize(**args)
|
295
|
+
update!(**args)
|
296
|
+
end
|
297
|
+
|
298
|
+
# Update properties of this object
|
299
|
+
def update!(**args)
|
300
|
+
@analysis_state = args[:analysis_state] if args.key?(:analysis_state)
|
301
|
+
@permission = args[:permission] if args.key?(:permission)
|
302
|
+
@role = args[:role] if args.key?(:role)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
# An access control list, derived from the above IAM policy binding, which
|
307
|
+
# contains a set of resources and accesses. May include one item from each set
|
308
|
+
# to compose an access control entry. NOTICE that there could be multiple access
|
309
|
+
# control lists for one IAM policy binding. The access control lists are created
|
310
|
+
# based on resource and access combinations. For example, assume we have the
|
311
|
+
# following cases in one IAM policy binding: - Permission P1 and P2 apply to
|
312
|
+
# resource R1 and R2; - Permission P3 applies to resource R2 and R3; This will
|
313
|
+
# result in the following access control lists: - AccessControlList 1: [R1, R2],
|
314
|
+
# [P1, P2] - AccessControlList 2: [R2, R3], [P3]
|
315
|
+
class GoogleCloudAssetV1p4beta1AccessControlList
|
316
|
+
include Google::Apis::Core::Hashable
|
317
|
+
|
318
|
+
# The accesses that match one of the following conditions: - The access_selector,
|
319
|
+
# if it is specified in request; - Otherwise, access specifiers reachable from
|
320
|
+
# the policy binding's role.
|
321
|
+
# Corresponds to the JSON property `accesses`
|
322
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1Access>]
|
323
|
+
attr_accessor :accesses
|
324
|
+
|
325
|
+
# Resource edges of the graph starting from the policy attached resource to any
|
326
|
+
# descendant resources. The Edge.source_node contains the full resource name of
|
327
|
+
# a parent resource and Edge.target_node contains the full resource name of a
|
328
|
+
# child resource. This field is present only if the output_resource_edges option
|
329
|
+
# is enabled in request.
|
330
|
+
# Corresponds to the JSON property `resourceEdges`
|
331
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1Edge>]
|
332
|
+
attr_accessor :resource_edges
|
333
|
+
|
334
|
+
# The resources that match one of the following conditions: - The
|
335
|
+
# resource_selector, if it is specified in request; - Otherwise, resources
|
336
|
+
# reachable from the policy attached resource.
|
337
|
+
# Corresponds to the JSON property `resources`
|
338
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1Resource>]
|
339
|
+
attr_accessor :resources
|
340
|
+
|
341
|
+
def initialize(**args)
|
342
|
+
update!(**args)
|
343
|
+
end
|
344
|
+
|
345
|
+
# Update properties of this object
|
346
|
+
def update!(**args)
|
347
|
+
@accesses = args[:accesses] if args.key?(:accesses)
|
348
|
+
@resource_edges = args[:resource_edges] if args.key?(:resource_edges)
|
349
|
+
@resources = args[:resources] if args.key?(:resources)
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
# Represents the detailed state of an entity under analysis, such as a resource,
|
354
|
+
# an identity or an access.
|
355
|
+
class GoogleCloudAssetV1p4beta1AnalysisState
|
356
|
+
include Google::Apis::Core::Hashable
|
357
|
+
|
358
|
+
# The human-readable description of the cause of failure.
|
359
|
+
# Corresponds to the JSON property `cause`
|
360
|
+
# @return [String]
|
361
|
+
attr_accessor :cause
|
362
|
+
|
363
|
+
# The Google standard error code that best describes the state. For example: -
|
364
|
+
# OK means the analysis on this entity has been successfully finished; -
|
365
|
+
# PERMISSION_DENIED means an access denied error is encountered; -
|
366
|
+
# DEADLINE_EXCEEDED means the analysis on this entity hasn't been started in
|
367
|
+
# time;
|
368
|
+
# Corresponds to the JSON property `code`
|
369
|
+
# @return [String]
|
370
|
+
attr_accessor :code
|
371
|
+
|
372
|
+
def initialize(**args)
|
373
|
+
update!(**args)
|
374
|
+
end
|
375
|
+
|
376
|
+
# Update properties of this object
|
377
|
+
def update!(**args)
|
378
|
+
@cause = args[:cause] if args.key?(:cause)
|
379
|
+
@code = args[:code] if args.key?(:code)
|
380
|
+
end
|
381
|
+
end
|
382
|
+
|
383
|
+
# A directional edge.
|
384
|
+
class GoogleCloudAssetV1p4beta1Edge
|
385
|
+
include Google::Apis::Core::Hashable
|
386
|
+
|
387
|
+
# The source node of the edge.
|
388
|
+
# Corresponds to the JSON property `sourceNode`
|
389
|
+
# @return [String]
|
390
|
+
attr_accessor :source_node
|
391
|
+
|
392
|
+
# The target node of the edge.
|
393
|
+
# Corresponds to the JSON property `targetNode`
|
394
|
+
# @return [String]
|
395
|
+
attr_accessor :target_node
|
396
|
+
|
397
|
+
def initialize(**args)
|
398
|
+
update!(**args)
|
399
|
+
end
|
400
|
+
|
401
|
+
# Update properties of this object
|
402
|
+
def update!(**args)
|
403
|
+
@source_node = args[:source_node] if args.key?(:source_node)
|
404
|
+
@target_node = args[:target_node] if args.key?(:target_node)
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
# An identity under analysis.
|
409
|
+
class GoogleCloudAssetV1p4beta1Identity
|
410
|
+
include Google::Apis::Core::Hashable
|
411
|
+
|
412
|
+
# Represents the detailed state of an entity under analysis, such as a resource,
|
413
|
+
# an identity or an access.
|
414
|
+
# Corresponds to the JSON property `analysisState`
|
415
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AnalysisState]
|
416
|
+
attr_accessor :analysis_state
|
417
|
+
|
418
|
+
# The identity name in any form of members appear in [IAM policy binding](https:/
|
419
|
+
# /cloud.google.com/iam/reference/rest/v1/Binding), such as: - user:foo@google.
|
420
|
+
# com - group:group1@google.com - serviceAccount:s1@prj1.iam.gserviceaccount.com
|
421
|
+
# - projectOwner:some_project_id - domain:google.com - allUsers - etc.
|
422
|
+
# Corresponds to the JSON property `name`
|
423
|
+
# @return [String]
|
424
|
+
attr_accessor :name
|
425
|
+
|
426
|
+
def initialize(**args)
|
427
|
+
update!(**args)
|
428
|
+
end
|
429
|
+
|
430
|
+
# Update properties of this object
|
431
|
+
def update!(**args)
|
432
|
+
@analysis_state = args[:analysis_state] if args.key?(:analysis_state)
|
433
|
+
@name = args[:name] if args.key?(:name)
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
#
|
438
|
+
class GoogleCloudAssetV1p4beta1IdentityList
|
439
|
+
include Google::Apis::Core::Hashable
|
440
|
+
|
441
|
+
# Group identity edges of the graph starting from the binding's group members to
|
442
|
+
# any node of the identities. The Edge.source_node contains a group, such as "
|
443
|
+
# group:parent@google.com". The Edge.target_node contains a member of the group,
|
444
|
+
# such as "group:child@google.com" or "user:foo@google.com". This field is
|
445
|
+
# present only if the output_group_edges option is enabled in request.
|
446
|
+
# Corresponds to the JSON property `groupEdges`
|
447
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1Edge>]
|
448
|
+
attr_accessor :group_edges
|
449
|
+
|
450
|
+
# Only the identities that match one of the following conditions will be
|
451
|
+
# presented: - The identity_selector, if it is specified in request; - Otherwise,
|
452
|
+
# identities reachable from the policy binding's members.
|
453
|
+
# Corresponds to the JSON property `identities`
|
454
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1Identity>]
|
455
|
+
attr_accessor :identities
|
456
|
+
|
457
|
+
def initialize(**args)
|
458
|
+
update!(**args)
|
459
|
+
end
|
460
|
+
|
461
|
+
# Update properties of this object
|
462
|
+
def update!(**args)
|
463
|
+
@group_edges = args[:group_edges] if args.key?(:group_edges)
|
464
|
+
@identities = args[:identities] if args.key?(:identities)
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
# A Google Cloud resource under analysis.
|
469
|
+
class GoogleCloudAssetV1p4beta1Resource
|
470
|
+
include Google::Apis::Core::Hashable
|
471
|
+
|
472
|
+
# Represents the detailed state of an entity under analysis, such as a resource,
|
473
|
+
# an identity or an access.
|
474
|
+
# Corresponds to the JSON property `analysisState`
|
475
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AnalysisState]
|
476
|
+
attr_accessor :analysis_state
|
477
|
+
|
478
|
+
# The [full resource name](https://cloud.google.com/asset-inventory/docs/
|
479
|
+
# resource-name-format)
|
480
|
+
# Corresponds to the JSON property `fullResourceName`
|
481
|
+
# @return [String]
|
482
|
+
attr_accessor :full_resource_name
|
483
|
+
|
484
|
+
def initialize(**args)
|
485
|
+
update!(**args)
|
486
|
+
end
|
487
|
+
|
488
|
+
# Update properties of this object
|
489
|
+
def update!(**args)
|
490
|
+
@analysis_state = args[:analysis_state] if args.key?(:analysis_state)
|
491
|
+
@full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
|
492
|
+
end
|
493
|
+
end
|
494
|
+
|
495
|
+
# An analysis message to group the query and results.
|
496
|
+
class IamPolicyAnalysis
|
497
|
+
include Google::Apis::Core::Hashable
|
498
|
+
|
499
|
+
# IAM policy analysis query message.
|
500
|
+
# Corresponds to the JSON property `analysisQuery`
|
501
|
+
# @return [Google::Apis::CloudassetV1p4beta1::IamPolicyAnalysisQuery]
|
502
|
+
attr_accessor :analysis_query
|
503
|
+
|
504
|
+
# A list of IamPolicyAnalysisResult that matches the analysis query, or empty if
|
505
|
+
# no result is found.
|
506
|
+
# Corresponds to the JSON property `analysisResults`
|
507
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::IamPolicyAnalysisResult>]
|
508
|
+
attr_accessor :analysis_results
|
509
|
+
|
510
|
+
# Represents whether all entries in the analysis_results have been fully
|
511
|
+
# explored to answer the query.
|
512
|
+
# Corresponds to the JSON property `fullyExplored`
|
513
|
+
# @return [Boolean]
|
514
|
+
attr_accessor :fully_explored
|
515
|
+
alias_method :fully_explored?, :fully_explored
|
516
|
+
|
517
|
+
def initialize(**args)
|
518
|
+
update!(**args)
|
519
|
+
end
|
520
|
+
|
521
|
+
# Update properties of this object
|
522
|
+
def update!(**args)
|
523
|
+
@analysis_query = args[:analysis_query] if args.key?(:analysis_query)
|
524
|
+
@analysis_results = args[:analysis_results] if args.key?(:analysis_results)
|
525
|
+
@fully_explored = args[:fully_explored] if args.key?(:fully_explored)
|
526
|
+
end
|
527
|
+
end
|
528
|
+
|
529
|
+
# Output configuration for export IAM policy analysis destination.
|
530
|
+
class IamPolicyAnalysisOutputConfig
|
531
|
+
include Google::Apis::Core::Hashable
|
532
|
+
|
533
|
+
# A Cloud Storage location.
|
534
|
+
# Corresponds to the JSON property `gcsDestination`
|
535
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GcsDestination]
|
536
|
+
attr_accessor :gcs_destination
|
537
|
+
|
538
|
+
def initialize(**args)
|
539
|
+
update!(**args)
|
540
|
+
end
|
541
|
+
|
542
|
+
# Update properties of this object
|
543
|
+
def update!(**args)
|
544
|
+
@gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
|
545
|
+
end
|
546
|
+
end
|
547
|
+
|
548
|
+
# IAM policy analysis query message.
|
549
|
+
class IamPolicyAnalysisQuery
|
550
|
+
include Google::Apis::Core::Hashable
|
551
|
+
|
552
|
+
# Specifies roles and/or permissions to analyze, to determine both the
|
553
|
+
# identities possessing them and the resources they control. If multiple values
|
554
|
+
# are specified, results will include identities and resources matching any of
|
555
|
+
# them. The total number of roles and permissions should be equal or less than
|
556
|
+
# 10.
|
557
|
+
# Corresponds to the JSON property `accessSelector`
|
558
|
+
# @return [Google::Apis::CloudassetV1p4beta1::AccessSelector]
|
559
|
+
attr_accessor :access_selector
|
560
|
+
|
561
|
+
# Specifies an identity for which to determine resource access, based on roles
|
562
|
+
# assigned either directly to them or to the groups they belong to, directly or
|
563
|
+
# indirectly.
|
564
|
+
# Corresponds to the JSON property `identitySelector`
|
565
|
+
# @return [Google::Apis::CloudassetV1p4beta1::IdentitySelector]
|
566
|
+
attr_accessor :identity_selector
|
567
|
+
|
568
|
+
# Required. The relative name of the root asset. Only resources and IAM policies
|
569
|
+
# within the parent will be analyzed. This can only be an organization number (
|
570
|
+
# such as "organizations/123"), a folder number (such as "folders/123"), a
|
571
|
+
# project ID (such as "projects/my-project-id"), or a project number (such as "
|
572
|
+
# projects/12345"). To know how to get organization id, visit [here ](https://
|
573
|
+
# cloud.google.com/resource-manager/docs/creating-managing-organization#
|
574
|
+
# retrieving_your_organization_id). To know how to get folder or project id,
|
575
|
+
# visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-
|
576
|
+
# folders#viewing_or_listing_folders_and_projects).
|
577
|
+
# Corresponds to the JSON property `parent`
|
578
|
+
# @return [String]
|
579
|
+
attr_accessor :parent
|
580
|
+
|
581
|
+
# Specifies the resource to analyze for access policies, which may be set
|
582
|
+
# directly on the resource, or on ancestors such as organizations, folders or
|
583
|
+
# projects.
|
584
|
+
# Corresponds to the JSON property `resourceSelector`
|
585
|
+
# @return [Google::Apis::CloudassetV1p4beta1::ResourceSelector]
|
586
|
+
attr_accessor :resource_selector
|
587
|
+
|
588
|
+
def initialize(**args)
|
589
|
+
update!(**args)
|
590
|
+
end
|
591
|
+
|
592
|
+
# Update properties of this object
|
593
|
+
def update!(**args)
|
594
|
+
@access_selector = args[:access_selector] if args.key?(:access_selector)
|
595
|
+
@identity_selector = args[:identity_selector] if args.key?(:identity_selector)
|
596
|
+
@parent = args[:parent] if args.key?(:parent)
|
597
|
+
@resource_selector = args[:resource_selector] if args.key?(:resource_selector)
|
598
|
+
end
|
599
|
+
end
|
600
|
+
|
601
|
+
# IAM Policy analysis result, consisting of one IAM policy binding and derived
|
602
|
+
# access control lists.
|
603
|
+
class IamPolicyAnalysisResult
|
604
|
+
include Google::Apis::Core::Hashable
|
605
|
+
|
606
|
+
# The access control lists derived from the iam_binding that match or
|
607
|
+
# potentially match resource and access selectors specified in the request.
|
608
|
+
# Corresponds to the JSON property `accessControlLists`
|
609
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AccessControlList>]
|
610
|
+
attr_accessor :access_control_lists
|
611
|
+
|
612
|
+
# The [full resource name](https://cloud.google.com/asset-inventory/docs/
|
613
|
+
# resource-name-format) of the resource to which the iam_binding policy attaches.
|
614
|
+
# Corresponds to the JSON property `attachedResourceFullName`
|
615
|
+
# @return [String]
|
616
|
+
attr_accessor :attached_resource_full_name
|
617
|
+
|
618
|
+
# Represents whether all analyses on the iam_binding have successfully finished.
|
619
|
+
# Corresponds to the JSON property `fullyExplored`
|
620
|
+
# @return [Boolean]
|
621
|
+
attr_accessor :fully_explored
|
622
|
+
alias_method :fully_explored?, :fully_explored
|
623
|
+
|
624
|
+
# Associates `members` with a `role`.
|
625
|
+
# Corresponds to the JSON property `iamBinding`
|
626
|
+
# @return [Google::Apis::CloudassetV1p4beta1::Binding]
|
627
|
+
attr_accessor :iam_binding
|
628
|
+
|
629
|
+
# The identity list derived from members of the iam_binding that match or
|
630
|
+
# potentially match identity selector specified in the request.
|
631
|
+
# Corresponds to the JSON property `identityList`
|
632
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1IdentityList]
|
633
|
+
attr_accessor :identity_list
|
634
|
+
|
635
|
+
def initialize(**args)
|
636
|
+
update!(**args)
|
637
|
+
end
|
638
|
+
|
639
|
+
# Update properties of this object
|
640
|
+
def update!(**args)
|
641
|
+
@access_control_lists = args[:access_control_lists] if args.key?(:access_control_lists)
|
642
|
+
@attached_resource_full_name = args[:attached_resource_full_name] if args.key?(:attached_resource_full_name)
|
643
|
+
@fully_explored = args[:fully_explored] if args.key?(:fully_explored)
|
644
|
+
@iam_binding = args[:iam_binding] if args.key?(:iam_binding)
|
645
|
+
@identity_list = args[:identity_list] if args.key?(:identity_list)
|
646
|
+
end
|
647
|
+
end
|
648
|
+
|
649
|
+
# Specifies an identity for which to determine resource access, based on roles
|
650
|
+
# assigned either directly to them or to the groups they belong to, directly or
|
651
|
+
# indirectly.
|
652
|
+
class IdentitySelector
|
653
|
+
include Google::Apis::Core::Hashable
|
654
|
+
|
655
|
+
# Required. The identity appear in the form of members in [IAM policy binding](
|
656
|
+
# https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of
|
657
|
+
# supported forms are: "user:mike@example.com", "group:admins@example.com", "
|
658
|
+
# domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com".
|
659
|
+
# Notice that wildcard characters (such as * and ?) are not supported. You must
|
660
|
+
# give a specific identity.
|
661
|
+
# Corresponds to the JSON property `identity`
|
662
|
+
# @return [String]
|
663
|
+
attr_accessor :identity
|
664
|
+
|
665
|
+
def initialize(**args)
|
666
|
+
update!(**args)
|
667
|
+
end
|
668
|
+
|
669
|
+
# Update properties of this object
|
670
|
+
def update!(**args)
|
671
|
+
@identity = args[:identity] if args.key?(:identity)
|
672
|
+
end
|
673
|
+
end
|
674
|
+
|
675
|
+
# This resource represents a long-running operation that is the result of a
|
676
|
+
# network API call.
|
677
|
+
class Operation
|
678
|
+
include Google::Apis::Core::Hashable
|
679
|
+
|
680
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
681
|
+
# , the operation is completed, and either `error` or `response` is available.
|
682
|
+
# Corresponds to the JSON property `done`
|
683
|
+
# @return [Boolean]
|
684
|
+
attr_accessor :done
|
685
|
+
alias_method :done?, :done
|
686
|
+
|
687
|
+
# The `Status` type defines a logical error model that is suitable for different
|
688
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
689
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
690
|
+
# data: error code, error message, and error details. You can find out more
|
691
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
692
|
+
# //cloud.google.com/apis/design/errors).
|
693
|
+
# Corresponds to the JSON property `error`
|
694
|
+
# @return [Google::Apis::CloudassetV1p4beta1::Status]
|
695
|
+
attr_accessor :error
|
696
|
+
|
697
|
+
# Service-specific metadata associated with the operation. It typically contains
|
698
|
+
# progress information and common metadata such as create time. Some services
|
699
|
+
# might not provide such metadata. Any method that returns a long-running
|
700
|
+
# operation should document the metadata type, if any.
|
701
|
+
# Corresponds to the JSON property `metadata`
|
702
|
+
# @return [Hash<String,Object>]
|
703
|
+
attr_accessor :metadata
|
704
|
+
|
705
|
+
# The server-assigned name, which is only unique within the same service that
|
706
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
707
|
+
# be a resource name ending with `operations/`unique_id``.
|
708
|
+
# Corresponds to the JSON property `name`
|
709
|
+
# @return [String]
|
710
|
+
attr_accessor :name
|
711
|
+
|
712
|
+
# The normal response of the operation in case of success. If the original
|
713
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
714
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
715
|
+
# the response should be the resource. For other methods, the response should
|
716
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
717
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
718
|
+
# response type is `TakeSnapshotResponse`.
|
719
|
+
# Corresponds to the JSON property `response`
|
720
|
+
# @return [Hash<String,Object>]
|
721
|
+
attr_accessor :response
|
722
|
+
|
723
|
+
def initialize(**args)
|
724
|
+
update!(**args)
|
725
|
+
end
|
726
|
+
|
727
|
+
# Update properties of this object
|
728
|
+
def update!(**args)
|
729
|
+
@done = args[:done] if args.key?(:done)
|
730
|
+
@error = args[:error] if args.key?(:error)
|
731
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
732
|
+
@name = args[:name] if args.key?(:name)
|
733
|
+
@response = args[:response] if args.key?(:response)
|
734
|
+
end
|
735
|
+
end
|
736
|
+
|
737
|
+
# Contains request options.
|
738
|
+
class Options
|
739
|
+
include Google::Apis::Core::Hashable
|
740
|
+
|
741
|
+
# Optional. If true, the response will include access analysis from identities
|
742
|
+
# to resources via service account impersonation. This is a very expensive
|
743
|
+
# operation, because many derived queries will be executed. For example, if the
|
744
|
+
# request analyzes for which resources user A has permission P, and there's an
|
745
|
+
# IAM policy states user A has iam.serviceAccounts.getAccessToken permission to
|
746
|
+
# a service account SA, and there's another IAM policy states service account SA
|
747
|
+
# has permission P to a GCP folder F, then user A potentially has access to the
|
748
|
+
# GCP folder F. And those advanced analysis results will be included in
|
749
|
+
# AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another
|
750
|
+
# example, if the request analyzes for who has permission P to a GCP folder F,
|
751
|
+
# and there's an IAM policy states user A has iam.serviceAccounts.actAs
|
752
|
+
# permission to a service account SA, and there's another IAM policy states
|
753
|
+
# service account SA has permission P to the GCP folder F, then user A
|
754
|
+
# potentially has access to the GCP folder F. And those advanced analysis
|
755
|
+
# results will be included in AnalyzeIamPolicyResponse.
|
756
|
+
# service_account_impersonation_analysis. Default is false.
|
757
|
+
# Corresponds to the JSON property `analyzeServiceAccountImpersonation`
|
758
|
+
# @return [Boolean]
|
759
|
+
attr_accessor :analyze_service_account_impersonation
|
760
|
+
alias_method :analyze_service_account_impersonation?, :analyze_service_account_impersonation
|
761
|
+
|
762
|
+
# Optional. If true, the identities section of the result will expand any Google
|
763
|
+
# groups appearing in an IAM policy binding. If identity_selector is specified,
|
764
|
+
# the identity in the result will be determined by the selector, and this flag
|
765
|
+
# will have no effect. Default is false.
|
766
|
+
# Corresponds to the JSON property `expandGroups`
|
767
|
+
# @return [Boolean]
|
768
|
+
attr_accessor :expand_groups
|
769
|
+
alias_method :expand_groups?, :expand_groups
|
770
|
+
|
771
|
+
# Optional. If true, the resource section of the result will expand any resource
|
772
|
+
# attached to an IAM policy to include resources lower in the resource hierarchy.
|
773
|
+
# For example, if the request analyzes for which resources user A has
|
774
|
+
# permission P, and the results include an IAM policy with P on a GCP folder,
|
775
|
+
# the results will also include resources in that folder with permission P. If
|
776
|
+
# resource_selector is specified, the resource section of the result will be
|
777
|
+
# determined by the selector, and this flag will have no effect. Default is
|
778
|
+
# false.
|
779
|
+
# Corresponds to the JSON property `expandResources`
|
780
|
+
# @return [Boolean]
|
781
|
+
attr_accessor :expand_resources
|
782
|
+
alias_method :expand_resources?, :expand_resources
|
783
|
+
|
784
|
+
# Optional. If true, the access section of result will expand any roles
|
785
|
+
# appearing in IAM policy bindings to include their permissions. If
|
786
|
+
# access_selector is specified, the access section of the result will be
|
787
|
+
# determined by the selector, and this flag will have no effect. Default is
|
788
|
+
# false.
|
789
|
+
# Corresponds to the JSON property `expandRoles`
|
790
|
+
# @return [Boolean]
|
791
|
+
attr_accessor :expand_roles
|
792
|
+
alias_method :expand_roles?, :expand_roles
|
793
|
+
|
794
|
+
# Optional. If true, the result will output group identity edges, starting from
|
795
|
+
# the binding's group members, to any expanded identities. Default is false.
|
796
|
+
# Corresponds to the JSON property `outputGroupEdges`
|
797
|
+
# @return [Boolean]
|
798
|
+
attr_accessor :output_group_edges
|
799
|
+
alias_method :output_group_edges?, :output_group_edges
|
800
|
+
|
801
|
+
# Optional. If true, the result will output resource edges, starting from the
|
802
|
+
# policy attached resource, to any expanded resources. Default is false.
|
803
|
+
# Corresponds to the JSON property `outputResourceEdges`
|
804
|
+
# @return [Boolean]
|
805
|
+
attr_accessor :output_resource_edges
|
806
|
+
alias_method :output_resource_edges?, :output_resource_edges
|
807
|
+
|
808
|
+
def initialize(**args)
|
809
|
+
update!(**args)
|
810
|
+
end
|
811
|
+
|
812
|
+
# Update properties of this object
|
813
|
+
def update!(**args)
|
814
|
+
@analyze_service_account_impersonation = args[:analyze_service_account_impersonation] if args.key?(:analyze_service_account_impersonation)
|
815
|
+
@expand_groups = args[:expand_groups] if args.key?(:expand_groups)
|
816
|
+
@expand_resources = args[:expand_resources] if args.key?(:expand_resources)
|
817
|
+
@expand_roles = args[:expand_roles] if args.key?(:expand_roles)
|
818
|
+
@output_group_edges = args[:output_group_edges] if args.key?(:output_group_edges)
|
819
|
+
@output_resource_edges = args[:output_resource_edges] if args.key?(:output_resource_edges)
|
820
|
+
end
|
821
|
+
end
|
822
|
+
|
823
|
+
# Specifies the resource to analyze for access policies, which may be set
|
824
|
+
# directly on the resource, or on ancestors such as organizations, folders or
|
825
|
+
# projects.
|
826
|
+
class ResourceSelector
|
827
|
+
include Google::Apis::Core::Hashable
|
828
|
+
|
829
|
+
# Required. The [full resource name](https://cloud.google.com/asset-inventory/
|
830
|
+
# docs/resource-name-format) of a resource of [supported resource types](https://
|
831
|
+
# cloud.google.com/asset-inventory/docs/supported-asset-types#
|
832
|
+
# analyzable_asset_types).
|
833
|
+
# Corresponds to the JSON property `fullResourceName`
|
834
|
+
# @return [String]
|
835
|
+
attr_accessor :full_resource_name
|
836
|
+
|
837
|
+
def initialize(**args)
|
838
|
+
update!(**args)
|
839
|
+
end
|
840
|
+
|
841
|
+
# Update properties of this object
|
842
|
+
def update!(**args)
|
843
|
+
@full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
|
844
|
+
end
|
845
|
+
end
|
846
|
+
|
847
|
+
# The `Status` type defines a logical error model that is suitable for different
|
848
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
849
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
850
|
+
# data: error code, error message, and error details. You can find out more
|
851
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
852
|
+
# //cloud.google.com/apis/design/errors).
|
853
|
+
class Status
|
854
|
+
include Google::Apis::Core::Hashable
|
855
|
+
|
856
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
857
|
+
# Corresponds to the JSON property `code`
|
858
|
+
# @return [Fixnum]
|
859
|
+
attr_accessor :code
|
860
|
+
|
861
|
+
# A list of messages that carry the error details. There is a common set of
|
862
|
+
# message types for APIs to use.
|
863
|
+
# Corresponds to the JSON property `details`
|
864
|
+
# @return [Array<Hash<String,Object>>]
|
865
|
+
attr_accessor :details
|
866
|
+
|
867
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
868
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
869
|
+
# field, or localized by the client.
|
870
|
+
# Corresponds to the JSON property `message`
|
871
|
+
# @return [String]
|
872
|
+
attr_accessor :message
|
873
|
+
|
874
|
+
def initialize(**args)
|
875
|
+
update!(**args)
|
876
|
+
end
|
877
|
+
|
878
|
+
# Update properties of this object
|
879
|
+
def update!(**args)
|
880
|
+
@code = args[:code] if args.key?(:code)
|
881
|
+
@details = args[:details] if args.key?(:details)
|
882
|
+
@message = args[:message] if args.key?(:message)
|
883
|
+
end
|
884
|
+
end
|
885
|
+
end
|
886
|
+
end
|
887
|
+
end
|