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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d5b2197051c2baf06680e62756f168fa711f4da24420dd61a6fb152cc3bda9e
4
- data.tar.gz: 8ed9d5855d6ed140587d8531fb8f63279b0db934584ba7baf259288893a5ea7e
3
+ metadata.gz: ef7aba14d920f91cdc95d2d14ee3cd24c5e3ecb4cfc8a8aa22e79ad1209764d5
4
+ data.tar.gz: 613486ea9041824d11605a72c673e0547b8af08b117da24ac160080d7245ffb3
5
5
  SHA512:
6
- metadata.gz: 55ad9b65f10df64221f4da533b4dceb9c668f49697b395259194944e4f01f8977ea5ffe3df20b5f0d93f5310cabf9c2f3a62533732cb939cb4b87a93853bae50
7
- data.tar.gz: 02735450c3d6629bc4396ab24d2f08cd77e23bad398f1fec5347e98b96fa0febb00bf39edc85f32480f48f830d02bd8717b912298102403616cc7f25025900bc
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 Client library for the Organization Policy V2 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://googleapis.dev/ruby/google-cloud-logging/latest)
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 == Client.configure.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
- # # iterate over all elements by calling #each, and the enumerable
256
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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
- # # iterate over all elements by calling #each, and the enumerable
361
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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
- config_attr :endpoint, "orgpolicy.googleapis.com", ::String
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