google-cloud-run-v2 0.11.0 → 0.13.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/AUTHENTICATION.md +72 -99
- data/lib/google/cloud/run/v2/condition_pb.rb +1 -1
- data/lib/google/cloud/run/v2/execution_pb.rb +2 -1
- data/lib/google/cloud/run/v2/execution_services_pb.rb +2 -0
- data/lib/google/cloud/run/v2/executions/client.rb +148 -14
- data/lib/google/cloud/run/v2/executions/operations.rb +28 -6
- data/lib/google/cloud/run/v2/executions/rest/client.rb +143 -13
- data/lib/google/cloud/run/v2/executions/rest/operations.rb +33 -8
- data/lib/google/cloud/run/v2/executions/rest/service_stub.rb +74 -2
- data/lib/google/cloud/run/v2/job_pb.rb +8 -1
- data/lib/google/cloud/run/v2/jobs/client.rb +67 -21
- data/lib/google/cloud/run/v2/jobs/operations.rb +28 -6
- data/lib/google/cloud/run/v2/jobs/rest/client.rb +39 -8
- data/lib/google/cloud/run/v2/jobs/rest/operations.rb +33 -8
- data/lib/google/cloud/run/v2/jobs/rest/service_stub.rb +14 -2
- data/lib/google/cloud/run/v2/k8s.min_pb.rb +3 -1
- data/lib/google/cloud/run/v2/revisions/client.rb +33 -8
- data/lib/google/cloud/run/v2/revisions/operations.rb +28 -6
- data/lib/google/cloud/run/v2/revisions/rest/client.rb +35 -7
- data/lib/google/cloud/run/v2/revisions/rest/operations.rb +33 -8
- data/lib/google/cloud/run/v2/revisions/rest/service_stub.rb +14 -2
- data/lib/google/cloud/run/v2/services/client.rb +33 -8
- data/lib/google/cloud/run/v2/services/operations.rb +28 -6
- data/lib/google/cloud/run/v2/services/rest/client.rb +35 -7
- data/lib/google/cloud/run/v2/services/rest/operations.rb +33 -8
- data/lib/google/cloud/run/v2/services/rest/service_stub.rb +14 -2
- data/lib/google/cloud/run/v2/task_pb.rb +1 -1
- data/lib/google/cloud/run/v2/tasks/client.rb +32 -8
- data/lib/google/cloud/run/v2/tasks/rest/client.rb +34 -7
- data/lib/google/cloud/run/v2/tasks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/run/v2/vendor_settings_pb.rb +3 -1
- data/lib/google/cloud/run/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/run/v2/condition.rb +3 -0
- data/proto_docs/google/cloud/run/v2/execution.rb +26 -6
- data/proto_docs/google/cloud/run/v2/job.rb +42 -0
- data/proto_docs/google/cloud/run/v2/k8s.min.rb +44 -4
- data/proto_docs/google/cloud/run/v2/task.rb +7 -2
- data/proto_docs/google/cloud/run/v2/vendor_settings.rb +33 -5
- metadata +7 -7
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# Cloud Run Service Control Plane API
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "run.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
include Paths
|
37
40
|
|
38
41
|
# @private
|
@@ -109,6 +112,15 @@ module Google
|
|
109
112
|
@config
|
110
113
|
end
|
111
114
|
|
115
|
+
##
|
116
|
+
# The effective universe domain
|
117
|
+
#
|
118
|
+
# @return [String]
|
119
|
+
#
|
120
|
+
def universe_domain
|
121
|
+
@services_stub.universe_domain
|
122
|
+
end
|
123
|
+
|
112
124
|
##
|
113
125
|
# Create a new Services REST client object.
|
114
126
|
#
|
@@ -136,8 +148,9 @@ module Google
|
|
136
148
|
credentials = @config.credentials
|
137
149
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
138
150
|
# but only if the default endpoint does not have a region prefix.
|
139
|
-
enable_self_signed_jwt = @config.endpoint
|
140
|
-
|
151
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
152
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
153
|
+
!@config.endpoint.split(".").first.include?("-"))
|
141
154
|
credentials ||= Credentials.default scope: @config.scope,
|
142
155
|
enable_self_signed_jwt: enable_self_signed_jwt
|
143
156
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -151,15 +164,22 @@ module Google
|
|
151
164
|
config.credentials = credentials
|
152
165
|
config.quota_project = @quota_project_id
|
153
166
|
config.endpoint = @config.endpoint
|
167
|
+
config.universe_domain = @config.universe_domain
|
154
168
|
end
|
155
169
|
|
156
170
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
157
171
|
config.credentials = credentials
|
158
172
|
config.quota_project = @quota_project_id
|
159
173
|
config.endpoint = @config.endpoint
|
174
|
+
config.universe_domain = @config.universe_domain
|
160
175
|
end
|
161
176
|
|
162
|
-
@services_stub = ::Google::Cloud::Run::V2::Services::Rest::ServiceStub.new
|
177
|
+
@services_stub = ::Google::Cloud::Run::V2::Services::Rest::ServiceStub.new(
|
178
|
+
endpoint: @config.endpoint,
|
179
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
180
|
+
universe_domain: @config.universe_domain,
|
181
|
+
credentials: credentials
|
182
|
+
)
|
163
183
|
end
|
164
184
|
|
165
185
|
##
|
@@ -927,9 +947,9 @@ module Google
|
|
927
947
|
# end
|
928
948
|
#
|
929
949
|
# @!attribute [rw] endpoint
|
930
|
-
#
|
931
|
-
#
|
932
|
-
# @return [::String]
|
950
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
951
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
952
|
+
# @return [::String,nil]
|
933
953
|
# @!attribute [rw] credentials
|
934
954
|
# Credentials to send with calls. You may provide any of the following types:
|
935
955
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -966,13 +986,20 @@ module Google
|
|
966
986
|
# @!attribute [rw] quota_project
|
967
987
|
# A separate project against which to charge quota.
|
968
988
|
# @return [::String]
|
989
|
+
# @!attribute [rw] universe_domain
|
990
|
+
# The universe domain within which to make requests. This determines the
|
991
|
+
# default endpoint URL. The default value of nil uses the environment
|
992
|
+
# universe (usually the default "googleapis.com" universe).
|
993
|
+
# @return [::String,nil]
|
969
994
|
#
|
970
995
|
class Configuration
|
971
996
|
extend ::Gapic::Config
|
972
997
|
|
998
|
+
# @private
|
999
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
973
1000
|
DEFAULT_ENDPOINT = "run.googleapis.com"
|
974
1001
|
|
975
|
-
config_attr :endpoint,
|
1002
|
+
config_attr :endpoint, nil, ::String, nil
|
976
1003
|
config_attr :credentials, nil do |value|
|
977
1004
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
978
1005
|
allowed.any? { |klass| klass === value }
|
@@ -984,6 +1011,7 @@ module Google
|
|
984
1011
|
config_attr :metadata, nil, ::Hash, nil
|
985
1012
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
986
1013
|
config_attr :quota_project, nil, ::String, nil
|
1014
|
+
config_attr :universe_domain, nil, ::String, nil
|
987
1015
|
|
988
1016
|
# @private
|
989
1017
|
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 = "run.$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
|
@@ -576,9 +590,9 @@ module Google
|
|
576
590
|
# end
|
577
591
|
#
|
578
592
|
# @!attribute [rw] endpoint
|
579
|
-
#
|
580
|
-
#
|
581
|
-
# @return [::String]
|
593
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
594
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
595
|
+
# @return [::String,nil]
|
582
596
|
# @!attribute [rw] credentials
|
583
597
|
# Credentials to send with calls. You may provide any of the following types:
|
584
598
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -615,13 +629,20 @@ module Google
|
|
615
629
|
# @!attribute [rw] quota_project
|
616
630
|
# A separate project against which to charge quota.
|
617
631
|
# @return [::String]
|
632
|
+
# @!attribute [rw] universe_domain
|
633
|
+
# The universe domain within which to make requests. This determines the
|
634
|
+
# default endpoint URL. The default value of nil uses the environment
|
635
|
+
# universe (usually the default "googleapis.com" universe).
|
636
|
+
# @return [::String,nil]
|
618
637
|
#
|
619
638
|
class Configuration
|
620
639
|
extend ::Gapic::Config
|
621
640
|
|
641
|
+
# @private
|
642
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
622
643
|
DEFAULT_ENDPOINT = "run.googleapis.com"
|
623
644
|
|
624
|
-
config_attr :endpoint,
|
645
|
+
config_attr :endpoint, nil, ::String, nil
|
625
646
|
config_attr :credentials, nil do |value|
|
626
647
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
627
648
|
allowed.any? { |klass| klass === value }
|
@@ -633,6 +654,7 @@ module Google
|
|
633
654
|
config_attr :metadata, nil, ::Hash, nil
|
634
655
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
635
656
|
config_attr :quota_project, nil, ::String, nil
|
657
|
+
config_attr :universe_domain, nil, ::String, nil
|
636
658
|
|
637
659
|
# @private
|
638
660
|
def initialize parent_config = nil
|
@@ -722,12 +744,15 @@ module Google
|
|
722
744
|
# Service stub contains baseline method implementations
|
723
745
|
# including transcoding, making the REST call, and deserialing the response.
|
724
746
|
class OperationsServiceStub
|
725
|
-
def initialize endpoint:, credentials:
|
747
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
726
748
|
# These require statements are intentionally placed here to initialize
|
727
749
|
# the REST modules only when it's required.
|
728
750
|
require "gapic/rest"
|
729
751
|
|
730
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
752
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
753
|
+
endpoint_template: endpoint_template,
|
754
|
+
universe_domain: universe_domain,
|
755
|
+
credentials: credentials
|
731
756
|
end
|
732
757
|
|
733
758
|
##
|
@@ -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 create_service REST call
|
45
57
|
#
|
@@ -16,7 +16,7 @@ require 'google/protobuf/timestamp_pb'
|
|
16
16
|
require 'google/rpc/status_pb'
|
17
17
|
|
18
18
|
|
19
|
-
descriptor_data = "\n\x1egoogle/cloud/run/v2/task.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/run/v2/condition.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"?\n\x0eGetTaskRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17run.googleapis.com/Task\"\x80\x01\n\x10ListTasksRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17run.googleapis.com/Task\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"V\n\x11ListTasksResponse\x12(\n\x05tasks\x18\x01 \x03(\x0b\x32\x19.google.cloud.run.v2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\
|
19
|
+
descriptor_data = "\n\x1egoogle/cloud/run/v2/task.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/run/v2/condition.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"?\n\x0eGetTaskRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17run.googleapis.com/Task\"\x80\x01\n\x10ListTasksRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17run.googleapis.com/Task\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"V\n\x11ListTasksResponse\x12(\n\x05tasks\x18\x01 \x03(\x0b\x32\x19.google.cloud.run.v2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb8\x0c\n\x04Task\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12:\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.run.v2.Task.LabelsEntryB\x03\xe0\x41\x03\x12\x44\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32*.google.cloud.run.v2.Task.AnnotationsEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0escheduled_time\x18\" \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x0f\x63ompletion_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12+\n\x03job\x18\x0c \x01(\tB\x1e\xe0\x41\x03\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x37\n\texecution\x18\r \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\x12\x32\n\ncontainers\x18\x0e \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12,\n\x07volumes\x18\x0f \x03(\x0b\x32\x1b.google.cloud.run.v2.Volume\x12\x13\n\x0bmax_retries\x18\x10 \x01(\x05\x12*\n\x07timeout\x18\x11 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fservice_account\x18\x12 \x01(\t\x12H\n\x15\x65xecution_environment\x18\x14 \x01(\x0e\x32).google.cloud.run.v2.ExecutionEnvironment\x12\x18\n\x0breconciling\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x16 \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12 \n\x13observed_generation\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\x12\n\x05index\x18\x18 \x01(\x05\x42\x03\xe0\x41\x03\x12\x14\n\x07retried\x18\x19 \x01(\x05\x42\x03\xe0\x41\x03\x12H\n\x13last_attempt_result\x18\x1a \x01(\x0b\x32&.google.cloud.run.v2.TaskAttemptResultB\x03\xe0\x41\x03\x12\x41\n\x0e\x65ncryption_key\x18\x1c \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x37\n\nvpc_access\x18\x1d \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccessB\x03\xe0\x41\x03\x12\x14\n\x07log_uri\x18 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18! \x01(\x08\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:w\xea\x41t\n\x17run.googleapis.com/Task\x12Vprojects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}R\x01\x01\"T\n\x11TaskAttemptResult\x12\'\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x16\n\texit_code\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x32\x96\x03\n\x05Tasks\x12\x97\x01\n\x07GetTask\x12#.google.cloud.run.v2.GetTaskRequest\x1a\x19.google.cloud.run.v2.Task\"L\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/jobs/*/executions/*/tasks/*}\xda\x41\x04name\x12\xaa\x01\n\tListTasks\x12%.google.cloud.run.v2.ListTasksRequest\x1a&.google.cloud.run.v2.ListTasksResponse\"N\x82\xd3\xe4\x93\x02?\x12=/v2/{parent=projects/*/locations/*/jobs/*/executions/*}/tasks\xda\x41\x06parent\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBQ\n\x17\x63om.google.cloud.run.v2B\tTaskProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3"
|
20
20
|
|
21
21
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
22
22
|
|
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# Cloud Run Task Control Plane API.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "run.$UNIVERSE_DOMAIN$"
|
36
|
+
|
34
37
|
include Paths
|
35
38
|
|
36
39
|
# @private
|
@@ -91,6 +94,15 @@ module Google
|
|
91
94
|
@config
|
92
95
|
end
|
93
96
|
|
97
|
+
##
|
98
|
+
# The effective universe domain
|
99
|
+
#
|
100
|
+
# @return [String]
|
101
|
+
#
|
102
|
+
def universe_domain
|
103
|
+
@tasks_stub.universe_domain
|
104
|
+
end
|
105
|
+
|
94
106
|
##
|
95
107
|
# Create a new Tasks client object.
|
96
108
|
#
|
@@ -124,8 +136,9 @@ module Google
|
|
124
136
|
credentials = @config.credentials
|
125
137
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
126
138
|
# but only if the default endpoint does not have a region prefix.
|
127
|
-
enable_self_signed_jwt = @config.endpoint
|
128
|
-
|
139
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
140
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
141
|
+
!@config.endpoint.split(".").first.include?("-"))
|
129
142
|
credentials ||= Credentials.default scope: @config.scope,
|
130
143
|
enable_self_signed_jwt: enable_self_signed_jwt
|
131
144
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -138,12 +151,15 @@ module Google
|
|
138
151
|
config.credentials = credentials
|
139
152
|
config.quota_project = @quota_project_id
|
140
153
|
config.endpoint = @config.endpoint
|
154
|
+
config.universe_domain = @config.universe_domain
|
141
155
|
end
|
142
156
|
|
143
157
|
@tasks_stub = ::Gapic::ServiceStub.new(
|
144
158
|
::Google::Cloud::Run::V2::Tasks::Stub,
|
145
|
-
credentials:
|
146
|
-
endpoint:
|
159
|
+
credentials: credentials,
|
160
|
+
endpoint: @config.endpoint,
|
161
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
162
|
+
universe_domain: @config.universe_domain,
|
147
163
|
channel_args: @config.channel_args,
|
148
164
|
interceptors: @config.interceptors,
|
149
165
|
channel_pool_config: @config.channel_pool
|
@@ -376,9 +392,9 @@ module Google
|
|
376
392
|
# end
|
377
393
|
#
|
378
394
|
# @!attribute [rw] endpoint
|
379
|
-
#
|
380
|
-
#
|
381
|
-
# @return [::String]
|
395
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
396
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
397
|
+
# @return [::String,nil]
|
382
398
|
# @!attribute [rw] credentials
|
383
399
|
# Credentials to send with calls. You may provide any of the following types:
|
384
400
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -424,13 +440,20 @@ module Google
|
|
424
440
|
# @!attribute [rw] quota_project
|
425
441
|
# A separate project against which to charge quota.
|
426
442
|
# @return [::String]
|
443
|
+
# @!attribute [rw] universe_domain
|
444
|
+
# The universe domain within which to make requests. This determines the
|
445
|
+
# default endpoint URL. The default value of nil uses the environment
|
446
|
+
# universe (usually the default "googleapis.com" universe).
|
447
|
+
# @return [::String,nil]
|
427
448
|
#
|
428
449
|
class Configuration
|
429
450
|
extend ::Gapic::Config
|
430
451
|
|
452
|
+
# @private
|
453
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
431
454
|
DEFAULT_ENDPOINT = "run.googleapis.com"
|
432
455
|
|
433
|
-
config_attr :endpoint,
|
456
|
+
config_attr :endpoint, nil, ::String, nil
|
434
457
|
config_attr :credentials, nil do |value|
|
435
458
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
436
459
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -445,6 +468,7 @@ module Google
|
|
445
468
|
config_attr :metadata, nil, ::Hash, nil
|
446
469
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
447
470
|
config_attr :quota_project, nil, ::String, nil
|
471
|
+
config_attr :universe_domain, nil, ::String, nil
|
448
472
|
|
449
473
|
# @private
|
450
474
|
def initialize parent_config = nil
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# Cloud Run Task Control Plane API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "run.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
include Paths
|
37
40
|
|
38
41
|
# @private
|
@@ -93,6 +96,15 @@ module Google
|
|
93
96
|
@config
|
94
97
|
end
|
95
98
|
|
99
|
+
##
|
100
|
+
# The effective universe domain
|
101
|
+
#
|
102
|
+
# @return [String]
|
103
|
+
#
|
104
|
+
def universe_domain
|
105
|
+
@tasks_stub.universe_domain
|
106
|
+
end
|
107
|
+
|
96
108
|
##
|
97
109
|
# Create a new Tasks REST client object.
|
98
110
|
#
|
@@ -120,8 +132,9 @@ module Google
|
|
120
132
|
credentials = @config.credentials
|
121
133
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
122
134
|
# but only if the default endpoint does not have a region prefix.
|
123
|
-
enable_self_signed_jwt = @config.endpoint
|
124
|
-
|
135
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
136
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
137
|
+
!@config.endpoint.split(".").first.include?("-"))
|
125
138
|
credentials ||= Credentials.default scope: @config.scope,
|
126
139
|
enable_self_signed_jwt: enable_self_signed_jwt
|
127
140
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -135,9 +148,15 @@ module Google
|
|
135
148
|
config.credentials = credentials
|
136
149
|
config.quota_project = @quota_project_id
|
137
150
|
config.endpoint = @config.endpoint
|
151
|
+
config.universe_domain = @config.universe_domain
|
138
152
|
end
|
139
153
|
|
140
|
-
@tasks_stub = ::Google::Cloud::Run::V2::Tasks::Rest::ServiceStub.new
|
154
|
+
@tasks_stub = ::Google::Cloud::Run::V2::Tasks::Rest::ServiceStub.new(
|
155
|
+
endpoint: @config.endpoint,
|
156
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
157
|
+
universe_domain: @config.universe_domain,
|
158
|
+
credentials: credentials
|
159
|
+
)
|
141
160
|
end
|
142
161
|
|
143
162
|
##
|
@@ -352,9 +371,9 @@ module Google
|
|
352
371
|
# end
|
353
372
|
#
|
354
373
|
# @!attribute [rw] endpoint
|
355
|
-
#
|
356
|
-
#
|
357
|
-
# @return [::String]
|
374
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
375
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
376
|
+
# @return [::String,nil]
|
358
377
|
# @!attribute [rw] credentials
|
359
378
|
# Credentials to send with calls. You may provide any of the following types:
|
360
379
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -391,13 +410,20 @@ module Google
|
|
391
410
|
# @!attribute [rw] quota_project
|
392
411
|
# A separate project against which to charge quota.
|
393
412
|
# @return [::String]
|
413
|
+
# @!attribute [rw] universe_domain
|
414
|
+
# The universe domain within which to make requests. This determines the
|
415
|
+
# default endpoint URL. The default value of nil uses the environment
|
416
|
+
# universe (usually the default "googleapis.com" universe).
|
417
|
+
# @return [::String,nil]
|
394
418
|
#
|
395
419
|
class Configuration
|
396
420
|
extend ::Gapic::Config
|
397
421
|
|
422
|
+
# @private
|
423
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
398
424
|
DEFAULT_ENDPOINT = "run.googleapis.com"
|
399
425
|
|
400
|
-
config_attr :endpoint,
|
426
|
+
config_attr :endpoint, nil, ::String, nil
|
401
427
|
config_attr :credentials, nil do |value|
|
402
428
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
403
429
|
allowed.any? { |klass| klass === value }
|
@@ -409,6 +435,7 @@ module Google
|
|
409
435
|
config_attr :metadata, nil, ::Hash, nil
|
410
436
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
411
437
|
config_attr :quota_project, nil, ::String, nil
|
438
|
+
config_attr :universe_domain, nil, ::String, nil
|
412
439
|
|
413
440
|
# @private
|
414
441
|
def initialize parent_config = nil
|
@@ -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 get_task REST call
|
45
57
|
#
|
@@ -4,10 +4,11 @@
|
|
4
4
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
|
+
require 'google/api/field_behavior_pb'
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
|
9
10
|
|
10
|
-
descriptor_data = "\n)google/cloud/run/v2/vendor_settings.proto\x12\x13google.cloud.run.v2\x1a\x19google/api/resource.proto\"\
|
11
|
+
descriptor_data = "\n)google/cloud/run/v2/vendor_settings.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe8\x02\n\tVpcAccess\x12:\n\tconnector\x18\x01 \x01(\tB\'\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\x12\x38\n\x06\x65gress\x18\x02 \x01(\x0e\x32(.google.cloud.run.v2.VpcAccess.VpcEgress\x12K\n\x12network_interfaces\x18\x03 \x03(\x0b\x32/.google.cloud.run.v2.VpcAccess.NetworkInterface\x1a\x45\n\x10NetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\x12\x0c\n\x04tags\x18\x03 \x03(\t\"Q\n\tVpcEgress\x12\x1a\n\x16VPC_EGRESS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x01\x12\x17\n\x13PRIVATE_RANGES_ONLY\x10\x02\"a\n\x13\x42inaryAuthorization\x12\x15\n\x0buse_default\x18\x01 \x01(\x08H\x00\x12 \n\x18\x62reakglass_justification\x18\x02 \x01(\tB\x11\n\x0f\x62inauthz_method\"I\n\x0fRevisionScaling\x12\x1a\n\x12min_instance_count\x18\x01 \x01(\x05\x12\x1a\n\x12max_instance_count\x18\x02 \x01(\x05*\x99\x01\n\x0eIngressTraffic\x12\x1f\n\x1bINGRESS_TRAFFIC_UNSPECIFIED\x10\x00\x12\x17\n\x13INGRESS_TRAFFIC_ALL\x10\x01\x12!\n\x1dINGRESS_TRAFFIC_INTERNAL_ONLY\x10\x02\x12*\n&INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER\x10\x03*}\n\x14\x45xecutionEnvironment\x12%\n!EXECUTION_ENVIRONMENT_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x45XECUTION_ENVIRONMENT_GEN1\x10\x01\x12\x1e\n\x1a\x45XECUTION_ENVIRONMENT_GEN2\x10\x02*p\n\x1d\x45ncryptionKeyRevocationAction\x12\x30\n,ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPREVENT_NEW\x10\x01\x12\x0c\n\x08SHUTDOWN\x10\x02\x42[\n\x17\x63om.google.cloud.run.v2B\x13VendorSettingsProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3"
|
11
12
|
|
12
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
14
|
|
@@ -38,6 +39,7 @@ module Google
|
|
38
39
|
module Run
|
39
40
|
module V2
|
40
41
|
VpcAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.VpcAccess").msgclass
|
42
|
+
VpcAccess::NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.VpcAccess.NetworkInterface").msgclass
|
41
43
|
VpcAccess::VpcEgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.VpcAccess.VpcEgress").enummodule
|
42
44
|
BinaryAuthorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.BinaryAuthorization").msgclass
|
43
45
|
RevisionScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.RevisionScaling").msgclass
|
@@ -21,6 +21,7 @@ module Google
|
|
21
21
|
module Api
|
22
22
|
# Required information for every language.
|
23
23
|
# @!attribute [rw] reference_docs_uri
|
24
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
24
25
|
# @return [::String]
|
25
26
|
# Link to automatically generated reference documentation. Example:
|
26
27
|
# https://cloud.google.com/nodejs/docs/reference/asset/latest
|
@@ -304,6 +305,19 @@ module Google
|
|
304
305
|
# seconds: 360 # 6 minutes
|
305
306
|
# total_poll_timeout:
|
306
307
|
# seconds: 54000 # 90 minutes
|
308
|
+
# @!attribute [rw] auto_populated_fields
|
309
|
+
# @return [::Array<::String>]
|
310
|
+
# List of top-level fields of the request message, that should be
|
311
|
+
# automatically populated by the client libraries based on their
|
312
|
+
# (google.api.field_info).format. Currently supported format: UUID4.
|
313
|
+
#
|
314
|
+
# Example of a YAML configuration:
|
315
|
+
#
|
316
|
+
# publishing:
|
317
|
+
# method_settings:
|
318
|
+
# - selector: google.example.v1.ExampleService.CreateExample
|
319
|
+
# auto_populated_fields:
|
320
|
+
# - request_id
|
307
321
|
class MethodSettings
|
308
322
|
include ::Google::Protobuf::MessageExts
|
309
323
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
# @return [::String]
|
27
27
|
# Required. The full name of the Execution.
|
28
28
|
# Format:
|
29
|
-
# projects
|
30
|
-
# where
|
29
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
30
|
+
# where `{project}` can be project id or number.
|
31
31
|
class GetExecutionRequest
|
32
32
|
include ::Google::Protobuf::MessageExts
|
33
33
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -38,8 +38,8 @@ module Google
|
|
38
38
|
# @return [::String]
|
39
39
|
# Required. The Execution from which the Executions should be listed.
|
40
40
|
# To list all Executions across Jobs, use "-" instead of Job name.
|
41
|
-
# Format: projects
|
42
|
-
# can be project id or number.
|
41
|
+
# Format: `projects/{project}/locations/{location}/jobs/{job}`, where
|
42
|
+
# `{project}` can be project id or number.
|
43
43
|
# @!attribute [rw] page_size
|
44
44
|
# @return [::Integer]
|
45
45
|
# Maximum number of Executions to return in this call.
|
@@ -73,8 +73,8 @@ module Google
|
|
73
73
|
# @return [::String]
|
74
74
|
# Required. The name of the Execution to delete.
|
75
75
|
# Format:
|
76
|
-
# projects
|
77
|
-
# where
|
76
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
77
|
+
# where `{project}` can be project id or number.
|
78
78
|
# @!attribute [rw] validate_only
|
79
79
|
# @return [::Boolean]
|
80
80
|
# Indicates that the request should be validated without actually
|
@@ -88,6 +88,26 @@ module Google
|
|
88
88
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
89
89
|
end
|
90
90
|
|
91
|
+
# Request message for deleting an Execution.
|
92
|
+
# @!attribute [rw] name
|
93
|
+
# @return [::String]
|
94
|
+
# Required. The name of the Execution to cancel.
|
95
|
+
# Format:
|
96
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
97
|
+
# where `{project}` can be project id or number.
|
98
|
+
# @!attribute [rw] validate_only
|
99
|
+
# @return [::Boolean]
|
100
|
+
# Indicates that the request should be validated without actually
|
101
|
+
# cancelling any resources.
|
102
|
+
# @!attribute [rw] etag
|
103
|
+
# @return [::String]
|
104
|
+
# A system-generated fingerprint for this version of the resource.
|
105
|
+
# This may be used to detect modification conflict during updates.
|
106
|
+
class CancelExecutionRequest
|
107
|
+
include ::Google::Protobuf::MessageExts
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
109
|
+
end
|
110
|
+
|
91
111
|
# Execution represents the configuration of a single execution. A execution an
|
92
112
|
# immutable resource that references a container image which is run to
|
93
113
|
# completion.
|