google-iam-v2 0.1.2 → 0.3.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/README.md +4 -4
- data/lib/google/iam/v2/deny_pb.rb +25 -8
- data/lib/google/iam/v2/policies/client.rb +18 -20
- data/lib/google/iam/v2/policies/operations.rb +14 -16
- data/lib/google/iam/v2/policies/rest/client.rb +735 -0
- data/lib/google/iam/v2/policies/rest/operations.rb +791 -0
- data/lib/google/iam/v2/policies/rest/service_stub.rb +343 -0
- data/lib/google/iam/v2/policies/rest.rb +50 -0
- data/lib/google/iam/v2/policies.rb +7 -1
- data/lib/google/iam/v2/policy_pb.rb +26 -47
- data/lib/google/iam/v2/rest.rb +35 -0
- data/lib/google/iam/v2/version.rb +1 -1
- data/lib/google/iam/v2.rb +7 -2
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +17 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6943707ac7a32f8a895195cbc9cb8777a0fc95ce8a4abd607c8c7f6c451885b3
|
4
|
+
data.tar.gz: bb476b2db4d45b9ef5d03ee92528b7e633fb7c0636ebf34aecb24655a1148243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b60d7cf0a0ad8bcc4fd42d0b770ea66985242634ccdfbb86bfa841c9cb171e202fbbd80a76a62f3fa95a24bdecfe55c49143ae2a0a1bd96f6d604bb3747f8027
|
7
|
+
data.tar.gz: 6a2a820967282d92dac31d447ade9c2bbff40e933176d0f5b7bab28cb416fdc682dbe65d7c8e7ba4ff3a5dadb9ff8e6da1a30f0bb852a38ca0d5d3d9d05c2f06
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the IAM V2 API
|
2
2
|
|
3
|
-
|
3
|
+
Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.
|
4
4
|
|
5
5
|
Manages identity and access control policies for Google Cloud Platform resources.
|
6
6
|
|
@@ -37,7 +37,7 @@ request = ::Google::Iam::V2::ListPoliciesRequest.new # (request fields as keywor
|
|
37
37
|
response = client.list_policies request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://rubydoc.info/gems/google-iam-v2)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/iam)
|
@@ -46,8 +46,8 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
49
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/iam/v2/deny.proto
|
3
4
|
|
@@ -5,16 +6,32 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/type/expr_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n\x18google/iam/v2/deny.proto\x12\rgoogle.iam.v2\x1a\x16google/type/expr.proto\"\xab\x01\n\x08\x44\x65nyRule\x12\x19\n\x11\x64\x65nied_principals\x18\x01 \x03(\t\x12\x1c\n\x14\x65xception_principals\x18\x02 \x03(\t\x12\x1a\n\x12\x64\x65nied_permissions\x18\x03 \x03(\t\x12\x1d\n\x15\x65xception_permissions\x18\x04 \x03(\t\x12+\n\x10\x64\x65nial_condition\x18\x05 \x01(\x0b\x32\x11.google.type.ExprB{\n\x11\x63om.google.iam.v2B\rDenyRuleProtoP\x01Z)cloud.google.com/go/iam/apiv2/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V2\xca\x02\x13Google\\Cloud\\Iam\\V2b\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
["google.type.Expr", "google/type/expr.proto"],
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
16
31
|
end
|
17
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
18
35
|
end
|
19
36
|
|
20
37
|
module Google
|
@@ -241,13 +241,11 @@ module Google
|
|
241
241
|
# # Call the list_policies method.
|
242
242
|
# result = client.list_policies request
|
243
243
|
#
|
244
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
245
|
-
# #
|
246
|
-
#
|
247
|
-
# # methods are also available for managing paging directly.
|
248
|
-
# result.each do |response|
|
244
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
245
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
246
|
+
# result.each do |item|
|
249
247
|
# # Each element is of type ::Google::Iam::V2::Policy.
|
250
|
-
# p
|
248
|
+
# p item
|
251
249
|
# end
|
252
250
|
#
|
253
251
|
def list_policies request, options = nil
|
@@ -444,14 +442,14 @@ module Google
|
|
444
442
|
# # Call the create_policy method.
|
445
443
|
# result = client.create_policy request
|
446
444
|
#
|
447
|
-
# # The returned object is of type Gapic::Operation. You can use
|
448
|
-
# #
|
449
|
-
# #
|
445
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
446
|
+
# # check the status of an operation, cancel it, or wait for results.
|
447
|
+
# # Here is how to wait for a response.
|
450
448
|
# result.wait_until_done! timeout: 60
|
451
449
|
# if result.response?
|
452
450
|
# p result.response
|
453
451
|
# else
|
454
|
-
# puts "
|
452
|
+
# puts "No response received."
|
455
453
|
# end
|
456
454
|
#
|
457
455
|
def create_policy request, options = nil
|
@@ -551,14 +549,14 @@ module Google
|
|
551
549
|
# # Call the update_policy method.
|
552
550
|
# result = client.update_policy request
|
553
551
|
#
|
554
|
-
# # The returned object is of type Gapic::Operation. You can use
|
555
|
-
# #
|
556
|
-
# #
|
552
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
553
|
+
# # check the status of an operation, cancel it, or wait for results.
|
554
|
+
# # Here is how to wait for a response.
|
557
555
|
# result.wait_until_done! timeout: 60
|
558
556
|
# if result.response?
|
559
557
|
# p result.response
|
560
558
|
# else
|
561
|
-
# puts "
|
559
|
+
# puts "No response received."
|
562
560
|
# end
|
563
561
|
#
|
564
562
|
def update_policy request, options = nil
|
@@ -660,14 +658,14 @@ module Google
|
|
660
658
|
# # Call the delete_policy method.
|
661
659
|
# result = client.delete_policy request
|
662
660
|
#
|
663
|
-
# # The returned object is of type Gapic::Operation. You can use
|
664
|
-
# #
|
665
|
-
# #
|
661
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
662
|
+
# # check the status of an operation, cancel it, or wait for results.
|
663
|
+
# # Here is how to wait for a response.
|
666
664
|
# result.wait_until_done! timeout: 60
|
667
665
|
# if result.response?
|
668
666
|
# p result.response
|
669
667
|
# else
|
670
|
-
# puts "
|
668
|
+
# puts "No response received."
|
671
669
|
# end
|
672
670
|
#
|
673
671
|
def delete_policy request, options = nil
|
@@ -750,9 +748,9 @@ module Google
|
|
750
748
|
# * (`String`) The path to a service account key file in JSON format
|
751
749
|
# * (`Hash`) A service account key as a Hash
|
752
750
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
753
|
-
# (see the [googleauth docs](https://
|
751
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
754
752
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
755
|
-
# (see the [signet docs](https://
|
753
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
756
754
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
757
755
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
758
756
|
# * (`nil`) indicating no credentials
|
@@ -157,13 +157,11 @@ module Google
|
|
157
157
|
# # Call the list_operations method.
|
158
158
|
# result = client.list_operations request
|
159
159
|
#
|
160
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
161
|
-
# #
|
162
|
-
#
|
163
|
-
# # methods are also available for managing paging directly.
|
164
|
-
# result.each do |response|
|
160
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
161
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
162
|
+
# result.each do |item|
|
165
163
|
# # Each element is of type ::Google::Longrunning::Operation.
|
166
|
-
# p
|
164
|
+
# p item
|
167
165
|
# end
|
168
166
|
#
|
169
167
|
def list_operations request, options = nil
|
@@ -252,14 +250,14 @@ module Google
|
|
252
250
|
# # Call the get_operation method.
|
253
251
|
# result = client.get_operation request
|
254
252
|
#
|
255
|
-
# # The returned object is of type Gapic::Operation. You can use
|
256
|
-
# #
|
257
|
-
# #
|
253
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
254
|
+
# # check the status of an operation, cancel it, or wait for results.
|
255
|
+
# # Here is how to wait for a response.
|
258
256
|
# result.wait_until_done! timeout: 60
|
259
257
|
# if result.response?
|
260
258
|
# p result.response
|
261
259
|
# else
|
262
|
-
# puts "
|
260
|
+
# puts "No response received."
|
263
261
|
# end
|
264
262
|
#
|
265
263
|
def get_operation request, options = nil
|
@@ -539,14 +537,14 @@ module Google
|
|
539
537
|
# # Call the wait_operation method.
|
540
538
|
# result = client.wait_operation request
|
541
539
|
#
|
542
|
-
# # The returned object is of type Gapic::Operation. You can use
|
543
|
-
# #
|
544
|
-
# #
|
540
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
541
|
+
# # check the status of an operation, cancel it, or wait for results.
|
542
|
+
# # Here is how to wait for a response.
|
545
543
|
# result.wait_until_done! timeout: 60
|
546
544
|
# if result.response?
|
547
545
|
# p result.response
|
548
546
|
# else
|
549
|
-
# puts "
|
547
|
+
# puts "No response received."
|
550
548
|
# end
|
551
549
|
#
|
552
550
|
def wait_operation request, options = nil
|
@@ -621,9 +619,9 @@ module Google
|
|
621
619
|
# * (`String`) The path to a service account key file in JSON format
|
622
620
|
# * (`Hash`) A service account key as a Hash
|
623
621
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
624
|
-
# (see the [googleauth docs](https://
|
622
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
625
623
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
626
|
-
# (see the [signet docs](https://
|
624
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
627
625
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
628
626
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
629
627
|
# * (`nil`) indicating no credentials
|