google-cloud-org_policy-v2 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/org_policy/v2/org_policy/client.rb +14 -16
- data/lib/google/cloud/org_policy/v2/org_policy/rest/client.rb +879 -0
- data/lib/google/cloud/org_policy/v2/org_policy/rest/service_stub.rb +565 -0
- data/lib/google/cloud/org_policy/v2/org_policy/rest.rb +71 -0
- data/lib/google/cloud/org_policy/v2/org_policy.rb +6 -0
- data/lib/google/cloud/org_policy/v2/rest.rb +37 -0
- data/lib/google/cloud/org_policy/v2/version.rb +1 -1
- data/lib/google/cloud/org_policy/v2.rb +5 -0
- data/lib/google/cloud/orgpolicy/v2/constraint_pb.rb +24 -22
- data/lib/google/cloud/orgpolicy/v2/orgpolicy_pb.rb +28 -66
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef7aba14d920f91cdc95d2d14ee3cd24c5e3ecb4cfc8a8aa22e79ad1209764d5
|
4
|
+
data.tar.gz: 613486ea9041824d11605a72c673e0547b8af08b117da24ac160080d7245ffb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2d7951d3783c38d5694f2d407004324f1abbb2ad61faaaca416cd114183badc1ae831571b6e76d3065352f717162f6ea19c8f76fd30d772df6ac6effa20e003
|
7
|
+
data.tar.gz: 5e88cf7fb13bbf46882bd38198ce086c692583d2276159b412a3cbc82898c09a1a800fa312731792877d787d560e5a8bc51a888e6635418be2bb638842500695
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Organization Policy V2 API
|
2
2
|
|
3
|
-
API
|
3
|
+
The Organization Policy API allows users to configure governance rules on their Google Cloud resources across the resource hierarchy.
|
4
4
|
|
5
5
|
The Cloud Org Policy service provides a simple mechanism for organizations to restrict the allowed configurations across their entire Cloud Resource hierarchy.
|
6
6
|
|
@@ -47,7 +47,7 @@ for general usage information.
|
|
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
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://
|
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
|
|
@@ -177,7 +177,7 @@ module Google
|
|
177
177
|
credentials = @config.credentials
|
178
178
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
179
179
|
# but only if the default endpoint does not have a region prefix.
|
180
|
-
enable_self_signed_jwt = @config.endpoint ==
|
180
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
181
181
|
!@config.endpoint.split(".").first.include?("-")
|
182
182
|
credentials ||= Credentials.default scope: @config.scope,
|
183
183
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -251,13 +251,11 @@ module Google
|
|
251
251
|
# # Call the list_constraints method.
|
252
252
|
# result = client.list_constraints request
|
253
253
|
#
|
254
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
255
|
-
# #
|
256
|
-
#
|
257
|
-
# # methods are also available for managing paging directly.
|
258
|
-
# result.each do |response|
|
254
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
255
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
256
|
+
# result.each do |item|
|
259
257
|
# # Each element is of type ::Google::Cloud::OrgPolicy::V2::Constraint.
|
260
|
-
# p
|
258
|
+
# p item
|
261
259
|
# end
|
262
260
|
#
|
263
261
|
def list_constraints request, options = nil
|
@@ -356,13 +354,11 @@ module Google
|
|
356
354
|
# # Call the list_policies method.
|
357
355
|
# result = client.list_policies request
|
358
356
|
#
|
359
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
360
|
-
# #
|
361
|
-
#
|
362
|
-
# # methods are also available for managing paging directly.
|
363
|
-
# result.each do |response|
|
357
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
358
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
359
|
+
# result.each do |item|
|
364
360
|
# # Each element is of type ::Google::Cloud::OrgPolicy::V2::Policy.
|
365
|
-
# p
|
361
|
+
# p item
|
366
362
|
# end
|
367
363
|
#
|
368
364
|
def list_policies request, options = nil
|
@@ -908,9 +904,9 @@ module Google
|
|
908
904
|
# * (`String`) The path to a service account key file in JSON format
|
909
905
|
# * (`Hash`) A service account key as a Hash
|
910
906
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
911
|
-
# (see the [googleauth docs](https://
|
907
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
912
908
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
913
|
-
# (see the [signet docs](https://
|
909
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
914
910
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
915
911
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
916
912
|
# * (`nil`) indicating no credentials
|
@@ -952,7 +948,9 @@ module Google
|
|
952
948
|
class Configuration
|
953
949
|
extend ::Gapic::Config
|
954
950
|
|
955
|
-
|
951
|
+
DEFAULT_ENDPOINT = "orgpolicy.googleapis.com"
|
952
|
+
|
953
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
956
954
|
config_attr :credentials, nil do |value|
|
957
955
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
958
956
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|