blob: afcb7c18b0ce75b3df660134c4f6e0d719d9c66c [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="bigqueryreservation_v1.html">BigQuery Reservation API</a> . <a href="bigqueryreservation_v1.projects.html">projects</a> . <a href="bigqueryreservation_v1.projects.locations.html">locations</a> . <a href="bigqueryreservation_v1.projects.locations.reservations.html">reservations</a> . <a href="bigqueryreservation_v1.projects.locations.reservations.assignments.html">assignments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates an assignment object which allows the given project to submit jobs</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a assignment. No expansion will happen.</p>
83<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070084 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070085<p class="firstline">Lists assignments.</p>
86<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
90 <code><a href="#move">move(name, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Moves an assignment under a new reservation.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
95 <pre>Creates an assignment object which allows the given project to submit jobs
96of a certain type using slots from the specified reservation.
97
98Currently a
99resource (project, folder, organization) can only have one assignment per
100each (job_type, location) combination, and that reservation will be used
101for all jobs of the matching type.
102
103Different assignments can be created on different levels of the
104projects, folders or organization hierarchy. During query execution,
105the assignment is looked up at the project, folder and organization levels
106in that order. The first assignment found is applied to the query.
107
108When creating assignments, it does not matter if other assignments exist at
109higher levels.
110
111Example:
112
113* The organization `organizationA` contains two projects, `project1`
114 and `project2`.
115* Assignments for all three entities (`organizationA`, `project1`, and
116 `project2`) could all be created and mapped to the same or different
117 reservations.
118
119Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
120&#x27;bigquery.admin&#x27; permissions on the project using the reservation
121and the project that owns this reservation.
122
123Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment
124does not match location of the reservation.
125
126Args:
127 parent: string, Required. The parent resource name of the assignment
128E.g. `projects/myproject/locations/US/reservations/team1-prod` (required)
129 body: object, The request body.
130 The object takes the form of:
131
132{ # A Assignment allows a project to submit jobs
133 # of a certain type using slots from the specified reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700134 &quot;assignee&quot;: &quot;A String&quot;, # The resource which will use the reservation. E.g.
135 # `projects/myproject`, `folders/123`, or `organizations/456`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700136 &quot;name&quot;: &quot;A String&quot;, # Output only. Name of the resource. E.g.:
137 # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
138 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the assignment.
139 &quot;jobType&quot;: &quot;A String&quot;, # Which type of jobs will use the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700140}
141
142 x__xgafv: string, V1 error format.
143 Allowed values
144 1 - v1 error format
145 2 - v2 error format
146
147Returns:
148 An object of the form:
149
150 { # A Assignment allows a project to submit jobs
151 # of a certain type using slots from the specified reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &quot;assignee&quot;: &quot;A String&quot;, # The resource which will use the reservation. E.g.
153 # `projects/myproject`, `folders/123`, or `organizations/456`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700154 &quot;name&quot;: &quot;A String&quot;, # Output only. Name of the resource. E.g.:
155 # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
156 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the assignment.
157 &quot;jobType&quot;: &quot;A String&quot;, # Which type of jobs will use the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 }</pre>
159</div>
160
161<div class="method">
162 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
163 <pre>Deletes a assignment. No expansion will happen.
164
165Example:
166
167* Organization `organizationA` contains two projects, `project1` and
168 `project2`.
169* Reservation `res1` exists and was created previously.
170* CreateAssignment was used previously to define the following
171 associations between entities and reservations: `&lt;organizationA, res1&gt;`
172 and `&lt;project1, res1&gt;`
173
174In this example, deletion of the `&lt;organizationA, res1&gt;` assignment won&#x27;t
175affect the other assignment `&lt;project1, res1&gt;`. After said deletion,
176queries from `project1` will still use `res1` while queries from
177`project2` will switch to use on-demand mode.
178
179Args:
180 name: string, Required. Name of the resource, e.g.
181 `projects/myproject/locations/US/reservations/team1-prod/assignments/123` (required)
182 x__xgafv: string, V1 error format.
183 Allowed values
184 1 - v1 error format
185 2 - v2 error format
186
187Returns:
188 An object of the form:
189
190 { # A generic empty message that you can re-use to avoid defining duplicated
191 # empty messages in your APIs. A typical example is to use it as the request
192 # or the response type of an API method. For instance:
193 #
194 # service Foo {
195 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
196 # }
197 #
198 # The JSON representation for `Empty` is empty JSON object `{}`.
199 }</pre>
200</div>
201
202<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700203 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 <pre>Lists assignments.
205
206Only explicitly created assignments will be returned.
207
208Example:
209
210* Organization `organizationA` contains two projects, `project1` and
211 `project2`.
212* Reservation `res1` exists and was created previously.
213* CreateAssignment was used previously to define the following
214 associations between entities and reservations: `&lt;organizationA, res1&gt;`
215 and `&lt;project1, res1&gt;`
216
217In this example, ListAssignments will just return the above two assignments
218for reservation `res1`, and no expansion/merge will happen.
219
220The wildcard &quot;-&quot; can be used for
221reservations in the request. In that case all assignments belongs to the
222specified project and location will be listed.
223
224**Note** &quot;-&quot; cannot be used for projects nor locations.
225
226Args:
227 parent: string, Required. The parent resource name e.g.:
228
229`projects/myproject/locations/US/reservations/team1-prod`
230
231Or:
232
233`projects/myproject/locations/US/reservations/-` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 pageSize: integer, The maximum number of items to return per page.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700235 pageToken: string, The next_page_token value returned from a previous List request, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700236 x__xgafv: string, V1 error format.
237 Allowed values
238 1 - v1 error format
239 2 - v2 error format
240
241Returns:
242 An object of the form:
243
244 { # The response for ReservationService.ListAssignments.
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 &quot;assignments&quot;: [ # List of assignments visible to the user.
246 { # A Assignment allows a project to submit jobs
247 # of a certain type using slots from the specified reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 &quot;assignee&quot;: &quot;A String&quot;, # The resource which will use the reservation. E.g.
249 # `projects/myproject`, `folders/123`, or `organizations/456`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700250 &quot;name&quot;: &quot;A String&quot;, # Output only. Name of the resource. E.g.:
251 # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
252 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the assignment.
253 &quot;jobType&quot;: &quot;A String&quot;, # Which type of jobs will use the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 },
255 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700256 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no
257 # more results in the list.
Bu Sun Kim65020912020-05-20 12:08:20 -0700258 }</pre>
259</div>
260
261<div class="method">
262 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
263 <pre>Retrieves the next page of results.
264
265Args:
266 previous_request: The request for the previous page. (required)
267 previous_response: The response from the request for the previous page. (required)
268
269Returns:
270 A request object that you can call &#x27;execute()&#x27; on to request the next
271 page. Returns None if there are no more items in the collection.
272 </pre>
273</div>
274
275<div class="method">
276 <code class="details" id="move">move(name, body=None, x__xgafv=None)</code>
277 <pre>Moves an assignment under a new reservation.
278
279This differs from removing an existing assignment and recreating a new one
280by providing a transactional change that ensures an assignee always has an
281associated reservation.
282
283Args:
284 name: string, Required. The resource name of the assignment,
285e.g.
286`projects/myproject/locations/US/reservations/team1-prod/assignments/123` (required)
287 body: object, The request body.
288 The object takes the form of:
289
290{ # The request for
291 # ReservationService.MoveAssignment.
292 #
293 # **Note**: &quot;bigquery.reservationAssignments.create&quot; permission is required on
294 # the destination_id.
295 #
296 # **Note**: &quot;bigquery.reservationAssignments.create&quot; and
297 # &quot;bigquery.reservationAssignments.delete&quot; permission are required on the
298 # related assignee.
299 &quot;destinationId&quot;: &quot;A String&quot;, # The new reservation ID, e.g.:
300 # `projects/myotherproject/locations/US/reservations/team2-prod`
301 }
302
303 x__xgafv: string, V1 error format.
304 Allowed values
305 1 - v1 error format
306 2 - v2 error format
307
308Returns:
309 An object of the form:
310
311 { # A Assignment allows a project to submit jobs
312 # of a certain type using slots from the specified reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;assignee&quot;: &quot;A String&quot;, # The resource which will use the reservation. E.g.
314 # `projects/myproject`, `folders/123`, or `organizations/456`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700315 &quot;name&quot;: &quot;A String&quot;, # Output only. Name of the resource. E.g.:
316 # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
317 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the assignment.
318 &quot;jobType&quot;: &quot;A String&quot;, # Which type of jobs will use the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 }</pre>
320</div>
321
322</body></html>