google-api-client 0.17.1 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +26 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +14 -0
- data/generated/google/apis/admin_directory_v1/service.rb +90 -52
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +150 -3
- data/generated/google/apis/androidenterprise_v1/representations.rb +65 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +50 -4
- data/generated/google/apis/appengine_v1.rb +1 -1
- data/generated/google/apis/appengine_v1/classes.rb +45 -0
- data/generated/google/apis/appengine_v1/representations.rb +18 -0
- data/generated/google/apis/appengine_v1beta.rb +1 -1
- data/generated/google/apis/appengine_v1beta/classes.rb +8 -0
- data/generated/google/apis/appengine_v1beta/representations.rb +1 -0
- data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
- data/generated/google/apis/bigquerydatatransfer_v1/service.rb +4 -4
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +17 -0
- data/generated/google/apis/cloudbuild_v1/representations.rb +2 -0
- data/generated/google/apis/cloudiot_v1.rb +1 -1
- data/generated/google/apis/cloudiot_v1/classes.rb +5 -1
- data/generated/google/apis/cloudkms_v1.rb +1 -1
- data/generated/google/apis/cloudkms_v1/classes.rb +2 -1
- data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta2/classes.rb +57 -61
- data/generated/google/apis/cloudtasks_v2beta2/representations.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta2/service.rb +20 -19
- data/generated/google/apis/compute_alpha.rb +1 -1
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +4 -6
- data/generated/google/apis/container_v1beta1.rb +1 -1
- data/generated/google/apis/container_v1beta1/classes.rb +4 -6
- data/generated/google/apis/customsearch_v1.rb +1 -1
- data/generated/google/apis/customsearch_v1/service.rb +140 -0
- data/generated/google/apis/dialogflow_v2beta1.rb +35 -0
- data/generated/google/apis/dialogflow_v2beta1/classes.rb +2536 -0
- data/generated/google/apis/dialogflow_v2beta1/representations.rb +1078 -0
- data/generated/google/apis/dialogflow_v2beta1/service.rb +1398 -0
- data/generated/google/apis/dlp_v2beta1.rb +1 -1
- data/generated/google/apis/genomics_v1alpha2.rb +1 -1
- data/generated/google/apis/genomics_v1alpha2/classes.rb +7 -5
- data/generated/google/apis/logging_v2.rb +1 -1
- data/generated/google/apis/logging_v2/classes.rb +4 -4
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +4 -4
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +55 -46
- data/generated/google/apis/monitoring_v3/representations.rb +19 -0
- data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +16 -60
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +1 -0
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +19 -21
- data/generated/google/apis/serviceconsumermanagement_v1.rb +38 -0
- data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +3945 -0
- data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +1235 -0
- data/generated/google/apis/serviceconsumermanagement_v1/service.rb +467 -0
- data/generated/google/apis/slides_v1.rb +1 -1
- data/generated/google/apis/slides_v1/classes.rb +16 -0
- data/generated/google/apis/slides_v1/representations.rb +2 -0
- data/generated/google/apis/sourcerepo_v1.rb +1 -1
- data/generated/google/apis/sourcerepo_v1/classes.rb +3 -2
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +4 -4
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/toolresults_v1beta3/classes.rb +21 -21
- data/generated/google/apis/tpu_v1alpha1.rb +34 -0
- data/generated/google/apis/tpu_v1alpha1/classes.rb +530 -0
- data/generated/google/apis/tpu_v1alpha1/representations.rb +191 -0
- data/generated/google/apis/tpu_v1alpha1/service.rb +474 -0
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/lib/google/apis/version.rb +1 -1
- metadata +14 -2
@@ -0,0 +1,467 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
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 ServiceconsumermanagementV1
|
23
|
+
# Service Consumer Management API
|
24
|
+
#
|
25
|
+
# Provides management methods for configuring service producer resources on
|
26
|
+
# Google Cloud.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/serviceconsumermanagement_v1'
|
30
|
+
#
|
31
|
+
# Serviceconsumermanagement = Google::Apis::ServiceconsumermanagementV1 # Alias the module
|
32
|
+
# service = Serviceconsumermanagement::ServiceConsumerManagementService.new
|
33
|
+
#
|
34
|
+
# @see https://cloud.google.com/service-consumer-management/docs/overview
|
35
|
+
class ServiceConsumerManagementService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://serviceconsumermanagement.googleapis.com/', '')
|
48
|
+
@batch_path = 'batch'
|
49
|
+
end
|
50
|
+
|
51
|
+
# Starts asynchronous cancellation on a long-running operation. The server
|
52
|
+
# makes a best effort to cancel the operation, but success is not
|
53
|
+
# guaranteed. If the server doesn't support this method, it returns
|
54
|
+
# `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
55
|
+
# Operations.GetOperation or
|
56
|
+
# other methods to check whether the cancellation succeeded or whether the
|
57
|
+
# operation completed despite cancellation. On successful cancellation,
|
58
|
+
# the operation is not deleted; instead, it becomes an operation with
|
59
|
+
# an Operation.error value with a google.rpc.Status.code of 1,
|
60
|
+
# corresponding to `Code.CANCELLED`.
|
61
|
+
# @param [String] name
|
62
|
+
# The name of the operation resource to be cancelled.
|
63
|
+
# @param [Google::Apis::ServiceconsumermanagementV1::CancelOperationRequest] cancel_operation_request_object
|
64
|
+
# @param [String] fields
|
65
|
+
# Selector specifying which fields to include in a partial response.
|
66
|
+
# @param [String] quota_user
|
67
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
68
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
69
|
+
# @param [Google::Apis::RequestOptions] options
|
70
|
+
# Request-specific options
|
71
|
+
#
|
72
|
+
# @yield [result, err] Result & error if block supplied
|
73
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::Empty] parsed result object
|
74
|
+
# @yieldparam err [StandardError] error object if request failed
|
75
|
+
#
|
76
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::Empty]
|
77
|
+
#
|
78
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
79
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
80
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
81
|
+
def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
82
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
83
|
+
command.request_representation = Google::Apis::ServiceconsumermanagementV1::CancelOperationRequest::Representation
|
84
|
+
command.request_object = cancel_operation_request_object
|
85
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::Empty::Representation
|
86
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::Empty
|
87
|
+
command.params['name'] = name unless name.nil?
|
88
|
+
command.query['fields'] = fields unless fields.nil?
|
89
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
90
|
+
execute_or_queue_command(command, &block)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Deletes a long-running operation. This method indicates that the client is
|
94
|
+
# no longer interested in the operation result. It does not cancel the
|
95
|
+
# operation. If the server doesn't support this method, it returns
|
96
|
+
# `google.rpc.Code.UNIMPLEMENTED`.
|
97
|
+
# @param [String] name
|
98
|
+
# The name of the operation resource to be deleted.
|
99
|
+
# @param [String] fields
|
100
|
+
# Selector specifying which fields to include in a partial response.
|
101
|
+
# @param [String] quota_user
|
102
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
103
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
104
|
+
# @param [Google::Apis::RequestOptions] options
|
105
|
+
# Request-specific options
|
106
|
+
#
|
107
|
+
# @yield [result, err] Result & error if block supplied
|
108
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::Empty] parsed result object
|
109
|
+
# @yieldparam err [StandardError] error object if request failed
|
110
|
+
#
|
111
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::Empty]
|
112
|
+
#
|
113
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
+
def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
117
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
118
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::Empty::Representation
|
119
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::Empty
|
120
|
+
command.params['name'] = name unless name.nil?
|
121
|
+
command.query['fields'] = fields unless fields.nil?
|
122
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
123
|
+
execute_or_queue_command(command, &block)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Gets the latest state of a long-running operation. Clients can use this
|
127
|
+
# method to poll the operation result at intervals as recommended by the API
|
128
|
+
# service.
|
129
|
+
# @param [String] name
|
130
|
+
# The name of the operation resource.
|
131
|
+
# @param [String] fields
|
132
|
+
# Selector specifying which fields to include in a partial response.
|
133
|
+
# @param [String] quota_user
|
134
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
135
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
136
|
+
# @param [Google::Apis::RequestOptions] options
|
137
|
+
# Request-specific options
|
138
|
+
#
|
139
|
+
# @yield [result, err] Result & error if block supplied
|
140
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::Operation] parsed result object
|
141
|
+
# @yieldparam err [StandardError] error object if request failed
|
142
|
+
#
|
143
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::Operation]
|
144
|
+
#
|
145
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
146
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
147
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
148
|
+
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
149
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
150
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::Operation::Representation
|
151
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::Operation
|
152
|
+
command.params['name'] = name unless name.nil?
|
153
|
+
command.query['fields'] = fields unless fields.nil?
|
154
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
155
|
+
execute_or_queue_command(command, &block)
|
156
|
+
end
|
157
|
+
|
158
|
+
# Lists operations that match the specified filter in the request. If the
|
159
|
+
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
160
|
+
# NOTE: the `name` binding allows API services to override the binding
|
161
|
+
# to use different resource name schemes, such as `users/*/operations`. To
|
162
|
+
# override the binding, API services can add a binding such as
|
163
|
+
# `"/v1/`name=users/*`/operations"` to their service configuration.
|
164
|
+
# For backwards compatibility, the default name includes the operations
|
165
|
+
# collection id, however overriding users must ensure the name binding
|
166
|
+
# is the parent resource, without the operations collection id.
|
167
|
+
# @param [String] name
|
168
|
+
# The name of the operation's parent resource.
|
169
|
+
# @param [String] filter
|
170
|
+
# The standard list filter.
|
171
|
+
# @param [Fixnum] page_size
|
172
|
+
# The standard list page size.
|
173
|
+
# @param [String] page_token
|
174
|
+
# The standard list page token.
|
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::ServiceconsumermanagementV1::ListOperationsResponse] parsed result object
|
185
|
+
# @yieldparam err [StandardError] error object if request failed
|
186
|
+
#
|
187
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::ListOperationsResponse]
|
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 list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
193
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
194
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::ListOperationsResponse::Representation
|
195
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::ListOperationsResponse
|
196
|
+
command.params['name'] = name unless name.nil?
|
197
|
+
command.query['filter'] = filter unless filter.nil?
|
198
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
199
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
200
|
+
command.query['fields'] = fields unless fields.nil?
|
201
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
202
|
+
execute_or_queue_command(command, &block)
|
203
|
+
end
|
204
|
+
|
205
|
+
# Search tenancy units for a service.
|
206
|
+
# @param [String] parent
|
207
|
+
# Service for which search is performed.
|
208
|
+
# services/`service`
|
209
|
+
# `service` the name of a service, for example 'service.googleapis.com'.
|
210
|
+
# @param [Fixnum] page_size
|
211
|
+
# The maximum number of results returned by this request. Currently, the
|
212
|
+
# default maximum is set to 1000. If page_size is not provided or provided a
|
213
|
+
# number larger than 1000, it will be automatically set to 1000.
|
214
|
+
# Optional.
|
215
|
+
# @param [String] page_token
|
216
|
+
# The continuation token, which is used to page through large result sets.
|
217
|
+
# To get the next page of results, set this parameter to the value of
|
218
|
+
# `nextPageToken` from the previous response.
|
219
|
+
# Optional.
|
220
|
+
# @param [String] query
|
221
|
+
# Set a query ``expression`` for querying tenancy units. Your ``expression``
|
222
|
+
# must be in the format: `field_name=literal_string`. The `field_name` is the
|
223
|
+
# name of the field you want to compare. Supported fields are
|
224
|
+
# `tenant_resources.tag` and`tenant_resources.resource`.
|
225
|
+
# For example, to search tenancy units that contain at least one tenant
|
226
|
+
# resource with given tag 'xyz', use query `tenant_resources.tag=xyz`.
|
227
|
+
# To search tenancy units that contain at least one tenant resource with
|
228
|
+
# given resource name 'projects/123456', use query
|
229
|
+
# `tenant_resources.resource=projects/123456`.
|
230
|
+
# Multiple expressions can be joined with `AND`s. Tenancy units must match
|
231
|
+
# all expressions to be included in the result set. For example,
|
232
|
+
# `tenant_resources.tag=xyz AND tenant_resources.resource=projects/123456`
|
233
|
+
# Optional.
|
234
|
+
# @param [String] fields
|
235
|
+
# Selector specifying which fields to include in a partial response.
|
236
|
+
# @param [String] quota_user
|
237
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
238
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
239
|
+
# @param [Google::Apis::RequestOptions] options
|
240
|
+
# Request-specific options
|
241
|
+
#
|
242
|
+
# @yield [result, err] Result & error if block supplied
|
243
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::SearchTenancyUnitsResponse] parsed result object
|
244
|
+
# @yieldparam err [StandardError] error object if request failed
|
245
|
+
#
|
246
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::SearchTenancyUnitsResponse]
|
247
|
+
#
|
248
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
249
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
250
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
251
|
+
def search_services(parent, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
|
252
|
+
command = make_simple_command(:get, 'v1/{+parent}:search', options)
|
253
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::SearchTenancyUnitsResponse::Representation
|
254
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::SearchTenancyUnitsResponse
|
255
|
+
command.params['parent'] = parent unless parent.nil?
|
256
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
257
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
258
|
+
command.query['query'] = query unless query.nil?
|
259
|
+
command.query['fields'] = fields unless fields.nil?
|
260
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
261
|
+
execute_or_queue_command(command, &block)
|
262
|
+
end
|
263
|
+
|
264
|
+
# Add a new tenant project to the tenancy unit.
|
265
|
+
# If there are previously failed AddTenantProject calls, you might need to
|
266
|
+
# call RemoveTenantProject first to clean them before you can make another
|
267
|
+
# AddTenantProject with the same tag.
|
268
|
+
# Operation<response: Empty>.
|
269
|
+
# @param [String] parent
|
270
|
+
# Name of the tenancy unit.
|
271
|
+
# @param [Google::Apis::ServiceconsumermanagementV1::AddTenantProjectRequest] add_tenant_project_request_object
|
272
|
+
# @param [String] fields
|
273
|
+
# Selector specifying which fields to include in a partial response.
|
274
|
+
# @param [String] quota_user
|
275
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
276
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
277
|
+
# @param [Google::Apis::RequestOptions] options
|
278
|
+
# Request-specific options
|
279
|
+
#
|
280
|
+
# @yield [result, err] Result & error if block supplied
|
281
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::Operation] parsed result object
|
282
|
+
# @yieldparam err [StandardError] error object if request failed
|
283
|
+
#
|
284
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::Operation]
|
285
|
+
#
|
286
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
287
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
288
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
289
|
+
def add_service_tenancy_unit_project(parent, add_tenant_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
290
|
+
command = make_simple_command(:post, 'v1/{+parent}:addProject', options)
|
291
|
+
command.request_representation = Google::Apis::ServiceconsumermanagementV1::AddTenantProjectRequest::Representation
|
292
|
+
command.request_object = add_tenant_project_request_object
|
293
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::Operation::Representation
|
294
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::Operation
|
295
|
+
command.params['parent'] = parent unless parent.nil?
|
296
|
+
command.query['fields'] = fields unless fields.nil?
|
297
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
298
|
+
execute_or_queue_command(command, &block)
|
299
|
+
end
|
300
|
+
|
301
|
+
# Creates a tenancy unit with no tenant resources.
|
302
|
+
# @param [String] parent
|
303
|
+
# services/`service`/`collection id`/`resource id`
|
304
|
+
# `collection id` is the cloud resource collection type representing the
|
305
|
+
# service consumer, for example 'projects', or 'organizations'.
|
306
|
+
# `resource id` is the consumer numeric id, such as project number: '123456'.
|
307
|
+
# `service` the name of a service, for example 'service.googleapis.com'.
|
308
|
+
# Enabled service binding using the new tenancy unit.
|
309
|
+
# @param [Google::Apis::ServiceconsumermanagementV1::CreateTenancyUnitRequest] create_tenancy_unit_request_object
|
310
|
+
# @param [String] fields
|
311
|
+
# Selector specifying which fields to include in a partial response.
|
312
|
+
# @param [String] quota_user
|
313
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
314
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
315
|
+
# @param [Google::Apis::RequestOptions] options
|
316
|
+
# Request-specific options
|
317
|
+
#
|
318
|
+
# @yield [result, err] Result & error if block supplied
|
319
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::TenancyUnit] parsed result object
|
320
|
+
# @yieldparam err [StandardError] error object if request failed
|
321
|
+
#
|
322
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::TenancyUnit]
|
323
|
+
#
|
324
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
325
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
326
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
327
|
+
def create_tenancy_unit(parent, create_tenancy_unit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
328
|
+
command = make_simple_command(:post, 'v1/{+parent}/tenancyUnits', options)
|
329
|
+
command.request_representation = Google::Apis::ServiceconsumermanagementV1::CreateTenancyUnitRequest::Representation
|
330
|
+
command.request_object = create_tenancy_unit_request_object
|
331
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::TenancyUnit::Representation
|
332
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::TenancyUnit
|
333
|
+
command.params['parent'] = parent unless parent.nil?
|
334
|
+
command.query['fields'] = fields unless fields.nil?
|
335
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
336
|
+
execute_or_queue_command(command, &block)
|
337
|
+
end
|
338
|
+
|
339
|
+
# Delete tenancy unit. Before the tenancy unit is deleted, there should be
|
340
|
+
# no tenant resource in it.
|
341
|
+
# Operation<response: Empty>.
|
342
|
+
# @param [String] name
|
343
|
+
# Name of the tenancy unit to be deleted.
|
344
|
+
# @param [String] fields
|
345
|
+
# Selector specifying which fields to include in a partial response.
|
346
|
+
# @param [String] quota_user
|
347
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
348
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
349
|
+
# @param [Google::Apis::RequestOptions] options
|
350
|
+
# Request-specific options
|
351
|
+
#
|
352
|
+
# @yield [result, err] Result & error if block supplied
|
353
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::Operation] parsed result object
|
354
|
+
# @yieldparam err [StandardError] error object if request failed
|
355
|
+
#
|
356
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::Operation]
|
357
|
+
#
|
358
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
359
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
360
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
361
|
+
def delete_service_tenancy_unit(name, fields: nil, quota_user: nil, options: nil, &block)
|
362
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
363
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::Operation::Representation
|
364
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::Operation
|
365
|
+
command.params['name'] = name unless name.nil?
|
366
|
+
command.query['fields'] = fields unless fields.nil?
|
367
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
368
|
+
execute_or_queue_command(command, &block)
|
369
|
+
end
|
370
|
+
|
371
|
+
# Find tenancy unit for a service and consumer.
|
372
|
+
# This method should not be used in producers' runtime path, e.g. finding
|
373
|
+
# the tenant project number when creating VMs. Producers should persist
|
374
|
+
# the tenant project information after the project is created.
|
375
|
+
# @param [String] parent
|
376
|
+
# Service and consumer. Required.
|
377
|
+
# services/`service`/`collection id`/`resource id`
|
378
|
+
# `collection id` is the cloud resource collection type representing the
|
379
|
+
# service consumer, for example 'projects', or 'organizations'.
|
380
|
+
# `resource id` is the consumer numeric id, such as project number: '123456'.
|
381
|
+
# `service` the name of a service, for example 'service.googleapis.com'.
|
382
|
+
# @param [String] filter
|
383
|
+
# Filter expression over tenancy resources field. Optional.
|
384
|
+
# @param [Fixnum] page_size
|
385
|
+
# The maximum number of results returned by this request.
|
386
|
+
# @param [String] page_token
|
387
|
+
# The continuation token, which is used to page through large result sets.
|
388
|
+
# To get the next page of results, set this parameter to the value of
|
389
|
+
# `nextPageToken` from the previous response.
|
390
|
+
# @param [String] fields
|
391
|
+
# Selector specifying which fields to include in a partial response.
|
392
|
+
# @param [String] quota_user
|
393
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
394
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
395
|
+
# @param [Google::Apis::RequestOptions] options
|
396
|
+
# Request-specific options
|
397
|
+
#
|
398
|
+
# @yield [result, err] Result & error if block supplied
|
399
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::ListTenancyUnitsResponse] parsed result object
|
400
|
+
# @yieldparam err [StandardError] error object if request failed
|
401
|
+
#
|
402
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::ListTenancyUnitsResponse]
|
403
|
+
#
|
404
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
405
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
406
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
407
|
+
def list_service_tenancy_units(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
408
|
+
command = make_simple_command(:get, 'v1/{+parent}/tenancyUnits', options)
|
409
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::ListTenancyUnitsResponse::Representation
|
410
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::ListTenancyUnitsResponse
|
411
|
+
command.params['parent'] = parent unless parent.nil?
|
412
|
+
command.query['filter'] = filter unless filter.nil?
|
413
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
414
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
415
|
+
command.query['fields'] = fields unless fields.nil?
|
416
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
417
|
+
execute_or_queue_command(command, &block)
|
418
|
+
end
|
419
|
+
|
420
|
+
# Removes specified project resource identified by tenant resource tag.
|
421
|
+
# It will remove project lien with 'TenantManager' origin if that was added.
|
422
|
+
# It will then attempt to delete the project.
|
423
|
+
# If that operation fails, this method fails.
|
424
|
+
# Operation<response: Empty>.
|
425
|
+
# @param [String] name
|
426
|
+
# Name of the tenancy unit.
|
427
|
+
# Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
|
428
|
+
# @param [Google::Apis::ServiceconsumermanagementV1::RemoveTenantProjectRequest] remove_tenant_project_request_object
|
429
|
+
# @param [String] fields
|
430
|
+
# Selector specifying which fields to include in a partial response.
|
431
|
+
# @param [String] quota_user
|
432
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
433
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
434
|
+
# @param [Google::Apis::RequestOptions] options
|
435
|
+
# Request-specific options
|
436
|
+
#
|
437
|
+
# @yield [result, err] Result & error if block supplied
|
438
|
+
# @yieldparam result [Google::Apis::ServiceconsumermanagementV1::Operation] parsed result object
|
439
|
+
# @yieldparam err [StandardError] error object if request failed
|
440
|
+
#
|
441
|
+
# @return [Google::Apis::ServiceconsumermanagementV1::Operation]
|
442
|
+
#
|
443
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
444
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
445
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
446
|
+
def remove_service_tenancy_unit_project(name, remove_tenant_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
447
|
+
command = make_simple_command(:post, 'v1/{+name}:removeProject', options)
|
448
|
+
command.request_representation = Google::Apis::ServiceconsumermanagementV1::RemoveTenantProjectRequest::Representation
|
449
|
+
command.request_object = remove_tenant_project_request_object
|
450
|
+
command.response_representation = Google::Apis::ServiceconsumermanagementV1::Operation::Representation
|
451
|
+
command.response_class = Google::Apis::ServiceconsumermanagementV1::Operation
|
452
|
+
command.params['name'] = name unless name.nil?
|
453
|
+
command.query['fields'] = fields unless fields.nil?
|
454
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
455
|
+
execute_or_queue_command(command, &block)
|
456
|
+
end
|
457
|
+
|
458
|
+
protected
|
459
|
+
|
460
|
+
def apply_command_defaults(command)
|
461
|
+
command.query['key'] = key unless key.nil?
|
462
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
463
|
+
end
|
464
|
+
end
|
465
|
+
end
|
466
|
+
end
|
467
|
+
end
|