google-cloud-bigquery-reservation-v1 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb +19 -0
- data/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb +145 -14
- data/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb +2 -2
- data/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb +27 -1
- data/lib/google/cloud/bigquery/reservation/v1/version.rb +1 -1
- data/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb +80 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f40ed2d914c5c6cbe86653c0b5be4d2dfceea516b00399a456de06d4fa4267db
|
4
|
+
data.tar.gz: 7e65142bac2c1705cad029bb7725e71ac6e51f8a65f9e4a09c42f208dcfc5a2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f98d554bd713ed30bf7f99079ff295b552708dd03846257b389a3805f4fbed5e470369b6fc4d9e9cf3d5ab35b3b6a2a6ba540fb1d5c98c38ff2687eba378612
|
7
|
+
data.tar.gz: 4b742a4c8b70b16e3d8754456d26d9ac42d37a024dbabe274a421382d45f388ac2a93e83716efd7c8065a6c5c258f96aa0042f945305ec92a34d26095bbb7d16
|
@@ -17,12 +17,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
17
17
|
optional :name, :string, 1
|
18
18
|
optional :slot_capacity, :int64, 2
|
19
19
|
optional :ignore_idle_slots, :bool, 4
|
20
|
+
optional :creation_time, :message, 8, "google.protobuf.Timestamp"
|
21
|
+
optional :update_time, :message, 9, "google.protobuf.Timestamp"
|
20
22
|
end
|
21
23
|
add_message "google.cloud.bigquery.reservation.v1.CapacityCommitment" do
|
22
24
|
optional :name, :string, 1
|
23
25
|
optional :slot_count, :int64, 2
|
24
26
|
optional :plan, :enum, 3, "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan"
|
25
27
|
optional :state, :enum, 4, "google.cloud.bigquery.reservation.v1.CapacityCommitment.State"
|
28
|
+
optional :commitment_start_time, :message, 9, "google.protobuf.Timestamp"
|
26
29
|
optional :commitment_end_time, :message, 5, "google.protobuf.Timestamp"
|
27
30
|
optional :failure_status, :message, 7, "google.rpc.Status"
|
28
31
|
optional :renewal_plan, :enum, 8, "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan"
|
@@ -68,6 +71,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
68
71
|
optional :parent, :string, 1
|
69
72
|
optional :capacity_commitment, :message, 2, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
|
70
73
|
optional :enforce_single_admin_project_per_org, :bool, 4
|
74
|
+
optional :capacity_commitment_id, :string, 5
|
71
75
|
end
|
72
76
|
add_message "google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest" do
|
73
77
|
optional :parent, :string, 1
|
@@ -83,6 +87,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
83
87
|
end
|
84
88
|
add_message "google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest" do
|
85
89
|
optional :name, :string, 1
|
90
|
+
optional :force, :bool, 3
|
86
91
|
end
|
87
92
|
add_message "google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest" do
|
88
93
|
optional :capacity_commitment, :message, 1, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
|
@@ -110,6 +115,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
110
115
|
value :JOB_TYPE_UNSPECIFIED, 0
|
111
116
|
value :PIPELINE, 1
|
112
117
|
value :QUERY, 2
|
118
|
+
value :ML_EXTERNAL, 3
|
113
119
|
end
|
114
120
|
add_enum "google.cloud.bigquery.reservation.v1.Assignment.State" do
|
115
121
|
value :STATE_UNSPECIFIED, 0
|
@@ -119,6 +125,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
119
125
|
add_message "google.cloud.bigquery.reservation.v1.CreateAssignmentRequest" do
|
120
126
|
optional :parent, :string, 1
|
121
127
|
optional :assignment, :message, 2, "google.cloud.bigquery.reservation.v1.Assignment"
|
128
|
+
optional :assignment_id, :string, 4
|
122
129
|
end
|
123
130
|
add_message "google.cloud.bigquery.reservation.v1.ListAssignmentsRequest" do
|
124
131
|
optional :parent, :string, 1
|
@@ -138,10 +145,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
138
145
|
optional :page_size, :int32, 3
|
139
146
|
optional :page_token, :string, 4
|
140
147
|
end
|
148
|
+
add_message "google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest" do
|
149
|
+
optional :parent, :string, 1
|
150
|
+
optional :query, :string, 2
|
151
|
+
optional :page_size, :int32, 3
|
152
|
+
optional :page_token, :string, 4
|
153
|
+
end
|
141
154
|
add_message "google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse" do
|
142
155
|
repeated :assignments, :message, 1, "google.cloud.bigquery.reservation.v1.Assignment"
|
143
156
|
optional :next_page_token, :string, 2
|
144
157
|
end
|
158
|
+
add_message "google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse" do
|
159
|
+
repeated :assignments, :message, 1, "google.cloud.bigquery.reservation.v1.Assignment"
|
160
|
+
optional :next_page_token, :string, 2
|
161
|
+
end
|
145
162
|
add_message "google.cloud.bigquery.reservation.v1.MoveAssignmentRequest" do
|
146
163
|
optional :name, :string, 1
|
147
164
|
optional :destination_id, :string, 3
|
@@ -193,7 +210,9 @@ module Google
|
|
193
210
|
ListAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsResponse").msgclass
|
194
211
|
DeleteAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest").msgclass
|
195
212
|
SearchAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest").msgclass
|
213
|
+
SearchAllAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest").msgclass
|
196
214
|
SearchAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse").msgclass
|
215
|
+
SearchAllAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse").msgclass
|
197
216
|
MoveAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MoveAssignmentRequest").msgclass
|
198
217
|
BiReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.BiReservation").msgclass
|
199
218
|
GetBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetBiReservationRequest").msgclass
|
@@ -79,7 +79,7 @@ module Google
|
|
79
79
|
end
|
80
80
|
default_config = Client::Configuration.new parent_config
|
81
81
|
|
82
|
-
default_config.rpcs.create_reservation.timeout =
|
82
|
+
default_config.rpcs.create_reservation.timeout = 300.0
|
83
83
|
|
84
84
|
default_config.rpcs.list_reservations.timeout = 60.0
|
85
85
|
default_config.rpcs.list_reservations.retry_policy = {
|
@@ -96,9 +96,9 @@ module Google
|
|
96
96
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
97
97
|
}
|
98
98
|
|
99
|
-
default_config.rpcs.update_reservation.timeout =
|
99
|
+
default_config.rpcs.update_reservation.timeout = 300.0
|
100
100
|
|
101
|
-
default_config.rpcs.create_capacity_commitment.timeout =
|
101
|
+
default_config.rpcs.create_capacity_commitment.timeout = 300.0
|
102
102
|
|
103
103
|
default_config.rpcs.list_capacity_commitments.timeout = 60.0
|
104
104
|
default_config.rpcs.list_capacity_commitments.retry_policy = {
|
@@ -115,13 +115,13 @@ module Google
|
|
115
115
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
116
116
|
}
|
117
117
|
|
118
|
-
default_config.rpcs.update_capacity_commitment.timeout =
|
118
|
+
default_config.rpcs.update_capacity_commitment.timeout = 300.0
|
119
119
|
|
120
|
-
default_config.rpcs.split_capacity_commitment.timeout =
|
120
|
+
default_config.rpcs.split_capacity_commitment.timeout = 300.0
|
121
121
|
|
122
|
-
default_config.rpcs.merge_capacity_commitments.timeout =
|
122
|
+
default_config.rpcs.merge_capacity_commitments.timeout = 300.0
|
123
123
|
|
124
|
-
default_config.rpcs.create_assignment.timeout =
|
124
|
+
default_config.rpcs.create_assignment.timeout = 300.0
|
125
125
|
|
126
126
|
default_config.rpcs.list_assignments.timeout = 60.0
|
127
127
|
default_config.rpcs.list_assignments.retry_policy = {
|
@@ -138,14 +138,14 @@ module Google
|
|
138
138
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
139
139
|
}
|
140
140
|
|
141
|
-
default_config.rpcs.move_assignment.timeout =
|
141
|
+
default_config.rpcs.move_assignment.timeout = 300.0
|
142
142
|
|
143
143
|
default_config.rpcs.get_bi_reservation.timeout = 60.0
|
144
144
|
default_config.rpcs.get_bi_reservation.retry_policy = {
|
145
145
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
146
146
|
}
|
147
147
|
|
148
|
-
default_config.rpcs.update_bi_reservation.timeout =
|
148
|
+
default_config.rpcs.update_bi_reservation.timeout = 300.0
|
149
149
|
|
150
150
|
default_config
|
151
151
|
end
|
@@ -598,7 +598,7 @@ module Google
|
|
598
598
|
# @param options [::Gapic::CallOptions, ::Hash]
|
599
599
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
600
600
|
#
|
601
|
-
# @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil)
|
601
|
+
# @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil)
|
602
602
|
# Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at
|
603
603
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
604
604
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -611,6 +611,12 @@ module Google
|
|
611
611
|
# @param enforce_single_admin_project_per_org [::Boolean]
|
612
612
|
# If true, fail the request if another project in the organization has a
|
613
613
|
# capacity commitment.
|
614
|
+
# @param capacity_commitment_id [::String]
|
615
|
+
# The optional capacity commitment ID. Capacity commitment name will be
|
616
|
+
# generated automatically if this field is empty.
|
617
|
+
# This field must only contain lower case alphanumeric characters or dash.
|
618
|
+
# Max length is 64 characters.
|
619
|
+
# NOTE: this ID won't be kept if the capacity commitment is split or merged.
|
614
620
|
#
|
615
621
|
# @yield [response, operation] Access the result along with the RPC operation
|
616
622
|
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
@@ -817,7 +823,7 @@ module Google
|
|
817
823
|
# @param options [::Gapic::CallOptions, ::Hash]
|
818
824
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
819
825
|
#
|
820
|
-
# @overload delete_capacity_commitment(name: nil)
|
826
|
+
# @overload delete_capacity_commitment(name: nil, force: nil)
|
821
827
|
# Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at
|
822
828
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
823
829
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -825,6 +831,10 @@ module Google
|
|
825
831
|
# @param name [::String]
|
826
832
|
# Required. Resource name of the capacity commitment to delete. E.g.,
|
827
833
|
# `projects/myproject/locations/US/capacityCommitments/123`
|
834
|
+
# @param force [::Boolean]
|
835
|
+
# Can be used to force delete commitments even if assignments exist. Deleting
|
836
|
+
# commitments with assignments may cause queries to fail if they no longer
|
837
|
+
# have access to slots.
|
828
838
|
#
|
829
839
|
# @yield [response, operation] Access the result along with the RPC operation
|
830
840
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -1133,6 +1143,11 @@ module Google
|
|
1133
1143
|
# `project2`) could all be created and mapped to the same or different
|
1134
1144
|
# reservations.
|
1135
1145
|
#
|
1146
|
+
# "None" assignments represent an absence of the assignment. Projects
|
1147
|
+
# assigned to None use on-demand pricing. To create a "None" assignment, use
|
1148
|
+
# "none" as a reservation_id in the parent. Example parent:
|
1149
|
+
# `projects/myproject/locations/US/reservations/none`.
|
1150
|
+
#
|
1136
1151
|
# Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
|
1137
1152
|
# 'bigquery.admin' permissions on the project using the reservation
|
1138
1153
|
# and the project that owns this reservation.
|
@@ -1150,7 +1165,7 @@ module Google
|
|
1150
1165
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1151
1166
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1152
1167
|
#
|
1153
|
-
# @overload create_assignment(parent: nil, assignment: nil)
|
1168
|
+
# @overload create_assignment(parent: nil, assignment: nil, assignment_id: nil)
|
1154
1169
|
# Pass arguments to `create_assignment` via keyword arguments. Note that at
|
1155
1170
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1156
1171
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1160,6 +1175,11 @@ module Google
|
|
1160
1175
|
# E.g. `projects/myproject/locations/US/reservations/team1-prod`
|
1161
1176
|
# @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash]
|
1162
1177
|
# Assignment resource to create.
|
1178
|
+
# @param assignment_id [::String]
|
1179
|
+
# The optional assignment ID. Assignment name will be generated automatically
|
1180
|
+
# if this field is empty.
|
1181
|
+
# This field must only contain lower case alphanumeric characters or dash.
|
1182
|
+
# Max length is 64 characters.
|
1163
1183
|
#
|
1164
1184
|
# @yield [response, operation] Access the result along with the RPC operation
|
1165
1185
|
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
|
@@ -1391,7 +1411,7 @@ module Google
|
|
1391
1411
|
end
|
1392
1412
|
|
1393
1413
|
##
|
1394
|
-
# Looks up assignments for a specified resource for a particular region.
|
1414
|
+
# Deprecated: Looks up assignments for a specified resource for a particular region.
|
1395
1415
|
# If the request is about a project:
|
1396
1416
|
#
|
1397
1417
|
# 1. Assignments created on the project will be returned if they exist.
|
@@ -1415,6 +1435,8 @@ module Google
|
|
1415
1435
|
# **Note** "-" cannot be used for projects
|
1416
1436
|
# nor locations.
|
1417
1437
|
#
|
1438
|
+
# @deprecated This method is deprecated and may be removed in the next major version update.
|
1439
|
+
#
|
1418
1440
|
# @overload search_assignments(request, options = nil)
|
1419
1441
|
# Pass arguments to `search_assignments` via a request object, either of type
|
1420
1442
|
# {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash.
|
@@ -1495,6 +1517,108 @@ module Google
|
|
1495
1517
|
raise ::Google::Cloud::Error.from_error(e)
|
1496
1518
|
end
|
1497
1519
|
|
1520
|
+
##
|
1521
|
+
# Looks up assignments for a specified resource for a particular region.
|
1522
|
+
# If the request is about a project:
|
1523
|
+
#
|
1524
|
+
# 1. Assignments created on the project will be returned if they exist.
|
1525
|
+
# 2. Otherwise assignments created on the closest ancestor will be
|
1526
|
+
# returned.
|
1527
|
+
# 3. Assignments for different JobTypes will all be returned.
|
1528
|
+
#
|
1529
|
+
# The same logic applies if the request is about a folder.
|
1530
|
+
#
|
1531
|
+
# If the request is about an organization, then assignments created on the
|
1532
|
+
# organization will be returned (organization doesn't have ancestors).
|
1533
|
+
#
|
1534
|
+
# Comparing to ListAssignments, there are some behavior
|
1535
|
+
# differences:
|
1536
|
+
#
|
1537
|
+
# 1. permission on the assignee will be verified in this API.
|
1538
|
+
# 2. Hierarchy lookup (project->folder->organization) happens in this API.
|
1539
|
+
# 3. Parent here is `projects/*/locations/*`, instead of
|
1540
|
+
# `projects/*/locations/*reservations/*`.
|
1541
|
+
#
|
1542
|
+
# @overload search_all_assignments(request, options = nil)
|
1543
|
+
# Pass arguments to `search_all_assignments` via a request object, either of type
|
1544
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash.
|
1545
|
+
#
|
1546
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash]
|
1547
|
+
# A request object representing the call parameters. Required. To specify no
|
1548
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1549
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1550
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1551
|
+
#
|
1552
|
+
# @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil)
|
1553
|
+
# Pass arguments to `search_all_assignments` via keyword arguments. Note that at
|
1554
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1555
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1556
|
+
#
|
1557
|
+
# @param parent [::String]
|
1558
|
+
# Required. The resource name with location (project name could be the wildcard '-'),
|
1559
|
+
# e.g.:
|
1560
|
+
# `projects/-/locations/US`.
|
1561
|
+
# @param query [::String]
|
1562
|
+
# Please specify resource name as assignee in the query.
|
1563
|
+
#
|
1564
|
+
# Examples:
|
1565
|
+
#
|
1566
|
+
# * `assignee=projects/myproject`
|
1567
|
+
# * `assignee=folders/123`
|
1568
|
+
# * `assignee=organizations/456`
|
1569
|
+
# @param page_size [::Integer]
|
1570
|
+
# The maximum number of items to return per page.
|
1571
|
+
# @param page_token [::String]
|
1572
|
+
# The next_page_token value returned from a previous List request, if any.
|
1573
|
+
#
|
1574
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1575
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
|
1576
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1577
|
+
#
|
1578
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
|
1579
|
+
#
|
1580
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1581
|
+
#
|
1582
|
+
def search_all_assignments request, options = nil
|
1583
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1584
|
+
|
1585
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest
|
1586
|
+
|
1587
|
+
# Converts hash and nil to an options object
|
1588
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1589
|
+
|
1590
|
+
# Customize the options with defaults
|
1591
|
+
metadata = @config.rpcs.search_all_assignments.metadata.to_h
|
1592
|
+
|
1593
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1594
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1595
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1596
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1597
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1598
|
+
|
1599
|
+
header_params = {
|
1600
|
+
"parent" => request.parent
|
1601
|
+
}
|
1602
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1603
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1604
|
+
|
1605
|
+
options.apply_defaults timeout: @config.rpcs.search_all_assignments.timeout,
|
1606
|
+
metadata: metadata,
|
1607
|
+
retry_policy: @config.rpcs.search_all_assignments.retry_policy
|
1608
|
+
|
1609
|
+
options.apply_defaults timeout: @config.timeout,
|
1610
|
+
metadata: @config.metadata,
|
1611
|
+
retry_policy: @config.retry_policy
|
1612
|
+
|
1613
|
+
@reservation_service_stub.call_rpc :search_all_assignments, request, options: options do |response, operation|
|
1614
|
+
response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, request, response, operation, options
|
1615
|
+
yield response, operation if block_given?
|
1616
|
+
return response
|
1617
|
+
end
|
1618
|
+
rescue ::GRPC::BadStatus => e
|
1619
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1620
|
+
end
|
1621
|
+
|
1498
1622
|
##
|
1499
1623
|
# Moves an assignment under a new reservation.
|
1500
1624
|
#
|
@@ -1592,7 +1716,7 @@ module Google
|
|
1592
1716
|
#
|
1593
1717
|
# @param name [::String]
|
1594
1718
|
# Required. Name of the requested reservation, for example:
|
1595
|
-
# `projects/{project_id}/locations/{location_id}/
|
1719
|
+
# `projects/{project_id}/locations/{location_id}/biReservation`
|
1596
1720
|
#
|
1597
1721
|
# @yield [response, operation] Access the result along with the RPC operation
|
1598
1722
|
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation]
|
@@ -1934,6 +2058,11 @@ module Google
|
|
1934
2058
|
#
|
1935
2059
|
attr_reader :search_assignments
|
1936
2060
|
##
|
2061
|
+
# RPC-specific configuration for `search_all_assignments`
|
2062
|
+
# @return [::Gapic::Config::Method]
|
2063
|
+
#
|
2064
|
+
attr_reader :search_all_assignments
|
2065
|
+
##
|
1937
2066
|
# RPC-specific configuration for `move_assignment`
|
1938
2067
|
# @return [::Gapic::Config::Method]
|
1939
2068
|
#
|
@@ -1983,6 +2112,8 @@ module Google
|
|
1983
2112
|
@delete_assignment = ::Gapic::Config::Method.new delete_assignment_config
|
1984
2113
|
search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments
|
1985
2114
|
@search_assignments = ::Gapic::Config::Method.new search_assignments_config
|
2115
|
+
search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments
|
2116
|
+
@search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config
|
1986
2117
|
move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment
|
1987
2118
|
@move_assignment = ::Gapic::Config::Method.new move_assignment_config
|
1988
2119
|
get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation
|
@@ -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}/
|
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}/
|
63
|
+
"projects/#{project}/locations/#{location}/biReservation"
|
64
64
|
end
|
65
65
|
|
66
66
|
##
|
@@ -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
|
@@ -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
|
45
|
-
# reservations within the same admin project. If true, a
|
46
|
-
# reservation will execute with the slot
|
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}/
|
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}/
|
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.
|
4
|
+
version: 0.4.0
|
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-
|
11
|
+
date: 2021-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|