google-apis-bigqueryreservation_v1beta1 0.1.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 +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-bigqueryreservation_v1beta1.rb +15 -0
- data/lib/google/apis/bigqueryreservation_v1beta1.rb +39 -0
- data/lib/google/apis/bigqueryreservation_v1beta1/classes.rb +506 -0
- data/lib/google/apis/bigqueryreservation_v1beta1/gem_version.rb +28 -0
- data/lib/google/apis/bigqueryreservation_v1beta1/representations.rb +250 -0
- data/lib/google/apis/bigqueryreservation_v1beta1/service.rb +789 -0
- metadata +76 -0
@@ -0,0 +1,28 @@
|
|
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
|
+
module Google
|
16
|
+
module Apis
|
17
|
+
module BigqueryreservationV1beta1
|
18
|
+
# Version of the google-apis-bigqueryreservation_v1beta1 gem
|
19
|
+
GEM_VERSION = "0.1.0"
|
20
|
+
|
21
|
+
# Version of the code generator used to generate this client
|
22
|
+
GENERATOR_VERSION = "0.1.1"
|
23
|
+
|
24
|
+
# Revision of the discovery document this client was generated from
|
25
|
+
REVISION = "20200808"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,250 @@
|
|
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 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module BigqueryreservationV1beta1
|
24
|
+
|
25
|
+
class Assignment
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class BiReservation
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class CapacityCommitment
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class CreateSlotPoolMetadata
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class Empty
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class ListAssignmentsResponse
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class ListCapacityCommitmentsResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class ListReservationsResponse
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class MergeCapacityCommitmentsRequest
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class MoveAssignmentRequest
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class Reservation
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class SearchAssignmentsResponse
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class SplitCapacityCommitmentRequest
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class SplitCapacityCommitmentResponse
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class Status
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class Assignment
|
116
|
+
# @private
|
117
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
118
|
+
property :assignee, as: 'assignee'
|
119
|
+
property :job_type, as: 'jobType'
|
120
|
+
property :name, as: 'name'
|
121
|
+
property :state, as: 'state'
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
class BiReservation
|
126
|
+
# @private
|
127
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
128
|
+
property :name, as: 'name'
|
129
|
+
property :size, :numeric_string => true, as: 'size'
|
130
|
+
property :update_time, as: 'updateTime'
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
class CapacityCommitment
|
135
|
+
# @private
|
136
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
137
|
+
property :commitment_end_time, as: 'commitmentEndTime'
|
138
|
+
property :commitment_start_time, as: 'commitmentStartTime'
|
139
|
+
property :failure_status, as: 'failureStatus', class: Google::Apis::BigqueryreservationV1beta1::Status, decorator: Google::Apis::BigqueryreservationV1beta1::Status::Representation
|
140
|
+
|
141
|
+
property :name, as: 'name'
|
142
|
+
property :plan, as: 'plan'
|
143
|
+
property :renewal_plan, as: 'renewalPlan'
|
144
|
+
property :slot_count, :numeric_string => true, as: 'slotCount'
|
145
|
+
property :state, as: 'state'
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
class CreateSlotPoolMetadata
|
150
|
+
# @private
|
151
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
152
|
+
property :slot_pool, as: 'slotPool'
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
class Empty
|
157
|
+
# @private
|
158
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
class ListAssignmentsResponse
|
163
|
+
# @private
|
164
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
165
|
+
collection :assignments, as: 'assignments', class: Google::Apis::BigqueryreservationV1beta1::Assignment, decorator: Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
|
166
|
+
|
167
|
+
property :next_page_token, as: 'nextPageToken'
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
class ListCapacityCommitmentsResponse
|
172
|
+
# @private
|
173
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
174
|
+
collection :capacity_commitments, as: 'capacityCommitments', class: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment, decorator: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
175
|
+
|
176
|
+
property :next_page_token, as: 'nextPageToken'
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
class ListReservationsResponse
|
181
|
+
# @private
|
182
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
183
|
+
property :next_page_token, as: 'nextPageToken'
|
184
|
+
collection :reservations, as: 'reservations', class: Google::Apis::BigqueryreservationV1beta1::Reservation, decorator: Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
|
185
|
+
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
class MergeCapacityCommitmentsRequest
|
190
|
+
# @private
|
191
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
192
|
+
collection :capacity_commitment_ids, as: 'capacityCommitmentIds'
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
class MoveAssignmentRequest
|
197
|
+
# @private
|
198
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
199
|
+
property :destination_id, as: 'destinationId'
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
class Reservation
|
204
|
+
# @private
|
205
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
206
|
+
property :creation_time, as: 'creationTime'
|
207
|
+
property :ignore_idle_slots, as: 'ignoreIdleSlots'
|
208
|
+
property :name, as: 'name'
|
209
|
+
property :slot_capacity, :numeric_string => true, as: 'slotCapacity'
|
210
|
+
property :update_time, as: 'updateTime'
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
class SearchAssignmentsResponse
|
215
|
+
# @private
|
216
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
217
|
+
collection :assignments, as: 'assignments', class: Google::Apis::BigqueryreservationV1beta1::Assignment, decorator: Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
|
218
|
+
|
219
|
+
property :next_page_token, as: 'nextPageToken'
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
class SplitCapacityCommitmentRequest
|
224
|
+
# @private
|
225
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
226
|
+
property :slot_count, :numeric_string => true, as: 'slotCount'
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
class SplitCapacityCommitmentResponse
|
231
|
+
# @private
|
232
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
233
|
+
property :first, as: 'first', class: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment, decorator: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
234
|
+
|
235
|
+
property :second, as: 'second', class: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment, decorator: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
236
|
+
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
class Status
|
241
|
+
# @private
|
242
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
243
|
+
property :code, as: 'code'
|
244
|
+
collection :details, as: 'details'
|
245
|
+
property :message, as: 'message'
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
@@ -0,0 +1,789 @@
|
|
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 BigqueryreservationV1beta1
|
23
|
+
# BigQuery Reservation API
|
24
|
+
#
|
25
|
+
# A service to modify your BigQuery flat-rate reservations.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/bigqueryreservation_v1beta1'
|
29
|
+
#
|
30
|
+
# Bigqueryreservation = Google::Apis::BigqueryreservationV1beta1 # Alias the module
|
31
|
+
# service = Bigqueryreservation::BigQueryReservationService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/bigquery/
|
34
|
+
class BigQueryReservationService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://bigqueryreservation.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-bigqueryreservation_v1beta1',
|
48
|
+
client_version: Google::Apis::BigqueryreservationV1beta1::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Retrieves a BI reservation.
|
53
|
+
# @param [String] name
|
54
|
+
# Required. Name of the requested reservation, for example: `projects/`
|
55
|
+
# project_id`/locations/`location_id`/bireservation`
|
56
|
+
# @param [String] fields
|
57
|
+
# Selector specifying which fields to include in a partial response.
|
58
|
+
# @param [String] quota_user
|
59
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
60
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
61
|
+
# @param [Google::Apis::RequestOptions] options
|
62
|
+
# Request-specific options
|
63
|
+
#
|
64
|
+
# @yield [result, err] Result & error if block supplied
|
65
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::BiReservation] parsed result object
|
66
|
+
# @yieldparam err [StandardError] error object if request failed
|
67
|
+
#
|
68
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::BiReservation]
|
69
|
+
#
|
70
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
71
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
72
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
73
|
+
def get_project_location_bi_reservation(name, fields: nil, quota_user: nil, options: nil, &block)
|
74
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
75
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::BiReservation::Representation
|
76
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::BiReservation
|
77
|
+
command.params['name'] = name unless name.nil?
|
78
|
+
command.query['fields'] = fields unless fields.nil?
|
79
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
80
|
+
execute_or_queue_command(command, &block)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Looks up assignments for a specified resource for a particular region. If the
|
84
|
+
# request is about a project: 1. Assignments created on the project will be
|
85
|
+
# returned if they exist. 2. Otherwise assignments created on the closest
|
86
|
+
# ancestor will be returned. 3. Assignments for different JobTypes will all be
|
87
|
+
# returned. The same logic applies if the request is about a folder. If the
|
88
|
+
# request is about an organization, then assignments created on the organization
|
89
|
+
# will be returned (organization doesn't have ancestors). Comparing to
|
90
|
+
# ListAssignments, there are some behavior differences: 1. permission on the
|
91
|
+
# assignee will be verified in this API. 2. Hierarchy lookup (project->folder->
|
92
|
+
# organization) happens in this API. 3. Parent here is `projects/*/locations/*`,
|
93
|
+
# instead of `projects/*/locations/*reservations/*`. **Note** "-" cannot be used
|
94
|
+
# for projects nor locations.
|
95
|
+
# @param [String] parent
|
96
|
+
# Required. The resource name of the admin project(containing project and
|
97
|
+
# location), e.g.: `projects/myproject/locations/US`.
|
98
|
+
# @param [Fixnum] page_size
|
99
|
+
# The maximum number of items to return.
|
100
|
+
# @param [String] page_token
|
101
|
+
# The next_page_token value returned from a previous List request, if any.
|
102
|
+
# @param [String] query
|
103
|
+
# Please specify resource name as assignee in the query. Examples: * `assignee=
|
104
|
+
# projects/myproject` * `assignee=folders/123` * `assignee=organizations/456`
|
105
|
+
# @param [String] fields
|
106
|
+
# Selector specifying which fields to include in a partial response.
|
107
|
+
# @param [String] quota_user
|
108
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
109
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
110
|
+
# @param [Google::Apis::RequestOptions] options
|
111
|
+
# Request-specific options
|
112
|
+
#
|
113
|
+
# @yield [result, err] Result & error if block supplied
|
114
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse] parsed result object
|
115
|
+
# @yieldparam err [StandardError] error object if request failed
|
116
|
+
#
|
117
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse]
|
118
|
+
#
|
119
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
120
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
121
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
122
|
+
def search_project_location_assignments(parent, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
|
123
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}:searchAssignments', options)
|
124
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse::Representation
|
125
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse
|
126
|
+
command.params['parent'] = parent unless parent.nil?
|
127
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
128
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
129
|
+
command.query['query'] = query unless query.nil?
|
130
|
+
command.query['fields'] = fields unless fields.nil?
|
131
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
132
|
+
execute_or_queue_command(command, &block)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Updates a BI reservation. Only fields specified in the `field_mask` are
|
136
|
+
# updated. A singleton BI reservation always exists with default size 0. In
|
137
|
+
# order to reserve BI capacity it needs to be updated to an amount greater than
|
138
|
+
# 0. In order to release BI capacity reservation size must be set to 0.
|
139
|
+
# @param [String] name
|
140
|
+
# The resource name of the singleton BI reservation. Reservation names have the
|
141
|
+
# form `projects/`project_id`/locations/`location_id`/bireservation`.
|
142
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::BiReservation] bi_reservation_object
|
143
|
+
# @param [String] update_mask
|
144
|
+
# A list of fields to be updated in this request.
|
145
|
+
# @param [String] fields
|
146
|
+
# Selector specifying which fields to include in a partial response.
|
147
|
+
# @param [String] quota_user
|
148
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
149
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
150
|
+
# @param [Google::Apis::RequestOptions] options
|
151
|
+
# Request-specific options
|
152
|
+
#
|
153
|
+
# @yield [result, err] Result & error if block supplied
|
154
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::BiReservation] parsed result object
|
155
|
+
# @yieldparam err [StandardError] error object if request failed
|
156
|
+
#
|
157
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::BiReservation]
|
158
|
+
#
|
159
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
160
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
161
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
162
|
+
def update_project_location_bi_reservation(name, bi_reservation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
163
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
164
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::BiReservation::Representation
|
165
|
+
command.request_object = bi_reservation_object
|
166
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::BiReservation::Representation
|
167
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::BiReservation
|
168
|
+
command.params['name'] = name unless name.nil?
|
169
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
170
|
+
command.query['fields'] = fields unless fields.nil?
|
171
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
172
|
+
execute_or_queue_command(command, &block)
|
173
|
+
end
|
174
|
+
|
175
|
+
# Creates a new capacity commitment resource.
|
176
|
+
# @param [String] parent
|
177
|
+
# Required. Resource name of the parent reservation. E.g., `projects/myproject/
|
178
|
+
# locations/US`
|
179
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] capacity_commitment_object
|
180
|
+
# @param [Boolean] enforce_single_admin_project_per_org
|
181
|
+
# If true, fail the request if another project in the organization has a
|
182
|
+
# capacity commitment.
|
183
|
+
# @param [String] fields
|
184
|
+
# Selector specifying which fields to include in a partial response.
|
185
|
+
# @param [String] quota_user
|
186
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
187
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
188
|
+
# @param [Google::Apis::RequestOptions] options
|
189
|
+
# Request-specific options
|
190
|
+
#
|
191
|
+
# @yield [result, err] Result & error if block supplied
|
192
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] parsed result object
|
193
|
+
# @yieldparam err [StandardError] error object if request failed
|
194
|
+
#
|
195
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment]
|
196
|
+
#
|
197
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
198
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
199
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
200
|
+
def create_project_location_capacity_commitment(parent, capacity_commitment_object = nil, enforce_single_admin_project_per_org: nil, fields: nil, quota_user: nil, options: nil, &block)
|
201
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/capacityCommitments', options)
|
202
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
203
|
+
command.request_object = capacity_commitment_object
|
204
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
205
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment
|
206
|
+
command.params['parent'] = parent unless parent.nil?
|
207
|
+
command.query['enforceSingleAdminProjectPerOrg'] = enforce_single_admin_project_per_org unless enforce_single_admin_project_per_org.nil?
|
208
|
+
command.query['fields'] = fields unless fields.nil?
|
209
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
210
|
+
execute_or_queue_command(command, &block)
|
211
|
+
end
|
212
|
+
|
213
|
+
# Deletes a capacity commitment. Attempting to delete capacity commitment before
|
214
|
+
# its commitment_end_time will fail with the error code `google.rpc.Code.
|
215
|
+
# FAILED_PRECONDITION`.
|
216
|
+
# @param [String] name
|
217
|
+
# Required. Resource name of the capacity commitment to delete. E.g., `projects/
|
218
|
+
# myproject/locations/US/capacityCommitments/123`
|
219
|
+
# @param [String] fields
|
220
|
+
# Selector specifying which fields to include in a partial response.
|
221
|
+
# @param [String] quota_user
|
222
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
223
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
224
|
+
# @param [Google::Apis::RequestOptions] options
|
225
|
+
# Request-specific options
|
226
|
+
#
|
227
|
+
# @yield [result, err] Result & error if block supplied
|
228
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Empty] parsed result object
|
229
|
+
# @yieldparam err [StandardError] error object if request failed
|
230
|
+
#
|
231
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::Empty]
|
232
|
+
#
|
233
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
234
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
235
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
236
|
+
def delete_project_location_capacity_commitment(name, fields: nil, quota_user: nil, options: nil, &block)
|
237
|
+
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
|
238
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::Empty::Representation
|
239
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::Empty
|
240
|
+
command.params['name'] = name unless name.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
|
+
# Returns information about the capacity commitment.
|
247
|
+
# @param [String] name
|
248
|
+
# Required. Resource name of the capacity commitment to retrieve. E.g., `
|
249
|
+
# projects/myproject/locations/US/capacityCommitments/123`
|
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::BigqueryreservationV1beta1::CapacityCommitment] parsed result object
|
260
|
+
# @yieldparam err [StandardError] error object if request failed
|
261
|
+
#
|
262
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment]
|
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_capacity_commitment(name, fields: nil, quota_user: nil, options: nil, &block)
|
268
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
269
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
270
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment
|
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
|
+
# Lists all the capacity commitments for the admin project.
|
278
|
+
# @param [String] parent
|
279
|
+
# Required. Resource name of the parent reservation. E.g., `projects/myproject/
|
280
|
+
# locations/US`
|
281
|
+
# @param [Fixnum] page_size
|
282
|
+
# The maximum number of items to return.
|
283
|
+
# @param [String] page_token
|
284
|
+
# The next_page_token value returned from a previous List request, if any.
|
285
|
+
# @param [String] fields
|
286
|
+
# Selector specifying which fields to include in a partial response.
|
287
|
+
# @param [String] quota_user
|
288
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
289
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
290
|
+
# @param [Google::Apis::RequestOptions] options
|
291
|
+
# Request-specific options
|
292
|
+
#
|
293
|
+
# @yield [result, err] Result & error if block supplied
|
294
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse] parsed result object
|
295
|
+
# @yieldparam err [StandardError] error object if request failed
|
296
|
+
#
|
297
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse]
|
298
|
+
#
|
299
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
300
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
301
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
302
|
+
def list_project_location_capacity_commitments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
303
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/capacityCommitments', options)
|
304
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse::Representation
|
305
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse
|
306
|
+
command.params['parent'] = parent unless parent.nil?
|
307
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
308
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
309
|
+
command.query['fields'] = fields unless fields.nil?
|
310
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
311
|
+
execute_or_queue_command(command, &block)
|
312
|
+
end
|
313
|
+
|
314
|
+
# Merges capacity commitments of the same plan into a single commitment. The
|
315
|
+
# resulting capacity commitment has the greater commitment_end_time out of the
|
316
|
+
# to-be-merged capacity commitments. Attempting to merge capacity commitments of
|
317
|
+
# different plan will fail with the error code `google.rpc.Code.
|
318
|
+
# FAILED_PRECONDITION`.
|
319
|
+
# @param [String] parent
|
320
|
+
# Parent resource that identifies admin project and location e.g., `projects/
|
321
|
+
# myproject/locations/us`
|
322
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::MergeCapacityCommitmentsRequest] merge_capacity_commitments_request_object
|
323
|
+
# @param [String] fields
|
324
|
+
# Selector specifying which fields to include in a partial response.
|
325
|
+
# @param [String] quota_user
|
326
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
327
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
328
|
+
# @param [Google::Apis::RequestOptions] options
|
329
|
+
# Request-specific options
|
330
|
+
#
|
331
|
+
# @yield [result, err] Result & error if block supplied
|
332
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] parsed result object
|
333
|
+
# @yieldparam err [StandardError] error object if request failed
|
334
|
+
#
|
335
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment]
|
336
|
+
#
|
337
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
338
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
339
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
340
|
+
def merge_capacity_commitments(parent, merge_capacity_commitments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
341
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/capacityCommitments:merge', options)
|
342
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::MergeCapacityCommitmentsRequest::Representation
|
343
|
+
command.request_object = merge_capacity_commitments_request_object
|
344
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
345
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment
|
346
|
+
command.params['parent'] = parent unless parent.nil?
|
347
|
+
command.query['fields'] = fields unless fields.nil?
|
348
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
349
|
+
execute_or_queue_command(command, &block)
|
350
|
+
end
|
351
|
+
|
352
|
+
# Updates an existing capacity commitment. Only `plan` and `renewal_plan` fields
|
353
|
+
# can be updated. Plan can only be changed to a plan of a longer commitment
|
354
|
+
# period. Attempting to change to a plan with shorter commitment period will
|
355
|
+
# fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
|
356
|
+
# @param [String] name
|
357
|
+
# Output only. The resource name of the capacity commitment, e.g., `projects/
|
358
|
+
# myproject/locations/US/capacityCommitments/123`
|
359
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] capacity_commitment_object
|
360
|
+
# @param [String] update_mask
|
361
|
+
# Standard field mask for the set of fields to be updated.
|
362
|
+
# @param [String] fields
|
363
|
+
# Selector specifying which fields to include in a partial response.
|
364
|
+
# @param [String] quota_user
|
365
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
366
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
367
|
+
# @param [Google::Apis::RequestOptions] options
|
368
|
+
# Request-specific options
|
369
|
+
#
|
370
|
+
# @yield [result, err] Result & error if block supplied
|
371
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] parsed result object
|
372
|
+
# @yieldparam err [StandardError] error object if request failed
|
373
|
+
#
|
374
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment]
|
375
|
+
#
|
376
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
377
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
378
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
379
|
+
def patch_project_location_capacity_commitment(name, capacity_commitment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
380
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
381
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
382
|
+
command.request_object = capacity_commitment_object
|
383
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
|
384
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment
|
385
|
+
command.params['name'] = name unless name.nil?
|
386
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
387
|
+
command.query['fields'] = fields unless fields.nil?
|
388
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
389
|
+
execute_or_queue_command(command, &block)
|
390
|
+
end
|
391
|
+
|
392
|
+
# Splits capacity commitment to two commitments of the same plan and `
|
393
|
+
# commitment_end_time`. A common use case is to enable downgrading commitments.
|
394
|
+
# For example, in order to downgrade from 10000 slots to 8000, you might split a
|
395
|
+
# 10000 capacity commitment into commitments of 2000 and 8000. Then, you would
|
396
|
+
# change the plan of the first one to `FLEX` and then delete it.
|
397
|
+
# @param [String] name
|
398
|
+
# Required. The resource name e.g.,: `projects/myproject/locations/US/
|
399
|
+
# capacityCommitments/123`
|
400
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::SplitCapacityCommitmentRequest] split_capacity_commitment_request_object
|
401
|
+
# @param [String] fields
|
402
|
+
# Selector specifying which fields to include in a partial response.
|
403
|
+
# @param [String] quota_user
|
404
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
405
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
406
|
+
# @param [Google::Apis::RequestOptions] options
|
407
|
+
# Request-specific options
|
408
|
+
#
|
409
|
+
# @yield [result, err] Result & error if block supplied
|
410
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::SplitCapacityCommitmentResponse] parsed result object
|
411
|
+
# @yieldparam err [StandardError] error object if request failed
|
412
|
+
#
|
413
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::SplitCapacityCommitmentResponse]
|
414
|
+
#
|
415
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
416
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
417
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
418
|
+
def split_capacity_commitment(name, split_capacity_commitment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
419
|
+
command = make_simple_command(:post, 'v1beta1/{+name}:split', options)
|
420
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::SplitCapacityCommitmentRequest::Representation
|
421
|
+
command.request_object = split_capacity_commitment_request_object
|
422
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::SplitCapacityCommitmentResponse::Representation
|
423
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::SplitCapacityCommitmentResponse
|
424
|
+
command.params['name'] = name unless name.nil?
|
425
|
+
command.query['fields'] = fields unless fields.nil?
|
426
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
427
|
+
execute_or_queue_command(command, &block)
|
428
|
+
end
|
429
|
+
|
430
|
+
# Creates a new reservation resource.
|
431
|
+
# @param [String] parent
|
432
|
+
# Required. Project, location. E.g., `projects/myproject/locations/US`
|
433
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::Reservation] reservation_object
|
434
|
+
# @param [String] reservation_id
|
435
|
+
# The reservation ID. This field must only contain lower case alphanumeric
|
436
|
+
# characters or dash. Max length is 64 characters.
|
437
|
+
# @param [String] fields
|
438
|
+
# Selector specifying which fields to include in a partial response.
|
439
|
+
# @param [String] quota_user
|
440
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
441
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
442
|
+
# @param [Google::Apis::RequestOptions] options
|
443
|
+
# Request-specific options
|
444
|
+
#
|
445
|
+
# @yield [result, err] Result & error if block supplied
|
446
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Reservation] parsed result object
|
447
|
+
# @yieldparam err [StandardError] error object if request failed
|
448
|
+
#
|
449
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::Reservation]
|
450
|
+
#
|
451
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
452
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
453
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
454
|
+
def create_project_location_reservation(parent, reservation_object = nil, reservation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
455
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/reservations', options)
|
456
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
|
457
|
+
command.request_object = reservation_object
|
458
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
|
459
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation
|
460
|
+
command.params['parent'] = parent unless parent.nil?
|
461
|
+
command.query['reservationId'] = reservation_id unless reservation_id.nil?
|
462
|
+
command.query['fields'] = fields unless fields.nil?
|
463
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
464
|
+
execute_or_queue_command(command, &block)
|
465
|
+
end
|
466
|
+
|
467
|
+
# Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when
|
468
|
+
# reservation has assignments.
|
469
|
+
# @param [String] name
|
470
|
+
# Required. Resource name of the reservation to retrieve. E.g., `projects/
|
471
|
+
# myproject/locations/US/reservations/team1-prod`
|
472
|
+
# @param [String] fields
|
473
|
+
# Selector specifying which fields to include in a partial response.
|
474
|
+
# @param [String] quota_user
|
475
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
476
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
477
|
+
# @param [Google::Apis::RequestOptions] options
|
478
|
+
# Request-specific options
|
479
|
+
#
|
480
|
+
# @yield [result, err] Result & error if block supplied
|
481
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Empty] parsed result object
|
482
|
+
# @yieldparam err [StandardError] error object if request failed
|
483
|
+
#
|
484
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::Empty]
|
485
|
+
#
|
486
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
487
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
488
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
489
|
+
def delete_project_location_reservation(name, fields: nil, quota_user: nil, options: nil, &block)
|
490
|
+
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
|
491
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::Empty::Representation
|
492
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::Empty
|
493
|
+
command.params['name'] = name unless name.nil?
|
494
|
+
command.query['fields'] = fields unless fields.nil?
|
495
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
496
|
+
execute_or_queue_command(command, &block)
|
497
|
+
end
|
498
|
+
|
499
|
+
# Returns information about the reservation.
|
500
|
+
# @param [String] name
|
501
|
+
# Required. Resource name of the reservation to retrieve. E.g., `projects/
|
502
|
+
# myproject/locations/US/reservations/team1-prod`
|
503
|
+
# @param [String] fields
|
504
|
+
# Selector specifying which fields to include in a partial response.
|
505
|
+
# @param [String] quota_user
|
506
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
507
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
508
|
+
# @param [Google::Apis::RequestOptions] options
|
509
|
+
# Request-specific options
|
510
|
+
#
|
511
|
+
# @yield [result, err] Result & error if block supplied
|
512
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Reservation] parsed result object
|
513
|
+
# @yieldparam err [StandardError] error object if request failed
|
514
|
+
#
|
515
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::Reservation]
|
516
|
+
#
|
517
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
518
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
519
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
520
|
+
def get_project_location_reservation(name, fields: nil, quota_user: nil, options: nil, &block)
|
521
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
522
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
|
523
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation
|
524
|
+
command.params['name'] = name unless name.nil?
|
525
|
+
command.query['fields'] = fields unless fields.nil?
|
526
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
527
|
+
execute_or_queue_command(command, &block)
|
528
|
+
end
|
529
|
+
|
530
|
+
# Lists all the reservations for the project in the specified location.
|
531
|
+
# @param [String] parent
|
532
|
+
# Required. The parent resource name containing project and location, e.g.: `
|
533
|
+
# projects/myproject/locations/US`
|
534
|
+
# @param [String] filter
|
535
|
+
# Can be used to filter out reservations based on names, capacity, etc, e.g.:
|
536
|
+
# filter="reservation.slot_capacity > 200" filter="reservation.name = \"*dev/*\""
|
537
|
+
# Advanced filtering syntax can be [here](https://cloud.google.com/logging/docs/
|
538
|
+
# view/advanced-filters).
|
539
|
+
# @param [Fixnum] page_size
|
540
|
+
# The maximum number of items to return.
|
541
|
+
# @param [String] page_token
|
542
|
+
# The next_page_token value returned from a previous List request, if any.
|
543
|
+
# @param [String] fields
|
544
|
+
# Selector specifying which fields to include in a partial response.
|
545
|
+
# @param [String] quota_user
|
546
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
547
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
548
|
+
# @param [Google::Apis::RequestOptions] options
|
549
|
+
# Request-specific options
|
550
|
+
#
|
551
|
+
# @yield [result, err] Result & error if block supplied
|
552
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse] parsed result object
|
553
|
+
# @yieldparam err [StandardError] error object if request failed
|
554
|
+
#
|
555
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse]
|
556
|
+
#
|
557
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
558
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
559
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
560
|
+
def list_project_location_reservations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
561
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/reservations', options)
|
562
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse::Representation
|
563
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse
|
564
|
+
command.params['parent'] = parent unless parent.nil?
|
565
|
+
command.query['filter'] = filter unless filter.nil?
|
566
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
567
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
568
|
+
command.query['fields'] = fields unless fields.nil?
|
569
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
570
|
+
execute_or_queue_command(command, &block)
|
571
|
+
end
|
572
|
+
|
573
|
+
# Updates an existing reservation resource.
|
574
|
+
# @param [String] name
|
575
|
+
# The resource name of the reservation, e.g., `projects/*/locations/*/
|
576
|
+
# reservations/team1-prod`.
|
577
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::Reservation] reservation_object
|
578
|
+
# @param [String] update_mask
|
579
|
+
# Standard field mask for the set of fields to be updated.
|
580
|
+
# @param [String] fields
|
581
|
+
# Selector specifying which fields to include in a partial response.
|
582
|
+
# @param [String] quota_user
|
583
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
584
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
585
|
+
# @param [Google::Apis::RequestOptions] options
|
586
|
+
# Request-specific options
|
587
|
+
#
|
588
|
+
# @yield [result, err] Result & error if block supplied
|
589
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Reservation] parsed result object
|
590
|
+
# @yieldparam err [StandardError] error object if request failed
|
591
|
+
#
|
592
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::Reservation]
|
593
|
+
#
|
594
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
595
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
596
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
597
|
+
def patch_project_location_reservation(name, reservation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
598
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
599
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
|
600
|
+
command.request_object = reservation_object
|
601
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation
|
602
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation
|
603
|
+
command.params['name'] = name unless name.nil?
|
604
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
605
|
+
command.query['fields'] = fields unless fields.nil?
|
606
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
607
|
+
execute_or_queue_command(command, &block)
|
608
|
+
end
|
609
|
+
|
610
|
+
# Creates an assignment object which allows the given project to submit jobs of
|
611
|
+
# a certain type using slots from the specified reservation. Currently a
|
612
|
+
# resource (project, folder, organization) can only have one assignment per each
|
613
|
+
# (job_type, location) combination, and that reservation will be used for all
|
614
|
+
# jobs of the matching type. Different assignments can be created on different
|
615
|
+
# levels of the projects, folders or organization hierarchy. During query
|
616
|
+
# execution, the assignment is looked up at the project, folder and organization
|
617
|
+
# levels in that order. The first assignment found is applied to the query. When
|
618
|
+
# creating assignments, it does not matter if other assignments exist at higher
|
619
|
+
# levels. Example: * The organization `organizationA` contains two projects, `
|
620
|
+
# project1` and `project2`. * Assignments for all three entities (`organizationA`
|
621
|
+
# , `project1`, and `project2`) could all be created and mapped to the same or
|
622
|
+
# different reservations. Returns `google.rpc.Code.PERMISSION_DENIED` if user
|
623
|
+
# does not have 'bigquery.admin' permissions on the project using the
|
624
|
+
# reservation and the project that owns this reservation. Returns `google.rpc.
|
625
|
+
# Code.INVALID_ARGUMENT` when location of the assignment does not match location
|
626
|
+
# of the reservation.
|
627
|
+
# @param [String] parent
|
628
|
+
# Required. The parent resource name of the assignment E.g. `projects/myproject/
|
629
|
+
# locations/US/reservations/team1-prod`
|
630
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::Assignment] assignment_object
|
631
|
+
# @param [String] fields
|
632
|
+
# Selector specifying which fields to include in a partial response.
|
633
|
+
# @param [String] quota_user
|
634
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
635
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
636
|
+
# @param [Google::Apis::RequestOptions] options
|
637
|
+
# Request-specific options
|
638
|
+
#
|
639
|
+
# @yield [result, err] Result & error if block supplied
|
640
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Assignment] parsed result object
|
641
|
+
# @yieldparam err [StandardError] error object if request failed
|
642
|
+
#
|
643
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::Assignment]
|
644
|
+
#
|
645
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
646
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
647
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
648
|
+
def create_project_location_reservation_assignment(parent, assignment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
649
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/assignments', options)
|
650
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
|
651
|
+
command.request_object = assignment_object
|
652
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
|
653
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::Assignment
|
654
|
+
command.params['parent'] = parent unless parent.nil?
|
655
|
+
command.query['fields'] = fields unless fields.nil?
|
656
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
657
|
+
execute_or_queue_command(command, &block)
|
658
|
+
end
|
659
|
+
|
660
|
+
# Deletes a assignment. No expansion will happen. Example: * Organization `
|
661
|
+
# organizationA` contains two projects, `project1` and `project2`. * Reservation
|
662
|
+
# `res1` exists and was created previously. * CreateAssignment was used
|
663
|
+
# previously to define the following associations between entities and
|
664
|
+
# reservations: `` and `` In this example, deletion of the `` assignment won't
|
665
|
+
# affect the other assignment ``. After said deletion, queries from `project1`
|
666
|
+
# will still use `res1` while queries from `project2` will switch to use on-
|
667
|
+
# demand mode.
|
668
|
+
# @param [String] name
|
669
|
+
# Required. Name of the resource, e.g. `projects/myproject/locations/US/
|
670
|
+
# reservations/team1-prod/assignments/123`
|
671
|
+
# @param [String] fields
|
672
|
+
# Selector specifying which fields to include in a partial response.
|
673
|
+
# @param [String] quota_user
|
674
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
675
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
676
|
+
# @param [Google::Apis::RequestOptions] options
|
677
|
+
# Request-specific options
|
678
|
+
#
|
679
|
+
# @yield [result, err] Result & error if block supplied
|
680
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Empty] parsed result object
|
681
|
+
# @yieldparam err [StandardError] error object if request failed
|
682
|
+
#
|
683
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::Empty]
|
684
|
+
#
|
685
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
686
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
687
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
688
|
+
def delete_project_location_reservation_assignment(name, fields: nil, quota_user: nil, options: nil, &block)
|
689
|
+
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
|
690
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::Empty::Representation
|
691
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::Empty
|
692
|
+
command.params['name'] = name unless name.nil?
|
693
|
+
command.query['fields'] = fields unless fields.nil?
|
694
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
695
|
+
execute_or_queue_command(command, &block)
|
696
|
+
end
|
697
|
+
|
698
|
+
# Lists assignments. Only explicitly created assignments will be returned.
|
699
|
+
# Example: * Organization `organizationA` contains two projects, `project1` and `
|
700
|
+
# project2`. * Reservation `res1` exists and was created previously. *
|
701
|
+
# CreateAssignment was used previously to define the following associations
|
702
|
+
# between entities and reservations: `` and `` In this example, ListAssignments
|
703
|
+
# will just return the above two assignments for reservation `res1`, and no
|
704
|
+
# expansion/merge will happen. The wildcard "-" can be used for reservations in
|
705
|
+
# the request. In that case all assignments belongs to the specified project and
|
706
|
+
# location will be listed. **Note** "-" cannot be used for projects nor
|
707
|
+
# locations.
|
708
|
+
# @param [String] parent
|
709
|
+
# Required. The parent resource name e.g.: `projects/myproject/locations/US/
|
710
|
+
# reservations/team1-prod` Or: `projects/myproject/locations/US/reservations/-`
|
711
|
+
# @param [Fixnum] page_size
|
712
|
+
# The maximum number of items to return.
|
713
|
+
# @param [String] page_token
|
714
|
+
# The next_page_token value returned from a previous List request, if any.
|
715
|
+
# @param [String] fields
|
716
|
+
# Selector specifying which fields to include in a partial response.
|
717
|
+
# @param [String] quota_user
|
718
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
719
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
720
|
+
# @param [Google::Apis::RequestOptions] options
|
721
|
+
# Request-specific options
|
722
|
+
#
|
723
|
+
# @yield [result, err] Result & error if block supplied
|
724
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse] parsed result object
|
725
|
+
# @yieldparam err [StandardError] error object if request failed
|
726
|
+
#
|
727
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse]
|
728
|
+
#
|
729
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
730
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
731
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
732
|
+
def list_project_location_reservation_assignments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
733
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/assignments', options)
|
734
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse::Representation
|
735
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse
|
736
|
+
command.params['parent'] = parent unless parent.nil?
|
737
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
738
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
739
|
+
command.query['fields'] = fields unless fields.nil?
|
740
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
741
|
+
execute_or_queue_command(command, &block)
|
742
|
+
end
|
743
|
+
|
744
|
+
# Moves an assignment under a new reservation. This differs from removing an
|
745
|
+
# existing assignment and recreating a new one by providing a transactional
|
746
|
+
# change that ensures an assignee always has an associated reservation.
|
747
|
+
# @param [String] name
|
748
|
+
# Required. The resource name of the assignment, e.g. `projects/myproject/
|
749
|
+
# locations/US/reservations/team1-prod/assignments/123`
|
750
|
+
# @param [Google::Apis::BigqueryreservationV1beta1::MoveAssignmentRequest] move_assignment_request_object
|
751
|
+
# @param [String] fields
|
752
|
+
# Selector specifying which fields to include in a partial response.
|
753
|
+
# @param [String] quota_user
|
754
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
755
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
756
|
+
# @param [Google::Apis::RequestOptions] options
|
757
|
+
# Request-specific options
|
758
|
+
#
|
759
|
+
# @yield [result, err] Result & error if block supplied
|
760
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Assignment] parsed result object
|
761
|
+
# @yieldparam err [StandardError] error object if request failed
|
762
|
+
#
|
763
|
+
# @return [Google::Apis::BigqueryreservationV1beta1::Assignment]
|
764
|
+
#
|
765
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
766
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
767
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
768
|
+
def move_assignment(name, move_assignment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
769
|
+
command = make_simple_command(:post, 'v1beta1/{+name}:move', options)
|
770
|
+
command.request_representation = Google::Apis::BigqueryreservationV1beta1::MoveAssignmentRequest::Representation
|
771
|
+
command.request_object = move_assignment_request_object
|
772
|
+
command.response_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation
|
773
|
+
command.response_class = Google::Apis::BigqueryreservationV1beta1::Assignment
|
774
|
+
command.params['name'] = name unless name.nil?
|
775
|
+
command.query['fields'] = fields unless fields.nil?
|
776
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
777
|
+
execute_or_queue_command(command, &block)
|
778
|
+
end
|
779
|
+
|
780
|
+
protected
|
781
|
+
|
782
|
+
def apply_command_defaults(command)
|
783
|
+
command.query['key'] = key unless key.nil?
|
784
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
785
|
+
end
|
786
|
+
end
|
787
|
+
end
|
788
|
+
end
|
789
|
+
end
|