Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 84 | <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 85 | <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 |
| 96 | of a certain type using slots from the specified reservation. |
| 97 | |
| 98 | Currently a |
| 99 | resource (project, folder, organization) can only have one assignment per |
| 100 | each (job_type, location) combination, and that reservation will be used |
| 101 | for all jobs of the matching type. |
| 102 | |
| 103 | Different assignments can be created on different levels of the |
| 104 | projects, folders or organization hierarchy. During query execution, |
| 105 | the assignment is looked up at the project, folder and organization levels |
| 106 | in that order. The first assignment found is applied to the query. |
| 107 | |
| 108 | When creating assignments, it does not matter if other assignments exist at |
| 109 | higher levels. |
| 110 | |
| 111 | Example: |
| 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 | |
| 119 | Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have |
| 120 | 'bigquery.admin' permissions on the project using the reservation |
| 121 | and the project that owns this reservation. |
| 122 | |
| 123 | Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment |
| 124 | does not match location of the reservation. |
| 125 | |
| 126 | Args: |
| 127 | parent: string, Required. The parent resource name of the assignment |
| 128 | E.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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 134 | "assignee": "A String", # The resource which will use the reservation. E.g. |
| 135 | # `projects/myproject`, `folders/123`, or `organizations/456`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 136 | "name": "A String", # Output only. Name of the resource. E.g.: |
| 137 | # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. |
| 138 | "state": "A String", # Output only. State of the assignment. |
| 139 | "jobType": "A String", # Which type of jobs will use the reservation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 140 | } |
| 141 | |
| 142 | x__xgafv: string, V1 error format. |
| 143 | Allowed values |
| 144 | 1 - v1 error format |
| 145 | 2 - v2 error format |
| 146 | |
| 147 | Returns: |
| 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 152 | "assignee": "A String", # The resource which will use the reservation. E.g. |
| 153 | # `projects/myproject`, `folders/123`, or `organizations/456`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 154 | "name": "A String", # Output only. Name of the resource. E.g.: |
| 155 | # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. |
| 156 | "state": "A String", # Output only. State of the assignment. |
| 157 | "jobType": "A String", # Which type of jobs will use the reservation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 158 | }</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 | |
| 165 | Example: |
| 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: `<organizationA, res1>` |
| 172 | and `<project1, res1>` |
| 173 | |
| 174 | In this example, deletion of the `<organizationA, res1>` assignment won't |
| 175 | affect the other assignment `<project1, res1>`. After said deletion, |
| 176 | queries from `project1` will still use `res1` while queries from |
| 177 | `project2` will switch to use on-demand mode. |
| 178 | |
| 179 | Args: |
| 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 | |
| 187 | Returns: |
| 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 Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 203 | <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 204 | <pre>Lists assignments. |
| 205 | |
| 206 | Only explicitly created assignments will be returned. |
| 207 | |
| 208 | Example: |
| 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: `<organizationA, res1>` |
| 215 | and `<project1, res1>` |
| 216 | |
| 217 | In this example, ListAssignments will just return the above two assignments |
| 218 | for reservation `res1`, and no expansion/merge will happen. |
| 219 | |
| 220 | The wildcard "-" can be used for |
| 221 | reservations in the request. In that case all assignments belongs to the |
| 222 | specified project and location will be listed. |
| 223 | |
| 224 | **Note** "-" cannot be used for projects nor locations. |
| 225 | |
| 226 | Args: |
| 227 | parent: string, Required. The parent resource name e.g.: |
| 228 | |
| 229 | `projects/myproject/locations/US/reservations/team1-prod` |
| 230 | |
| 231 | Or: |
| 232 | |
| 233 | `projects/myproject/locations/US/reservations/-` (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 234 | pageSize: integer, The maximum number of items to return per page. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 235 | pageToken: string, The next_page_token value returned from a previous List request, if any. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 236 | x__xgafv: string, V1 error format. |
| 237 | Allowed values |
| 238 | 1 - v1 error format |
| 239 | 2 - v2 error format |
| 240 | |
| 241 | Returns: |
| 242 | An object of the form: |
| 243 | |
| 244 | { # The response for ReservationService.ListAssignments. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 245 | "assignments": [ # 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 248 | "assignee": "A String", # The resource which will use the reservation. E.g. |
| 249 | # `projects/myproject`, `folders/123`, or `organizations/456`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 250 | "name": "A String", # Output only. Name of the resource. E.g.: |
| 251 | # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. |
| 252 | "state": "A String", # Output only. State of the assignment. |
| 253 | "jobType": "A String", # Which type of jobs will use the reservation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 254 | }, |
| 255 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 256 | "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no |
| 257 | # more results in the list. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 258 | }</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 | |
| 265 | Args: |
| 266 | previous_request: The request for the previous page. (required) |
| 267 | previous_response: The response from the request for the previous page. (required) |
| 268 | |
| 269 | Returns: |
| 270 | A request object that you can call 'execute()' 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 | |
| 279 | This differs from removing an existing assignment and recreating a new one |
| 280 | by providing a transactional change that ensures an assignee always has an |
| 281 | associated reservation. |
| 282 | |
| 283 | Args: |
| 284 | name: string, Required. The resource name of the assignment, |
| 285 | e.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**: "bigquery.reservationAssignments.create" permission is required on |
| 294 | # the destination_id. |
| 295 | # |
| 296 | # **Note**: "bigquery.reservationAssignments.create" and |
| 297 | # "bigquery.reservationAssignments.delete" permission are required on the |
| 298 | # related assignee. |
| 299 | "destinationId": "A String", # 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 | |
| 308 | Returns: |
| 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 313 | "assignee": "A String", # The resource which will use the reservation. E.g. |
| 314 | # `projects/myproject`, `folders/123`, or `organizations/456`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 315 | "name": "A String", # Output only. Name of the resource. E.g.: |
| 316 | # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. |
| 317 | "state": "A String", # Output only. State of the assignment. |
| 318 | "jobType": "A String", # Which type of jobs will use the reservation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 319 | }</pre> |
| 320 | </div> |
| 321 | |
| 322 | </body></html> |