google-cloud-bigquery-reservation-v1 0.3.2 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -51,7 +51,7 @@ module Google
51
51
  #
52
52
  # The resource will be in the following format:
53
53
  #
54
- # `projects/{project}/locations/{location}/bireservation`
54
+ # `projects/{project}/locations/{location}/biReservation`
55
55
  #
56
56
  # @param project [String]
57
57
  # @param location [String]
@@ -60,7 +60,7 @@ module Google
60
60
  def bi_reservation_path project:, location:
61
61
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
62
62
 
63
- "projects/#{project}/locations/#{location}/bireservation"
63
+ "projects/#{project}/locations/#{location}/biReservation"
64
64
  end
65
65
 
66
66
  ##
@@ -42,7 +42,7 @@ module Google
42
42
  # `projects/myproject/locations/US/capacityCommitments/id`.
43
43
  class Service
44
44
 
45
- include GRPC::GenericService
45
+ include ::GRPC::GenericService
46
46
 
47
47
  self.marshal_class_method = :encode
48
48
  self.unmarshal_class_method = :decode
@@ -119,6 +119,11 @@ module Google
119
119
  # `project2`) could all be created and mapped to the same or different
120
120
  # reservations.
121
121
  #
122
+ # "None" assignments represent an absence of the assignment. Projects
123
+ # assigned to None use on-demand pricing. To create a "None" assignment, use
124
+ # "none" as a reservation_id in the parent. Example parent:
125
+ # `projects/myproject/locations/US/reservations/none`.
126
+ #
122
127
  # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
123
128
  # 'bigquery.admin' permissions on the project using the reservation
124
129
  # and the project that owns this reservation.
@@ -164,7 +169,7 @@ module Google
164
169
  # queries from `project1` will still use `res1` while queries from
165
170
  # `project2` will switch to use on-demand mode.
166
171
  rpc :DeleteAssignment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Google::Protobuf::Empty
167
- # Looks up assignments for a specified resource for a particular region.
172
+ # Deprecated: Looks up assignments for a specified resource for a particular region.
168
173
  # If the request is about a project:
169
174
  #
170
175
  # 1. Assignments created on the project will be returned if they exist.
@@ -188,6 +193,27 @@ module Google
188
193
  # **Note** "-" cannot be used for projects
189
194
  # nor locations.
190
195
  rpc :SearchAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse
196
+ # Looks up assignments for a specified resource for a particular region.
197
+ # If the request is about a project:
198
+ #
199
+ # 1. Assignments created on the project will be returned if they exist.
200
+ # 2. Otherwise assignments created on the closest ancestor will be
201
+ # returned.
202
+ # 3. Assignments for different JobTypes will all be returned.
203
+ #
204
+ # The same logic applies if the request is about a folder.
205
+ #
206
+ # If the request is about an organization, then assignments created on the
207
+ # organization will be returned (organization doesn't have ancestors).
208
+ #
209
+ # Comparing to ListAssignments, there are some behavior
210
+ # differences:
211
+ #
212
+ # 1. permission on the assignee will be verified in this API.
213
+ # 2. Hierarchy lookup (project->folder->organization) happens in this API.
214
+ # 3. Parent here is `projects/*/locations/*`, instead of
215
+ # `projects/*/locations/*reservations/*`.
216
+ rpc :SearchAllAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse
191
217
  # Moves an assignment under a new reservation.
192
218
  #
193
219
  # This differs from removing an existing assignment and recreating a new one
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigquery
23
23
  module Reservation
24
24
  module V1
25
- VERSION = "0.3.2"
25
+ VERSION = "0.4.2"
26
26
  end
27
27
  end
28
28
  end
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -41,9 +41,16 @@ module Google
41
41
  # `google.rpc.Code.RESOURCE_EXHAUSTED`.
42
42
  # @!attribute [rw] ignore_idle_slots
43
43
  # @return [::Boolean]
44
- # If false, any query using this reservation will use idle slots from other
45
- # reservations within the same admin project. If true, a query using this
46
- # reservation will execute with the slot capacity specified above at most.
44
+ # If false, any query or pipeline job using this reservation will use idle
45
+ # slots from other reservations within the same admin project. If true, a
46
+ # query or pipeline job using this reservation will execute with the slot
47
+ # capacity specified in the slot_capacity field at most.
48
+ # @!attribute [r] creation_time
49
+ # @return [::Google::Protobuf::Timestamp]
50
+ # Output only. Creation time of the reservation.
51
+ # @!attribute [r] update_time
52
+ # @return [::Google::Protobuf::Timestamp]
53
+ # Output only. Last update time of the reservation.
47
54
  class Reservation
48
55
  include ::Google::Protobuf::MessageExts
49
56
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -72,6 +79,10 @@ module Google
72
79
  # @!attribute [r] state
73
80
  # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::State]
74
81
  # Output only. State of the commitment.
82
+ # @!attribute [r] commitment_start_time
83
+ # @return [::Google::Protobuf::Timestamp]
84
+ # Output only. The start of the current commitment period. It is applicable only for
85
+ # ACTIVE capacity commitments.
75
86
  # @!attribute [r] commitment_end_time
76
87
  # @return [::Google::Protobuf::Timestamp]
77
88
  # Output only. The end of the current commitment period. It is applicable only for ACTIVE
@@ -226,6 +237,13 @@ module Google
226
237
  # @return [::Boolean]
227
238
  # If true, fail the request if another project in the organization has a
228
239
  # capacity commitment.
240
+ # @!attribute [rw] capacity_commitment_id
241
+ # @return [::String]
242
+ # The optional capacity commitment ID. Capacity commitment name will be
243
+ # generated automatically if this field is empty.
244
+ # This field must only contain lower case alphanumeric characters or dash.
245
+ # Max length is 64 characters.
246
+ # NOTE: this ID won't be kept if the capacity commitment is split or merged.
229
247
  class CreateCapacityCommitmentRequest
230
248
  include ::Google::Protobuf::MessageExts
231
249
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -275,6 +293,11 @@ module Google
275
293
  # @return [::String]
276
294
  # Required. Resource name of the capacity commitment to delete. E.g.,
277
295
  # `projects/myproject/locations/US/capacityCommitments/123`
296
+ # @!attribute [rw] force
297
+ # @return [::Boolean]
298
+ # Can be used to force delete commitments even if assignments exist. Deleting
299
+ # commitments with assignments may cause queries to fail if they no longer
300
+ # have access to slots.
278
301
  class DeleteCapacityCommitmentRequest
279
302
  include ::Google::Protobuf::MessageExts
280
303
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -365,6 +388,10 @@ module Google
365
388
 
366
389
  # Query jobs from the project will use the reservation.
367
390
  QUERY = 2
391
+
392
+ # BigQuery ML jobs that use services external to BigQuery for model
393
+ # training. These jobs will not utilize idle slots from other reservations.
394
+ ML_EXTERNAL = 3
368
395
  end
369
396
 
370
397
  # Assignment will remain in PENDING state if no active capacity commitment is
@@ -393,6 +420,12 @@ module Google
393
420
  # @!attribute [rw] assignment
394
421
  # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
395
422
  # Assignment resource to create.
423
+ # @!attribute [rw] assignment_id
424
+ # @return [::String]
425
+ # The optional assignment ID. Assignment name will be generated automatically
426
+ # if this field is empty.
427
+ # This field must only contain lower case alphanumeric characters or dash.
428
+ # Max length is 64 characters.
396
429
  class CreateAssignmentRequest
397
430
  include ::Google::Protobuf::MessageExts
398
431
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -473,6 +506,35 @@ module Google
473
506
  extend ::Google::Protobuf::MessageExts::ClassMethods
474
507
  end
475
508
 
509
+ # The request for
510
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}.
511
+ # Note: "bigquery.reservationAssignments.search" permission is required on the
512
+ # related assignee.
513
+ # @!attribute [rw] parent
514
+ # @return [::String]
515
+ # Required. The resource name with location (project name could be the wildcard '-'),
516
+ # e.g.:
517
+ # `projects/-/locations/US`.
518
+ # @!attribute [rw] query
519
+ # @return [::String]
520
+ # Please specify resource name as assignee in the query.
521
+ #
522
+ # Examples:
523
+ #
524
+ # * `assignee=projects/myproject`
525
+ # * `assignee=folders/123`
526
+ # * `assignee=organizations/456`
527
+ # @!attribute [rw] page_size
528
+ # @return [::Integer]
529
+ # The maximum number of items to return per page.
530
+ # @!attribute [rw] page_token
531
+ # @return [::String]
532
+ # The next_page_token value returned from a previous List request, if any.
533
+ class SearchAllAssignmentsRequest
534
+ include ::Google::Protobuf::MessageExts
535
+ extend ::Google::Protobuf::MessageExts::ClassMethods
536
+ end
537
+
476
538
  # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}.
477
539
  # @!attribute [rw] assignments
478
540
  # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
@@ -486,6 +548,19 @@ module Google
486
548
  extend ::Google::Protobuf::MessageExts::ClassMethods
487
549
  end
488
550
 
551
+ # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}.
552
+ # @!attribute [rw] assignments
553
+ # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
554
+ # List of assignments visible to the user.
555
+ # @!attribute [rw] next_page_token
556
+ # @return [::String]
557
+ # Token to retrieve the next page of results, or empty if there are no
558
+ # more results in the list.
559
+ class SearchAllAssignmentsResponse
560
+ include ::Google::Protobuf::MessageExts
561
+ extend ::Google::Protobuf::MessageExts::ClassMethods
562
+ end
563
+
489
564
  # The request for
490
565
  # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment ReservationService.MoveAssignment}.
491
566
  #
@@ -514,7 +589,7 @@ module Google
514
589
  # @return [::String]
515
590
  # The resource name of the singleton BI reservation.
516
591
  # Reservation names have the form
517
- # `projects/{project_id}/locations/{location_id}/bireservation`.
592
+ # `projects/{project_id}/locations/{location_id}/biReservation`.
518
593
  # @!attribute [r] update_time
519
594
  # @return [::Google::Protobuf::Timestamp]
520
595
  # Output only. The last update timestamp of a reservation.
@@ -530,7 +605,7 @@ module Google
530
605
  # @!attribute [rw] name
531
606
  # @return [::String]
532
607
  # Required. Name of the requested reservation, for example:
533
- # `projects/{project_id}/locations/{location_id}/bireservation`
608
+ # `projects/{project_id}/locations/{location_id}/biReservation`
534
609
  class GetBiReservationRequest
535
610
  include ::Google::Protobuf::MessageExts
536
611
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery-reservation-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  requirements: []
210
- rubygems_version: 3.2.17
210
+ rubygems_version: 3.3.4
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: API Client library for the BigQuery Reservation V1 API