google-cloud-pubsub-v1 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/pubsub/v1/_helpers.rb +19 -0
- data/lib/google/cloud/pubsub/v1/iam_policy/client.rb +21 -332
- data/lib/google/cloud/pubsub/v1/iam_policy/credentials.rb +6 -2
- data/lib/google/cloud/pubsub/v1/iam_policy.rb +5 -31
- data/lib/google/cloud/pubsub/v1/publisher/client.rb +14 -0
- data/lib/google/cloud/pubsub/v1/schema_service/client.rb +14 -0
- data/lib/google/cloud/pubsub/v1/subscriber/client.rb +14 -0
- data/lib/google/cloud/pubsub/v1/version.rb +1 -1
- data/lib/google/cloud/pubsub/v1.rb +0 -1
- data/proto_docs/google/protobuf/empty.rb +0 -2
- metadata +16 -12
- data/proto_docs/google/iam/v1/iam_policy.rb +0 -87
- data/proto_docs/google/iam/v1/options.rb +0 -50
- data/proto_docs/google/iam/v1/policy.rb +0 -418
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d98ae127654ffa655c567eadff7dfc28cc131e68ac7716d40f68704d8f061118
|
4
|
+
data.tar.gz: d8da26f605fb01815b937f5fdc56634492c51157db87670e41b50f281e8c0eb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f04d0ec694b3cebd2daaa541a0295aa212b8eaad7d939d7222219358e3acc69e44d6f5f2f11e1a717c45cce3d34fad165a11c86341ff8d46bdcaaef1a50194e5
|
7
|
+
data.tar.gz: 95d5cb21ecc54d183846406d5546508c6f496a65390c3461420cbf9b477c22a34c1f18bcd0134c6377e1feb9189d99c9ea756a6ba65f6571b7918faaeb298843
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Legacy IAM Policy client.
|
18
|
+
# No longer generated, but kept around for backward compatibility.
|
19
|
+
require "google/cloud/pubsub/v1/iam_policy"
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
#
|
17
|
+
# Originally auto-generated by gapic-generator-ruby.
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/iam/v1/iam_policy_pb"
|
@@ -25,56 +25,18 @@ module Google
|
|
25
25
|
module V1
|
26
26
|
module IAMPolicy
|
27
27
|
##
|
28
|
-
#
|
28
|
+
# This module contains the legacy IAM Policy client.
|
29
29
|
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
# Manages Identity and Access Management (IAM) policies.
|
34
|
-
#
|
35
|
-
# Any implementation of an API that offers access control features
|
36
|
-
# implements the google.iam.v1.IAMPolicy interface.
|
37
|
-
#
|
38
|
-
# ## Data model
|
39
|
-
#
|
40
|
-
# Access control is applied when a principal (user or service account), takes
|
41
|
-
# some action on a resource exposed by a service. Resources, identified by
|
42
|
-
# URI-like names, are the unit of access control specification. Service
|
43
|
-
# implementations can choose the granularity of access control and the
|
44
|
-
# supported permissions for their resources.
|
45
|
-
# For example one database service may allow access control to be
|
46
|
-
# specified only at the Table level, whereas another might allow access control
|
47
|
-
# to also be specified at the Column level.
|
48
|
-
#
|
49
|
-
# ## Policy Structure
|
50
|
-
#
|
51
|
-
# See google.iam.v1.Policy
|
52
|
-
#
|
53
|
-
# This is intentionally not a CRUD style API because access control policies
|
54
|
-
# are created and deleted implicitly with the resources to which they are
|
55
|
-
# attached.
|
30
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
31
|
+
# objects to get a client for IAM policies instead of using this
|
32
|
+
# legacy class.
|
56
33
|
#
|
57
34
|
class Client
|
58
35
|
# @private
|
59
36
|
attr_reader :iam_policy_stub
|
60
37
|
|
61
38
|
##
|
62
|
-
#
|
63
|
-
#
|
64
|
-
# See {::Google::Cloud::PubSub::V1::IAMPolicy::Client::Configuration}
|
65
|
-
# for a description of the configuration fields.
|
66
|
-
#
|
67
|
-
# @example
|
68
|
-
#
|
69
|
-
# # Modify the configuration for all IAMPolicy clients
|
70
|
-
# ::Google::Cloud::PubSub::V1::IAMPolicy::Client.configure do |config|
|
71
|
-
# config.timeout = 10.0
|
72
|
-
# end
|
73
|
-
#
|
74
|
-
# @yield [config] Configure the Client client.
|
75
|
-
# @yieldparam config [Client::Configuration]
|
76
|
-
#
|
77
|
-
# @return [Client::Configuration]
|
39
|
+
# @deprecated
|
78
40
|
#
|
79
41
|
def self.configure
|
80
42
|
@configure ||= begin
|
@@ -94,19 +56,7 @@ module Google
|
|
94
56
|
end
|
95
57
|
|
96
58
|
##
|
97
|
-
#
|
98
|
-
#
|
99
|
-
# The configuration is set to the derived mode, meaning that values can be changed,
|
100
|
-
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
101
|
-
# should be made on {Client.configure}.
|
102
|
-
#
|
103
|
-
# See {::Google::Cloud::PubSub::V1::IAMPolicy::Client::Configuration}
|
104
|
-
# for a description of the configuration fields.
|
105
|
-
#
|
106
|
-
# @yield [config] Configure the Client client.
|
107
|
-
# @yieldparam config [Client::Configuration]
|
108
|
-
#
|
109
|
-
# @return [Client::Configuration]
|
59
|
+
# @deprecated
|
110
60
|
#
|
111
61
|
def configure
|
112
62
|
yield @config if block_given?
|
@@ -114,20 +64,7 @@ module Google
|
|
114
64
|
end
|
115
65
|
|
116
66
|
##
|
117
|
-
#
|
118
|
-
#
|
119
|
-
# @example
|
120
|
-
#
|
121
|
-
# # Create a client using the default configuration
|
122
|
-
# client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
123
|
-
#
|
124
|
-
# # Create a client using a custom configuration
|
125
|
-
# client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new do |config|
|
126
|
-
# config.timeout = 10.0
|
127
|
-
# end
|
128
|
-
#
|
129
|
-
# @yield [config] Configure the IAMPolicy client.
|
130
|
-
# @yieldparam config [Client::Configuration]
|
67
|
+
# @deprecated
|
131
68
|
#
|
132
69
|
def initialize
|
133
70
|
# These require statements are intentionally placed here to initialize
|
@@ -165,66 +102,8 @@ module Google
|
|
165
102
|
)
|
166
103
|
end
|
167
104
|
|
168
|
-
# Service calls
|
169
|
-
|
170
105
|
##
|
171
|
-
#
|
172
|
-
# existing policy.
|
173
|
-
#
|
174
|
-
# Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
|
175
|
-
#
|
176
|
-
# @overload set_iam_policy(request, options = nil)
|
177
|
-
# Pass arguments to `set_iam_policy` via a request object, either of type
|
178
|
-
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
179
|
-
#
|
180
|
-
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
181
|
-
# A request object representing the call parameters. Required. To specify no
|
182
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
183
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
184
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
185
|
-
#
|
186
|
-
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
187
|
-
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
188
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
189
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
190
|
-
#
|
191
|
-
# @param resource [::String]
|
192
|
-
# REQUIRED: The resource for which the policy is being specified.
|
193
|
-
# See the operation documentation for the appropriate value for this field.
|
194
|
-
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
195
|
-
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
196
|
-
# the policy is limited to a few 10s of KB. An empty policy is a
|
197
|
-
# valid policy but certain Cloud Platform services (such as Projects)
|
198
|
-
# might reject them.
|
199
|
-
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
200
|
-
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
201
|
-
# the fields in the mask will be modified. If no mask is provided, the
|
202
|
-
# following default mask is used:
|
203
|
-
#
|
204
|
-
# `paths: "bindings, etag"`
|
205
|
-
#
|
206
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
207
|
-
# @yieldparam response [::Google::Iam::V1::Policy]
|
208
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
209
|
-
#
|
210
|
-
# @return [::Google::Iam::V1::Policy]
|
211
|
-
#
|
212
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
213
|
-
#
|
214
|
-
# @example Basic example
|
215
|
-
# require "google/iam/v1"
|
216
|
-
#
|
217
|
-
# # Create a client object. The client can be reused for multiple calls.
|
218
|
-
# client = Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
219
|
-
#
|
220
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
221
|
-
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
222
|
-
#
|
223
|
-
# # Call the set_iam_policy method.
|
224
|
-
# result = client.set_iam_policy request
|
225
|
-
#
|
226
|
-
# # The returned object is of type Google::Iam::V1::Policy.
|
227
|
-
# p result
|
106
|
+
# @deprecated
|
228
107
|
#
|
229
108
|
def set_iam_policy request, options = nil
|
230
109
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
@@ -268,54 +147,7 @@ module Google
|
|
268
147
|
end
|
269
148
|
|
270
149
|
##
|
271
|
-
#
|
272
|
-
# Returns an empty policy if the resource exists and does not have a policy
|
273
|
-
# set.
|
274
|
-
#
|
275
|
-
# @overload get_iam_policy(request, options = nil)
|
276
|
-
# Pass arguments to `get_iam_policy` via a request object, either of type
|
277
|
-
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
278
|
-
#
|
279
|
-
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
280
|
-
# A request object representing the call parameters. Required. To specify no
|
281
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
282
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
283
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
284
|
-
#
|
285
|
-
# @overload get_iam_policy(resource: nil, options: nil)
|
286
|
-
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
287
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
288
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
289
|
-
#
|
290
|
-
# @param resource [::String]
|
291
|
-
# REQUIRED: The resource for which the policy is being requested.
|
292
|
-
# See the operation documentation for the appropriate value for this field.
|
293
|
-
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
294
|
-
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
295
|
-
# `GetIamPolicy`.
|
296
|
-
#
|
297
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
298
|
-
# @yieldparam response [::Google::Iam::V1::Policy]
|
299
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
300
|
-
#
|
301
|
-
# @return [::Google::Iam::V1::Policy]
|
302
|
-
#
|
303
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
304
|
-
#
|
305
|
-
# @example Basic example
|
306
|
-
# require "google/iam/v1"
|
307
|
-
#
|
308
|
-
# # Create a client object. The client can be reused for multiple calls.
|
309
|
-
# client = Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
310
|
-
#
|
311
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
312
|
-
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
313
|
-
#
|
314
|
-
# # Call the get_iam_policy method.
|
315
|
-
# result = client.get_iam_policy request
|
316
|
-
#
|
317
|
-
# # The returned object is of type Google::Iam::V1::Policy.
|
318
|
-
# p result
|
150
|
+
# @deprecated
|
319
151
|
#
|
320
152
|
def get_iam_policy request, options = nil
|
321
153
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
@@ -359,60 +191,7 @@ module Google
|
|
359
191
|
end
|
360
192
|
|
361
193
|
##
|
362
|
-
#
|
363
|
-
# If the resource does not exist, this will return an empty set of
|
364
|
-
# permissions, not a `NOT_FOUND` error.
|
365
|
-
#
|
366
|
-
# Note: This operation is designed to be used for building permission-aware
|
367
|
-
# UIs and command-line tools, not for authorization checking. This operation
|
368
|
-
# may "fail open" without warning.
|
369
|
-
#
|
370
|
-
# @overload test_iam_permissions(request, options = nil)
|
371
|
-
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
372
|
-
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
373
|
-
#
|
374
|
-
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
375
|
-
# A request object representing the call parameters. Required. To specify no
|
376
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
377
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
378
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
379
|
-
#
|
380
|
-
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
381
|
-
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
382
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
383
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
384
|
-
#
|
385
|
-
# @param resource [::String]
|
386
|
-
# REQUIRED: The resource for which the policy detail is being requested.
|
387
|
-
# See the operation documentation for the appropriate value for this field.
|
388
|
-
# @param permissions [::Array<::String>]
|
389
|
-
# The set of permissions to check for the `resource`. Permissions with
|
390
|
-
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
391
|
-
# information see
|
392
|
-
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
393
|
-
#
|
394
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
395
|
-
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
396
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
397
|
-
#
|
398
|
-
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
399
|
-
#
|
400
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
401
|
-
#
|
402
|
-
# @example Basic example
|
403
|
-
# require "google/iam/v1"
|
404
|
-
#
|
405
|
-
# # Create a client object. The client can be reused for multiple calls.
|
406
|
-
# client = Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
407
|
-
#
|
408
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
409
|
-
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
410
|
-
#
|
411
|
-
# # Call the test_iam_permissions method.
|
412
|
-
# result = client.test_iam_permissions request
|
413
|
-
#
|
414
|
-
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
415
|
-
# p result
|
194
|
+
# @deprecated
|
416
195
|
#
|
417
196
|
def test_iam_permissions request, options = nil
|
418
197
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
@@ -456,83 +235,9 @@ module Google
|
|
456
235
|
end
|
457
236
|
|
458
237
|
##
|
459
|
-
#
|
460
|
-
#
|
461
|
-
#
|
462
|
-
# providing control over timeouts, retry behavior, logging, transport
|
463
|
-
# parameters, and other low-level controls. Certain parameters can also be
|
464
|
-
# applied individually to specific RPCs. See
|
465
|
-
# {::Google::Cloud::PubSub::V1::IAMPolicy::Client::Configuration::Rpcs}
|
466
|
-
# for a list of RPCs that can be configured independently.
|
467
|
-
#
|
468
|
-
# Configuration can be applied globally to all clients, or to a single client
|
469
|
-
# on construction.
|
470
|
-
#
|
471
|
-
# @example
|
472
|
-
#
|
473
|
-
# # Modify the global config, setting the timeout for
|
474
|
-
# # set_iam_policy to 20 seconds,
|
475
|
-
# # and all remaining timeouts to 10 seconds.
|
476
|
-
# ::Google::Cloud::PubSub::V1::IAMPolicy::Client.configure do |config|
|
477
|
-
# config.timeout = 10.0
|
478
|
-
# config.rpcs.set_iam_policy.timeout = 20.0
|
479
|
-
# end
|
480
|
-
#
|
481
|
-
# # Apply the above configuration only to a new client.
|
482
|
-
# client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new do |config|
|
483
|
-
# config.timeout = 10.0
|
484
|
-
# config.rpcs.set_iam_policy.timeout = 20.0
|
485
|
-
# end
|
486
|
-
#
|
487
|
-
# @!attribute [rw] endpoint
|
488
|
-
# The hostname or hostname:port of the service endpoint.
|
489
|
-
# Defaults to `"pubsub.googleapis.com"`.
|
490
|
-
# @return [::String]
|
491
|
-
# @!attribute [rw] credentials
|
492
|
-
# Credentials to send with calls. You may provide any of the following types:
|
493
|
-
# * (`String`) The path to a service account key file in JSON format
|
494
|
-
# * (`Hash`) A service account key as a Hash
|
495
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
496
|
-
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
497
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
498
|
-
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
499
|
-
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
500
|
-
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
501
|
-
# * (`nil`) indicating no credentials
|
502
|
-
# @return [::Object]
|
503
|
-
# @!attribute [rw] scope
|
504
|
-
# The OAuth scopes
|
505
|
-
# @return [::Array<::String>]
|
506
|
-
# @!attribute [rw] lib_name
|
507
|
-
# The library name as recorded in instrumentation and logging
|
508
|
-
# @return [::String]
|
509
|
-
# @!attribute [rw] lib_version
|
510
|
-
# The library version as recorded in instrumentation and logging
|
511
|
-
# @return [::String]
|
512
|
-
# @!attribute [rw] channel_args
|
513
|
-
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
514
|
-
# `GRPC::Core::Channel` object is provided as the credential.
|
515
|
-
# @return [::Hash]
|
516
|
-
# @!attribute [rw] interceptors
|
517
|
-
# An array of interceptors that are run before calls are executed.
|
518
|
-
# @return [::Array<::GRPC::ClientInterceptor>]
|
519
|
-
# @!attribute [rw] timeout
|
520
|
-
# The call timeout in seconds.
|
521
|
-
# @return [::Numeric]
|
522
|
-
# @!attribute [rw] metadata
|
523
|
-
# Additional gRPC headers to be sent with the call.
|
524
|
-
# @return [::Hash{::Symbol=>::String}]
|
525
|
-
# @!attribute [rw] retry_policy
|
526
|
-
# The retry policy. The value is a hash with the following keys:
|
527
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
528
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
529
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
530
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
531
|
-
# trigger a retry.
|
532
|
-
# @return [::Hash]
|
533
|
-
# @!attribute [rw] quota_project
|
534
|
-
# A separate project against which to charge quota.
|
535
|
-
# @return [::String]
|
238
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
239
|
+
# objects to get a client for IAM policies instead of using this
|
240
|
+
# legacy class.
|
536
241
|
#
|
537
242
|
class Configuration
|
538
243
|
extend ::Gapic::Config
|
@@ -561,8 +266,7 @@ module Google
|
|
561
266
|
end
|
562
267
|
|
563
268
|
##
|
564
|
-
#
|
565
|
-
# @return [Rpcs]
|
269
|
+
# @deprecated
|
566
270
|
#
|
567
271
|
def rpcs
|
568
272
|
@rpcs ||= begin
|
@@ -573,36 +277,21 @@ module Google
|
|
573
277
|
end
|
574
278
|
|
575
279
|
##
|
576
|
-
#
|
577
|
-
#
|
578
|
-
#
|
579
|
-
# Each configuration object is of type `Gapic::Config::Method` and includes
|
580
|
-
# the following configuration fields:
|
581
|
-
#
|
582
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
583
|
-
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
584
|
-
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
585
|
-
# include the following keys:
|
586
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
587
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
588
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
589
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
590
|
-
# trigger a retry.
|
280
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
281
|
+
# objects to get a client for IAM policies instead of using this
|
282
|
+
# legacy class.
|
591
283
|
#
|
592
284
|
class Rpcs
|
593
285
|
##
|
594
|
-
#
|
595
|
-
# @return [::Gapic::Config::Method]
|
286
|
+
# @deprecated
|
596
287
|
#
|
597
288
|
attr_reader :set_iam_policy
|
598
289
|
##
|
599
|
-
#
|
600
|
-
# @return [::Gapic::Config::Method]
|
290
|
+
# @deprecated
|
601
291
|
#
|
602
292
|
attr_reader :get_iam_policy
|
603
293
|
##
|
604
|
-
#
|
605
|
-
# @return [::Gapic::Config::Method]
|
294
|
+
# @deprecated
|
606
295
|
#
|
607
296
|
attr_reader :test_iam_permissions
|
608
297
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
#
|
17
|
+
# Originally auto-generated by gapic-generator-ruby.
|
18
18
|
|
19
19
|
require "googleauth"
|
20
20
|
|
@@ -23,7 +23,11 @@ module Google
|
|
23
23
|
module PubSub
|
24
24
|
module V1
|
25
25
|
module IAMPolicy
|
26
|
-
|
26
|
+
##
|
27
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
28
|
+
# objects to get a client for IAM policies instead of using this
|
29
|
+
# legacy class.
|
30
|
+
#
|
27
31
|
class Credentials < ::Google::Auth::Credentials
|
28
32
|
self.scope = [
|
29
33
|
"https://www.googleapis.com/auth/cloud-platform",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
#
|
17
|
+
# Originally auto-generated by gapic-generator-ruby.
|
18
18
|
|
19
19
|
require "gapic/common"
|
20
20
|
require "gapic/config"
|
@@ -30,37 +30,11 @@ module Google
|
|
30
30
|
module PubSub
|
31
31
|
module V1
|
32
32
|
##
|
33
|
-
#
|
33
|
+
# This module contains the legacy IAM Policy client.
|
34
34
|
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# Any implementation of an API that offers access control features
|
39
|
-
# implements the google.iam.v1.IAMPolicy interface.
|
40
|
-
#
|
41
|
-
# ## Data model
|
42
|
-
#
|
43
|
-
# Access control is applied when a principal (user or service account), takes
|
44
|
-
# some action on a resource exposed by a service. Resources, identified by
|
45
|
-
# URI-like names, are the unit of access control specification. Service
|
46
|
-
# implementations can choose the granularity of access control and the
|
47
|
-
# supported permissions for their resources.
|
48
|
-
# For example one database service may allow access control to be
|
49
|
-
# specified only at the Table level, whereas another might allow access control
|
50
|
-
# to also be specified at the Column level.
|
51
|
-
#
|
52
|
-
# ## Policy Structure
|
53
|
-
#
|
54
|
-
# See google.iam.v1.Policy
|
55
|
-
#
|
56
|
-
# This is intentionally not a CRUD style API because access control policies
|
57
|
-
# are created and deleted implicitly with the resources to which they are
|
58
|
-
# attached.
|
59
|
-
#
|
60
|
-
# To load this service and instantiate a client:
|
61
|
-
#
|
62
|
-
# require "google/cloud/pubsub/v1/iam_policy"
|
63
|
-
# client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
35
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
36
|
+
# objects to get a client for IAM policies instead of using this
|
37
|
+
# legacy class.
|
64
38
|
#
|
65
39
|
module IAMPolicy
|
66
40
|
end
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/pubsub/v1/pubsub_pb"
|
21
|
+
require "google/iam/v1"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -179,6 +180,12 @@ module Google
|
|
179
180
|
@quota_project_id = @config.quota_project
|
180
181
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
181
182
|
|
183
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
184
|
+
config.credentials = credentials
|
185
|
+
config.quota_project = @quota_project_id
|
186
|
+
config.endpoint = @config.endpoint
|
187
|
+
end
|
188
|
+
|
182
189
|
@publisher_stub = ::Gapic::ServiceStub.new(
|
183
190
|
::Google::Cloud::PubSub::V1::Publisher::Stub,
|
184
191
|
credentials: credentials,
|
@@ -188,6 +195,13 @@ module Google
|
|
188
195
|
)
|
189
196
|
end
|
190
197
|
|
198
|
+
##
|
199
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
200
|
+
#
|
201
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
202
|
+
#
|
203
|
+
attr_reader :iam_policy_client
|
204
|
+
|
191
205
|
# Service calls
|
192
206
|
|
193
207
|
##
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/pubsub/v1/schema_pb"
|
21
|
+
require "google/iam/v1"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -133,6 +134,12 @@ module Google
|
|
133
134
|
@quota_project_id = @config.quota_project
|
134
135
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
135
136
|
|
137
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
138
|
+
config.credentials = credentials
|
139
|
+
config.quota_project = @quota_project_id
|
140
|
+
config.endpoint = @config.endpoint
|
141
|
+
end
|
142
|
+
|
136
143
|
@schema_service_stub = ::Gapic::ServiceStub.new(
|
137
144
|
::Google::Cloud::PubSub::V1::SchemaService::Stub,
|
138
145
|
credentials: credentials,
|
@@ -142,6 +149,13 @@ module Google
|
|
142
149
|
)
|
143
150
|
end
|
144
151
|
|
152
|
+
##
|
153
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
154
|
+
#
|
155
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
156
|
+
#
|
157
|
+
attr_reader :iam_policy_client
|
158
|
+
|
145
159
|
# Service calls
|
146
160
|
|
147
161
|
##
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/pubsub/v1/pubsub_pb"
|
21
|
+
require "google/iam/v1"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -215,6 +216,12 @@ module Google
|
|
215
216
|
@quota_project_id = @config.quota_project
|
216
217
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
217
218
|
|
219
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
220
|
+
config.credentials = credentials
|
221
|
+
config.quota_project = @quota_project_id
|
222
|
+
config.endpoint = @config.endpoint
|
223
|
+
end
|
224
|
+
|
218
225
|
@subscriber_stub = ::Gapic::ServiceStub.new(
|
219
226
|
::Google::Cloud::PubSub::V1::Subscriber::Stub,
|
220
227
|
credentials: credentials,
|
@@ -224,6 +231,13 @@ module Google
|
|
224
231
|
)
|
225
232
|
end
|
226
233
|
|
234
|
+
##
|
235
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
236
|
+
#
|
237
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
238
|
+
#
|
239
|
+
attr_reader :iam_policy_client
|
240
|
+
|
227
241
|
# Service calls
|
228
242
|
|
229
243
|
##
|
@@ -26,8 +26,6 @@ module Google
|
|
26
26
|
# service Foo {
|
27
27
|
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
28
28
|
# }
|
29
|
-
#
|
30
|
-
# The JSON representation for `Empty` is empty JSON object `{}`.
|
31
29
|
class Empty
|
32
30
|
include ::Google::Protobuf::MessageExts
|
33
31
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-pubsub-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.12'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.12'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -45,19 +45,25 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '1.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: google-iam-v1
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '0.0'
|
54
|
+
- - "<"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 2.a
|
54
57
|
type: :runtime
|
55
58
|
prerelease: false
|
56
59
|
version_requirements: !ruby/object:Gem::Requirement
|
57
60
|
requirements:
|
58
|
-
- - "
|
61
|
+
- - ">="
|
59
62
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
63
|
+
version: '0.0'
|
64
|
+
- - "<"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 2.a
|
61
67
|
- !ruby/object:Gem::Dependency
|
62
68
|
name: google-style
|
63
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,6 +191,7 @@ files:
|
|
185
191
|
- README.md
|
186
192
|
- lib/google-cloud-pubsub-v1.rb
|
187
193
|
- lib/google/cloud/pubsub/v1.rb
|
194
|
+
- lib/google/cloud/pubsub/v1/_helpers.rb
|
188
195
|
- lib/google/cloud/pubsub/v1/iam_policy.rb
|
189
196
|
- lib/google/cloud/pubsub/v1/iam_policy/client.rb
|
190
197
|
- lib/google/cloud/pubsub/v1/iam_policy/credentials.rb
|
@@ -210,9 +217,6 @@ files:
|
|
210
217
|
- proto_docs/README.md
|
211
218
|
- proto_docs/google/api/field_behavior.rb
|
212
219
|
- proto_docs/google/api/resource.rb
|
213
|
-
- proto_docs/google/iam/v1/iam_policy.rb
|
214
|
-
- proto_docs/google/iam/v1/options.rb
|
215
|
-
- proto_docs/google/iam/v1/policy.rb
|
216
220
|
- proto_docs/google/protobuf/duration.rb
|
217
221
|
- proto_docs/google/protobuf/empty.rb
|
218
222
|
- proto_docs/google/protobuf/field_mask.rb
|
@@ -1,87 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright 2020 Google LLC
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
-
|
19
|
-
|
20
|
-
module Google
|
21
|
-
module Iam
|
22
|
-
module V1
|
23
|
-
# Request message for `SetIamPolicy` method.
|
24
|
-
# @!attribute [rw] resource
|
25
|
-
# @return [::String]
|
26
|
-
# REQUIRED: The resource for which the policy is being specified.
|
27
|
-
# See the operation documentation for the appropriate value for this field.
|
28
|
-
# @!attribute [rw] policy
|
29
|
-
# @return [::Google::Iam::V1::Policy]
|
30
|
-
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
31
|
-
# the policy is limited to a few 10s of KB. An empty policy is a
|
32
|
-
# valid policy but certain Cloud Platform services (such as Projects)
|
33
|
-
# might reject them.
|
34
|
-
# @!attribute [rw] update_mask
|
35
|
-
# @return [::Google::Protobuf::FieldMask]
|
36
|
-
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
37
|
-
# the fields in the mask will be modified. If no mask is provided, the
|
38
|
-
# following default mask is used:
|
39
|
-
#
|
40
|
-
# `paths: "bindings, etag"`
|
41
|
-
class SetIamPolicyRequest
|
42
|
-
include ::Google::Protobuf::MessageExts
|
43
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
44
|
-
end
|
45
|
-
|
46
|
-
# Request message for `GetIamPolicy` method.
|
47
|
-
# @!attribute [rw] resource
|
48
|
-
# @return [::String]
|
49
|
-
# REQUIRED: The resource for which the policy is being requested.
|
50
|
-
# See the operation documentation for the appropriate value for this field.
|
51
|
-
# @!attribute [rw] options
|
52
|
-
# @return [::Google::Iam::V1::GetPolicyOptions]
|
53
|
-
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
54
|
-
# `GetIamPolicy`.
|
55
|
-
class GetIamPolicyRequest
|
56
|
-
include ::Google::Protobuf::MessageExts
|
57
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
58
|
-
end
|
59
|
-
|
60
|
-
# Request message for `TestIamPermissions` method.
|
61
|
-
# @!attribute [rw] resource
|
62
|
-
# @return [::String]
|
63
|
-
# REQUIRED: The resource for which the policy detail is being requested.
|
64
|
-
# See the operation documentation for the appropriate value for this field.
|
65
|
-
# @!attribute [rw] permissions
|
66
|
-
# @return [::Array<::String>]
|
67
|
-
# The set of permissions to check for the `resource`. Permissions with
|
68
|
-
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
69
|
-
# information see
|
70
|
-
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
71
|
-
class TestIamPermissionsRequest
|
72
|
-
include ::Google::Protobuf::MessageExts
|
73
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
74
|
-
end
|
75
|
-
|
76
|
-
# Response message for `TestIamPermissions` method.
|
77
|
-
# @!attribute [rw] permissions
|
78
|
-
# @return [::Array<::String>]
|
79
|
-
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
80
|
-
# allowed.
|
81
|
-
class TestIamPermissionsResponse
|
82
|
-
include ::Google::Protobuf::MessageExts
|
83
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright 2020 Google LLC
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
-
|
19
|
-
|
20
|
-
module Google
|
21
|
-
module Iam
|
22
|
-
module V1
|
23
|
-
# Encapsulates settings provided to GetIamPolicy.
|
24
|
-
# @!attribute [rw] requested_policy_version
|
25
|
-
# @return [::Integer]
|
26
|
-
# Optional. The maximum policy version that will be used to format the
|
27
|
-
# policy.
|
28
|
-
#
|
29
|
-
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
30
|
-
# rejected.
|
31
|
-
#
|
32
|
-
# Requests for policies with any conditional role bindings must specify
|
33
|
-
# version 3. Policies with no conditional role bindings may specify any valid
|
34
|
-
# value or leave the field unset.
|
35
|
-
#
|
36
|
-
# The policy in the response might use the policy version that you specified,
|
37
|
-
# or it might use a lower policy version. For example, if you specify version
|
38
|
-
# 3, but the policy has no conditional role bindings, the response uses
|
39
|
-
# version 1.
|
40
|
-
#
|
41
|
-
# To learn which resources support conditions in their IAM policies, see the
|
42
|
-
# [IAM
|
43
|
-
# documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
44
|
-
class GetPolicyOptions
|
45
|
-
include ::Google::Protobuf::MessageExts
|
46
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,418 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright 2020 Google LLC
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
-
|
19
|
-
|
20
|
-
module Google
|
21
|
-
module Iam
|
22
|
-
module V1
|
23
|
-
# An Identity and Access Management (IAM) policy, which specifies access
|
24
|
-
# controls for Google Cloud resources.
|
25
|
-
#
|
26
|
-
#
|
27
|
-
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
|
28
|
-
# `members`, or principals, to a single `role`. Principals can be user
|
29
|
-
# accounts, service accounts, Google groups, and domains (such as G Suite). A
|
30
|
-
# `role` is a named list of permissions; each `role` can be an IAM predefined
|
31
|
-
# role or a user-created custom role.
|
32
|
-
#
|
33
|
-
# For some types of Google Cloud resources, a `binding` can also specify a
|
34
|
-
# `condition`, which is a logical expression that allows access to a resource
|
35
|
-
# only if the expression evaluates to `true`. A condition can add constraints
|
36
|
-
# based on attributes of the request, the resource, or both. To learn which
|
37
|
-
# resources support conditions in their IAM policies, see the
|
38
|
-
# [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
39
|
-
#
|
40
|
-
# **JSON example:**
|
41
|
-
#
|
42
|
-
# {
|
43
|
-
# "bindings": [
|
44
|
-
# {
|
45
|
-
# "role": "roles/resourcemanager.organizationAdmin",
|
46
|
-
# "members": [
|
47
|
-
# "user:mike@example.com",
|
48
|
-
# "group:admins@example.com",
|
49
|
-
# "domain:google.com",
|
50
|
-
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
|
51
|
-
# ]
|
52
|
-
# },
|
53
|
-
# {
|
54
|
-
# "role": "roles/resourcemanager.organizationViewer",
|
55
|
-
# "members": [
|
56
|
-
# "user:eve@example.com"
|
57
|
-
# ],
|
58
|
-
# "condition": {
|
59
|
-
# "title": "expirable access",
|
60
|
-
# "description": "Does not grant access after Sep 2020",
|
61
|
-
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')",
|
62
|
-
# }
|
63
|
-
# }
|
64
|
-
# ],
|
65
|
-
# "etag": "BwWWja0YfJA=",
|
66
|
-
# "version": 3
|
67
|
-
# }
|
68
|
-
#
|
69
|
-
# **YAML example:**
|
70
|
-
#
|
71
|
-
# bindings:
|
72
|
-
# - members:
|
73
|
-
# - user:mike@example.com
|
74
|
-
# - group:admins@example.com
|
75
|
-
# - domain:google.com
|
76
|
-
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
77
|
-
# role: roles/resourcemanager.organizationAdmin
|
78
|
-
# - members:
|
79
|
-
# - user:eve@example.com
|
80
|
-
# role: roles/resourcemanager.organizationViewer
|
81
|
-
# condition:
|
82
|
-
# title: expirable access
|
83
|
-
# description: Does not grant access after Sep 2020
|
84
|
-
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
|
85
|
-
# etag: BwWWja0YfJA=
|
86
|
-
# version: 3
|
87
|
-
#
|
88
|
-
# For a description of IAM and its features, see the
|
89
|
-
# [IAM documentation](https://cloud.google.com/iam/docs/).
|
90
|
-
# @!attribute [rw] version
|
91
|
-
# @return [::Integer]
|
92
|
-
# Specifies the format of the policy.
|
93
|
-
#
|
94
|
-
# Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
|
95
|
-
# are rejected.
|
96
|
-
#
|
97
|
-
# Any operation that affects conditional role bindings must specify version
|
98
|
-
# `3`. This requirement applies to the following operations:
|
99
|
-
#
|
100
|
-
# * Getting a policy that includes a conditional role binding
|
101
|
-
# * Adding a conditional role binding to a policy
|
102
|
-
# * Changing a conditional role binding in a policy
|
103
|
-
# * Removing any role binding, with or without a condition, from a policy
|
104
|
-
# that includes conditions
|
105
|
-
#
|
106
|
-
# **Important:** If you use IAM Conditions, you must include the `etag` field
|
107
|
-
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
|
108
|
-
# you to overwrite a version `3` policy with a version `1` policy, and all of
|
109
|
-
# the conditions in the version `3` policy are lost.
|
110
|
-
#
|
111
|
-
# If a policy does not include any conditions, operations on that policy may
|
112
|
-
# specify any valid version or leave the field unset.
|
113
|
-
#
|
114
|
-
# To learn which resources support conditions in their IAM policies, see the
|
115
|
-
# [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
116
|
-
# @!attribute [rw] bindings
|
117
|
-
# @return [::Array<::Google::Iam::V1::Binding>]
|
118
|
-
# Associates a list of `members`, or principals, with a `role`. Optionally,
|
119
|
-
# may specify a `condition` that determines how and when the `bindings` are
|
120
|
-
# applied. Each of the `bindings` must contain at least one principal.
|
121
|
-
#
|
122
|
-
# The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
|
123
|
-
# of these principals can be Google groups. Each occurrence of a principal
|
124
|
-
# counts towards these limits. For example, if the `bindings` grant 50
|
125
|
-
# different roles to `user:alice@example.com`, and not to any other
|
126
|
-
# principal, then you can add another 1,450 principals to the `bindings` in
|
127
|
-
# the `Policy`.
|
128
|
-
# @!attribute [rw] audit_configs
|
129
|
-
# @return [::Array<::Google::Iam::V1::AuditConfig>]
|
130
|
-
# Specifies cloud audit logging configuration for this policy.
|
131
|
-
# @!attribute [rw] etag
|
132
|
-
# @return [::String]
|
133
|
-
# `etag` is used for optimistic concurrency control as a way to help
|
134
|
-
# prevent simultaneous updates of a policy from overwriting each other.
|
135
|
-
# It is strongly suggested that systems make use of the `etag` in the
|
136
|
-
# read-modify-write cycle to perform policy updates in order to avoid race
|
137
|
-
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
|
138
|
-
# systems are expected to put that etag in the request to `setIamPolicy` to
|
139
|
-
# ensure that their change will be applied to the same version of the policy.
|
140
|
-
#
|
141
|
-
# **Important:** If you use IAM Conditions, you must include the `etag` field
|
142
|
-
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
|
143
|
-
# you to overwrite a version `3` policy with a version `1` policy, and all of
|
144
|
-
# the conditions in the version `3` policy are lost.
|
145
|
-
class Policy
|
146
|
-
include ::Google::Protobuf::MessageExts
|
147
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
148
|
-
end
|
149
|
-
|
150
|
-
# Associates `members`, or principals, with a `role`.
|
151
|
-
# @!attribute [rw] role
|
152
|
-
# @return [::String]
|
153
|
-
# Role that is assigned to the list of `members`, or principals.
|
154
|
-
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
155
|
-
# @!attribute [rw] members
|
156
|
-
# @return [::Array<::String>]
|
157
|
-
# Specifies the principals requesting access for a Cloud Platform resource.
|
158
|
-
# `members` can have the following values:
|
159
|
-
#
|
160
|
-
# * `allUsers`: A special identifier that represents anyone who is
|
161
|
-
# on the internet; with or without a Google account.
|
162
|
-
#
|
163
|
-
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
164
|
-
# who is authenticated with a Google account or a service account.
|
165
|
-
#
|
166
|
-
# * `user:{emailid}`: An email address that represents a specific Google
|
167
|
-
# account. For example, `alice@example.com` .
|
168
|
-
#
|
169
|
-
#
|
170
|
-
# * `serviceAccount:{emailid}`: An email address that represents a service
|
171
|
-
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
172
|
-
#
|
173
|
-
# * `group:{emailid}`: An email address that represents a Google group.
|
174
|
-
# For example, `admins@example.com`.
|
175
|
-
#
|
176
|
-
# * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
|
177
|
-
# identifier) representing a user that has been recently deleted. For
|
178
|
-
# example, `alice@example.com?uid=123456789012345678901`. If the user is
|
179
|
-
# recovered, this value reverts to `user:{emailid}` and the recovered user
|
180
|
-
# retains the role in the binding.
|
181
|
-
#
|
182
|
-
# * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
|
183
|
-
# unique identifier) representing a service account that has been recently
|
184
|
-
# deleted. For example,
|
185
|
-
# `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
|
186
|
-
# If the service account is undeleted, this value reverts to
|
187
|
-
# `serviceAccount:{emailid}` and the undeleted service account retains the
|
188
|
-
# role in the binding.
|
189
|
-
#
|
190
|
-
# * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
|
191
|
-
# identifier) representing a Google group that has been recently
|
192
|
-
# deleted. For example, `admins@example.com?uid=123456789012345678901`. If
|
193
|
-
# the group is recovered, this value reverts to `group:{emailid}` and the
|
194
|
-
# recovered group retains the role in the binding.
|
195
|
-
#
|
196
|
-
#
|
197
|
-
# * `domain:{domain}`: The G Suite domain (primary) that represents all the
|
198
|
-
# users of that domain. For example, `google.com` or `example.com`.
|
199
|
-
# @!attribute [rw] condition
|
200
|
-
# @return [::Google::Type::Expr]
|
201
|
-
# The condition that is associated with this binding.
|
202
|
-
#
|
203
|
-
# If the condition evaluates to `true`, then this binding applies to the
|
204
|
-
# current request.
|
205
|
-
#
|
206
|
-
# If the condition evaluates to `false`, then this binding does not apply to
|
207
|
-
# the current request. However, a different role binding might grant the same
|
208
|
-
# role to one or more of the principals in this binding.
|
209
|
-
#
|
210
|
-
# To learn which resources support conditions in their IAM policies, see the
|
211
|
-
# [IAM
|
212
|
-
# documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
213
|
-
class Binding
|
214
|
-
include ::Google::Protobuf::MessageExts
|
215
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
216
|
-
end
|
217
|
-
|
218
|
-
# Specifies the audit configuration for a service.
|
219
|
-
# The configuration determines which permission types are logged, and what
|
220
|
-
# identities, if any, are exempted from logging.
|
221
|
-
# An AuditConfig must have one or more AuditLogConfigs.
|
222
|
-
#
|
223
|
-
# If there are AuditConfigs for both `allServices` and a specific service,
|
224
|
-
# the union of the two AuditConfigs is used for that service: the log_types
|
225
|
-
# specified in each AuditConfig are enabled, and the exempted_members in each
|
226
|
-
# AuditLogConfig are exempted.
|
227
|
-
#
|
228
|
-
# Example Policy with multiple AuditConfigs:
|
229
|
-
#
|
230
|
-
# {
|
231
|
-
# "audit_configs": [
|
232
|
-
# {
|
233
|
-
# "service": "allServices",
|
234
|
-
# "audit_log_configs": [
|
235
|
-
# {
|
236
|
-
# "log_type": "DATA_READ",
|
237
|
-
# "exempted_members": [
|
238
|
-
# "user:jose@example.com"
|
239
|
-
# ]
|
240
|
-
# },
|
241
|
-
# {
|
242
|
-
# "log_type": "DATA_WRITE"
|
243
|
-
# },
|
244
|
-
# {
|
245
|
-
# "log_type": "ADMIN_READ"
|
246
|
-
# }
|
247
|
-
# ]
|
248
|
-
# },
|
249
|
-
# {
|
250
|
-
# "service": "sampleservice.googleapis.com",
|
251
|
-
# "audit_log_configs": [
|
252
|
-
# {
|
253
|
-
# "log_type": "DATA_READ"
|
254
|
-
# },
|
255
|
-
# {
|
256
|
-
# "log_type": "DATA_WRITE",
|
257
|
-
# "exempted_members": [
|
258
|
-
# "user:aliya@example.com"
|
259
|
-
# ]
|
260
|
-
# }
|
261
|
-
# ]
|
262
|
-
# }
|
263
|
-
# ]
|
264
|
-
# }
|
265
|
-
#
|
266
|
-
# For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
|
267
|
-
# logging. It also exempts jose@example.com from DATA_READ logging, and
|
268
|
-
# aliya@example.com from DATA_WRITE logging.
|
269
|
-
# @!attribute [rw] service
|
270
|
-
# @return [::String]
|
271
|
-
# Specifies a service that will be enabled for audit logging.
|
272
|
-
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
|
273
|
-
# `allServices` is a special value that covers all services.
|
274
|
-
# @!attribute [rw] audit_log_configs
|
275
|
-
# @return [::Array<::Google::Iam::V1::AuditLogConfig>]
|
276
|
-
# The configuration for logging of each type of permission.
|
277
|
-
class AuditConfig
|
278
|
-
include ::Google::Protobuf::MessageExts
|
279
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
280
|
-
end
|
281
|
-
|
282
|
-
# Provides the configuration for logging a type of permissions.
|
283
|
-
# Example:
|
284
|
-
#
|
285
|
-
# {
|
286
|
-
# "audit_log_configs": [
|
287
|
-
# {
|
288
|
-
# "log_type": "DATA_READ",
|
289
|
-
# "exempted_members": [
|
290
|
-
# "user:jose@example.com"
|
291
|
-
# ]
|
292
|
-
# },
|
293
|
-
# {
|
294
|
-
# "log_type": "DATA_WRITE"
|
295
|
-
# }
|
296
|
-
# ]
|
297
|
-
# }
|
298
|
-
#
|
299
|
-
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
|
300
|
-
# jose@example.com from DATA_READ logging.
|
301
|
-
# @!attribute [rw] log_type
|
302
|
-
# @return [::Google::Iam::V1::AuditLogConfig::LogType]
|
303
|
-
# The log type that this config enables.
|
304
|
-
# @!attribute [rw] exempted_members
|
305
|
-
# @return [::Array<::String>]
|
306
|
-
# Specifies the identities that do not cause logging for this type of
|
307
|
-
# permission.
|
308
|
-
# Follows the same format of {::Google::Iam::V1::Binding#members Binding.members}.
|
309
|
-
class AuditLogConfig
|
310
|
-
include ::Google::Protobuf::MessageExts
|
311
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
312
|
-
|
313
|
-
# The list of valid permission types for which logging can be configured.
|
314
|
-
# Admin writes are always logged, and are not configurable.
|
315
|
-
module LogType
|
316
|
-
# Default case. Should never be this.
|
317
|
-
LOG_TYPE_UNSPECIFIED = 0
|
318
|
-
|
319
|
-
# Admin reads. Example: CloudIAM getIamPolicy
|
320
|
-
ADMIN_READ = 1
|
321
|
-
|
322
|
-
# Data writes. Example: CloudSQL Users create
|
323
|
-
DATA_WRITE = 2
|
324
|
-
|
325
|
-
# Data reads. Example: CloudSQL Users list
|
326
|
-
DATA_READ = 3
|
327
|
-
end
|
328
|
-
end
|
329
|
-
|
330
|
-
# The difference delta between two policies.
|
331
|
-
# @!attribute [rw] binding_deltas
|
332
|
-
# @return [::Array<::Google::Iam::V1::BindingDelta>]
|
333
|
-
# The delta for Bindings between two policies.
|
334
|
-
# @!attribute [rw] audit_config_deltas
|
335
|
-
# @return [::Array<::Google::Iam::V1::AuditConfigDelta>]
|
336
|
-
# The delta for AuditConfigs between two policies.
|
337
|
-
class PolicyDelta
|
338
|
-
include ::Google::Protobuf::MessageExts
|
339
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
340
|
-
end
|
341
|
-
|
342
|
-
# One delta entry for Binding. Each individual change (only one member in each
|
343
|
-
# entry) to a binding will be a separate entry.
|
344
|
-
# @!attribute [rw] action
|
345
|
-
# @return [::Google::Iam::V1::BindingDelta::Action]
|
346
|
-
# The action that was performed on a Binding.
|
347
|
-
# Required
|
348
|
-
# @!attribute [rw] role
|
349
|
-
# @return [::String]
|
350
|
-
# Role that is assigned to `members`.
|
351
|
-
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
352
|
-
# Required
|
353
|
-
# @!attribute [rw] member
|
354
|
-
# @return [::String]
|
355
|
-
# A single identity requesting access for a Cloud Platform resource.
|
356
|
-
# Follows the same format of Binding.members.
|
357
|
-
# Required
|
358
|
-
# @!attribute [rw] condition
|
359
|
-
# @return [::Google::Type::Expr]
|
360
|
-
# The condition that is associated with this binding.
|
361
|
-
class BindingDelta
|
362
|
-
include ::Google::Protobuf::MessageExts
|
363
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
364
|
-
|
365
|
-
# The type of action performed on a Binding in a policy.
|
366
|
-
module Action
|
367
|
-
# Unspecified.
|
368
|
-
ACTION_UNSPECIFIED = 0
|
369
|
-
|
370
|
-
# Addition of a Binding.
|
371
|
-
ADD = 1
|
372
|
-
|
373
|
-
# Removal of a Binding.
|
374
|
-
REMOVE = 2
|
375
|
-
end
|
376
|
-
end
|
377
|
-
|
378
|
-
# One delta entry for AuditConfig. Each individual change (only one
|
379
|
-
# exempted_member in each entry) to a AuditConfig will be a separate entry.
|
380
|
-
# @!attribute [rw] action
|
381
|
-
# @return [::Google::Iam::V1::AuditConfigDelta::Action]
|
382
|
-
# The action that was performed on an audit configuration in a policy.
|
383
|
-
# Required
|
384
|
-
# @!attribute [rw] service
|
385
|
-
# @return [::String]
|
386
|
-
# Specifies a service that was configured for Cloud Audit Logging.
|
387
|
-
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
|
388
|
-
# `allServices` is a special value that covers all services.
|
389
|
-
# Required
|
390
|
-
# @!attribute [rw] exempted_member
|
391
|
-
# @return [::String]
|
392
|
-
# A single identity that is exempted from "data access" audit
|
393
|
-
# logging for the `service` specified above.
|
394
|
-
# Follows the same format of Binding.members.
|
395
|
-
# @!attribute [rw] log_type
|
396
|
-
# @return [::String]
|
397
|
-
# Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
|
398
|
-
# enabled, and cannot be configured.
|
399
|
-
# Required
|
400
|
-
class AuditConfigDelta
|
401
|
-
include ::Google::Protobuf::MessageExts
|
402
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
403
|
-
|
404
|
-
# The type of action performed on an audit configuration in a policy.
|
405
|
-
module Action
|
406
|
-
# Unspecified.
|
407
|
-
ACTION_UNSPECIFIED = 0
|
408
|
-
|
409
|
-
# Addition of an audit configuration.
|
410
|
-
ADD = 1
|
411
|
-
|
412
|
-
# Removal of an audit configuration.
|
413
|
-
REMOVE = 2
|
414
|
-
end
|
415
|
-
end
|
416
|
-
end
|
417
|
-
end
|
418
|
-
end
|