google-apis-run_v2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/run_v2/classes.rb +1823 -0
- data/lib/google/apis/run_v2/gem_version.rb +28 -0
- data/lib/google/apis/run_v2/representations.rb +638 -0
- data/lib/google/apis/run_v2/service.rb +601 -0
- data/lib/google/apis/run_v2.rb +38 -0
- data/lib/google-apis-run_v2.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,601 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module RunV2
|
23
|
+
# Cloud Run Admin API
|
24
|
+
#
|
25
|
+
# Deploy and manage user provided container images that scale automatically
|
26
|
+
# based on incoming requests. The Cloud Run Admin API follows the Knative
|
27
|
+
# Serving API specification.
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
# require 'google/apis/run_v2'
|
31
|
+
#
|
32
|
+
# Run = Google::Apis::RunV2 # Alias the module
|
33
|
+
# service = Run::CloudRunService.new
|
34
|
+
#
|
35
|
+
# @see https://cloud.google.com/run/
|
36
|
+
class CloudRunService < Google::Apis::Core::BaseService
|
37
|
+
# @return [String]
|
38
|
+
# API key. Your API key identifies your project and provides you with API access,
|
39
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
40
|
+
attr_accessor :key
|
41
|
+
|
42
|
+
# @return [String]
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
super('https://run.googleapis.com/', '',
|
49
|
+
client_name: 'google-apis-run_v2',
|
50
|
+
client_version: Google::Apis::RunV2::GEM_VERSION)
|
51
|
+
@batch_path = 'batch'
|
52
|
+
end
|
53
|
+
|
54
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
55
|
+
# longer interested in the operation result. It does not cancel the operation.
|
56
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
57
|
+
# UNIMPLEMENTED`.
|
58
|
+
# @param [String] name
|
59
|
+
# The name of the operation resource to be deleted.
|
60
|
+
# @param [String] fields
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
62
|
+
# @param [String] quota_user
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
66
|
+
# Request-specific options
|
67
|
+
#
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
69
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleProtobufEmpty] parsed result object
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
71
|
+
#
|
72
|
+
# @return [Google::Apis::RunV2::GoogleProtobufEmpty]
|
73
|
+
#
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
77
|
+
def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
78
|
+
command = make_simple_command(:delete, 'v2/{+name}', options)
|
79
|
+
command.response_representation = Google::Apis::RunV2::GoogleProtobufEmpty::Representation
|
80
|
+
command.response_class = Google::Apis::RunV2::GoogleProtobufEmpty
|
81
|
+
command.params['name'] = name unless name.nil?
|
82
|
+
command.query['fields'] = fields unless fields.nil?
|
83
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
84
|
+
execute_or_queue_command(command, &block)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
88
|
+
# to poll the operation result at intervals as recommended by the API service.
|
89
|
+
# @param [String] name
|
90
|
+
# The name of the operation resource.
|
91
|
+
# @param [String] fields
|
92
|
+
# Selector specifying which fields to include in a partial response.
|
93
|
+
# @param [String] quota_user
|
94
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
95
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
96
|
+
# @param [Google::Apis::RequestOptions] options
|
97
|
+
# Request-specific options
|
98
|
+
#
|
99
|
+
# @yield [result, err] Result & error if block supplied
|
100
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleLongrunningOperation] parsed result object
|
101
|
+
# @yieldparam err [StandardError] error object if request failed
|
102
|
+
#
|
103
|
+
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
|
104
|
+
#
|
105
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
106
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
107
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
108
|
+
def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
109
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
110
|
+
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
|
111
|
+
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
|
112
|
+
command.params['name'] = name unless name.nil?
|
113
|
+
command.query['fields'] = fields unless fields.nil?
|
114
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
115
|
+
execute_or_queue_command(command, &block)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Lists operations that match the specified filter in the request. If the server
|
119
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
|
120
|
+
# binding allows API services to override the binding to use different resource
|
121
|
+
# name schemes, such as `users/*/operations`. To override the binding, API
|
122
|
+
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
|
123
|
+
# service configuration. For backwards compatibility, the default name includes
|
124
|
+
# the operations collection id, however overriding users must ensure the name
|
125
|
+
# binding is the parent resource, without the operations collection id.
|
126
|
+
# @param [String] name
|
127
|
+
# The name of the operation's parent resource.
|
128
|
+
# @param [String] filter
|
129
|
+
# The standard list filter.
|
130
|
+
# @param [Fixnum] page_size
|
131
|
+
# The standard list page size.
|
132
|
+
# @param [String] page_token
|
133
|
+
# The standard list page token.
|
134
|
+
# @param [String] fields
|
135
|
+
# Selector specifying which fields to include in a partial response.
|
136
|
+
# @param [String] quota_user
|
137
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
138
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
139
|
+
# @param [Google::Apis::RequestOptions] options
|
140
|
+
# Request-specific options
|
141
|
+
#
|
142
|
+
# @yield [result, err] Result & error if block supplied
|
143
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleLongrunningListOperationsResponse] parsed result object
|
144
|
+
# @yieldparam err [StandardError] error object if request failed
|
145
|
+
#
|
146
|
+
# @return [Google::Apis::RunV2::GoogleLongrunningListOperationsResponse]
|
147
|
+
#
|
148
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
149
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
150
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
151
|
+
def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
152
|
+
command = make_simple_command(:get, 'v2/{+name}/operations', options)
|
153
|
+
command.response_representation = Google::Apis::RunV2::GoogleLongrunningListOperationsResponse::Representation
|
154
|
+
command.response_class = Google::Apis::RunV2::GoogleLongrunningListOperationsResponse
|
155
|
+
command.params['name'] = name unless name.nil?
|
156
|
+
command.query['filter'] = filter unless filter.nil?
|
157
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
158
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
159
|
+
command.query['fields'] = fields unless fields.nil?
|
160
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
161
|
+
execute_or_queue_command(command, &block)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Creates a new Service in a given project and location.
|
165
|
+
# @param [String] parent
|
166
|
+
# Required. The location and project in which this service should be created.
|
167
|
+
# Format: projects/`projectnumber`/locations/`location`
|
168
|
+
# @param [Google::Apis::RunV2::GoogleCloudRunOpV2Service] google_cloud_run_op_v2_service_object
|
169
|
+
# @param [String] service_id
|
170
|
+
# Required. The unique identifier for the Service. The name of the service
|
171
|
+
# becomes `parent`/services/`service_id`.
|
172
|
+
# @param [Boolean] validate_only
|
173
|
+
# Indicates that the request should be validated and default values populated,
|
174
|
+
# without persisting the request or creating any resources.
|
175
|
+
# @param [String] fields
|
176
|
+
# Selector specifying which fields to include in a partial response.
|
177
|
+
# @param [String] quota_user
|
178
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
179
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
180
|
+
# @param [Google::Apis::RequestOptions] options
|
181
|
+
# Request-specific options
|
182
|
+
#
|
183
|
+
# @yield [result, err] Result & error if block supplied
|
184
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleLongrunningOperation] parsed result object
|
185
|
+
# @yieldparam err [StandardError] error object if request failed
|
186
|
+
#
|
187
|
+
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
|
188
|
+
#
|
189
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
190
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
191
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
192
|
+
def create_project_location_service(parent, google_cloud_run_op_v2_service_object = nil, service_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
193
|
+
command = make_simple_command(:post, 'v2/{+parent}/services', options)
|
194
|
+
command.request_representation = Google::Apis::RunV2::GoogleCloudRunOpV2Service::Representation
|
195
|
+
command.request_object = google_cloud_run_op_v2_service_object
|
196
|
+
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
|
197
|
+
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
|
198
|
+
command.params['parent'] = parent unless parent.nil?
|
199
|
+
command.query['serviceId'] = service_id unless service_id.nil?
|
200
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
201
|
+
command.query['fields'] = fields unless fields.nil?
|
202
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
203
|
+
execute_or_queue_command(command, &block)
|
204
|
+
end
|
205
|
+
|
206
|
+
# Deletes a Service. This will cause the Service to stop serving traffic and
|
207
|
+
# will delete all revisions.
|
208
|
+
# @param [String] name
|
209
|
+
# Required. The full name of the Service. Format: projects/`projectnumber`/
|
210
|
+
# locations/`location`/services/`service`
|
211
|
+
# @param [String] etag
|
212
|
+
# A system-generated fingerprint for this version of the resource. May be used
|
213
|
+
# to detect modification conflict during updates.
|
214
|
+
# @param [Boolean] validate_only
|
215
|
+
# Indicates that the request should be validated without actually deleting any
|
216
|
+
# resources.
|
217
|
+
# @param [String] fields
|
218
|
+
# Selector specifying which fields to include in a partial response.
|
219
|
+
# @param [String] quota_user
|
220
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
221
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
222
|
+
# @param [Google::Apis::RequestOptions] options
|
223
|
+
# Request-specific options
|
224
|
+
#
|
225
|
+
# @yield [result, err] Result & error if block supplied
|
226
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleLongrunningOperation] parsed result object
|
227
|
+
# @yieldparam err [StandardError] error object if request failed
|
228
|
+
#
|
229
|
+
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
|
230
|
+
#
|
231
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
232
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
233
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
234
|
+
def delete_project_location_service(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
235
|
+
command = make_simple_command(:delete, 'v2/{+name}', options)
|
236
|
+
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
|
237
|
+
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
|
238
|
+
command.params['name'] = name unless name.nil?
|
239
|
+
command.query['etag'] = etag unless etag.nil?
|
240
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
241
|
+
command.query['fields'] = fields unless fields.nil?
|
242
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
243
|
+
execute_or_queue_command(command, &block)
|
244
|
+
end
|
245
|
+
|
246
|
+
# Gets information about a Service.
|
247
|
+
# @param [String] name
|
248
|
+
# Required. The full name of the Service. Format: projects/`projectnumber`/
|
249
|
+
# locations/`location`/services/`service`
|
250
|
+
# @param [String] fields
|
251
|
+
# Selector specifying which fields to include in a partial response.
|
252
|
+
# @param [String] quota_user
|
253
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
254
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
255
|
+
# @param [Google::Apis::RequestOptions] options
|
256
|
+
# Request-specific options
|
257
|
+
#
|
258
|
+
# @yield [result, err] Result & error if block supplied
|
259
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleCloudRunOpV2Service] parsed result object
|
260
|
+
# @yieldparam err [StandardError] error object if request failed
|
261
|
+
#
|
262
|
+
# @return [Google::Apis::RunV2::GoogleCloudRunOpV2Service]
|
263
|
+
#
|
264
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
265
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
266
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
267
|
+
def get_project_location_service(name, fields: nil, quota_user: nil, options: nil, &block)
|
268
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
269
|
+
command.response_representation = Google::Apis::RunV2::GoogleCloudRunOpV2Service::Representation
|
270
|
+
command.response_class = Google::Apis::RunV2::GoogleCloudRunOpV2Service
|
271
|
+
command.params['name'] = name unless name.nil?
|
272
|
+
command.query['fields'] = fields unless fields.nil?
|
273
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
274
|
+
execute_or_queue_command(command, &block)
|
275
|
+
end
|
276
|
+
|
277
|
+
# Get the IAM Access Control policy currently in effect for the given Cloud Run
|
278
|
+
# Service. This result does not include any inherited policies.
|
279
|
+
# @param [String] resource
|
280
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
281
|
+
# operation documentation for the appropriate value for this field.
|
282
|
+
# @param [Fixnum] options_requested_policy_version
|
283
|
+
# Optional. The maximum policy version that will be used to format the policy.
|
284
|
+
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
285
|
+
# rejected. Requests for policies with any conditional role bindings must
|
286
|
+
# specify version 3. Policies with no conditional role bindings may specify any
|
287
|
+
# valid value or leave the field unset. The policy in the response might use the
|
288
|
+
# policy version that you specified, or it might use a lower policy version. For
|
289
|
+
# example, if you specify version 3, but the policy has no conditional role
|
290
|
+
# bindings, the response uses version 1. To learn which resources support
|
291
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
292
|
+
# google.com/iam/help/conditions/resource-policies).
|
293
|
+
# @param [String] fields
|
294
|
+
# Selector specifying which fields to include in a partial response.
|
295
|
+
# @param [String] quota_user
|
296
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
297
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
298
|
+
# @param [Google::Apis::RequestOptions] options
|
299
|
+
# Request-specific options
|
300
|
+
#
|
301
|
+
# @yield [result, err] Result & error if block supplied
|
302
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleIamV1Policy] parsed result object
|
303
|
+
# @yieldparam err [StandardError] error object if request failed
|
304
|
+
#
|
305
|
+
# @return [Google::Apis::RunV2::GoogleIamV1Policy]
|
306
|
+
#
|
307
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
308
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
309
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
310
|
+
def get_project_location_service_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
311
|
+
command = make_simple_command(:get, 'v2/{+resource}:getIamPolicy', options)
|
312
|
+
command.response_representation = Google::Apis::RunV2::GoogleIamV1Policy::Representation
|
313
|
+
command.response_class = Google::Apis::RunV2::GoogleIamV1Policy
|
314
|
+
command.params['resource'] = resource unless resource.nil?
|
315
|
+
command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
|
316
|
+
command.query['fields'] = fields unless fields.nil?
|
317
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
318
|
+
execute_or_queue_command(command, &block)
|
319
|
+
end
|
320
|
+
|
321
|
+
# List Services.
|
322
|
+
# @param [String] parent
|
323
|
+
# Required. The location and project to list resources on. Format: projects/`
|
324
|
+
# projectnumber`/locations/`location`
|
325
|
+
# @param [Fixnum] page_size
|
326
|
+
# Maximum number of Services to return in this call.
|
327
|
+
# @param [String] page_token
|
328
|
+
# A page token received from a previous call to ListServices. All other
|
329
|
+
# parameters must match.
|
330
|
+
# @param [Boolean] show_deleted
|
331
|
+
# If true, returns deleted (but unexpired) resources along with active ones.
|
332
|
+
# @param [String] fields
|
333
|
+
# Selector specifying which fields to include in a partial response.
|
334
|
+
# @param [String] quota_user
|
335
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
336
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
337
|
+
# @param [Google::Apis::RequestOptions] options
|
338
|
+
# Request-specific options
|
339
|
+
#
|
340
|
+
# @yield [result, err] Result & error if block supplied
|
341
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleCloudRunOpV2ListServicesResponse] parsed result object
|
342
|
+
# @yieldparam err [StandardError] error object if request failed
|
343
|
+
#
|
344
|
+
# @return [Google::Apis::RunV2::GoogleCloudRunOpV2ListServicesResponse]
|
345
|
+
#
|
346
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
347
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
348
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
349
|
+
def list_project_location_services(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
350
|
+
command = make_simple_command(:get, 'v2/{+parent}/services', options)
|
351
|
+
command.response_representation = Google::Apis::RunV2::GoogleCloudRunOpV2ListServicesResponse::Representation
|
352
|
+
command.response_class = Google::Apis::RunV2::GoogleCloudRunOpV2ListServicesResponse
|
353
|
+
command.params['parent'] = parent unless parent.nil?
|
354
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
355
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
356
|
+
command.query['showDeleted'] = show_deleted unless show_deleted.nil?
|
357
|
+
command.query['fields'] = fields unless fields.nil?
|
358
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
359
|
+
execute_or_queue_command(command, &block)
|
360
|
+
end
|
361
|
+
|
362
|
+
# Updates a Service.
|
363
|
+
# @param [String] name
|
364
|
+
# The fully qualified name of this Service. In CreateServiceRequest, this field
|
365
|
+
# is ignored, and instead composed from CreateServiceRequest.parent and
|
366
|
+
# CreateServiceRequest.service_id. Format: projects/`project`/locations/`
|
367
|
+
# location`/services/`service_id`
|
368
|
+
# @param [Google::Apis::RunV2::GoogleCloudRunOpV2Service] google_cloud_run_op_v2_service_object
|
369
|
+
# @param [Boolean] allow_missing
|
370
|
+
# If set to true, and if the Service does not exist, it will create a new one.
|
371
|
+
# Caller must have both create and update permissions for this call if this is
|
372
|
+
# set to true.
|
373
|
+
# @param [String] update_mask
|
374
|
+
# The list of fields to be updated.
|
375
|
+
# @param [Boolean] validate_only
|
376
|
+
# Indicates that the request should be validated and default values populated,
|
377
|
+
# without persisting the request or updating any resources.
|
378
|
+
# @param [String] fields
|
379
|
+
# Selector specifying which fields to include in a partial response.
|
380
|
+
# @param [String] quota_user
|
381
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
382
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
383
|
+
# @param [Google::Apis::RequestOptions] options
|
384
|
+
# Request-specific options
|
385
|
+
#
|
386
|
+
# @yield [result, err] Result & error if block supplied
|
387
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleLongrunningOperation] parsed result object
|
388
|
+
# @yieldparam err [StandardError] error object if request failed
|
389
|
+
#
|
390
|
+
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
|
391
|
+
#
|
392
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
393
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
394
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
395
|
+
def patch_project_location_service(name, google_cloud_run_op_v2_service_object = nil, allow_missing: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
396
|
+
command = make_simple_command(:patch, 'v2/{+name}', options)
|
397
|
+
command.request_representation = Google::Apis::RunV2::GoogleCloudRunOpV2Service::Representation
|
398
|
+
command.request_object = google_cloud_run_op_v2_service_object
|
399
|
+
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
|
400
|
+
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
|
401
|
+
command.params['name'] = name unless name.nil?
|
402
|
+
command.query['allowMissing'] = allow_missing unless allow_missing.nil?
|
403
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
404
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
405
|
+
command.query['fields'] = fields unless fields.nil?
|
406
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
407
|
+
execute_or_queue_command(command, &block)
|
408
|
+
end
|
409
|
+
|
410
|
+
# Sets the IAM Access control policy for the specified Service. Overwrites any
|
411
|
+
# existing policy.
|
412
|
+
# @param [String] resource
|
413
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
414
|
+
# operation documentation for the appropriate value for this field.
|
415
|
+
# @param [Google::Apis::RunV2::GoogleIamV1SetIamPolicyRequest] google_iam_v1_set_iam_policy_request_object
|
416
|
+
# @param [String] fields
|
417
|
+
# Selector specifying which fields to include in a partial response.
|
418
|
+
# @param [String] quota_user
|
419
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
420
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
421
|
+
# @param [Google::Apis::RequestOptions] options
|
422
|
+
# Request-specific options
|
423
|
+
#
|
424
|
+
# @yield [result, err] Result & error if block supplied
|
425
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleIamV1Policy] parsed result object
|
426
|
+
# @yieldparam err [StandardError] error object if request failed
|
427
|
+
#
|
428
|
+
# @return [Google::Apis::RunV2::GoogleIamV1Policy]
|
429
|
+
#
|
430
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
431
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
432
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
433
|
+
def set_project_location_service_iam_policy(resource, google_iam_v1_set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
434
|
+
command = make_simple_command(:post, 'v2/{+resource}:setIamPolicy', options)
|
435
|
+
command.request_representation = Google::Apis::RunV2::GoogleIamV1SetIamPolicyRequest::Representation
|
436
|
+
command.request_object = google_iam_v1_set_iam_policy_request_object
|
437
|
+
command.response_representation = Google::Apis::RunV2::GoogleIamV1Policy::Representation
|
438
|
+
command.response_class = Google::Apis::RunV2::GoogleIamV1Policy
|
439
|
+
command.params['resource'] = resource unless resource.nil?
|
440
|
+
command.query['fields'] = fields unless fields.nil?
|
441
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
442
|
+
execute_or_queue_command(command, &block)
|
443
|
+
end
|
444
|
+
|
445
|
+
# Returns permissions that a caller has on the specified Project. There are no
|
446
|
+
# permissions required for making this API call.
|
447
|
+
# @param [String] resource
|
448
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
449
|
+
# operation documentation for the appropriate value for this field.
|
450
|
+
# @param [Google::Apis::RunV2::GoogleIamV1TestIamPermissionsRequest] google_iam_v1_test_iam_permissions_request_object
|
451
|
+
# @param [String] fields
|
452
|
+
# Selector specifying which fields to include in a partial response.
|
453
|
+
# @param [String] quota_user
|
454
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
455
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
456
|
+
# @param [Google::Apis::RequestOptions] options
|
457
|
+
# Request-specific options
|
458
|
+
#
|
459
|
+
# @yield [result, err] Result & error if block supplied
|
460
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleIamV1TestIamPermissionsResponse] parsed result object
|
461
|
+
# @yieldparam err [StandardError] error object if request failed
|
462
|
+
#
|
463
|
+
# @return [Google::Apis::RunV2::GoogleIamV1TestIamPermissionsResponse]
|
464
|
+
#
|
465
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
466
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
467
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
468
|
+
def test_project_location_service_iam_permissions(resource, google_iam_v1_test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
469
|
+
command = make_simple_command(:post, 'v2/{+resource}:testIamPermissions', options)
|
470
|
+
command.request_representation = Google::Apis::RunV2::GoogleIamV1TestIamPermissionsRequest::Representation
|
471
|
+
command.request_object = google_iam_v1_test_iam_permissions_request_object
|
472
|
+
command.response_representation = Google::Apis::RunV2::GoogleIamV1TestIamPermissionsResponse::Representation
|
473
|
+
command.response_class = Google::Apis::RunV2::GoogleIamV1TestIamPermissionsResponse
|
474
|
+
command.params['resource'] = resource unless resource.nil?
|
475
|
+
command.query['fields'] = fields unless fields.nil?
|
476
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
477
|
+
execute_or_queue_command(command, &block)
|
478
|
+
end
|
479
|
+
|
480
|
+
# Delete a Revision.
|
481
|
+
# @param [String] name
|
482
|
+
# Required. The name of the Revision to delete. Format: projects/`project`/
|
483
|
+
# locations/`location`/services/`service`/revisions/`revision`
|
484
|
+
# @param [String] etag
|
485
|
+
# A system-generated fingerprint for this version of the resource. This may be
|
486
|
+
# used to detect modification conflict during updates.
|
487
|
+
# @param [Boolean] validate_only
|
488
|
+
# Indicates that the request should be validated without actually deleting any
|
489
|
+
# resources.
|
490
|
+
# @param [String] fields
|
491
|
+
# Selector specifying which fields to include in a partial response.
|
492
|
+
# @param [String] quota_user
|
493
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
494
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
495
|
+
# @param [Google::Apis::RequestOptions] options
|
496
|
+
# Request-specific options
|
497
|
+
#
|
498
|
+
# @yield [result, err] Result & error if block supplied
|
499
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleLongrunningOperation] parsed result object
|
500
|
+
# @yieldparam err [StandardError] error object if request failed
|
501
|
+
#
|
502
|
+
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
|
503
|
+
#
|
504
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
505
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
506
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
507
|
+
def delete_project_location_service_revision(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
508
|
+
command = make_simple_command(:delete, 'v2/{+name}', options)
|
509
|
+
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
|
510
|
+
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
|
511
|
+
command.params['name'] = name unless name.nil?
|
512
|
+
command.query['etag'] = etag unless etag.nil?
|
513
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
514
|
+
command.query['fields'] = fields unless fields.nil?
|
515
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
516
|
+
execute_or_queue_command(command, &block)
|
517
|
+
end
|
518
|
+
|
519
|
+
# Gets information about a Revision.
|
520
|
+
# @param [String] name
|
521
|
+
# Required. The full name of the Revision. Format: projects/`project`/locations/`
|
522
|
+
# location`/services/`service`/revisions/`revision`
|
523
|
+
# @param [String] fields
|
524
|
+
# Selector specifying which fields to include in a partial response.
|
525
|
+
# @param [String] quota_user
|
526
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
527
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
528
|
+
# @param [Google::Apis::RequestOptions] options
|
529
|
+
# Request-specific options
|
530
|
+
#
|
531
|
+
# @yield [result, err] Result & error if block supplied
|
532
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleCloudRunOpV2Revision] parsed result object
|
533
|
+
# @yieldparam err [StandardError] error object if request failed
|
534
|
+
#
|
535
|
+
# @return [Google::Apis::RunV2::GoogleCloudRunOpV2Revision]
|
536
|
+
#
|
537
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
538
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
539
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
540
|
+
def get_project_location_service_revision(name, fields: nil, quota_user: nil, options: nil, &block)
|
541
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
542
|
+
command.response_representation = Google::Apis::RunV2::GoogleCloudRunOpV2Revision::Representation
|
543
|
+
command.response_class = Google::Apis::RunV2::GoogleCloudRunOpV2Revision
|
544
|
+
command.params['name'] = name unless name.nil?
|
545
|
+
command.query['fields'] = fields unless fields.nil?
|
546
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
547
|
+
execute_or_queue_command(command, &block)
|
548
|
+
end
|
549
|
+
|
550
|
+
# List Revisions from a given Service, or from a given location.
|
551
|
+
# @param [String] parent
|
552
|
+
# Required. The Service from which the Revisions should be listed. To list all
|
553
|
+
# Revisions across Services, use "-" instead of Service name. Format: projects/`
|
554
|
+
# project`/locations/`location`/services/`service`
|
555
|
+
# @param [Fixnum] page_size
|
556
|
+
# Maximum number of revisions to return in this call.
|
557
|
+
# @param [String] page_token
|
558
|
+
# A page token received from a previous call to ListRevisions. All other
|
559
|
+
# parameters must match.
|
560
|
+
# @param [Boolean] show_deleted
|
561
|
+
# If true, returns deleted (but unexpired) resources along with active ones.
|
562
|
+
# @param [String] fields
|
563
|
+
# Selector specifying which fields to include in a partial response.
|
564
|
+
# @param [String] quota_user
|
565
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
566
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
567
|
+
# @param [Google::Apis::RequestOptions] options
|
568
|
+
# Request-specific options
|
569
|
+
#
|
570
|
+
# @yield [result, err] Result & error if block supplied
|
571
|
+
# @yieldparam result [Google::Apis::RunV2::GoogleCloudRunOpV2ListRevisionsResponse] parsed result object
|
572
|
+
# @yieldparam err [StandardError] error object if request failed
|
573
|
+
#
|
574
|
+
# @return [Google::Apis::RunV2::GoogleCloudRunOpV2ListRevisionsResponse]
|
575
|
+
#
|
576
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
577
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
578
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
579
|
+
def list_project_location_service_revisions(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
580
|
+
command = make_simple_command(:get, 'v2/{+parent}/revisions', options)
|
581
|
+
command.response_representation = Google::Apis::RunV2::GoogleCloudRunOpV2ListRevisionsResponse::Representation
|
582
|
+
command.response_class = Google::Apis::RunV2::GoogleCloudRunOpV2ListRevisionsResponse
|
583
|
+
command.params['parent'] = parent unless parent.nil?
|
584
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
585
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
586
|
+
command.query['showDeleted'] = show_deleted unless show_deleted.nil?
|
587
|
+
command.query['fields'] = fields unless fields.nil?
|
588
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
589
|
+
execute_or_queue_command(command, &block)
|
590
|
+
end
|
591
|
+
|
592
|
+
protected
|
593
|
+
|
594
|
+
def apply_command_defaults(command)
|
595
|
+
command.query['key'] = key unless key.nil?
|
596
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
597
|
+
end
|
598
|
+
end
|
599
|
+
end
|
600
|
+
end
|
601
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/run_v2/service.rb'
|
16
|
+
require 'google/apis/run_v2/classes.rb'
|
17
|
+
require 'google/apis/run_v2/representations.rb'
|
18
|
+
require 'google/apis/run_v2/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Cloud Run Admin API
|
23
|
+
#
|
24
|
+
# Deploy and manage user provided container images that scale automatically
|
25
|
+
# based on incoming requests. The Cloud Run Admin API follows the Knative
|
26
|
+
# Serving API specification.
|
27
|
+
#
|
28
|
+
# @see https://cloud.google.com/run/
|
29
|
+
module RunV2
|
30
|
+
# Version of the Cloud Run Admin API this client connects to.
|
31
|
+
# This is NOT the gem version.
|
32
|
+
VERSION = 'V2'
|
33
|
+
|
34
|
+
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
35
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/apis/run_v2"
|