google-cloud-resource_manager-v3 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/resource_manager/v3/folders/client.rb +32 -8
- data/lib/google/cloud/resource_manager/v3/folders/operations.rb +28 -6
- data/lib/google/cloud/resource_manager/v3/folders/rest/client.rb +34 -7
- data/lib/google/cloud/resource_manager/v3/folders/rest/operations.rb +33 -8
- data/lib/google/cloud/resource_manager/v3/folders/rest/service_stub.rb +14 -2
- data/lib/google/cloud/resource_manager/v3/organizations/client.rb +31 -8
- data/lib/google/cloud/resource_manager/v3/organizations/rest/client.rb +33 -7
- data/lib/google/cloud/resource_manager/v3/organizations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/resource_manager/v3/projects/client.rb +32 -8
- data/lib/google/cloud/resource_manager/v3/projects/operations.rb +28 -6
- data/lib/google/cloud/resource_manager/v3/projects/rest/client.rb +34 -7
- data/lib/google/cloud/resource_manager/v3/projects/rest/operations.rb +33 -8
- data/lib/google/cloud/resource_manager/v3/projects/rest/service_stub.rb +14 -2
- data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +32 -8
- data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +28 -6
- data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/client.rb +34 -7
- data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/operations.rb +33 -8
- data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/service_stub.rb +14 -2
- data/lib/google/cloud/resource_manager/v3/tag_holds/client.rb +32 -8
- data/lib/google/cloud/resource_manager/v3/tag_holds/operations.rb +28 -6
- data/lib/google/cloud/resource_manager/v3/tag_holds/rest/client.rb +34 -7
- data/lib/google/cloud/resource_manager/v3/tag_holds/rest/operations.rb +33 -8
- data/lib/google/cloud/resource_manager/v3/tag_holds/rest/service_stub.rb +14 -2
- data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +32 -8
- data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +28 -6
- data/lib/google/cloud/resource_manager/v3/tag_keys/rest/client.rb +34 -7
- data/lib/google/cloud/resource_manager/v3/tag_keys/rest/operations.rb +33 -8
- data/lib/google/cloud/resource_manager/v3/tag_keys/rest/service_stub.rb +14 -2
- data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +32 -8
- data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +28 -6
- data/lib/google/cloud/resource_manager/v3/tag_values/rest/client.rb +34 -7
- data/lib/google/cloud/resource_manager/v3/tag_values/rest/operations.rb +33 -8
- data/lib/google/cloud/resource_manager/v3/tag_values/rest/service_stub.rb +14 -2
- data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- metadata +5 -5
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# different Google Cloud resources throughout the GCP resource hierarchy.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
|
36
|
+
|
34
37
|
include Paths
|
35
38
|
|
36
39
|
# @private
|
@@ -100,6 +103,15 @@ module Google
|
|
100
103
|
@config
|
101
104
|
end
|
102
105
|
|
106
|
+
##
|
107
|
+
# The effective universe domain
|
108
|
+
#
|
109
|
+
# @return [String]
|
110
|
+
#
|
111
|
+
def universe_domain
|
112
|
+
@tag_bindings_stub.universe_domain
|
113
|
+
end
|
114
|
+
|
103
115
|
##
|
104
116
|
# Create a new TagBindings client object.
|
105
117
|
#
|
@@ -133,8 +145,9 @@ module Google
|
|
133
145
|
credentials = @config.credentials
|
134
146
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
135
147
|
# but only if the default endpoint does not have a region prefix.
|
136
|
-
enable_self_signed_jwt = @config.endpoint
|
137
|
-
|
148
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
149
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
150
|
+
!@config.endpoint.split(".").first.include?("-"))
|
138
151
|
credentials ||= Credentials.default scope: @config.scope,
|
139
152
|
enable_self_signed_jwt: enable_self_signed_jwt
|
140
153
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -147,12 +160,15 @@ module Google
|
|
147
160
|
config.credentials = credentials
|
148
161
|
config.quota_project = @quota_project_id
|
149
162
|
config.endpoint = @config.endpoint
|
163
|
+
config.universe_domain = @config.universe_domain
|
150
164
|
end
|
151
165
|
|
152
166
|
@tag_bindings_stub = ::Gapic::ServiceStub.new(
|
153
167
|
::Google::Cloud::ResourceManager::V3::TagBindings::Stub,
|
154
|
-
credentials:
|
155
|
-
endpoint:
|
168
|
+
credentials: credentials,
|
169
|
+
endpoint: @config.endpoint,
|
170
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
171
|
+
universe_domain: @config.universe_domain,
|
156
172
|
channel_args: @config.channel_args,
|
157
173
|
interceptors: @config.interceptors,
|
158
174
|
channel_pool_config: @config.channel_pool
|
@@ -568,9 +584,9 @@ module Google
|
|
568
584
|
# end
|
569
585
|
#
|
570
586
|
# @!attribute [rw] endpoint
|
571
|
-
#
|
572
|
-
#
|
573
|
-
# @return [::String]
|
587
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
588
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
589
|
+
# @return [::String,nil]
|
574
590
|
# @!attribute [rw] credentials
|
575
591
|
# Credentials to send with calls. You may provide any of the following types:
|
576
592
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -616,13 +632,20 @@ module Google
|
|
616
632
|
# @!attribute [rw] quota_project
|
617
633
|
# A separate project against which to charge quota.
|
618
634
|
# @return [::String]
|
635
|
+
# @!attribute [rw] universe_domain
|
636
|
+
# The universe domain within which to make requests. This determines the
|
637
|
+
# default endpoint URL. The default value of nil uses the environment
|
638
|
+
# universe (usually the default "googleapis.com" universe).
|
639
|
+
# @return [::String,nil]
|
619
640
|
#
|
620
641
|
class Configuration
|
621
642
|
extend ::Gapic::Config
|
622
643
|
|
644
|
+
# @private
|
645
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
623
646
|
DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
|
624
647
|
|
625
|
-
config_attr :endpoint,
|
648
|
+
config_attr :endpoint, nil, ::String, nil
|
626
649
|
config_attr :credentials, nil do |value|
|
627
650
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
628
651
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -637,6 +660,7 @@ module Google
|
|
637
660
|
config_attr :metadata, nil, ::Hash, nil
|
638
661
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
639
662
|
config_attr :quota_project, nil, ::String, nil
|
663
|
+
config_attr :universe_domain, nil, ::String, nil
|
640
664
|
|
641
665
|
# @private
|
642
666
|
def initialize parent_config = nil
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module TagBindings
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
|
31
|
+
|
29
32
|
# @private
|
30
33
|
attr_reader :operations_stub
|
31
34
|
|
@@ -60,6 +63,15 @@ module Google
|
|
60
63
|
@config
|
61
64
|
end
|
62
65
|
|
66
|
+
##
|
67
|
+
# The effective universe domain
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
#
|
71
|
+
def universe_domain
|
72
|
+
@operations_stub.universe_domain
|
73
|
+
end
|
74
|
+
|
63
75
|
##
|
64
76
|
# Create a new Operations client object.
|
65
77
|
#
|
@@ -90,8 +102,10 @@ module Google
|
|
90
102
|
|
91
103
|
@operations_stub = ::Gapic::ServiceStub.new(
|
92
104
|
::Google::Longrunning::Operations::Stub,
|
93
|
-
credentials:
|
94
|
-
endpoint:
|
105
|
+
credentials: credentials,
|
106
|
+
endpoint: @config.endpoint,
|
107
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
108
|
+
universe_domain: @config.universe_domain,
|
95
109
|
channel_args: @config.channel_args,
|
96
110
|
interceptors: @config.interceptors,
|
97
111
|
channel_pool_config: @config.channel_pool
|
@@ -613,9 +627,9 @@ module Google
|
|
613
627
|
# end
|
614
628
|
#
|
615
629
|
# @!attribute [rw] endpoint
|
616
|
-
#
|
617
|
-
#
|
618
|
-
# @return [::String]
|
630
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
631
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
632
|
+
# @return [::String,nil]
|
619
633
|
# @!attribute [rw] credentials
|
620
634
|
# Credentials to send with calls. You may provide any of the following types:
|
621
635
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -661,13 +675,20 @@ module Google
|
|
661
675
|
# @!attribute [rw] quota_project
|
662
676
|
# A separate project against which to charge quota.
|
663
677
|
# @return [::String]
|
678
|
+
# @!attribute [rw] universe_domain
|
679
|
+
# The universe domain within which to make requests. This determines the
|
680
|
+
# default endpoint URL. The default value of nil uses the environment
|
681
|
+
# universe (usually the default "googleapis.com" universe).
|
682
|
+
# @return [::String,nil]
|
664
683
|
#
|
665
684
|
class Configuration
|
666
685
|
extend ::Gapic::Config
|
667
686
|
|
687
|
+
# @private
|
688
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
668
689
|
DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
|
669
690
|
|
670
|
-
config_attr :endpoint,
|
691
|
+
config_attr :endpoint, nil, ::String, nil
|
671
692
|
config_attr :credentials, nil do |value|
|
672
693
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
673
694
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -682,6 +703,7 @@ module Google
|
|
682
703
|
config_attr :metadata, nil, ::Hash, nil
|
683
704
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
684
705
|
config_attr :quota_project, nil, ::String, nil
|
706
|
+
config_attr :universe_domain, nil, ::String, nil
|
685
707
|
|
686
708
|
# @private
|
687
709
|
def initialize parent_config = nil
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# different Google Cloud resources throughout the GCP resource hierarchy.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
include Paths
|
37
40
|
|
38
41
|
# @private
|
@@ -102,6 +105,15 @@ module Google
|
|
102
105
|
@config
|
103
106
|
end
|
104
107
|
|
108
|
+
##
|
109
|
+
# The effective universe domain
|
110
|
+
#
|
111
|
+
# @return [String]
|
112
|
+
#
|
113
|
+
def universe_domain
|
114
|
+
@tag_bindings_stub.universe_domain
|
115
|
+
end
|
116
|
+
|
105
117
|
##
|
106
118
|
# Create a new TagBindings REST client object.
|
107
119
|
#
|
@@ -129,8 +141,9 @@ module Google
|
|
129
141
|
credentials = @config.credentials
|
130
142
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
131
143
|
# but only if the default endpoint does not have a region prefix.
|
132
|
-
enable_self_signed_jwt = @config.endpoint
|
133
|
-
|
144
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
145
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
146
|
+
!@config.endpoint.split(".").first.include?("-"))
|
134
147
|
credentials ||= Credentials.default scope: @config.scope,
|
135
148
|
enable_self_signed_jwt: enable_self_signed_jwt
|
136
149
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -144,9 +157,15 @@ module Google
|
|
144
157
|
config.credentials = credentials
|
145
158
|
config.quota_project = @quota_project_id
|
146
159
|
config.endpoint = @config.endpoint
|
160
|
+
config.universe_domain = @config.universe_domain
|
147
161
|
end
|
148
162
|
|
149
|
-
@tag_bindings_stub = ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::ServiceStub.new
|
163
|
+
@tag_bindings_stub = ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::ServiceStub.new(
|
164
|
+
endpoint: @config.endpoint,
|
165
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
166
|
+
universe_domain: @config.universe_domain,
|
167
|
+
credentials: credentials
|
168
|
+
)
|
150
169
|
end
|
151
170
|
|
152
171
|
##
|
@@ -554,9 +573,9 @@ module Google
|
|
554
573
|
# end
|
555
574
|
#
|
556
575
|
# @!attribute [rw] endpoint
|
557
|
-
#
|
558
|
-
#
|
559
|
-
# @return [::String]
|
576
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
577
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
578
|
+
# @return [::String,nil]
|
560
579
|
# @!attribute [rw] credentials
|
561
580
|
# Credentials to send with calls. You may provide any of the following types:
|
562
581
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -593,13 +612,20 @@ module Google
|
|
593
612
|
# @!attribute [rw] quota_project
|
594
613
|
# A separate project against which to charge quota.
|
595
614
|
# @return [::String]
|
615
|
+
# @!attribute [rw] universe_domain
|
616
|
+
# The universe domain within which to make requests. This determines the
|
617
|
+
# default endpoint URL. The default value of nil uses the environment
|
618
|
+
# universe (usually the default "googleapis.com" universe).
|
619
|
+
# @return [::String,nil]
|
596
620
|
#
|
597
621
|
class Configuration
|
598
622
|
extend ::Gapic::Config
|
599
623
|
|
624
|
+
# @private
|
625
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
600
626
|
DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
|
601
627
|
|
602
|
-
config_attr :endpoint,
|
628
|
+
config_attr :endpoint, nil, ::String, nil
|
603
629
|
config_attr :credentials, nil do |value|
|
604
630
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
605
631
|
allowed.any? { |klass| klass === value }
|
@@ -611,6 +637,7 @@ module Google
|
|
611
637
|
config_attr :metadata, nil, ::Hash, nil
|
612
638
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
613
639
|
config_attr :quota_project, nil, ::String, nil
|
640
|
+
config_attr :universe_domain, nil, ::String, nil
|
614
641
|
|
615
642
|
# @private
|
616
643
|
def initialize parent_config = nil
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
|
31
|
+
|
29
32
|
# @private
|
30
33
|
attr_reader :operations_stub
|
31
34
|
|
@@ -60,6 +63,15 @@ module Google
|
|
60
63
|
@config
|
61
64
|
end
|
62
65
|
|
66
|
+
##
|
67
|
+
# The effective universe domain
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
#
|
71
|
+
def universe_domain
|
72
|
+
@operations_stub.universe_domain
|
73
|
+
end
|
74
|
+
|
63
75
|
##
|
64
76
|
# Create a new Operations client object.
|
65
77
|
#
|
@@ -84,8 +96,10 @@ module Google
|
|
84
96
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
85
97
|
|
86
98
|
@operations_stub = OperationsServiceStub.new(
|
87
|
-
endpoint:
|
88
|
-
|
99
|
+
endpoint: @config.endpoint,
|
100
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
101
|
+
universe_domain: @config.universe_domain,
|
102
|
+
credentials: credentials
|
89
103
|
)
|
90
104
|
|
91
105
|
# Used by an LRO wrapper for some methods of this service
|
@@ -478,9 +492,9 @@ module Google
|
|
478
492
|
# end
|
479
493
|
#
|
480
494
|
# @!attribute [rw] endpoint
|
481
|
-
#
|
482
|
-
#
|
483
|
-
# @return [::String]
|
495
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
496
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
497
|
+
# @return [::String,nil]
|
484
498
|
# @!attribute [rw] credentials
|
485
499
|
# Credentials to send with calls. You may provide any of the following types:
|
486
500
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -517,13 +531,20 @@ module Google
|
|
517
531
|
# @!attribute [rw] quota_project
|
518
532
|
# A separate project against which to charge quota.
|
519
533
|
# @return [::String]
|
534
|
+
# @!attribute [rw] universe_domain
|
535
|
+
# The universe domain within which to make requests. This determines the
|
536
|
+
# default endpoint URL. The default value of nil uses the environment
|
537
|
+
# universe (usually the default "googleapis.com" universe).
|
538
|
+
# @return [::String,nil]
|
520
539
|
#
|
521
540
|
class Configuration
|
522
541
|
extend ::Gapic::Config
|
523
542
|
|
543
|
+
# @private
|
544
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
524
545
|
DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
|
525
546
|
|
526
|
-
config_attr :endpoint,
|
547
|
+
config_attr :endpoint, nil, ::String, nil
|
527
548
|
config_attr :credentials, nil do |value|
|
528
549
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
529
550
|
allowed.any? { |klass| klass === value }
|
@@ -535,6 +556,7 @@ module Google
|
|
535
556
|
config_attr :metadata, nil, ::Hash, nil
|
536
557
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
537
558
|
config_attr :quota_project, nil, ::String, nil
|
559
|
+
config_attr :universe_domain, nil, ::String, nil
|
538
560
|
|
539
561
|
# @private
|
540
562
|
def initialize parent_config = nil
|
@@ -617,12 +639,15 @@ module Google
|
|
617
639
|
# Service stub contains baseline method implementations
|
618
640
|
# including transcoding, making the REST call, and deserialing the response.
|
619
641
|
class OperationsServiceStub
|
620
|
-
def initialize endpoint:, credentials:
|
642
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
621
643
|
# These require statements are intentionally placed here to initialize
|
622
644
|
# the REST modules only when it's required.
|
623
645
|
require "gapic/rest"
|
624
646
|
|
625
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
647
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
648
|
+
endpoint_template: endpoint_template,
|
649
|
+
universe_domain: universe_domain,
|
650
|
+
credentials: credentials
|
626
651
|
end
|
627
652
|
|
628
653
|
##
|
@@ -30,16 +30,28 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
def initialize endpoint:, credentials:
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
34
34
|
# These require statements are intentionally placed here to initialize
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
endpoint_template: endpoint_template,
|
40
|
+
universe_domain: universe_domain,
|
41
|
+
credentials: credentials,
|
39
42
|
numeric_enums: true,
|
40
43
|
raise_faraday_errors: false
|
41
44
|
end
|
42
45
|
|
46
|
+
##
|
47
|
+
# The effective universe domain
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
def universe_domain
|
52
|
+
@client_stub.universe_domain
|
53
|
+
end
|
54
|
+
|
43
55
|
##
|
44
56
|
# Baseline implementation for the list_tag_bindings REST call
|
45
57
|
#
|
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# so that TagHolds can be managed in the same location as their usage.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
|
39
|
+
|
37
40
|
include Paths
|
38
41
|
|
39
42
|
# @private
|
@@ -94,6 +97,15 @@ module Google
|
|
94
97
|
@config
|
95
98
|
end
|
96
99
|
|
100
|
+
##
|
101
|
+
# The effective universe domain
|
102
|
+
#
|
103
|
+
# @return [String]
|
104
|
+
#
|
105
|
+
def universe_domain
|
106
|
+
@tag_holds_stub.universe_domain
|
107
|
+
end
|
108
|
+
|
97
109
|
##
|
98
110
|
# Create a new TagHolds client object.
|
99
111
|
#
|
@@ -127,8 +139,9 @@ module Google
|
|
127
139
|
credentials = @config.credentials
|
128
140
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
129
141
|
# but only if the default endpoint does not have a region prefix.
|
130
|
-
enable_self_signed_jwt = @config.endpoint
|
131
|
-
|
142
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
143
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
144
|
+
!@config.endpoint.split(".").first.include?("-"))
|
132
145
|
credentials ||= Credentials.default scope: @config.scope,
|
133
146
|
enable_self_signed_jwt: enable_self_signed_jwt
|
134
147
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -141,12 +154,15 @@ module Google
|
|
141
154
|
config.credentials = credentials
|
142
155
|
config.quota_project = @quota_project_id
|
143
156
|
config.endpoint = @config.endpoint
|
157
|
+
config.universe_domain = @config.universe_domain
|
144
158
|
end
|
145
159
|
|
146
160
|
@tag_holds_stub = ::Gapic::ServiceStub.new(
|
147
161
|
::Google::Cloud::ResourceManager::V3::TagHolds::Stub,
|
148
|
-
credentials:
|
149
|
-
endpoint:
|
162
|
+
credentials: credentials,
|
163
|
+
endpoint: @config.endpoint,
|
164
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
165
|
+
universe_domain: @config.universe_domain,
|
150
166
|
channel_args: @config.channel_args,
|
151
167
|
interceptors: @config.interceptors,
|
152
168
|
channel_pool_config: @config.channel_pool
|
@@ -499,9 +515,9 @@ module Google
|
|
499
515
|
# end
|
500
516
|
#
|
501
517
|
# @!attribute [rw] endpoint
|
502
|
-
#
|
503
|
-
#
|
504
|
-
# @return [::String]
|
518
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
519
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
520
|
+
# @return [::String,nil]
|
505
521
|
# @!attribute [rw] credentials
|
506
522
|
# Credentials to send with calls. You may provide any of the following types:
|
507
523
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -547,13 +563,20 @@ module Google
|
|
547
563
|
# @!attribute [rw] quota_project
|
548
564
|
# A separate project against which to charge quota.
|
549
565
|
# @return [::String]
|
566
|
+
# @!attribute [rw] universe_domain
|
567
|
+
# The universe domain within which to make requests. This determines the
|
568
|
+
# default endpoint URL. The default value of nil uses the environment
|
569
|
+
# universe (usually the default "googleapis.com" universe).
|
570
|
+
# @return [::String,nil]
|
550
571
|
#
|
551
572
|
class Configuration
|
552
573
|
extend ::Gapic::Config
|
553
574
|
|
575
|
+
# @private
|
576
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
554
577
|
DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
|
555
578
|
|
556
|
-
config_attr :endpoint,
|
579
|
+
config_attr :endpoint, nil, ::String, nil
|
557
580
|
config_attr :credentials, nil do |value|
|
558
581
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
559
582
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -568,6 +591,7 @@ module Google
|
|
568
591
|
config_attr :metadata, nil, ::Hash, nil
|
569
592
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
570
593
|
config_attr :quota_project, nil, ::String, nil
|
594
|
+
config_attr :universe_domain, nil, ::String, nil
|
571
595
|
|
572
596
|
# @private
|
573
597
|
def initialize parent_config = nil
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module TagHolds
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
|
31
|
+
|
29
32
|
# @private
|
30
33
|
attr_reader :operations_stub
|
31
34
|
|
@@ -60,6 +63,15 @@ module Google
|
|
60
63
|
@config
|
61
64
|
end
|
62
65
|
|
66
|
+
##
|
67
|
+
# The effective universe domain
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
#
|
71
|
+
def universe_domain
|
72
|
+
@operations_stub.universe_domain
|
73
|
+
end
|
74
|
+
|
63
75
|
##
|
64
76
|
# Create a new Operations client object.
|
65
77
|
#
|
@@ -90,8 +102,10 @@ module Google
|
|
90
102
|
|
91
103
|
@operations_stub = ::Gapic::ServiceStub.new(
|
92
104
|
::Google::Longrunning::Operations::Stub,
|
93
|
-
credentials:
|
94
|
-
endpoint:
|
105
|
+
credentials: credentials,
|
106
|
+
endpoint: @config.endpoint,
|
107
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
108
|
+
universe_domain: @config.universe_domain,
|
95
109
|
channel_args: @config.channel_args,
|
96
110
|
interceptors: @config.interceptors,
|
97
111
|
channel_pool_config: @config.channel_pool
|
@@ -613,9 +627,9 @@ module Google
|
|
613
627
|
# end
|
614
628
|
#
|
615
629
|
# @!attribute [rw] endpoint
|
616
|
-
#
|
617
|
-
#
|
618
|
-
# @return [::String]
|
630
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
631
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
632
|
+
# @return [::String,nil]
|
619
633
|
# @!attribute [rw] credentials
|
620
634
|
# Credentials to send with calls. You may provide any of the following types:
|
621
635
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -661,13 +675,20 @@ module Google
|
|
661
675
|
# @!attribute [rw] quota_project
|
662
676
|
# A separate project against which to charge quota.
|
663
677
|
# @return [::String]
|
678
|
+
# @!attribute [rw] universe_domain
|
679
|
+
# The universe domain within which to make requests. This determines the
|
680
|
+
# default endpoint URL. The default value of nil uses the environment
|
681
|
+
# universe (usually the default "googleapis.com" universe).
|
682
|
+
# @return [::String,nil]
|
664
683
|
#
|
665
684
|
class Configuration
|
666
685
|
extend ::Gapic::Config
|
667
686
|
|
687
|
+
# @private
|
688
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
668
689
|
DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
|
669
690
|
|
670
|
-
config_attr :endpoint,
|
691
|
+
config_attr :endpoint, nil, ::String, nil
|
671
692
|
config_attr :credentials, nil do |value|
|
672
693
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
673
694
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -682,6 +703,7 @@ module Google
|
|
682
703
|
config_attr :metadata, nil, ::Hash, nil
|
683
704
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
684
705
|
config_attr :quota_project, nil, ::String, nil
|
706
|
+
config_attr :universe_domain, nil, ::String, nil
|
685
707
|
|
686
708
|
# @private
|
687
709
|
def initialize parent_config = nil
|