google-cloud-policy_troubleshooter 1.6.2 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d27059219be47cd8b4223131451548ce6da28c6aafb28fb1de25c1133bfc17c
|
4
|
+
data.tar.gz: 602f55135d37fd9e7ee22d6b9d3af9e85fa172c1594ce8086edb918f0f21e7a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b85cfb81727a3360731271cc3cb80c46591c34c4f932768e35c71c6efead0c4667202d6c2e3df453a9aaf8ac44f678b596110d59633c18dd81adfa197e7dc64
|
7
|
+
data.tar.gz: 36a3d4e846232e11a5cf9d121db10ea34a0616598509ff3252c75113d626ef6435239ce93bc91b94a6f9e5d82f91bb6c8c7529de6ee24c869abeafd2e8b4c04c
|
data/README.md
CHANGED
@@ -17,6 +17,7 @@ constructing client objects. Reference documentation for the client objects
|
|
17
17
|
themselves can be found in the client library documentation for the versioned
|
18
18
|
client gems:
|
19
19
|
[google-cloud-policy_troubleshooter-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest),
|
20
|
+
[google-cloud-policy_troubleshooter-iam-v3](https://cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-iam-v3/latest),
|
20
21
|
[google-cloud-policy_troubleshooter-iam-v3](https://cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-iam-v3/latest).
|
21
22
|
|
22
23
|
See also the [Product Documentation](https://cloud.google.com/iam/docs/troubleshooting-access)
|
@@ -35,9 +36,39 @@ In order to use this library, you first need to go through the following steps:
|
|
35
36
|
1. [Enable the API.](https://console.cloud.google.com/apis/library/policytroubleshooter.googleapis.com)
|
36
37
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
37
38
|
|
39
|
+
## Debug Logging
|
40
|
+
|
41
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
42
|
+
your application's integration with the API. When logging is activated, key
|
43
|
+
events such as requests and responses, along with data payloads and metadata
|
44
|
+
such as headers and client configuration, are logged to the standard error
|
45
|
+
stream.
|
46
|
+
|
47
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
48
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
49
|
+
customers, private keys, or other security data that could be compromising if
|
50
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
51
|
+
the principle of least access. Google also recommends that Client Library Debug
|
52
|
+
Logging be enabled only temporarily during active debugging, and not used
|
53
|
+
permanently in production.
|
54
|
+
|
55
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
56
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
57
|
+
list of client library gem names. This will select the default logging behavior,
|
58
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
59
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
60
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
61
|
+
results in logs appearing alongside your application logs in the
|
62
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
63
|
+
|
64
|
+
Debug logging also requires that the versioned clients for this service be
|
65
|
+
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
66
|
+
working, try updating the versioned clients in your bundle or installed gems:
|
67
|
+
[google-cloud-policy_troubleshooter-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest).
|
68
|
+
|
38
69
|
## Supported Ruby Versions
|
39
70
|
|
40
|
-
This library is supported on Ruby
|
71
|
+
This library is supported on Ruby 3.0+.
|
41
72
|
|
42
73
|
Google provides official support for Ruby versions that are actively supported
|
43
74
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -59,6 +59,11 @@ module Google
|
|
59
59
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
60
60
|
# the `transport` parameter.
|
61
61
|
#
|
62
|
+
# Raises an exception if the currently installed versioned client gem for the
|
63
|
+
# given API version does not support the given transport of the PolicyTroubleshooter service.
|
64
|
+
# You can determine whether the method will succeed by calling
|
65
|
+
# {Google::Cloud::PolicyTroubleshooter::Iam.policy_troubleshooter_available?}.
|
66
|
+
#
|
62
67
|
# ## About PolicyTroubleshooter
|
63
68
|
#
|
64
69
|
# IAM Policy Troubleshooter service.
|
@@ -82,6 +87,37 @@ module Google
|
|
82
87
|
service_module.const_get(:Client).new(&block)
|
83
88
|
end
|
84
89
|
|
90
|
+
##
|
91
|
+
# Determines whether the PolicyTroubleshooter service is supported by the current client.
|
92
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::PolicyTroubleshooter::Iam.policy_troubleshooter}.
|
93
|
+
# If false, that method will raise an exception. This could happen if the given
|
94
|
+
# API version does not exist or does not support the PolicyTroubleshooter service,
|
95
|
+
# or if the versioned client gem needs an update to support the PolicyTroubleshooter service.
|
96
|
+
#
|
97
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
98
|
+
# Defaults to `:v3`.
|
99
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
100
|
+
# @return [boolean] Whether the service is available.
|
101
|
+
#
|
102
|
+
def self.policy_troubleshooter_available? version: :v3, transport: :grpc
|
103
|
+
require "google/cloud/policy_troubleshooter/iam/#{version.to_s.downcase}"
|
104
|
+
package_name = Google::Cloud::PolicyTroubleshooter::Iam
|
105
|
+
.constants
|
106
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
107
|
+
.first
|
108
|
+
return false unless package_name
|
109
|
+
service_module = Google::Cloud::PolicyTroubleshooter::Iam.const_get package_name
|
110
|
+
return false unless service_module.const_defined? :PolicyTroubleshooter
|
111
|
+
service_module = service_module.const_get :PolicyTroubleshooter
|
112
|
+
if transport == :rest
|
113
|
+
return false unless service_module.const_defined? :Rest
|
114
|
+
service_module = service_module.const_get :Rest
|
115
|
+
end
|
116
|
+
service_module.const_defined? :Client
|
117
|
+
rescue ::LoadError
|
118
|
+
false
|
119
|
+
end
|
120
|
+
|
85
121
|
##
|
86
122
|
# Configure the google-cloud-policy_troubleshooter-iam library.
|
87
123
|
#
|
@@ -58,6 +58,11 @@ module Google
|
|
58
58
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
59
|
# the `transport` parameter.
|
60
60
|
#
|
61
|
+
# Raises an exception if the currently installed versioned client gem for the
|
62
|
+
# given API version does not support the given transport of the IamChecker service.
|
63
|
+
# You can determine whether the method will succeed by calling
|
64
|
+
# {Google::Cloud::PolicyTroubleshooter.iam_checker_available?}.
|
65
|
+
#
|
61
66
|
# ## About IamChecker
|
62
67
|
#
|
63
68
|
# IAM Policy Troubleshooter service.
|
@@ -81,6 +86,37 @@ module Google
|
|
81
86
|
service_module.const_get(:Client).new(&block)
|
82
87
|
end
|
83
88
|
|
89
|
+
##
|
90
|
+
# Determines whether the IamChecker service is supported by the current client.
|
91
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::PolicyTroubleshooter.iam_checker}.
|
92
|
+
# If false, that method will raise an exception. This could happen if the given
|
93
|
+
# API version does not exist or does not support the IamChecker service,
|
94
|
+
# or if the versioned client gem needs an update to support the IamChecker service.
|
95
|
+
#
|
96
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
97
|
+
# Defaults to `:v1`.
|
98
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
99
|
+
# @return [boolean] Whether the service is available.
|
100
|
+
#
|
101
|
+
def self.iam_checker_available? version: :v1, transport: :grpc
|
102
|
+
require "google/cloud/policy_troubleshooter/#{version.to_s.downcase}"
|
103
|
+
package_name = Google::Cloud::PolicyTroubleshooter
|
104
|
+
.constants
|
105
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
106
|
+
.first
|
107
|
+
return false unless package_name
|
108
|
+
service_module = Google::Cloud::PolicyTroubleshooter.const_get package_name
|
109
|
+
return false unless service_module.const_defined? :IamChecker
|
110
|
+
service_module = service_module.const_get :IamChecker
|
111
|
+
if transport == :rest
|
112
|
+
return false unless service_module.const_defined? :Rest
|
113
|
+
service_module = service_module.const_get :Rest
|
114
|
+
end
|
115
|
+
service_module.const_defined? :Client
|
116
|
+
rescue ::LoadError
|
117
|
+
false
|
118
|
+
end
|
119
|
+
|
84
120
|
##
|
85
121
|
# Configure the google-cloud-policy_troubleshooter library.
|
86
122
|
#
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-policy_troubleshooter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-cloud-core
|
@@ -87,7 +86,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
87
86
|
licenses:
|
88
87
|
- Apache-2.0
|
89
88
|
metadata: {}
|
90
|
-
post_install_message:
|
91
89
|
rdoc_options: []
|
92
90
|
require_paths:
|
93
91
|
- lib
|
@@ -95,15 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
95
93
|
requirements:
|
96
94
|
- - ">="
|
97
95
|
- !ruby/object:Gem::Version
|
98
|
-
version: '
|
96
|
+
version: '3.0'
|
99
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
98
|
requirements:
|
101
99
|
- - ">="
|
102
100
|
- !ruby/object:Gem::Version
|
103
101
|
version: '0'
|
104
102
|
requirements: []
|
105
|
-
rubygems_version: 3.
|
106
|
-
signing_key:
|
103
|
+
rubygems_version: 3.6.2
|
107
104
|
specification_version: 4
|
108
105
|
summary: API Client library for the IAM Policy Troubleshooter API
|
109
106
|
test_files: []
|