google-apis-accesscontextmanager_v1 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-accesscontextmanager_v1.rb +15 -0
- data/lib/google/apis/accesscontextmanager_v1.rb +36 -0
- data/lib/google/apis/accesscontextmanager_v1/classes.rb +1346 -0
- data/lib/google/apis/accesscontextmanager_v1/gem_version.rb +28 -0
- data/lib/google/apis/accesscontextmanager_v1/representations.rb +582 -0
- data/lib/google/apis/accesscontextmanager_v1/service.rb +1065 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 96e64d9ae39978cc0e9c3ad48edbce361707f8a803403b095bd6671d5bd3315f
|
4
|
+
data.tar.gz: 8ce006beabc0c739902873e999adb416448b362299fdc1c2b0d39e44ef783800
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ee6888ee223204d159fe9a39f7ead7d6c13dc31645fecb7afc68aecec407a5294641ef033f292d99946c4d4cf14d76679341db1ba70db966b0f12fd0718c74e0
|
7
|
+
data.tar.gz: a71a6cc11355054ae9bf1f0cceaf50020fdb61508b030b9190e03e8df1bc60de22fcd9fce558cba539e58299b49357b0537162b9992cfb391f87b0bb8dbe8a7d
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-accesscontextmanager_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/accesscontextmanager_v1/*.rb
|
9
|
+
lib/google/apis/accesscontextmanager_v1.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 V1 of the Access Context Manager API
|
2
|
+
|
3
|
+
This is a simple client library for version V1 of the Access Context Manager 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/accesscontextmanager.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-accesscontextmanager_v1', '~> 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-accesscontextmanager_v1
|
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/accesscontextmanager_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::AccesscontextmanagerV1::AccessContextManagerService.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 Accesscontextmanager service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Access Context Manager API, see the {Google::Apis::AccesscontextmanagerV1::AccessContextManagerService 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-accesscontextmanager_v1`, 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/access-context-manager/docs/reference/rest/) 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/accesscontextmanager_v1"
|
@@ -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/accesscontextmanager_v1/service.rb'
|
16
|
+
require 'google/apis/accesscontextmanager_v1/classes.rb'
|
17
|
+
require 'google/apis/accesscontextmanager_v1/representations.rb'
|
18
|
+
require 'google/apis/accesscontextmanager_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Access Context Manager API
|
23
|
+
#
|
24
|
+
# An API for setting attribute based access control to requests to GCP services.
|
25
|
+
#
|
26
|
+
# @see https://cloud.google.com/access-context-manager/docs/reference/rest/
|
27
|
+
module AccesscontextmanagerV1
|
28
|
+
# Version of the Access Context Manager API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V1'
|
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,1346 @@
|
|
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 AccesscontextmanagerV1
|
24
|
+
|
25
|
+
# An `AccessLevel` is a label that can be applied to requests to Google Cloud
|
26
|
+
# services, along with a list of requirements necessary for the label to be
|
27
|
+
# applied.
|
28
|
+
class AccessLevel
|
29
|
+
include Google::Apis::Core::Hashable
|
30
|
+
|
31
|
+
# `BasicLevel` is an `AccessLevel` using a set of recommended features.
|
32
|
+
# Corresponds to the JSON property `basic`
|
33
|
+
# @return [Google::Apis::AccesscontextmanagerV1::BasicLevel]
|
34
|
+
attr_accessor :basic
|
35
|
+
|
36
|
+
# `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
|
37
|
+
# to represent the necessary conditions for the level to apply to a request. See
|
38
|
+
# CEL spec at: https://github.com/google/cel-spec
|
39
|
+
# Corresponds to the JSON property `custom`
|
40
|
+
# @return [Google::Apis::AccesscontextmanagerV1::CustomLevel]
|
41
|
+
attr_accessor :custom
|
42
|
+
|
43
|
+
# Description of the `AccessLevel` and its use. Does not affect behavior.
|
44
|
+
# Corresponds to the JSON property `description`
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :description
|
47
|
+
|
48
|
+
# Required. Resource name for the Access Level. The `short_name` component must
|
49
|
+
# begin with a letter and only include alphanumeric and '_'. Format: `
|
50
|
+
# accessPolicies/`policy_id`/accessLevels/`short_name``. The maximum length of
|
51
|
+
# the `short_name` component is 50 characters.
|
52
|
+
# Corresponds to the JSON property `name`
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :name
|
55
|
+
|
56
|
+
# Human readable title. Must be unique within the Policy.
|
57
|
+
# Corresponds to the JSON property `title`
|
58
|
+
# @return [String]
|
59
|
+
attr_accessor :title
|
60
|
+
|
61
|
+
def initialize(**args)
|
62
|
+
update!(**args)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Update properties of this object
|
66
|
+
def update!(**args)
|
67
|
+
@basic = args[:basic] if args.key?(:basic)
|
68
|
+
@custom = args[:custom] if args.key?(:custom)
|
69
|
+
@description = args[:description] if args.key?(:description)
|
70
|
+
@name = args[:name] if args.key?(:name)
|
71
|
+
@title = args[:title] if args.key?(:title)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# `AccessPolicy` is a container for `AccessLevels` (which define the necessary
|
76
|
+
# attributes to use Google Cloud services) and `ServicePerimeters` (which define
|
77
|
+
# regions of services able to freely pass data within a perimeter). An access
|
78
|
+
# policy is globally visible within an organization, and the restrictions it
|
79
|
+
# specifies apply to all projects within an organization.
|
80
|
+
class AccessPolicy
|
81
|
+
include Google::Apis::Core::Hashable
|
82
|
+
|
83
|
+
# Output only. An opaque identifier for the current version of the `AccessPolicy`
|
84
|
+
# . This will always be a strongly validated etag, meaning that two Access
|
85
|
+
# Polices will be identical if and only if their etags are identical. Clients
|
86
|
+
# should not expect this to be in any specific format.
|
87
|
+
# Corresponds to the JSON property `etag`
|
88
|
+
# @return [String]
|
89
|
+
attr_accessor :etag
|
90
|
+
|
91
|
+
# Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/`
|
92
|
+
# policy_id``
|
93
|
+
# Corresponds to the JSON property `name`
|
94
|
+
# @return [String]
|
95
|
+
attr_accessor :name
|
96
|
+
|
97
|
+
# Required. The parent of this `AccessPolicy` in the Cloud Resource Hierarchy.
|
98
|
+
# Currently immutable once created. Format: `organizations/`organization_id``
|
99
|
+
# Corresponds to the JSON property `parent`
|
100
|
+
# @return [String]
|
101
|
+
attr_accessor :parent
|
102
|
+
|
103
|
+
# Required. Human readable title. Does not affect behavior.
|
104
|
+
# Corresponds to the JSON property `title`
|
105
|
+
# @return [String]
|
106
|
+
attr_accessor :title
|
107
|
+
|
108
|
+
def initialize(**args)
|
109
|
+
update!(**args)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Update properties of this object
|
113
|
+
def update!(**args)
|
114
|
+
@etag = args[:etag] if args.key?(:etag)
|
115
|
+
@name = args[:name] if args.key?(:name)
|
116
|
+
@parent = args[:parent] if args.key?(:parent)
|
117
|
+
@title = args[:title] if args.key?(:title)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# Identification for an API Operation.
|
122
|
+
class ApiOperation
|
123
|
+
include Google::Apis::Core::Hashable
|
124
|
+
|
125
|
+
# API methods or permissions to allow. Method or permission must belong to the
|
126
|
+
# service specified by `service_name` field. A single MethodSelector entry with `
|
127
|
+
# *` specified for the `method` field will allow all methods AND permissions for
|
128
|
+
# the service specified in `service_name`.
|
129
|
+
# Corresponds to the JSON property `methodSelectors`
|
130
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::MethodSelector>]
|
131
|
+
attr_accessor :method_selectors
|
132
|
+
|
133
|
+
# The name of the API whose methods or permissions the IngressPolicy or
|
134
|
+
# EgressPolicy want to allow. A single ApiOperation with `service_name` field
|
135
|
+
# set to `*` will allow all methods AND permissions for all services.
|
136
|
+
# Corresponds to the JSON property `serviceName`
|
137
|
+
# @return [String]
|
138
|
+
attr_accessor :service_name
|
139
|
+
|
140
|
+
def initialize(**args)
|
141
|
+
update!(**args)
|
142
|
+
end
|
143
|
+
|
144
|
+
# Update properties of this object
|
145
|
+
def update!(**args)
|
146
|
+
@method_selectors = args[:method_selectors] if args.key?(:method_selectors)
|
147
|
+
@service_name = args[:service_name] if args.key?(:service_name)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
# `BasicLevel` is an `AccessLevel` using a set of recommended features.
|
152
|
+
class BasicLevel
|
153
|
+
include Google::Apis::Core::Hashable
|
154
|
+
|
155
|
+
# How the `conditions` list should be combined to determine if a request is
|
156
|
+
# granted this `AccessLevel`. If AND is used, each `Condition` in `conditions`
|
157
|
+
# must be satisfied for the `AccessLevel` to be applied. If OR is used, at least
|
158
|
+
# one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be
|
159
|
+
# applied. Default behavior is AND.
|
160
|
+
# Corresponds to the JSON property `combiningFunction`
|
161
|
+
# @return [String]
|
162
|
+
attr_accessor :combining_function
|
163
|
+
|
164
|
+
# Required. A list of requirements for the `AccessLevel` to be granted.
|
165
|
+
# Corresponds to the JSON property `conditions`
|
166
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::Condition>]
|
167
|
+
attr_accessor :conditions
|
168
|
+
|
169
|
+
def initialize(**args)
|
170
|
+
update!(**args)
|
171
|
+
end
|
172
|
+
|
173
|
+
# Update properties of this object
|
174
|
+
def update!(**args)
|
175
|
+
@combining_function = args[:combining_function] if args.key?(:combining_function)
|
176
|
+
@conditions = args[:conditions] if args.key?(:conditions)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# The request message for Operations.CancelOperation.
|
181
|
+
class CancelOperationRequest
|
182
|
+
include Google::Apis::Core::Hashable
|
183
|
+
|
184
|
+
def initialize(**args)
|
185
|
+
update!(**args)
|
186
|
+
end
|
187
|
+
|
188
|
+
# Update properties of this object
|
189
|
+
def update!(**args)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# A request to commit dry-run specs in all Service Perimeters belonging to an
|
194
|
+
# Access Policy.
|
195
|
+
class CommitServicePerimetersRequest
|
196
|
+
include Google::Apis::Core::Hashable
|
197
|
+
|
198
|
+
# Optional. The etag for the version of the Access Policy that this commit
|
199
|
+
# operation is to be performed on. If, at the time of commit, the etag for the
|
200
|
+
# Access Policy stored in Access Context Manager is different from the specified
|
201
|
+
# etag, then the commit operation will not be performed and the call will fail.
|
202
|
+
# This field is not required. If etag is not provided, the operation will be
|
203
|
+
# performed as if a valid etag is provided.
|
204
|
+
# Corresponds to the JSON property `etag`
|
205
|
+
# @return [String]
|
206
|
+
attr_accessor :etag
|
207
|
+
|
208
|
+
def initialize(**args)
|
209
|
+
update!(**args)
|
210
|
+
end
|
211
|
+
|
212
|
+
# Update properties of this object
|
213
|
+
def update!(**args)
|
214
|
+
@etag = args[:etag] if args.key?(:etag)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
# A response to CommitServicePerimetersRequest. This will be put inside of
|
219
|
+
# Operation.response field.
|
220
|
+
class CommitServicePerimetersResponse
|
221
|
+
include Google::Apis::Core::Hashable
|
222
|
+
|
223
|
+
# List of all the Service Perimeter instances in the Access Policy.
|
224
|
+
# Corresponds to the JSON property `servicePerimeters`
|
225
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::ServicePerimeter>]
|
226
|
+
attr_accessor :service_perimeters
|
227
|
+
|
228
|
+
def initialize(**args)
|
229
|
+
update!(**args)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Update properties of this object
|
233
|
+
def update!(**args)
|
234
|
+
@service_perimeters = args[:service_perimeters] if args.key?(:service_perimeters)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# A condition necessary for an `AccessLevel` to be granted. The Condition is an
|
239
|
+
# AND over its fields. So a Condition is true if: 1) the request IP is from one
|
240
|
+
# of the listed subnetworks AND 2) the originating device complies with the
|
241
|
+
# listed device policy AND 3) all listed access levels are granted AND 4) the
|
242
|
+
# request was sent at a time allowed by the DateTimeRestriction.
|
243
|
+
class Condition
|
244
|
+
include Google::Apis::Core::Hashable
|
245
|
+
|
246
|
+
# `DevicePolicy` specifies device specific restrictions necessary to acquire a
|
247
|
+
# given access level. A `DevicePolicy` specifies requirements for requests from
|
248
|
+
# devices to be granted access levels, it does not do any enforcement on the
|
249
|
+
# device. `DevicePolicy` acts as an AND over all specified fields, and each
|
250
|
+
# repeated field is an OR over its elements. Any unset fields are ignored. For
|
251
|
+
# example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX,
|
252
|
+
# encryption_status: ENCRYPTED`, then the DevicePolicy will be true for requests
|
253
|
+
# originating from encrypted Linux desktops and encrypted Windows desktops.
|
254
|
+
# Corresponds to the JSON property `devicePolicy`
|
255
|
+
# @return [Google::Apis::AccesscontextmanagerV1::DevicePolicy]
|
256
|
+
attr_accessor :device_policy
|
257
|
+
|
258
|
+
# CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a
|
259
|
+
# CIDR IP address block, the specified IP address portion must be properly
|
260
|
+
# truncated (i.e. all the host bits must be zero) or the input is considered
|
261
|
+
# malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not.
|
262
|
+
# Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is
|
263
|
+
# not. The originating IP of a request must be in one of the listed subnets in
|
264
|
+
# order for this Condition to be true. If empty, all IP addresses are allowed.
|
265
|
+
# Corresponds to the JSON property `ipSubnetworks`
|
266
|
+
# @return [Array<String>]
|
267
|
+
attr_accessor :ip_subnetworks
|
268
|
+
|
269
|
+
# The request must be made by one of the provided user or service accounts.
|
270
|
+
# Groups are not supported. Syntax: `user:`emailid`` `serviceAccount:`emailid``
|
271
|
+
# If not specified, a request may come from any user.
|
272
|
+
# Corresponds to the JSON property `members`
|
273
|
+
# @return [Array<String>]
|
274
|
+
attr_accessor :members
|
275
|
+
|
276
|
+
# Whether to negate the Condition. If true, the Condition becomes a NAND over
|
277
|
+
# its non-empty fields, each field must be false for the Condition overall to be
|
278
|
+
# satisfied. Defaults to false.
|
279
|
+
# Corresponds to the JSON property `negate`
|
280
|
+
# @return [Boolean]
|
281
|
+
attr_accessor :negate
|
282
|
+
alias_method :negate?, :negate
|
283
|
+
|
284
|
+
# The request must originate from one of the provided countries/regions. Must be
|
285
|
+
# valid ISO 3166-1 alpha-2 codes.
|
286
|
+
# Corresponds to the JSON property `regions`
|
287
|
+
# @return [Array<String>]
|
288
|
+
attr_accessor :regions
|
289
|
+
|
290
|
+
# A list of other access levels defined in the same `Policy`, referenced by
|
291
|
+
# resource name. Referencing an `AccessLevel` which does not exist is an error.
|
292
|
+
# All access levels listed must be granted for the Condition to be true. Example:
|
293
|
+
# "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"`
|
294
|
+
# Corresponds to the JSON property `requiredAccessLevels`
|
295
|
+
# @return [Array<String>]
|
296
|
+
attr_accessor :required_access_levels
|
297
|
+
|
298
|
+
def initialize(**args)
|
299
|
+
update!(**args)
|
300
|
+
end
|
301
|
+
|
302
|
+
# Update properties of this object
|
303
|
+
def update!(**args)
|
304
|
+
@device_policy = args[:device_policy] if args.key?(:device_policy)
|
305
|
+
@ip_subnetworks = args[:ip_subnetworks] if args.key?(:ip_subnetworks)
|
306
|
+
@members = args[:members] if args.key?(:members)
|
307
|
+
@negate = args[:negate] if args.key?(:negate)
|
308
|
+
@regions = args[:regions] if args.key?(:regions)
|
309
|
+
@required_access_levels = args[:required_access_levels] if args.key?(:required_access_levels)
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
# `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
|
314
|
+
# to represent the necessary conditions for the level to apply to a request. See
|
315
|
+
# CEL spec at: https://github.com/google/cel-spec
|
316
|
+
class CustomLevel
|
317
|
+
include Google::Apis::Core::Hashable
|
318
|
+
|
319
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
320
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
321
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
322
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
323
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
324
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
325
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
326
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
327
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
328
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
329
|
+
# string" description: "Create a notification string with a timestamp."
|
330
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
331
|
+
# exact variables and functions that may be referenced within an expression are
|
332
|
+
# determined by the service that evaluates it. See the service documentation for
|
333
|
+
# additional information.
|
334
|
+
# Corresponds to the JSON property `expr`
|
335
|
+
# @return [Google::Apis::AccesscontextmanagerV1::Expr]
|
336
|
+
attr_accessor :expr
|
337
|
+
|
338
|
+
def initialize(**args)
|
339
|
+
update!(**args)
|
340
|
+
end
|
341
|
+
|
342
|
+
# Update properties of this object
|
343
|
+
def update!(**args)
|
344
|
+
@expr = args[:expr] if args.key?(:expr)
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
# `DevicePolicy` specifies device specific restrictions necessary to acquire a
|
349
|
+
# given access level. A `DevicePolicy` specifies requirements for requests from
|
350
|
+
# devices to be granted access levels, it does not do any enforcement on the
|
351
|
+
# device. `DevicePolicy` acts as an AND over all specified fields, and each
|
352
|
+
# repeated field is an OR over its elements. Any unset fields are ignored. For
|
353
|
+
# example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX,
|
354
|
+
# encryption_status: ENCRYPTED`, then the DevicePolicy will be true for requests
|
355
|
+
# originating from encrypted Linux desktops and encrypted Windows desktops.
|
356
|
+
class DevicePolicy
|
357
|
+
include Google::Apis::Core::Hashable
|
358
|
+
|
359
|
+
# Allowed device management levels, an empty list allows all management levels.
|
360
|
+
# Corresponds to the JSON property `allowedDeviceManagementLevels`
|
361
|
+
# @return [Array<String>]
|
362
|
+
attr_accessor :allowed_device_management_levels
|
363
|
+
|
364
|
+
# Allowed encryptions statuses, an empty list allows all statuses.
|
365
|
+
# Corresponds to the JSON property `allowedEncryptionStatuses`
|
366
|
+
# @return [Array<String>]
|
367
|
+
attr_accessor :allowed_encryption_statuses
|
368
|
+
|
369
|
+
# Allowed OS versions, an empty list allows all types and all versions.
|
370
|
+
# Corresponds to the JSON property `osConstraints`
|
371
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::OsConstraint>]
|
372
|
+
attr_accessor :os_constraints
|
373
|
+
|
374
|
+
# Whether the device needs to be approved by the customer admin.
|
375
|
+
# Corresponds to the JSON property `requireAdminApproval`
|
376
|
+
# @return [Boolean]
|
377
|
+
attr_accessor :require_admin_approval
|
378
|
+
alias_method :require_admin_approval?, :require_admin_approval
|
379
|
+
|
380
|
+
# Whether the device needs to be corp owned.
|
381
|
+
# Corresponds to the JSON property `requireCorpOwned`
|
382
|
+
# @return [Boolean]
|
383
|
+
attr_accessor :require_corp_owned
|
384
|
+
alias_method :require_corp_owned?, :require_corp_owned
|
385
|
+
|
386
|
+
# Whether or not screenlock is required for the DevicePolicy to be true.
|
387
|
+
# Defaults to `false`.
|
388
|
+
# Corresponds to the JSON property `requireScreenlock`
|
389
|
+
# @return [Boolean]
|
390
|
+
attr_accessor :require_screenlock
|
391
|
+
alias_method :require_screenlock?, :require_screenlock
|
392
|
+
|
393
|
+
def initialize(**args)
|
394
|
+
update!(**args)
|
395
|
+
end
|
396
|
+
|
397
|
+
# Update properties of this object
|
398
|
+
def update!(**args)
|
399
|
+
@allowed_device_management_levels = args[:allowed_device_management_levels] if args.key?(:allowed_device_management_levels)
|
400
|
+
@allowed_encryption_statuses = args[:allowed_encryption_statuses] if args.key?(:allowed_encryption_statuses)
|
401
|
+
@os_constraints = args[:os_constraints] if args.key?(:os_constraints)
|
402
|
+
@require_admin_approval = args[:require_admin_approval] if args.key?(:require_admin_approval)
|
403
|
+
@require_corp_owned = args[:require_corp_owned] if args.key?(:require_corp_owned)
|
404
|
+
@require_screenlock = args[:require_screenlock] if args.key?(:require_screenlock)
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
# Defines the conditions under which an EgressPolicy matches a request.
|
409
|
+
# Conditions based on information about the source of the request. Note that if
|
410
|
+
# the destination of the request is protected by a ServicePerimeter, then that
|
411
|
+
# ServicePerimeter must have an IngressPolicy which allows access in order for
|
412
|
+
# this request to succeed.
|
413
|
+
class EgressFrom
|
414
|
+
include Google::Apis::Core::Hashable
|
415
|
+
|
416
|
+
# A list of identities that are allowed access through this [EgressPolicy].
|
417
|
+
# Should be in the format of email address. The email address should represent
|
418
|
+
# individual user or service account only.
|
419
|
+
# Corresponds to the JSON property `identities`
|
420
|
+
# @return [Array<String>]
|
421
|
+
attr_accessor :identities
|
422
|
+
|
423
|
+
# Specifies the type of identities that are allowed access to outside the
|
424
|
+
# perimeter. If left unspecified, then members of `identities` field will be
|
425
|
+
# allowed access.
|
426
|
+
# Corresponds to the JSON property `identityType`
|
427
|
+
# @return [String]
|
428
|
+
attr_accessor :identity_type
|
429
|
+
|
430
|
+
def initialize(**args)
|
431
|
+
update!(**args)
|
432
|
+
end
|
433
|
+
|
434
|
+
# Update properties of this object
|
435
|
+
def update!(**args)
|
436
|
+
@identities = args[:identities] if args.key?(:identities)
|
437
|
+
@identity_type = args[:identity_type] if args.key?(:identity_type)
|
438
|
+
end
|
439
|
+
end
|
440
|
+
|
441
|
+
# Policy for egress from perimeter. EgressPolicies match requests based on `
|
442
|
+
# egress_from` and `egress_to` stanzas. For an EgressPolicy to match, both `
|
443
|
+
# egress_from` and `egress_to` stanzas must be matched. If an EgressPolicy
|
444
|
+
# matches a request, the request is allowed to span the ServicePerimeter
|
445
|
+
# boundary. For example, an EgressPolicy can be used to allow VMs on networks
|
446
|
+
# within the ServicePerimeter to access a defined set of projects outside the
|
447
|
+
# perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket
|
448
|
+
# or query against a BigQuery dataset). EgressPolicies are concerned with the *
|
449
|
+
# resources* that a request relates as well as the API services and API actions
|
450
|
+
# being used. They do not related to the direction of data movement. More
|
451
|
+
# detailed documentation for this concept can be found in the descriptions of
|
452
|
+
# EgressFrom and EgressTo.
|
453
|
+
class EgressPolicy
|
454
|
+
include Google::Apis::Core::Hashable
|
455
|
+
|
456
|
+
# Defines the conditions under which an EgressPolicy matches a request.
|
457
|
+
# Conditions based on information about the source of the request. Note that if
|
458
|
+
# the destination of the request is protected by a ServicePerimeter, then that
|
459
|
+
# ServicePerimeter must have an IngressPolicy which allows access in order for
|
460
|
+
# this request to succeed.
|
461
|
+
# Corresponds to the JSON property `egressFrom`
|
462
|
+
# @return [Google::Apis::AccesscontextmanagerV1::EgressFrom]
|
463
|
+
attr_accessor :egress_from
|
464
|
+
|
465
|
+
# Defines the conditions under which an EgressPolicy matches a request.
|
466
|
+
# Conditions are based on information about the ApiOperation intended to be
|
467
|
+
# performed on the `resources` specified. Note that if the destination of the
|
468
|
+
# request is protected by a ServicePerimeter, then that ServicePerimeter must
|
469
|
+
# have an IngressPolicy which allows access in order for this request to succeed.
|
470
|
+
# Corresponds to the JSON property `egressTo`
|
471
|
+
# @return [Google::Apis::AccesscontextmanagerV1::EgressTo]
|
472
|
+
attr_accessor :egress_to
|
473
|
+
|
474
|
+
def initialize(**args)
|
475
|
+
update!(**args)
|
476
|
+
end
|
477
|
+
|
478
|
+
# Update properties of this object
|
479
|
+
def update!(**args)
|
480
|
+
@egress_from = args[:egress_from] if args.key?(:egress_from)
|
481
|
+
@egress_to = args[:egress_to] if args.key?(:egress_to)
|
482
|
+
end
|
483
|
+
end
|
484
|
+
|
485
|
+
# Defines the conditions under which an EgressPolicy matches a request.
|
486
|
+
# Conditions are based on information about the ApiOperation intended to be
|
487
|
+
# performed on the `resources` specified. Note that if the destination of the
|
488
|
+
# request is protected by a ServicePerimeter, then that ServicePerimeter must
|
489
|
+
# have an IngressPolicy which allows access in order for this request to succeed.
|
490
|
+
class EgressTo
|
491
|
+
include Google::Apis::Core::Hashable
|
492
|
+
|
493
|
+
# A list of ApiOperations that this egress rule applies to. A request matches if
|
494
|
+
# it contains an operation/service in this list.
|
495
|
+
# Corresponds to the JSON property `operations`
|
496
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::ApiOperation>]
|
497
|
+
attr_accessor :operations
|
498
|
+
|
499
|
+
# A list of resources, currently only projects in the form `projects/`, that
|
500
|
+
# match this to stanza. A request matches if it contains a resource in this list.
|
501
|
+
# If `*` is specified for resources, then this EgressTo rule will authorize
|
502
|
+
# access to all resources outside the perimeter.
|
503
|
+
# Corresponds to the JSON property `resources`
|
504
|
+
# @return [Array<String>]
|
505
|
+
attr_accessor :resources
|
506
|
+
|
507
|
+
def initialize(**args)
|
508
|
+
update!(**args)
|
509
|
+
end
|
510
|
+
|
511
|
+
# Update properties of this object
|
512
|
+
def update!(**args)
|
513
|
+
@operations = args[:operations] if args.key?(:operations)
|
514
|
+
@resources = args[:resources] if args.key?(:resources)
|
515
|
+
end
|
516
|
+
end
|
517
|
+
|
518
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
519
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
520
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
521
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
522
|
+
# `Empty` is empty JSON object ````.
|
523
|
+
class Empty
|
524
|
+
include Google::Apis::Core::Hashable
|
525
|
+
|
526
|
+
def initialize(**args)
|
527
|
+
update!(**args)
|
528
|
+
end
|
529
|
+
|
530
|
+
# Update properties of this object
|
531
|
+
def update!(**args)
|
532
|
+
end
|
533
|
+
end
|
534
|
+
|
535
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
536
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
537
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
538
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
539
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
540
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
541
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
542
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
543
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
544
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
545
|
+
# string" description: "Create a notification string with a timestamp."
|
546
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
547
|
+
# exact variables and functions that may be referenced within an expression are
|
548
|
+
# determined by the service that evaluates it. See the service documentation for
|
549
|
+
# additional information.
|
550
|
+
class Expr
|
551
|
+
include Google::Apis::Core::Hashable
|
552
|
+
|
553
|
+
# Optional. Description of the expression. This is a longer text which describes
|
554
|
+
# the expression, e.g. when hovered over it in a UI.
|
555
|
+
# Corresponds to the JSON property `description`
|
556
|
+
# @return [String]
|
557
|
+
attr_accessor :description
|
558
|
+
|
559
|
+
# Textual representation of an expression in Common Expression Language syntax.
|
560
|
+
# Corresponds to the JSON property `expression`
|
561
|
+
# @return [String]
|
562
|
+
attr_accessor :expression
|
563
|
+
|
564
|
+
# Optional. String indicating the location of the expression for error reporting,
|
565
|
+
# e.g. a file name and a position in the file.
|
566
|
+
# Corresponds to the JSON property `location`
|
567
|
+
# @return [String]
|
568
|
+
attr_accessor :location
|
569
|
+
|
570
|
+
# Optional. Title for the expression, i.e. a short string describing its purpose.
|
571
|
+
# This can be used e.g. in UIs which allow to enter the expression.
|
572
|
+
# Corresponds to the JSON property `title`
|
573
|
+
# @return [String]
|
574
|
+
attr_accessor :title
|
575
|
+
|
576
|
+
def initialize(**args)
|
577
|
+
update!(**args)
|
578
|
+
end
|
579
|
+
|
580
|
+
# Update properties of this object
|
581
|
+
def update!(**args)
|
582
|
+
@description = args[:description] if args.key?(:description)
|
583
|
+
@expression = args[:expression] if args.key?(:expression)
|
584
|
+
@location = args[:location] if args.key?(:location)
|
585
|
+
@title = args[:title] if args.key?(:title)
|
586
|
+
end
|
587
|
+
end
|
588
|
+
|
589
|
+
# Restricts access to Cloud Console and Google Cloud APIs for a set of users
|
590
|
+
# using Context-Aware Access.
|
591
|
+
class GcpUserAccessBinding
|
592
|
+
include Google::Apis::Core::Hashable
|
593
|
+
|
594
|
+
# Required. Access level that a user must have to be granted access. Only one
|
595
|
+
# access level is supported, not multiple. This repeated field must have exactly
|
596
|
+
# one element. Example: "accessPolicies/9522/accessLevels/device_trusted"
|
597
|
+
# Corresponds to the JSON property `accessLevels`
|
598
|
+
# @return [Array<String>]
|
599
|
+
attr_accessor :access_levels
|
600
|
+
|
601
|
+
# Required. Immutable. Google Group id whose members are subject to this binding'
|
602
|
+
# s restrictions. See "id" in the [G Suite Directory API's Groups resource] (
|
603
|
+
# https://developers.google.com/admin-sdk/directory/v1/reference/groups#resource)
|
604
|
+
# . If a group's email address/alias is changed, this resource will continue to
|
605
|
+
# point at the changed group. This field does not accept group email addresses
|
606
|
+
# or aliases. Example: "01d520gv4vjcrht"
|
607
|
+
# Corresponds to the JSON property `groupKey`
|
608
|
+
# @return [String]
|
609
|
+
attr_accessor :group_key
|
610
|
+
|
611
|
+
# Immutable. Assigned by the server during creation. The last segment has an
|
612
|
+
# arbitrary length and has only URI unreserved characters (as defined by [RFC
|
613
|
+
# 3986 Section 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). Should
|
614
|
+
# not be specified by the client during creation. Example: "organizations/256/
|
615
|
+
# gcpUserAccessBindings/b3-BhcX_Ud5N"
|
616
|
+
# Corresponds to the JSON property `name`
|
617
|
+
# @return [String]
|
618
|
+
attr_accessor :name
|
619
|
+
|
620
|
+
def initialize(**args)
|
621
|
+
update!(**args)
|
622
|
+
end
|
623
|
+
|
624
|
+
# Update properties of this object
|
625
|
+
def update!(**args)
|
626
|
+
@access_levels = args[:access_levels] if args.key?(:access_levels)
|
627
|
+
@group_key = args[:group_key] if args.key?(:group_key)
|
628
|
+
@name = args[:name] if args.key?(:name)
|
629
|
+
end
|
630
|
+
end
|
631
|
+
|
632
|
+
# Defines the conditions under which an IngressPolicy matches a request.
|
633
|
+
# Conditions are based on information about the source of the request.
|
634
|
+
class IngressFrom
|
635
|
+
include Google::Apis::Core::Hashable
|
636
|
+
|
637
|
+
# A list of identities that are allowed access through this ingress policy.
|
638
|
+
# Should be in the format of email address. The email address should represent
|
639
|
+
# individual user or service account only.
|
640
|
+
# Corresponds to the JSON property `identities`
|
641
|
+
# @return [Array<String>]
|
642
|
+
attr_accessor :identities
|
643
|
+
|
644
|
+
# Specifies the type of identities that are allowed access from outside the
|
645
|
+
# perimeter. If left unspecified, then members of `identities` field will be
|
646
|
+
# allowed access.
|
647
|
+
# Corresponds to the JSON property `identityType`
|
648
|
+
# @return [String]
|
649
|
+
attr_accessor :identity_type
|
650
|
+
|
651
|
+
# Sources that this IngressPolicy authorizes access from.
|
652
|
+
# Corresponds to the JSON property `sources`
|
653
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::IngressSource>]
|
654
|
+
attr_accessor :sources
|
655
|
+
|
656
|
+
def initialize(**args)
|
657
|
+
update!(**args)
|
658
|
+
end
|
659
|
+
|
660
|
+
# Update properties of this object
|
661
|
+
def update!(**args)
|
662
|
+
@identities = args[:identities] if args.key?(:identities)
|
663
|
+
@identity_type = args[:identity_type] if args.key?(:identity_type)
|
664
|
+
@sources = args[:sources] if args.key?(:sources)
|
665
|
+
end
|
666
|
+
end
|
667
|
+
|
668
|
+
# Policy for ingress into ServicePerimeter. IngressPolicies match requests based
|
669
|
+
# on `ingress_from` and `ingress_to` stanzas. For an ingress policy to match,
|
670
|
+
# both the `ingress_from` and `ingress_to` stanzas must be matched. If an
|
671
|
+
# IngressPolicy matches a request, the request is allowed through the perimeter
|
672
|
+
# boundary from outside the perimeter. For example, access from the internet can
|
673
|
+
# be allowed either based on an AccessLevel or, for traffic hosted on Google
|
674
|
+
# Cloud, the project of the source network. For access from private networks,
|
675
|
+
# using the project of the hosting network is required. Individual ingress
|
676
|
+
# policies can be limited by restricting which services and/or actions they
|
677
|
+
# match using the `ingress_to` field.
|
678
|
+
class IngressPolicy
|
679
|
+
include Google::Apis::Core::Hashable
|
680
|
+
|
681
|
+
# Defines the conditions under which an IngressPolicy matches a request.
|
682
|
+
# Conditions are based on information about the source of the request.
|
683
|
+
# Corresponds to the JSON property `ingressFrom`
|
684
|
+
# @return [Google::Apis::AccesscontextmanagerV1::IngressFrom]
|
685
|
+
attr_accessor :ingress_from
|
686
|
+
|
687
|
+
# Defines the conditions under which an IngressPolicy matches a request.
|
688
|
+
# Conditions are based on information about the ApiOperation intended to be
|
689
|
+
# performed on the destination of the request.
|
690
|
+
# Corresponds to the JSON property `ingressTo`
|
691
|
+
# @return [Google::Apis::AccesscontextmanagerV1::IngressTo]
|
692
|
+
attr_accessor :ingress_to
|
693
|
+
|
694
|
+
def initialize(**args)
|
695
|
+
update!(**args)
|
696
|
+
end
|
697
|
+
|
698
|
+
# Update properties of this object
|
699
|
+
def update!(**args)
|
700
|
+
@ingress_from = args[:ingress_from] if args.key?(:ingress_from)
|
701
|
+
@ingress_to = args[:ingress_to] if args.key?(:ingress_to)
|
702
|
+
end
|
703
|
+
end
|
704
|
+
|
705
|
+
# The source that IngressPolicy authorizes access from.
|
706
|
+
class IngressSource
|
707
|
+
include Google::Apis::Core::Hashable
|
708
|
+
|
709
|
+
# An AccessLevel resource name that allow resources within the ServicePerimeters
|
710
|
+
# to be accessed from the internet. AccessLevels listed must be in the same
|
711
|
+
# policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will
|
712
|
+
# cause an error. If no AccessLevel names are listed, resources within the
|
713
|
+
# perimeter can only be accessed via Google Cloud calls with request origins
|
714
|
+
# within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`
|
715
|
+
# . If `*` is specified, then all IngressSources will be allowed.
|
716
|
+
# Corresponds to the JSON property `accessLevel`
|
717
|
+
# @return [String]
|
718
|
+
attr_accessor :access_level
|
719
|
+
|
720
|
+
# A Google Cloud resource that is allowed to ingress the perimeter. Requests
|
721
|
+
# from these resources will be allowed to access perimeter data. Currently only
|
722
|
+
# projects are allowed. Format: `projects/`project_number`` The project may be
|
723
|
+
# in any Google Cloud organization, not just the organization that the perimeter
|
724
|
+
# is defined in. `*` is not allowed, the case of allowing all Google Cloud
|
725
|
+
# resources only is not supported.
|
726
|
+
# Corresponds to the JSON property `resource`
|
727
|
+
# @return [String]
|
728
|
+
attr_accessor :resource
|
729
|
+
|
730
|
+
def initialize(**args)
|
731
|
+
update!(**args)
|
732
|
+
end
|
733
|
+
|
734
|
+
# Update properties of this object
|
735
|
+
def update!(**args)
|
736
|
+
@access_level = args[:access_level] if args.key?(:access_level)
|
737
|
+
@resource = args[:resource] if args.key?(:resource)
|
738
|
+
end
|
739
|
+
end
|
740
|
+
|
741
|
+
# Defines the conditions under which an IngressPolicy matches a request.
|
742
|
+
# Conditions are based on information about the ApiOperation intended to be
|
743
|
+
# performed on the destination of the request.
|
744
|
+
class IngressTo
|
745
|
+
include Google::Apis::Core::Hashable
|
746
|
+
|
747
|
+
# A list of ApiOperations the sources specified in corresponding IngressFrom are
|
748
|
+
# allowed to perform in this ServicePerimeter.
|
749
|
+
# Corresponds to the JSON property `operations`
|
750
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::ApiOperation>]
|
751
|
+
attr_accessor :operations
|
752
|
+
|
753
|
+
# A list of resources, currently only projects in the form `projects/`,
|
754
|
+
# protected by this ServicePerimeter that are allowed to be accessed by sources
|
755
|
+
# defined in the corresponding IngressFrom. A request matches if it contains a
|
756
|
+
# resource in this list. If `*` is specified for resources, then this IngressTo
|
757
|
+
# rule will authorize access to all resources inside the perimeter, provided
|
758
|
+
# that the request also matches the `operations` field.
|
759
|
+
# Corresponds to the JSON property `resources`
|
760
|
+
# @return [Array<String>]
|
761
|
+
attr_accessor :resources
|
762
|
+
|
763
|
+
def initialize(**args)
|
764
|
+
update!(**args)
|
765
|
+
end
|
766
|
+
|
767
|
+
# Update properties of this object
|
768
|
+
def update!(**args)
|
769
|
+
@operations = args[:operations] if args.key?(:operations)
|
770
|
+
@resources = args[:resources] if args.key?(:resources)
|
771
|
+
end
|
772
|
+
end
|
773
|
+
|
774
|
+
# A response to `ListAccessLevelsRequest`.
|
775
|
+
class ListAccessLevelsResponse
|
776
|
+
include Google::Apis::Core::Hashable
|
777
|
+
|
778
|
+
# List of the Access Level instances.
|
779
|
+
# Corresponds to the JSON property `accessLevels`
|
780
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::AccessLevel>]
|
781
|
+
attr_accessor :access_levels
|
782
|
+
|
783
|
+
# The pagination token to retrieve the next page of results. If the value is
|
784
|
+
# empty, no further results remain.
|
785
|
+
# Corresponds to the JSON property `nextPageToken`
|
786
|
+
# @return [String]
|
787
|
+
attr_accessor :next_page_token
|
788
|
+
|
789
|
+
def initialize(**args)
|
790
|
+
update!(**args)
|
791
|
+
end
|
792
|
+
|
793
|
+
# Update properties of this object
|
794
|
+
def update!(**args)
|
795
|
+
@access_levels = args[:access_levels] if args.key?(:access_levels)
|
796
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
797
|
+
end
|
798
|
+
end
|
799
|
+
|
800
|
+
# A response to `ListAccessPoliciesRequest`.
|
801
|
+
class ListAccessPoliciesResponse
|
802
|
+
include Google::Apis::Core::Hashable
|
803
|
+
|
804
|
+
# List of the AccessPolicy instances.
|
805
|
+
# Corresponds to the JSON property `accessPolicies`
|
806
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::AccessPolicy>]
|
807
|
+
attr_accessor :access_policies
|
808
|
+
|
809
|
+
# The pagination token to retrieve the next page of results. If the value is
|
810
|
+
# empty, no further results remain.
|
811
|
+
# Corresponds to the JSON property `nextPageToken`
|
812
|
+
# @return [String]
|
813
|
+
attr_accessor :next_page_token
|
814
|
+
|
815
|
+
def initialize(**args)
|
816
|
+
update!(**args)
|
817
|
+
end
|
818
|
+
|
819
|
+
# Update properties of this object
|
820
|
+
def update!(**args)
|
821
|
+
@access_policies = args[:access_policies] if args.key?(:access_policies)
|
822
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
823
|
+
end
|
824
|
+
end
|
825
|
+
|
826
|
+
# Response of ListGcpUserAccessBindings.
|
827
|
+
class ListGcpUserAccessBindingsResponse
|
828
|
+
include Google::Apis::Core::Hashable
|
829
|
+
|
830
|
+
# GcpUserAccessBinding
|
831
|
+
# Corresponds to the JSON property `gcpUserAccessBindings`
|
832
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::GcpUserAccessBinding>]
|
833
|
+
attr_accessor :gcp_user_access_bindings
|
834
|
+
|
835
|
+
# Token to get the next page of items. If blank, there are no more items.
|
836
|
+
# Corresponds to the JSON property `nextPageToken`
|
837
|
+
# @return [String]
|
838
|
+
attr_accessor :next_page_token
|
839
|
+
|
840
|
+
def initialize(**args)
|
841
|
+
update!(**args)
|
842
|
+
end
|
843
|
+
|
844
|
+
# Update properties of this object
|
845
|
+
def update!(**args)
|
846
|
+
@gcp_user_access_bindings = args[:gcp_user_access_bindings] if args.key?(:gcp_user_access_bindings)
|
847
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
848
|
+
end
|
849
|
+
end
|
850
|
+
|
851
|
+
# The response message for Operations.ListOperations.
|
852
|
+
class ListOperationsResponse
|
853
|
+
include Google::Apis::Core::Hashable
|
854
|
+
|
855
|
+
# The standard List next-page token.
|
856
|
+
# Corresponds to the JSON property `nextPageToken`
|
857
|
+
# @return [String]
|
858
|
+
attr_accessor :next_page_token
|
859
|
+
|
860
|
+
# A list of operations that matches the specified filter in the request.
|
861
|
+
# Corresponds to the JSON property `operations`
|
862
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::Operation>]
|
863
|
+
attr_accessor :operations
|
864
|
+
|
865
|
+
def initialize(**args)
|
866
|
+
update!(**args)
|
867
|
+
end
|
868
|
+
|
869
|
+
# Update properties of this object
|
870
|
+
def update!(**args)
|
871
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
872
|
+
@operations = args[:operations] if args.key?(:operations)
|
873
|
+
end
|
874
|
+
end
|
875
|
+
|
876
|
+
# A response to `ListServicePerimetersRequest`.
|
877
|
+
class ListServicePerimetersResponse
|
878
|
+
include Google::Apis::Core::Hashable
|
879
|
+
|
880
|
+
# The pagination token to retrieve the next page of results. If the value is
|
881
|
+
# empty, no further results remain.
|
882
|
+
# Corresponds to the JSON property `nextPageToken`
|
883
|
+
# @return [String]
|
884
|
+
attr_accessor :next_page_token
|
885
|
+
|
886
|
+
# List of the Service Perimeter instances.
|
887
|
+
# Corresponds to the JSON property `servicePerimeters`
|
888
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::ServicePerimeter>]
|
889
|
+
attr_accessor :service_perimeters
|
890
|
+
|
891
|
+
def initialize(**args)
|
892
|
+
update!(**args)
|
893
|
+
end
|
894
|
+
|
895
|
+
# Update properties of this object
|
896
|
+
def update!(**args)
|
897
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
898
|
+
@service_perimeters = args[:service_perimeters] if args.key?(:service_perimeters)
|
899
|
+
end
|
900
|
+
end
|
901
|
+
|
902
|
+
# An allowed method or permission of a service specified in ApiOperation.
|
903
|
+
class MethodSelector
|
904
|
+
include Google::Apis::Core::Hashable
|
905
|
+
|
906
|
+
# Value for `method` should be a valid method name for the corresponding `
|
907
|
+
# service_name` in ApiOperation. If `*` used as value for `method`, then ALL
|
908
|
+
# methods and permissions are allowed.
|
909
|
+
# Corresponds to the JSON property `method`
|
910
|
+
# @return [String]
|
911
|
+
attr_accessor :method_prop
|
912
|
+
|
913
|
+
# Value for `permission` should be a valid Cloud IAM permission for the
|
914
|
+
# corresponding `service_name` in ApiOperation.
|
915
|
+
# Corresponds to the JSON property `permission`
|
916
|
+
# @return [String]
|
917
|
+
attr_accessor :permission
|
918
|
+
|
919
|
+
def initialize(**args)
|
920
|
+
update!(**args)
|
921
|
+
end
|
922
|
+
|
923
|
+
# Update properties of this object
|
924
|
+
def update!(**args)
|
925
|
+
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
926
|
+
@permission = args[:permission] if args.key?(:permission)
|
927
|
+
end
|
928
|
+
end
|
929
|
+
|
930
|
+
# This resource represents a long-running operation that is the result of a
|
931
|
+
# network API call.
|
932
|
+
class Operation
|
933
|
+
include Google::Apis::Core::Hashable
|
934
|
+
|
935
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
936
|
+
# , the operation is completed, and either `error` or `response` is available.
|
937
|
+
# Corresponds to the JSON property `done`
|
938
|
+
# @return [Boolean]
|
939
|
+
attr_accessor :done
|
940
|
+
alias_method :done?, :done
|
941
|
+
|
942
|
+
# The `Status` type defines a logical error model that is suitable for different
|
943
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
944
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
945
|
+
# data: error code, error message, and error details. You can find out more
|
946
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
947
|
+
# //cloud.google.com/apis/design/errors).
|
948
|
+
# Corresponds to the JSON property `error`
|
949
|
+
# @return [Google::Apis::AccesscontextmanagerV1::Status]
|
950
|
+
attr_accessor :error
|
951
|
+
|
952
|
+
# Service-specific metadata associated with the operation. It typically contains
|
953
|
+
# progress information and common metadata such as create time. Some services
|
954
|
+
# might not provide such metadata. Any method that returns a long-running
|
955
|
+
# operation should document the metadata type, if any.
|
956
|
+
# Corresponds to the JSON property `metadata`
|
957
|
+
# @return [Hash<String,Object>]
|
958
|
+
attr_accessor :metadata
|
959
|
+
|
960
|
+
# The server-assigned name, which is only unique within the same service that
|
961
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
962
|
+
# be a resource name ending with `operations/`unique_id``.
|
963
|
+
# Corresponds to the JSON property `name`
|
964
|
+
# @return [String]
|
965
|
+
attr_accessor :name
|
966
|
+
|
967
|
+
# The normal response of the operation in case of success. If the original
|
968
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
969
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
970
|
+
# the response should be the resource. For other methods, the response should
|
971
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
972
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
973
|
+
# response type is `TakeSnapshotResponse`.
|
974
|
+
# Corresponds to the JSON property `response`
|
975
|
+
# @return [Hash<String,Object>]
|
976
|
+
attr_accessor :response
|
977
|
+
|
978
|
+
def initialize(**args)
|
979
|
+
update!(**args)
|
980
|
+
end
|
981
|
+
|
982
|
+
# Update properties of this object
|
983
|
+
def update!(**args)
|
984
|
+
@done = args[:done] if args.key?(:done)
|
985
|
+
@error = args[:error] if args.key?(:error)
|
986
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
987
|
+
@name = args[:name] if args.key?(:name)
|
988
|
+
@response = args[:response] if args.key?(:response)
|
989
|
+
end
|
990
|
+
end
|
991
|
+
|
992
|
+
# A restriction on the OS type and version of devices making requests.
|
993
|
+
class OsConstraint
|
994
|
+
include Google::Apis::Core::Hashable
|
995
|
+
|
996
|
+
# The minimum allowed OS version. If not set, any version of this OS satisfies
|
997
|
+
# the constraint. Format: `"major.minor.patch"`. Examples: `"10.5.301"`, `"9.2.1"
|
998
|
+
# `.
|
999
|
+
# Corresponds to the JSON property `minimumVersion`
|
1000
|
+
# @return [String]
|
1001
|
+
attr_accessor :minimum_version
|
1002
|
+
|
1003
|
+
# Required. The allowed OS type.
|
1004
|
+
# Corresponds to the JSON property `osType`
|
1005
|
+
# @return [String]
|
1006
|
+
attr_accessor :os_type
|
1007
|
+
|
1008
|
+
# Only allows requests from devices with a verified Chrome OS. Verifications
|
1009
|
+
# includes requirements that the device is enterprise-managed, conformant to
|
1010
|
+
# domain policies, and the caller has permission to call the API targeted by the
|
1011
|
+
# request.
|
1012
|
+
# Corresponds to the JSON property `requireVerifiedChromeOs`
|
1013
|
+
# @return [Boolean]
|
1014
|
+
attr_accessor :require_verified_chrome_os
|
1015
|
+
alias_method :require_verified_chrome_os?, :require_verified_chrome_os
|
1016
|
+
|
1017
|
+
def initialize(**args)
|
1018
|
+
update!(**args)
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
# Update properties of this object
|
1022
|
+
def update!(**args)
|
1023
|
+
@minimum_version = args[:minimum_version] if args.key?(:minimum_version)
|
1024
|
+
@os_type = args[:os_type] if args.key?(:os_type)
|
1025
|
+
@require_verified_chrome_os = args[:require_verified_chrome_os] if args.key?(:require_verified_chrome_os)
|
1026
|
+
end
|
1027
|
+
end
|
1028
|
+
|
1029
|
+
# A request to replace all existing Access Levels in an Access Policy with the
|
1030
|
+
# Access Levels provided. This is done atomically.
|
1031
|
+
class ReplaceAccessLevelsRequest
|
1032
|
+
include Google::Apis::Core::Hashable
|
1033
|
+
|
1034
|
+
# Required. The desired Access Levels that should replace all existing Access
|
1035
|
+
# Levels in the Access Policy.
|
1036
|
+
# Corresponds to the JSON property `accessLevels`
|
1037
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::AccessLevel>]
|
1038
|
+
attr_accessor :access_levels
|
1039
|
+
|
1040
|
+
# Optional. The etag for the version of the Access Policy that this replace
|
1041
|
+
# operation is to be performed on. If, at the time of replace, the etag for the
|
1042
|
+
# Access Policy stored in Access Context Manager is different from the specified
|
1043
|
+
# etag, then the replace operation will not be performed and the call will fail.
|
1044
|
+
# This field is not required. If etag is not provided, the operation will be
|
1045
|
+
# performed as if a valid etag is provided.
|
1046
|
+
# Corresponds to the JSON property `etag`
|
1047
|
+
# @return [String]
|
1048
|
+
attr_accessor :etag
|
1049
|
+
|
1050
|
+
def initialize(**args)
|
1051
|
+
update!(**args)
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
# Update properties of this object
|
1055
|
+
def update!(**args)
|
1056
|
+
@access_levels = args[:access_levels] if args.key?(:access_levels)
|
1057
|
+
@etag = args[:etag] if args.key?(:etag)
|
1058
|
+
end
|
1059
|
+
end
|
1060
|
+
|
1061
|
+
# A response to ReplaceAccessLevelsRequest. This will be put inside of Operation.
|
1062
|
+
# response field.
|
1063
|
+
class ReplaceAccessLevelsResponse
|
1064
|
+
include Google::Apis::Core::Hashable
|
1065
|
+
|
1066
|
+
# List of the Access Level instances.
|
1067
|
+
# Corresponds to the JSON property `accessLevels`
|
1068
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::AccessLevel>]
|
1069
|
+
attr_accessor :access_levels
|
1070
|
+
|
1071
|
+
def initialize(**args)
|
1072
|
+
update!(**args)
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
# Update properties of this object
|
1076
|
+
def update!(**args)
|
1077
|
+
@access_levels = args[:access_levels] if args.key?(:access_levels)
|
1078
|
+
end
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# A request to replace all existing Service Perimeters in an Access Policy with
|
1082
|
+
# the Service Perimeters provided. This is done atomically.
|
1083
|
+
class ReplaceServicePerimetersRequest
|
1084
|
+
include Google::Apis::Core::Hashable
|
1085
|
+
|
1086
|
+
# Optional. The etag for the version of the Access Policy that this replace
|
1087
|
+
# operation is to be performed on. If, at the time of replace, the etag for the
|
1088
|
+
# Access Policy stored in Access Context Manager is different from the specified
|
1089
|
+
# etag, then the replace operation will not be performed and the call will fail.
|
1090
|
+
# This field is not required. If etag is not provided, the operation will be
|
1091
|
+
# performed as if a valid etag is provided.
|
1092
|
+
# Corresponds to the JSON property `etag`
|
1093
|
+
# @return [String]
|
1094
|
+
attr_accessor :etag
|
1095
|
+
|
1096
|
+
# Required. The desired Service Perimeters that should replace all existing
|
1097
|
+
# Service Perimeters in the Access Policy.
|
1098
|
+
# Corresponds to the JSON property `servicePerimeters`
|
1099
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::ServicePerimeter>]
|
1100
|
+
attr_accessor :service_perimeters
|
1101
|
+
|
1102
|
+
def initialize(**args)
|
1103
|
+
update!(**args)
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
# Update properties of this object
|
1107
|
+
def update!(**args)
|
1108
|
+
@etag = args[:etag] if args.key?(:etag)
|
1109
|
+
@service_perimeters = args[:service_perimeters] if args.key?(:service_perimeters)
|
1110
|
+
end
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
# A response to ReplaceServicePerimetersRequest. This will be put inside of
|
1114
|
+
# Operation.response field.
|
1115
|
+
class ReplaceServicePerimetersResponse
|
1116
|
+
include Google::Apis::Core::Hashable
|
1117
|
+
|
1118
|
+
# List of the Service Perimeter instances.
|
1119
|
+
# Corresponds to the JSON property `servicePerimeters`
|
1120
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::ServicePerimeter>]
|
1121
|
+
attr_accessor :service_perimeters
|
1122
|
+
|
1123
|
+
def initialize(**args)
|
1124
|
+
update!(**args)
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
# Update properties of this object
|
1128
|
+
def update!(**args)
|
1129
|
+
@service_perimeters = args[:service_perimeters] if args.key?(:service_perimeters)
|
1130
|
+
end
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
# `ServicePerimeter` describes a set of Google Cloud resources which can freely
|
1134
|
+
# import and export data amongst themselves, but not export outside of the `
|
1135
|
+
# ServicePerimeter`. If a request with a source within this `ServicePerimeter`
|
1136
|
+
# has a target outside of the `ServicePerimeter`, the request will be blocked.
|
1137
|
+
# Otherwise the request is allowed. There are two types of Service Perimeter -
|
1138
|
+
# Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google
|
1139
|
+
# Cloud project can only belong to a single regular Service Perimeter. Service
|
1140
|
+
# Perimeter Bridges can contain only Google Cloud projects as members, a single
|
1141
|
+
# Google Cloud project may belong to multiple Service Perimeter Bridges.
|
1142
|
+
class ServicePerimeter
|
1143
|
+
include Google::Apis::Core::Hashable
|
1144
|
+
|
1145
|
+
# Description of the `ServicePerimeter` and its use. Does not affect behavior.
|
1146
|
+
# Corresponds to the JSON property `description`
|
1147
|
+
# @return [String]
|
1148
|
+
attr_accessor :description
|
1149
|
+
|
1150
|
+
# Required. Resource name for the ServicePerimeter. The `short_name` component
|
1151
|
+
# must begin with a letter and only include alphanumeric and '_'. Format: `
|
1152
|
+
# accessPolicies/`policy_id`/servicePerimeters/`short_name``
|
1153
|
+
# Corresponds to the JSON property `name`
|
1154
|
+
# @return [String]
|
1155
|
+
attr_accessor :name
|
1156
|
+
|
1157
|
+
# Perimeter type indicator. A single project is allowed to be a member of single
|
1158
|
+
# regular perimeter, but multiple service perimeter bridges. A project cannot be
|
1159
|
+
# a included in a perimeter bridge without being included in regular perimeter.
|
1160
|
+
# For perimeter bridges, the restricted service list as well as access level
|
1161
|
+
# lists must be empty.
|
1162
|
+
# Corresponds to the JSON property `perimeterType`
|
1163
|
+
# @return [String]
|
1164
|
+
attr_accessor :perimeter_type
|
1165
|
+
|
1166
|
+
# `ServicePerimeterConfig` specifies a set of Google Cloud resources that
|
1167
|
+
# describe specific Service Perimeter configuration.
|
1168
|
+
# Corresponds to the JSON property `spec`
|
1169
|
+
# @return [Google::Apis::AccesscontextmanagerV1::ServicePerimeterConfig]
|
1170
|
+
attr_accessor :spec
|
1171
|
+
|
1172
|
+
# `ServicePerimeterConfig` specifies a set of Google Cloud resources that
|
1173
|
+
# describe specific Service Perimeter configuration.
|
1174
|
+
# Corresponds to the JSON property `status`
|
1175
|
+
# @return [Google::Apis::AccesscontextmanagerV1::ServicePerimeterConfig]
|
1176
|
+
attr_accessor :status
|
1177
|
+
|
1178
|
+
# Human readable title. Must be unique within the Policy.
|
1179
|
+
# Corresponds to the JSON property `title`
|
1180
|
+
# @return [String]
|
1181
|
+
attr_accessor :title
|
1182
|
+
|
1183
|
+
# Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists
|
1184
|
+
# for all Service Perimeters, and that spec is identical to the status for those
|
1185
|
+
# Service Perimeters. When this flag is set, it inhibits the generation of the
|
1186
|
+
# implicit spec, thereby allowing the user to explicitly provide a configuration
|
1187
|
+
# ("spec") to use in a dry-run version of the Service Perimeter. This allows the
|
1188
|
+
# user to test changes to the enforced config ("status") without actually
|
1189
|
+
# enforcing them. This testing is done through analyzing the differences between
|
1190
|
+
# currently enforced and suggested restrictions. use_explicit_dry_run_spec must
|
1191
|
+
# bet set to True if any of the fields in the spec are set to non-default values.
|
1192
|
+
# Corresponds to the JSON property `useExplicitDryRunSpec`
|
1193
|
+
# @return [Boolean]
|
1194
|
+
attr_accessor :use_explicit_dry_run_spec
|
1195
|
+
alias_method :use_explicit_dry_run_spec?, :use_explicit_dry_run_spec
|
1196
|
+
|
1197
|
+
def initialize(**args)
|
1198
|
+
update!(**args)
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
# Update properties of this object
|
1202
|
+
def update!(**args)
|
1203
|
+
@description = args[:description] if args.key?(:description)
|
1204
|
+
@name = args[:name] if args.key?(:name)
|
1205
|
+
@perimeter_type = args[:perimeter_type] if args.key?(:perimeter_type)
|
1206
|
+
@spec = args[:spec] if args.key?(:spec)
|
1207
|
+
@status = args[:status] if args.key?(:status)
|
1208
|
+
@title = args[:title] if args.key?(:title)
|
1209
|
+
@use_explicit_dry_run_spec = args[:use_explicit_dry_run_spec] if args.key?(:use_explicit_dry_run_spec)
|
1210
|
+
end
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
# `ServicePerimeterConfig` specifies a set of Google Cloud resources that
|
1214
|
+
# describe specific Service Perimeter configuration.
|
1215
|
+
class ServicePerimeterConfig
|
1216
|
+
include Google::Apis::Core::Hashable
|
1217
|
+
|
1218
|
+
# A list of `AccessLevel` resource names that allow resources within the `
|
1219
|
+
# ServicePerimeter` to be accessed from the internet. `AccessLevels` listed must
|
1220
|
+
# be in the same policy as this `ServicePerimeter`. Referencing a nonexistent `
|
1221
|
+
# AccessLevel` is a syntax error. If no `AccessLevel` names are listed,
|
1222
|
+
# resources within the perimeter can only be accessed via Google Cloud calls
|
1223
|
+
# with request origins within the perimeter. Example: `"accessPolicies/MY_POLICY/
|
1224
|
+
# accessLevels/MY_LEVEL"`. For Service Perimeter Bridge, must be empty.
|
1225
|
+
# Corresponds to the JSON property `accessLevels`
|
1226
|
+
# @return [Array<String>]
|
1227
|
+
attr_accessor :access_levels
|
1228
|
+
|
1229
|
+
# List of EgressPolicies to apply to the perimeter. A perimeter may have
|
1230
|
+
# multiple EgressPolicies, each of which is evaluated separately. Access is
|
1231
|
+
# granted if any EgressPolicy grants it. Must be empty for a perimeter bridge.
|
1232
|
+
# Corresponds to the JSON property `egressPolicies`
|
1233
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::EgressPolicy>]
|
1234
|
+
attr_accessor :egress_policies
|
1235
|
+
|
1236
|
+
# List of IngressPolicies to apply to the perimeter. A perimeter may have
|
1237
|
+
# multiple IngressPolicies, each of which is evaluated separately. Access is
|
1238
|
+
# granted if any Ingress Policy grants it. Must be empty for a perimeter bridge.
|
1239
|
+
# Corresponds to the JSON property `ingressPolicies`
|
1240
|
+
# @return [Array<Google::Apis::AccesscontextmanagerV1::IngressPolicy>]
|
1241
|
+
attr_accessor :ingress_policies
|
1242
|
+
|
1243
|
+
# A list of Google Cloud resources that are inside of the service perimeter.
|
1244
|
+
# Currently only projects are allowed. Format: `projects/`project_number``
|
1245
|
+
# Corresponds to the JSON property `resources`
|
1246
|
+
# @return [Array<String>]
|
1247
|
+
attr_accessor :resources
|
1248
|
+
|
1249
|
+
# Google Cloud services that are subject to the Service Perimeter restrictions.
|
1250
|
+
# For example, if `storage.googleapis.com` is specified, access to the storage
|
1251
|
+
# buckets inside the perimeter must meet the perimeter's access restrictions.
|
1252
|
+
# Corresponds to the JSON property `restrictedServices`
|
1253
|
+
# @return [Array<String>]
|
1254
|
+
attr_accessor :restricted_services
|
1255
|
+
|
1256
|
+
# Specifies how APIs are allowed to communicate within the Service Perimeter.
|
1257
|
+
# Corresponds to the JSON property `vpcAccessibleServices`
|
1258
|
+
# @return [Google::Apis::AccesscontextmanagerV1::VpcAccessibleServices]
|
1259
|
+
attr_accessor :vpc_accessible_services
|
1260
|
+
|
1261
|
+
def initialize(**args)
|
1262
|
+
update!(**args)
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
# Update properties of this object
|
1266
|
+
def update!(**args)
|
1267
|
+
@access_levels = args[:access_levels] if args.key?(:access_levels)
|
1268
|
+
@egress_policies = args[:egress_policies] if args.key?(:egress_policies)
|
1269
|
+
@ingress_policies = args[:ingress_policies] if args.key?(:ingress_policies)
|
1270
|
+
@resources = args[:resources] if args.key?(:resources)
|
1271
|
+
@restricted_services = args[:restricted_services] if args.key?(:restricted_services)
|
1272
|
+
@vpc_accessible_services = args[:vpc_accessible_services] if args.key?(:vpc_accessible_services)
|
1273
|
+
end
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1277
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1278
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1279
|
+
# data: error code, error message, and error details. You can find out more
|
1280
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1281
|
+
# //cloud.google.com/apis/design/errors).
|
1282
|
+
class Status
|
1283
|
+
include Google::Apis::Core::Hashable
|
1284
|
+
|
1285
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1286
|
+
# Corresponds to the JSON property `code`
|
1287
|
+
# @return [Fixnum]
|
1288
|
+
attr_accessor :code
|
1289
|
+
|
1290
|
+
# A list of messages that carry the error details. There is a common set of
|
1291
|
+
# message types for APIs to use.
|
1292
|
+
# Corresponds to the JSON property `details`
|
1293
|
+
# @return [Array<Hash<String,Object>>]
|
1294
|
+
attr_accessor :details
|
1295
|
+
|
1296
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
1297
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
1298
|
+
# field, or localized by the client.
|
1299
|
+
# Corresponds to the JSON property `message`
|
1300
|
+
# @return [String]
|
1301
|
+
attr_accessor :message
|
1302
|
+
|
1303
|
+
def initialize(**args)
|
1304
|
+
update!(**args)
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
# Update properties of this object
|
1308
|
+
def update!(**args)
|
1309
|
+
@code = args[:code] if args.key?(:code)
|
1310
|
+
@details = args[:details] if args.key?(:details)
|
1311
|
+
@message = args[:message] if args.key?(:message)
|
1312
|
+
end
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
# Specifies how APIs are allowed to communicate within the Service Perimeter.
|
1316
|
+
class VpcAccessibleServices
|
1317
|
+
include Google::Apis::Core::Hashable
|
1318
|
+
|
1319
|
+
# The list of APIs usable within the Service Perimeter. Must be empty unless '
|
1320
|
+
# enable_restriction' is True. You can specify a list of individual services, as
|
1321
|
+
# well as include the 'RESTRICTED-SERVICES' value, which automatically includes
|
1322
|
+
# all of the services protected by the perimeter.
|
1323
|
+
# Corresponds to the JSON property `allowedServices`
|
1324
|
+
# @return [Array<String>]
|
1325
|
+
attr_accessor :allowed_services
|
1326
|
+
|
1327
|
+
# Whether to restrict API calls within the Service Perimeter to the list of APIs
|
1328
|
+
# specified in 'allowed_services'.
|
1329
|
+
# Corresponds to the JSON property `enableRestriction`
|
1330
|
+
# @return [Boolean]
|
1331
|
+
attr_accessor :enable_restriction
|
1332
|
+
alias_method :enable_restriction?, :enable_restriction
|
1333
|
+
|
1334
|
+
def initialize(**args)
|
1335
|
+
update!(**args)
|
1336
|
+
end
|
1337
|
+
|
1338
|
+
# Update properties of this object
|
1339
|
+
def update!(**args)
|
1340
|
+
@allowed_services = args[:allowed_services] if args.key?(:allowed_services)
|
1341
|
+
@enable_restriction = args[:enable_restriction] if args.key?(:enable_restriction)
|
1342
|
+
end
|
1343
|
+
end
|
1344
|
+
end
|
1345
|
+
end
|
1346
|
+
end
|